Skip to content

feat: complete pre-edit context evaluation gate - #256

Merged
Helweg merged 1 commit into
mainfrom
feat/pre-edit-eval-gate
Aug 6, 2026
Merged

feat: complete pre-edit context evaluation gate#256
Helweg merged 1 commit into
mainfrom
feat/pre-edit-eval-gate

Conversation

@Helweg

@Helweg Helweg commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Completes the documented acceptance gate for codebase_edit_context from docs/pre-edit-context-design.md. The tool has shipped across OpenCode, MCP, and Pi, but the evaluation gate was unfinished: no budget file, no graph-neighbor recall threshold, no CI wiring, and no documented baseline.

Changes

  • Budget gate: adds the minGraphNeighborRecall threshold to EvalBudget, parseBudget, and evaluateBudgetGate. It is only enforced when the metric is present, so datasets without graph-neighbor expectations are unaffected.
  • Budget file: benchmarks/budgets/pre-edit.json with thresholds derived from the measured deterministic mock-embedding baseline.
  • CI wiring: eval:pre-edit:ci npm script runs in .github/workflows/ci.yml after the eval smoke check, using the existing mock-embeddings server.
  • Tests: three new unit tests for the graph-neighbor recall gate (fail below minimum, pass at minimum, skip when metric absent).
  • Docs: baseline metrics documented in docs/pre-edit-context-design.md; changelog updated.

Measured baseline (mock embeddings)

Metric Baseline
Hit@5 1.0000
MRR@10 1.0000
Graph-neighbor recall 1.0000
p95 latency 687 ms
Response tokens avg / p95 / max 358.5 / 399.5 / 404

Validation

  • npm run typecheck: pass
  • npm run lint: pass
  • Budget/schema/metrics/edit-context tests: 48 passed (3 new budget-gate tests)
  • Full gate run end-to-end against mock embeddings: Gate: passed=true violations=[]

Close the documented acceptance gate for codebase_edit_context:

- Add minGraphNeighborRecall budget threshold and wire it into the eval
  budget gate, schema parsing, and unit tests.
- Add benchmarks/budgets/pre-edit.json with thresholds from the measured
  deterministic mock-embedding baseline (Hit@5 1.0, MRR@10 1.0,
  graph-neighbor recall 1.0, p95 687ms, avg response tokens 358.5).
- Add eval:pre-edit:ci script and run it in CI after the eval smoke check.
- Document the baseline metrics in docs/pre-edit-context-design.md.
@Helweg Helweg added the feature New feature or capability label Aug 6, 2026
@Helweg
Helweg merged commit 662c827 into main Aug 6, 2026
12 checks passed
@Helweg
Helweg deleted the feat/pre-edit-eval-gate branch August 6, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant