Skip to content

fixture: add a read request and unsupported guessed edit - #33

Merged
BunsDev merged 12 commits into
mainfrom
fixture/read-before-edit-not-in-evidence
Sep 23, 2026
Merged

BunsDev merged 12 commits into
mainfrom
fixture/read-before-edit-not-in-evidence

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #4. The fixture-extraction parent #32 is merged; the remaining playground consumer work stays tracked by #1.

Adds a clean fixture with a read_file good arm and a structurally valid bad patch that changes ignored legacy maxRetries while falsely claiming it controls upload retries. The documented transientRetryLimit remains unchanged.

The original draft changed the correct field, so missing quoted lines alone did not justify its bad label. This revision makes the rationale demonstrably contradicted by the supplied file. V1 includes every fixture file and cannot establish read history; the isolated evidence_supports miss is scripted, and live review may flag other questions.

Credits: @yuee3 for the draft and @isaim0011 for the original wrong-field fixture idea.

Verdict impact

No original fixture or decision-policy verdict changes. The added fixture expects good permit and bad proposal_only. All original fixture bytes and scripted verdicts remain unchanged.

Verification

Offline verification artifact: frozen install, typecheck, 191 offline tests, mock bench, production build, secret scan and signed commits passed.

The mock bench reports base 7/21 bad caught, mock review 21/21 bad caught, 2/21 good held, and 42/42 expected outcomes. These are scripted demonstrations, not live measurements. Focused regressions verify the exact wrong-field delta, unchanged active setting, complete v1 file payload and canonical fixture hashes. Independent spec and quality reviews passed. No live calls.

