review: port the seeded-trial cases to the live corpus#235
Conversation
… the live corpus Three live-enabled corpus cases porting the Khan/webapp#40678 seeded-defect trial as sanitized structural rewrites: fresh Go code around a generic notes-retention feature reproducing the trial's defect mechanisms, with no webapp code, paths, or identifiers. - trial-retention-deletion (incident-repro): flag-gated compliance deletion, query-default limit of 1, reimplemented deletion helper, env-interface widening flagged in both files, swallowed prune error. - trial-retention-prune-tests (incident-repro): off-by-one retention cap, vacuous cap test that passes for a no-op prune, suite-wide flag-ON mock hiding the flag-off path, full-entity fetch where a keys-only query suffices. - trial-batch-delete-wrapper (clean): the trial's deliberate non-defect as a must-not-flag trap; the datastore wrapper (unchanged, in tree) chunks DeleteMulti into 500-key batches, so the recorded 500-entity-cap block is refuted and the case approves. Every recorded finding anchors on an added line of the case diff (provenance gate verified); the full vitest suite and typecheck are green.
🦋 Changeset detectedLatest commit: 895af01 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
… into jwbron/live-eval-trial-cases
… live corpus cases Three sanitized structural rewrites from the v1.4.0 re-run, in the same generic notes-retention domain as the existing trial cases: - trial-dedup-composite-key: the save path dedups on Note.Body alone while the entity carries a Kind readers select on; a same-Body note of a different kind is silently never saved. v1.3.1 caught this; v1.4.0 missed it at the finder level. - trial-dedup-eventual-consistency: the dedup read is documented eventually consistent, so a duplicate submitted moments after the original reads a stale set and is stored again. The re-run's skill auditor investigated the mechanism and declined it as unquotable, and no correctness lens surfaced it; the case pins that a skill-adjacent correctness issue must surface regardless of which lens owns it. - trial-erasure-suite-flag-mock: the erasure test suite pins the rollout flag on in its shared test-env constructor, so the flag-off path (where the unchanged EraseUser silently skips the compliance deletion) is never exercised. Anchors and spec windows were mechanically asserted against added diff lines at generation time, as with the existing trial cases.
|
Rider: pushed the three v1.4.0 re-run misses as live cases (54bff8a), same sanitized notes domain and case mechanics as the originals.
Anchors and spec windows were mechanically asserted against added diff lines at generation time. |
…orpus' into tmp-refresh
… into jwbron/live-eval-trial-cases
…s on the prune trial case Same acceptance-run lesson as the main corpus: a live case whose recorded finding belongs to a specialist lens needs a routerConfig lens rule or the live roster never spawns that lens. Only the full-entity-fetch finding qualifies here; the other trial findings belong to whole-change reviewers that always run.
…wbron/live-eval-trial-cases' into jwbron/live-eval-trial-cases
… into jwbron/live-eval-trial-cases
…record the judge-direction lesson All three follow-ups shipped: agent-failure reasons and the per-row stability footer on #236, lens routing for live cases on #233/#235. Records the acceptance pair's most instructive number: judge quality rose on the deliberately regressed arm (fewer, surer comments score better), so recall against labeled specs is the load-bearing metric.
…orpus Sanitized rewrite of the webapp#40736 test: a 'redundant' Limit removal routes the digest read into a pre-existing default-limit-1 mechanism (the amplifying hunk must confirm and block, with the regression attributed to the removal), while the same diff cosmetically touches the mechanism's doc lines (non-amplified pre-existing: must not draw a blocking finding; the expected posted-comment count enforces it). Locks the amplification confirm rule, the provenance gate, and the introduce-vs-amplify prose labeling in regression.
|
Added trial-amplified-default-limit: the amplification/provenance behavior case from webapp#40736, sanitized into the notes domain (amplifying Limit removal must block with the regression attributed to the removal; the cosmetically-touched pre-existing default-limit mechanism must not; postedCommentCount enforces both). Closes the corpus gap flagged on #250. |
…misses into the smoke set trial-dedup-composite-key and trial-erasure-suite-flag-mock are the sanitized ports of defects the current production prompt demonstrably missed, which makes them exactly what the per-PR smoke A/B should watch: a candidate that recovers either shows up as a gained spec, a candidate that loses ground cannot hide it behind the label-gated full run. Cost is about one dollar per A/B run for the pair (two cases, two arms). The other trial cases stay out of smoke deliberately to hold the per-push price down; the full-eval label still covers them.
Ports the seeded-defect trial from Khan/webapp#40678 into the review-workflow eval corpus as three live-enabled cases, stacked on #233 (the live-enabled corpus format).
Sanitization constraint
Khan/actions is public and Khan/webapp is private, so these are sanitized structural rewrites, not copies: fresh Go code around a generic "notes retention" feature (per-user stored notes, a background prune, deletion on account erasure) that reproduces the trial's defect mechanisms with generic naming. No webapp code, file paths, or identifiers appear anywhere in the cases.
The three cases
trial-retention-deletion(incident-repro, tags incident/trial/live)The trial's deletion-path seeds, five recorded findings across
erasure.go,store.go, and a new test file:erasure-flag-gated-deletion(blocking): the account-erasure deletion is gated behind a rollout flag, so flag-off silently skips the compliance deletion (trial seed 1).erasure-default-limit-one(blocking): the deletion query leavesLimitunset and the store's documented zero-value default is 1, so at most one note is ever deleted (seed 2).erasure-ignores-delete-helper(advisory): the new loop reimplements, worse, a paging batch-delete helper that already exists in the same file (seed 3).erasure-env-widening+store-env-widening(advisory, one per file): the request-env interface is widened in two files solely for the buggy flag gate (seed 4).erasure-prune-error-swallowed(blocking):_ = PruneUserNotes(...)discards the returned error; the prose cites the error-handling skill (seed 8).Expected: REQUEST_CHANGES, all six ids must-catch, 6 posted comments.
trial-retention-prune-tests(incident-repro, tags incident/trial/live)The prune-and-tests seeds in a new
prune.go+prune_test.go(both added files):prune-off-by-one-cap(advisory, the trial's calibrated severity):notes[maxRetainedNotes-1:]retains 199 where the documented cap is 200 (seed 5).prune-test-vacuous-cap(blocking): the cap test seeds 5 notes, far below the cap, so the early return makes it pass even for a no-op prune (seed 6).prune-suite-flag-mock(blocking):TestMainforces the rollout flag on for the whole suite, so the flag-off path is never exercised (seed 7).prune-full-entity-fetch(advisory): the prune fetches up to 5000 full entities but reads only ids;Query.KeysOnlyexists for exactly this (seed 9).Expected: REQUEST_CHANGES, all four ids must-catch, 4 posted comments.
trial-batch-delete-wrapper(clean, tags clean/trial/live)The trial's deliberate non-defect (seed 10) as a must-not-flag trap: the changed
purge.gocollects every note key and issues oneDeleteMulticall that looks like it exceeds the datastore's 500-entity per-call cap. The tree also carries the unchanged wrapper source (internal/datastore/client.go) whoseDeleteMultivisibly chunks into 500-key batches, so a live reviewer can discover the truth by reading it. The case records the wrong blocking claim, neutralizes it with arefutedvalidation entry, and pinsexpectedto APPROVE with zero posted comments;live.mustNotFlagSpecsdescribes the trap so a live run that claims the cap is scored as a false block.Case mechanics
/dev/nullwith a new-file mode line), the post-change tree next tocase.json,live.prContext, and per-defectmustCatchSpecs/mustNotFlagSpecswith line windows of about +/-5 around the defect and 2-4 mechanism alternates.smoke, keeping the per-PR smoke gate fast; both incident-repro cases feed must-catch recall insuite.test.tsautomatically.reviewpatch changeset.Test plan:
pnpm run test --run: all 21 files / 662 tests green, including the corpus loader's live-block and tree validation over the new cases andcheckExpectationon each case's expected block.pnpm run typecheck: clean (no TypeScript touched).Next steps (human)
expectedblocks and specs move together.Update 2026-07-09: two misses promoted to smoke
trial-dedup-composite-keyandtrial-erasure-suite-flag-mock(the v1.4.0 re-run misses) now carry thesmoketag, so every per-PR A/B watches the two defects the current production prompt demonstrably missed (~$1/run for the pair). The other trial cases deliberately stay behind thefull-evallabel.