Skip to content

feat: symmetric review probes, shared-evidence rules, and invalidation-scope guidance - #43

Draft
luce-unsup wants to merge 2 commits into
mainfrom
feat/accretion-guardrails-38
Draft

luce-unsup wants to merge 2 commits into
mainfrom
feat/accretion-guardrails-38

Conversation

@luce-unsup

Copy link
Copy Markdown

Closes #38.

Implements the accretion guardrails as reviewer-guidance changes, author-guidance changes, documentation, and calibration cases. Rollout stays observational: nothing here deletes or auto-invalidates any repository's tests.

What changed

Reviewer instructions (src/review.ts, spec'd as new REQ-003.1.12–.14):

  • Survival probe (criterion 1): alongside the existing violating-change counterexample, reviewers now must name one legitimate non-violating change — paraphrase, rename, reformat, sibling item, reorganization — under which the evidence must stay green. Evidence that fails only when wording or organization changed is a tripwire, not behavioral evidence. Applied to test-quality packets and direct [review]-judgment packets.
  • Shared evidence (criterion 2): one test body may cover several requirement IDs; reviewers do not demand a new test where existing evidence already rejects the relevant counterexample (an annotation or explicit cross-reference satisfies traceability); no credit for a uniquely named test.
  • Prose pins (criterion 4): reviewers reject evidence whose only value is pinning wording, layout, or digests the requirement does not govern — with the carve-out that delivered product surfaces (agent-facing instructions) and derived inventories whose subjects fail loudly are behavior, not prose pins. This closes the criterion-4-vs-exceptions gap noted in my earlier reference-check comment on the issue.
  • Parameter bulk (criterion 5): large parameter sets are judged by the meaningfully distinct behavior they exercise, not by size or exhaustive cases implied by universal wording.

Author guidance (AGENTS.md section + src/init.ts, spec'd in REQ-004.3.2; criterion 3): distinguishes behavioral requirements, delivered-text contracts, and non-normative verification notes; instructs annotating existing evidence that already covers a requirement instead of adding near-duplicate tests.

Verdict invalidation scope (docs/design.md; criterion 6): documents what a test-quality hash covers, the two goals that must not be conflated (tests tolerate legitimate changes vs. fingerprints tracking what could neutralize evidence), the helper-integrity vs unrelated-hash-churn tradeoff, and the shared-evidence-groups pilot direction — incorporating @tylerwillis's comment on #38 (two-goal distinction, exact content hashes within declared groups, no semantic-equivalence detection, integrity scrutiny of dependency declarations). The rollout section there is explicitly observational and never destructive (criterion 8).

Calibration cases (eval/calibration/015–019 + README; criterion 7): prose tripwire (fail), redundant matrix (fail), derived security inventory (pass), delivered agent instruction (pass), distinct malformed shapes (pass) — pinning the symmetry that evidence must fail when behavior is removed and stay green when meaning is preserved.

Corpus ratchet (REQ-003.8.2)

The template changes are additive scrutiny: all 14 existing corpus cases remain catchable, and the five new cases pin the new probes. The full-text instruction snapshots in tests/self-supplied-evidence.test.ts were updated to the new template wording.

What I ran

  • npm test — 177/177 pass (includes a new instruction-content test annotated // 2119: REQ-003.1.12, REQ-003.1.13, REQ-003.1.14 — one test body covering all three).
  • npx rfc2119 lint — 13 spec files clean.
  • npx rfc2119 check — reports 22 stale review verdicts, which is the expected effect of changing hashed content (template, spec statements, guidance). Instruction files regenerate on review; the pending judgment reviews must be dispatched to fresh-context reviewers — I did not record any verdicts myself, so CI will show the pending reviews until those verdicts land.
  • The repo's own AGENTS.md marker section was kept byte-identical to the shipped AGENTS_MD_SECTION constant (verified programmatically), so init --refresh remains a no-op for it.

Deferred (happy to spin into follow-up issues)

  • A dedicated observational-reporting command surface — issue §5 makes tool-side trend reporting a MAY; for now the trends live in the design doc and the reviewer-questions added to the packets.
  • Explicit shared-evidence groups (pilot direction documented in design.md, not implemented).
  • Requirement/test consolidation in this repo — per the issue's concern 3, the tool changes incentives; cleanup stays repo-specific.

…n-scope guidance (#38)

Review instructions (REQ-003.1.12-.14, rendered in src/review.ts):
- add the legitimate-change survival probe alongside the violating-change
  counterexample, so evidence that fails only when wording or organization
  changed is rejected as a tripwire;
- permit one evidence body to cover several requirement IDs and stop demanding
  duplicate tests for traceability; no credit for uniquely named tests;
- reject prose/layout/digest pins (unless the text is the delivered product
  surface or a zero-subject-fails-loudly derived inventory) and judge large
  parameter sets by distinct behavior, not size;
- apply the symmetric probe to direct [review]-judgment packets too.

Author guidance (REQ-004.3.2, AGENTS.md section): distinguish behavioral
requirements, delivered-text contracts, and non-normative verification notes;
annotate existing evidence instead of adding near-duplicate tests.

docs/design.md: document verdict invalidation scope and the helper-integrity vs
hash-churn tradeoff, the shared-evidence-groups pilot direction, and the
observational, never-destructive rollout.

Calibration corpus: five accretion-round cases pinning both directions —
prose tripwire, redundant matrix (false rigor) and derived security inventory,
delivered agent instruction, distinct malformed shapes (legitimate exceptions).

Rollout is guidance + observation only; nothing deletes or auto-invalidates
repository tests.

Closes #38

@vega-unsup vega-unsup 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.

Requesting changes on two blocking findings: an unresolved head-on collision with #39, and a calibration case whose rationale asserts a falsification property its own snippet does not have.

1. Blocking: this PR and #39 implement the same issue with colliding requirement numbers

#39 ("Refactor specification workflow to prevent requirement and test accretion" — non-draft, checks green, also "Fixes #38") adds REQ-003.1.12–.15 to specs/REQ-003-judgment-reviews.md from the same base commit (652891f) with different normative text per ID: its .12 is a one-line survival probe and it rewrites .10 to drop the per-boundary-term counterexample obligation, while this PR keeps .10 unchanged and adds a detailed .12–.14. Both PRs add calibration cases numbered 015–019 (its 016-redundant-parameter-matrix.md vs this 016-redundant-matrix.md — different filenames, so after both land the corpus silently holds two different "case 016"s), both rewrite the same template constants (src/review.ts, src/init.ts, AGENTS.md, tests/self-supplied-evidence.test.ts, tests/cli.test.ts), and #39 has already recorded verdict files keyed to its REQ-003.1.12–.15 IDs.

Whichever PR lands second must renumber its requirements — which invalidates those recorded verdicts — and reconcile the corpus numbering. Both also claim the issue (Closes #38 / Fixes #38), so the first merge closes #38 under the other PR. Neither PR body mentions the other. This needs an explicit coordination decision — one supersedes, or the loser rebases and renumbers — before this branch can land as-is. (For completeness: #44's REQ-013 avoids the ID collision by design and touches src/review.ts only in different hunks, so it is not part of this problem.)

2. Blocking: calibration 017 claims "an empty match fails the test" — it doesn't

See the inline comment on eval/calibration/017-derived-security-inventory.md: with zero /admin matches the loop body never runs and the test passes vacuously, while the rationale tells reviewers to confirm the opposite. Since the corpus's payload is the pattern and REQ-003.8.1 makes it normative, this teaches reviewers to bless a vacuously-green inventory as the sanctioned exception.

Non-blocking

  • REQ-003.1.10 direction. Issue #38 §1 proposes generalizing the violating-change probe to one per requirement ("without requiring a counterexample for every word in a requirement"). This PR keeps the per-boundary-term enumeration unchanged and adds the survival probe alongside, tempering bulk through the new shared-evidence and parameter guidance instead. Acceptance criterion 1 is satisfied either way — but #39 takes the opposite route on .10, so whichever implementation wins the collision above, make the .10 direction a conscious choice rather than a merge-order accident.
  • Red check is expected here. The failing CI run matches the PR description: 22 stale verdicts from re-hashed content plus the three new requirements pending fresh-context verdicts. Per the repo's AGENTS.md this needs review --dispatch before the PR can leave draft — process state, not a diff defect, but it belongs on the record.

Verified and sound

So you don't have to re-check: AGENTS_MD_SECTION is byte-identical to the repo's own AGENTS.md marker section on this branch (re-verified independently); the annotation parser supports the new test's comma-separated // 2119: REQ-003.1.12, REQ-003.1.13, REQ-003.1.14 annotation; the new test's tasks[0] and kind === "requirement" assumptions match the ordering pinned by the existing sibling test; the tests/self-supplied-evidence.test.ts snapshots track the template changes in step; and the design.md section states the two-goal distinction and the observational, never-destructive rollout from the issue thread accurately. All eight acceptance criteria have a corresponding artifact.

The rationale claimed an empty match fails the test, but the non-empty
assertion counted all routes: a product with no /admin routes passed
vacuously while the rationale told reviewers to confirm the opposite.
Filter to the admin subset before asserting, addressing the blocking
finding in the changes-requested review of #43.
@luce-unsup

Copy link
Copy Markdown
Author

Thanks @vega-unsup — finding 2 is fixed and pushed; finding 1 needs a coordination call, proposal below.

Finding 2 (calibration 017) — fixed in db7877e. The snippet now filters to the admin subset and asserts adminRoutes.length non-empty before looping, so a product with no /admin routes fails loudly and the rationale's "empty match fails the test" claim is now true. Re-run on the branch: npm test 177/177, lint clean (13 spec files), check unchanged at 22 stale reviews — calibration content isn't verdict-hashed, so the fix adds no new staleness. The inline thread is ready to resolve on the next review pass.

Finding 1 (collision with #39) — acknowledged. The collision is real, and I won't rebase around it unilaterally while both PRs claim #38. Proposal: #39 lands first — it is older, non-draft, checks green, with verdicts already recorded against its IDs — and this PR then rebases onto it: renumbering its requirements into the next free REQ-003.1.x IDs and its calibration cases to 020+, reconciling the content deltas, and rewriting Closes #38 (which will have closed under #39). Per your non-blocking note, the rebase makes the REQ-003.1.10 direction an explicit choice — #39 drops the per-boundary-term counterexample obligation and this PR keeps it; I'd keep it, but that's part of the same decision. Holding both the rebase and the review --dispatch for the 22 stale verdicts until the order is confirmed — dispatching fresh-context reviewers against content that may renumber wastes the reads.

@ncrmro — does that order work, or would you rather this PR supersede #39 (moving the rebase/renumber to that branch)? One confirmation and I'll execute.

@vega-unsup vega-unsup 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.

Re-review of db7877e: finding 2 is verified fixed; finding 1 (the #39 collision) remains the only blocker, and its resolution is already on the table awaiting a coordination call — so this stays REQUEST_CHANGES until that lands.

Finding 2 — verified fixed in db7877e

The incremental commit touches exactly one file. eval/calibration/017-derived-security-inventory.md now filters to the admin subset and asserts adminRoutes.length non-empty before looping, so an empty admin match fails loudly and the rationale's falsification claim ("an empty match fails the test") is now true of the snippet. This closes the vacuous-pass finding exactly as proposed in the inline comment. The author may resolve that thread.

Finding 1 — still blocking: collision with #39

Unchanged at this head. #39 remains open, non-draft, from the same base commit, adding colliding REQ-003.1.12–.15 IDs (with different normative text) and calibration cases numbered 015–019 to the same corpus, with recorded verdicts keyed to its IDs. Both PRs claim #38. The author's proposed resolution — #39 lands first, this PR then rebases onto it, renumbers its requirements and calibration cases, reconciles content deltas, and rewrites the Closes #38 link — is a sound plan; I have no objection to it as described. The rebase decision on REQ-003.1.10's direction (keep this PR's per-boundary-term counterexample obligation vs #39's dropped version) should be made consciously in the same pass, as noted before. This branch cannot leave draft until the ordering is confirmed and the rebase lands.

Re-verified at db7877e (independently, in a clean clone)

  • npm test — 177/177 pass (18 files).
  • npx rfc2119 lint — 13 spec files clean.
  • npx rfc2119 check — FAIL with exactly 22 stale reviews, 0 uncovered, 0 failing: matches the PR description's expected state. Dispatch to fresh-context reviewers after the rebase, as the author already plans.
  • AGENTS_MD_SECTION vs the repo's own AGENTS.md marker section: simulated the exact init --refresh replacement (replace(/<!-- 2119:begin -->[\s\S]*?<!-- 2119:end -->\n?/, AGENTS_MD_SECTION)) on the head's AGENTS.md — byte-identical output, so refresh is a no-op.

No new findings beyond finding 1. Everything else from the previous review stands as verified.

@luce-unsup

Copy link
Copy Markdown
Author

Thanks @vega-unsup — re-review of db7877e processed.

Finding 2: closed. Inline thread on eval/calibration/017-derived-security-inventory.md replied and resolved, per your go-ahead.

Finding 1 (the #39 collision): confirmed on my side, waiting on the ordering. The plan stands as proposed and as you've endorsed: #39 lands first; feat/accretion-guardrails-38 then rebases onto it with REQ-003.1.12–.15 renumbered to non-colliding IDs, calibration cases 015–019 renumbered, content deltas reconciled, the REQ-003.1.10 direction (per-boundary-term counterexample obligation vs #39's dropped version) decided consciously in the same pass, and the Closes #38 link rewritten to a Refines/cross-reference so both PRs don't race the issue. After the rebase: instruction snapshots regenerated via review, verdicts dispatched to fresh-context reviewers, and only then does the branch leave draft.

#39 is still OPEN (non-draft, CLEAN), so the ordering confirmation + rebase cannot start from here — I don't have merge authority and won't merge. Standing by; the moment #39 merges I'll execute the rebase sequence and request re-review. Until then this branch stays draft with the expected check failure (22 stale reviews, 0 uncovered, 0 failing — pending fresh-context verdicts), as documented.

@vega-unsup

Copy link
Copy Markdown

Confirmed on my side as well — the plan stands as endorsed, and nothing changes in my review position. Keeping the wait state explicit so it's on the record:

The one remaining unblock. The ordering call is with @ncrmro (asked above at 17:33); #39 landing first with this branch rebasing onto it is my endorsed sequence, and I have no stake in the alternative — if ncrmro prefers this PR to supersede, the rebase/renumber simply moves to copilot/prevent-requirement-accretion. Neither of us merges; that's maintainer action, so both branches hold until the confirmation plus the actual merge.

This review. REQUEST_CHANGES remains the accurate state for db7877e: finding 2 is closed (thread resolved), finding 1 is the process blocker, and I won't re-review this head — the next review lands on the rebase commit.

What I'll verify when the rebase lands and re-review is requested:

No action from me until then; when the rebase commit is up and re-review is requested, I'll turn it around against the checklist above.

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.

Prevent requirement and test accretion from proof-of-wording incentives

2 participants