Repository navigation
feat: symmetric review probes, shared-evidence rules, and invalidation-scope guidance #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
luce-unsup
wants to merge
2
commits into
main
Choose a base branch
from
feat/accretion-guardrails-38
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| expected_verdict: fail | ||
| prompt: test-quality | ||
| source: accretion study (2119#38), 2026-10 (synthetic) | ||
| failure_mode: false rigor — exact-prose pin standing in for behavioral evidence | ||
| --- | ||
|
|
||
| ## Requirement | ||
|
|
||
| > The CLI MUST print a top-level `--help` flag listing its subcommands. | ||
|
|
||
| ## Evidence | ||
|
|
||
| ```ts | ||
| // 2119: REQ-007.1.1 | ||
| it("help output matches the README word for word", () => { | ||
| const help = runCli(["--help"]); | ||
| const readme = readFileSync("README.md", "utf8"); | ||
| for (const line of readme.split("\n").filter((l) => l.startsWith("`2119 "))) { | ||
| expect(help).toContain(line.replace(/`/g, "")); | ||
| } | ||
| }); | ||
| ``` | ||
|
|
||
| ## Why the correct verdict is FAIL | ||
|
|
||
| The assertion pins documentation wording, not behavior. Rephrase the README — a legitimate, | ||
| non-violating change — and the test breaks even though the CLI still lists every subcommand; | ||
| that is exactly the survival probe the reviewer runs alongside the counterexample probe. The | ||
| behavioral evidence is an assertion against the CLI's observable output (each subcommand | ||
| present with a description), not against prose or a digest of files the requirement does not | ||
| govern. Evidence whose only value is pinning wording, layout, or hashes must be rejected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| expected_verdict: fail | ||
| prompt: test-quality | ||
| source: accretion study (2119#38), 2026-10 (synthetic) | ||
| failure_mode: false rigor — Cartesian matrix over dimensions that do not interact | ||
| --- | ||
|
|
||
| ## Requirement | ||
|
|
||
| > Uploaded files larger than the configured limit MUST be rejected with a 413 response. | ||
|
|
||
| ## Evidence | ||
|
|
||
| ```ts | ||
| // 2119: REQ-004.2.1 | ||
| it.each( | ||
| [1, 4, 16, 64].flatMap((mb) => | ||
| ["csv", "json", "png", "pdf", "zip"].map((ext) => [`${mb}mb.${ext}`, mb, ext]), | ||
| ), | ||
| )("rejects oversized %s", (_name, mb, ext) => { | ||
| const res = upload(bigFile(mb, ext), LIMIT_MB); | ||
| expect(res.statusCode).toBe(413); | ||
| }); | ||
| ``` | ||
|
|
||
| A previous test already covers the rejection with two cases straddling the limit. | ||
|
|
||
| ## Why the correct verdict is FAIL | ||
|
|
||
| Twenty parameter cases re-spell one branch: nothing in production makes the file extension | ||
| interact with the size limit, so the matrix adds no discriminating evidence over the existing | ||
| boundary test — it is bulk added for traceability. Parameter sets are judged by the meaningfully | ||
| distinct behavior they exercise, not by size, and universal wording never obligates exhaustive | ||
| cases. The requirement's real negative space (a file exactly at the limit; a changed limit | ||
| honored without restart) is never probed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| expected_verdict: pass | ||
| prompt: test-quality | ||
| source: accretion study (2119#38), 2026-10 (synthetic) | ||
| failure_mode: legitimate exception — derived security inventory whose subjects fail loudly | ||
| --- | ||
|
|
||
| ## Requirement | ||
|
|
||
| > Every admin route MUST reject unauthenticated requests with 401 before touching handlers. | ||
|
|
||
| ## Evidence | ||
|
|
||
| ```ts | ||
| // 2119: REQ-009.1.1 | ||
| it("rejects unauthenticated access to every admin route", async () => { | ||
| const app = await buildRealApp(); // the production server factory, not a mock | ||
| const routes = await enumerateRoutes(app); // derived from the running product | ||
| const adminRoutes = routes.filter((r) => r.startsWith("/admin")); | ||
| expect(adminRoutes.length).toBeGreaterThan(0); // an empty admin match fails the test | ||
| for (const route of adminRoutes) { | ||
| const res = await app.inject({ method: "GET", url: route }); | ||
| expect(res.statusCode).toBe(401); | ||
| } | ||
| }); | ||
| ``` | ||
|
|
||
| ## Why the correct verdict is PASS | ||
|
|
||
| This resembles an inventory pin, but it is behavioral: the route list is derived from the | ||
| running product (not a frozen literal), zero subjects fail loudly (any future admin route | ||
| without an auth guard fails this test), and each assertion observes a real status code. A | ||
| derived inventory whose enumerated subjects fail loudly is legitimate security evidence. The | ||
| reviewer confirms the inventory comes from the real product and that an empty match fails the | ||
| test — not that the enumeration be smaller or the loop replaced with a hand-written list. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| expected_verdict: pass | ||
| prompt: test-quality | ||
| source: accretion study (2119#38), 2026-10 (synthetic) | ||
| failure_mode: legitimate exception — delivered agent-facing text is behavior | ||
| --- | ||
|
|
||
| ## Requirement | ||
|
|
||
| > The review dispatch surface MUST instruct each reviewer agent not to edit files and to record | ||
| > its verdict with the pass/fail command named in its instruction file. | ||
|
|
||
| ## Evidence | ||
|
|
||
| ```ts | ||
| // 2119: REQ-003.6.2 | ||
| it("dispatch prompt carries the verdict-recording and no-edit instructions", () => { | ||
| const prompt = renderDispatchPrompt([fakeTask()]); | ||
| expect(prompt).toMatch(/record its own verdict/); | ||
| expect(prompt).toContain("pass/fail command"); | ||
| expect(prompt).toMatch(/do not edit files/i); | ||
| }); | ||
| ``` | ||
|
|
||
| ## Why the correct verdict is PASS | ||
|
|
||
| Agent-facing text is behavior when it is delivered through the product's real surface, and this | ||
| requirement is about delivered text — asserting its load-bearing content is asserting the | ||
| contract. The evidence survives legitimate editing (rewording the prompt keeps it green) because | ||
| it pins the outcome that must survive: the no-edit instruction and the recording command — not a | ||
| whole paragraph, heading order, or unrelated prose. A byte-for-byte snapshot of the entire | ||
| rendered prompt would deserve FAIL as a prose tripwire instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| expected_verdict: pass | ||
| prompt: test-quality | ||
| source: accretion study (2119#38), 2026-10 (synthetic) | ||
| failure_mode: legitimate exception — negative-space table over genuinely distinct shapes | ||
| --- | ||
|
|
||
| ## Requirement | ||
|
|
||
| > The parser MUST reject malformed transcripts with a diagnostic naming the offending line. | ||
|
|
||
| ## Evidence | ||
|
|
||
| ```ts | ||
| // 2119: REQ-002.3.1 | ||
| it.each([ | ||
| ["truncated header", "TRANSCT\n"], | ||
| ["missing separator", "HEADER body\nBODY without break"], | ||
| ["bad ordinal", "#5 Event without preceding #4"], | ||
| ["unclosed quote", 'SAY "never finished'], | ||
| ["negative span", "SPAN -1..3"], | ||
| ])("rejects %s and names the line", (_shape, text) => { | ||
| expect(() => parseTranscript(text)).toThrow(/line \d+/); | ||
| }); | ||
| ``` | ||
|
|
||
| ## Why the correct verdict is PASS | ||
|
|
||
| Unlike the redundant-matrix case, these parameter values exercise meaningfully different | ||
| behavior: each shape reaches a different rejection path in the parser (header validation, | ||
| structure, ordering, tokenization, bounds), so this is negative-space enumeration over a defined | ||
| input language, not bulk. Universal wording ("malformed") cannot imply these cases, which is | ||
| precisely why an explicit table of distinct malformed shapes is justified. The reviewer confirms | ||
| each row reaches a distinct path rather than collapsing the table with the Cartesian anti-pattern. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.