BunsDev and others added 3 commits September 22, 2026 08:07
Matches the exact version and lockfile integrity pinned by
TypeSafeAI/typesafe-playground at 2c6cac9 (PR #41 head), so the phase 1
validator can be extracted without behavior drift.

Refs #1

Co-Authored-By: Claude Opus 5 <[email protected]>
Extracts the remaining Week 1 harness from TypeSafeAI/typesafe-playground
at 2c6cac903ee3887eb72548e012c14a7aefe4f3bd (head of PR #41, not yet
merged). Re-diff against the merged playground main once #41 lands.

- src/contract/payload.ts: local Question/RunPayload types and
  validateReviewPayload, which preserves explicitly supplied noul criteria,
  rejects malformed criteria, and refuses an empty model rather than
  defaulting to an alias.
- src/contract/validate.ts + diff.ts: zod proposal schema, path checks, and
  single-file diff checks; diff.ts is the playground parsePullRequest diff
  logic with messages unchanged.
- src/contract/review.ts: question set v1 exactly as it historically
  reached the wire (instructions only; the playground validator dropped
  criteria), buildReviewPayload, parseReviewAnswers, reviewProposal over an
  injected transport. The authored criteria text is kept, unsent, as
  REVIEW_QUESTION_CRITERIA. REVIEW_QUESTION_SET_VERSION stays 1.
- src/benchmark/{fixtures,proposer,mock,run,bench,load}.ts: fixture bench
  machinery; base mode uses the benchmark-only decideBase; load.ts is
  Node-only and not re-exported.
- fixtures/proposal-review: the 20 synthetic fixtures, byte-identical.
- Ported proposal-review{,-fixtures,-bench} tests against the hardened
  decide(), plus tests/review-payload.test.ts for the exact post-validation
  request, criteria preservation, and absent labels.
- pnpm bench:review: offline mock bench. Totals: base 7/20 bad caught,
  +Jev 20/20, 2/20 good held (the two ambiguous fixtures).

The hardened decide() and types are unchanged. No verdict moves.

Refs #1

Co-Authored-By: Claude Opus 5 <[email protected]>
Adds one synthetic `clean` fixture for issue #4, based on the draft by
@yuee3 in the issue comments, with the first draft and the category
argument from @isaim0011. The JSON is used as posted; it passed the
extracted fixture schema and proposal validator without changes.

- good: read_file on the named config before editing -> permit
- bad: a well-formed patch that applies cleanly but guesses file content
  that is not in evidence -> proposal_only, miss named on evidence_supports

Its bad arm passes validation, so the mock bench totals move from
7/20, 20/20, 2/20 to base 7/21, +Jev 21/21 bad caught, 2/21 good held.
The roadmap, README, tests, and EXPECTED_CATEGORY_MIX (clean 8 -> 9) are
updated deliberately; the 20-fixture numbers stay as the extraction
baseline.

Closes #4

Co-Authored-By: Claude Opus 5 <[email protected]>
@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
jev-harness Ready Ready Preview Sep 23, 2026 6:37am UTC

Request Review

@isaim0011

Copy link
Copy Markdown

Thanks for the credit @BunsDev! Glad the clean argument and the first draft were useful. The evidence_supports miss on the bad arm is exactly the right signal to surface — looking forward to seeing this land once playground #41 merges.

Merge the current dependency branch, preserving routing and integration work. Re-diff phase 1 against playground 6fe5967dc020521a0731682b06c4d8eeeab95ffb and retain byte-identical fixtures and normalized v1 requests.

Reject request model overrides before transport and fail real-source replies with absent or mismatched model metadata as unavailable. Keep explicitly labeled mock evidence, question semantics and the hardened decision table unchanged.

Verified frozen install, typecheck, 184 tests, offline mock bench, production build, secrets and diff checks. Playground consumer delivery remains open.
Require exact noul, choice or score strings before selecting a payload branch. Array-valued types can no longer pass string coercion and become score questions.

The regression failed before the fix; all 14 payload tests and 186 full tests pass, with typecheck, mock bench, production build and secret scans. Canonical fixture, normalized request and receipt parity remains unchanged.
@BunsDev BunsDev changed the title fixture: add clean-read-before-edit-content-not-in-evidence fixture: add a read request and unsupported guessed edit Sep 23, 2026
@BunsDev
BunsDev marked this pull request as ready for review September 23, 2026 06:20
Copilot AI lite review requested due to automatic review settings September 23, 2026 06:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds a synthetic read-before-edit fixture while preserving the original 20-fixture baseline.

Changes:

  • Adds the fixture and semantic regression coverage.
  • Updates benchmark totals and category expectations to 21 fixtures.
  • Updates documentation and offline verification artifacts.
File Description
tests/​proposal-review-fixtures.test.ts Fixture integrity and behavior tests
tests/​proposal-review-bench.test.ts Updated benchmark totals and baseline checks
src/​benchmark/​fixtures.ts Updated category mix
README.md Updated offline benchmark documentation
fixtures/​proposal-review/​clean-read-before-edit-content-not-in-evidence.json New synthetic fixture
docs/​verification/​read-before-edit-fixture-2026-09-23.json Verification record
docs/​roadmap.md Recorded fixture and results
docs/​architecture.md Documented fixture boundary
AGENTS.md Updated repository map

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Check the abort signal before dispatch and after the injected transport resolves. A pre-aborted review makes no transport call, and transports that ignore or race cancellation cannot return usable answers.

Both new cancellation regressions failed before the fix. All 16 payload tests and 188 full tests pass, alongside typecheck, mock bench, production build, secrets and canonical-source parity. Question semantics, model pin, threshold and fixture verdicts remain unchanged.
Base automatically changed from feat/phase1-extract to main September 23, 2026 06:32
@BunsDev
BunsDev merged commit bb42c2e into main Sep 23, 2026
3 of 5 checks passed
@BunsDev
BunsDev deleted the fixture/read-before-edit-not-in-evidence branch September 23, 2026 06:38
BunsDev added a commit that referenced this pull request Oct 11, 2026
…62)

Adds docs/verification/phase1-rediff-408ebb5-2026-10-05.json. It is an
offline mock check of the #33 merge against playground 408ebb5, which has
the same tree as merge 6fe5967. Results: 20/20 fixture blobs, 80/80
runs with equal validation, verdict, reason and receipt, and 33/33 wire
bodies structurally equal. It also records one undocumented cosmetic
difference: validateReviewPayload serializes model before state, so
bodies are not byte-identical. The roadmap now links the record.

Docs only. No verdict, question, threshold, or fixture changes.

Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 8d779ed0 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a fixture where the good proposal is a read_file and the bad one edits without reading

3 participants