The forged producer is the fixture that falsifies my gate. A verdict there is a plain file: review.sh reads the full HEAD hash at the start, saves the verdict under .ai/reviews/ named by the first 12 characters, and writes the full hash on a Head: line. merge-check.sh refuses a missing file or a Head: line that names another commit, which covers your stale candidate row. Nothing covers your different signer row, because anything with write access to the repo can write under .ai/. review.sh also voids a review if HEAD moved while it ran, so when does your fixture read the candidate SHA, before the review starts or at signing?
Founder & CEO of Netsujo. Building trustworthy AI agent systems, with a focus on task boundaries, verification, and production reliability. Creator of Agent Role Contracts (ARC).
Thanks, Iliya. In the fixture, the candidate SHA should be pinned before review starts—not first discovered at signing.
A trusted dispatcher captures full commit A and binds the run to it. The reviewer evaluates an isolated checkout of A, verifies the source identity (including any uncommitted changes) at the start and again before signing, and signs a receipt bound to A, the run, policy, and verdict. Signing never silently rebinds the review to a newer HEAD.
The merge gate independently resolves the current candidate (and, where relevant, base/merge result) and compares it with the authenticated receipt.
If the reviewed checkout changes during the run, no PASS is issued. If the branch advances from A to B but A remains an intact reviewed snapshot, the A receipt can remain evidence for A; it must not authorize B.
Your start/end HEAD checks cover an important race. The separate issue is producer authority: a matching Head: line in a writable .ai/reviews/ file is not an authenticated reviewer verdict.
Our local lab tests the negative case with a different signing key and a pinned reviewer public key, but because both keys are created in one toy process, it does not prove real-world key custody.
The smallest additional test for your gate would keep HEAD=A, forge a PASS file with the correct full Head: A, and require merge-check.sh to reject it specifically for unauthenticated provenance. A separate race fixture would change the candidate during review and ensure no receipt is accepted for the changed candidate.
That gives us two independently falsifiable properties: exact subject binding and reviewer-only issuance. Thanks for specifying where your gate already succeeds and where it does not.
I haven't run your forged PASS test, so what follows is the script's logic, with no run behind it. merge-check.sh asks for three things: a test pass record for the full HEAD hash, a verdict file for HEAD whose Head: line matches, and an ACCEPT whose reviewer is a different engine from the builder. A hand-written file with Head: A, one Verdict: ACCEPT line and another engine's name as reviewer meets every check on the verdict, so I expect it to pass, because the reviewer is only a name in a file. Your second test is covered: if HEAD moves or a file outside .ai/ changes during the review, review.sh voids it and saves no verdict. Builder and reviewer both run on my machine, so where would you keep the reviewer's key so the builder can't sign with it?
Founder & CEO of Netsujo. Building trustworthy AI agent systems, with a focus on task boundaries, verification, and production reliability. Creator of Agent Role Contracts (ARC).
Thanks, Iliya. I checked merge-check.sh, and your reading is correct: the verdict fields are checked, but reviewer provenance isn't authenticated.
Your HEAD and working-tree checks already handle review-time drift.
On a shared machine with the same OS identity, I wouldn't claim the reviewer's private key is isolated from the builder.
For cryptographically independent approval, I'd use a separately controlled reviewer runtime or signing service, with the private key inaccessible to the builder. The merge gate would verify a signed receipt bound to the pre-pinned candidate SHA, policy, run identity, and verdict.
Without that trust boundary, the local gate remains a useful workflow guard, not independent authorization.
A forged ACCEPT fixture would be a useful next test.
Ran it. Throwaway repo, a real test pass for HEAD, then a verdict file written by hand: the full hash on the Head: line, Builder: claude, Reviewer: codex and one Verdict: ACCEPT line. No review ran, and merge-check.sh answered OK and named Codex as the reviewer. The same file with claude on both lines was refused, so that check compares two names and says nothing about who typed them. The script's header calls it a local guard against merging the wrong commit, not a security boundary, which is your reading. With a separate signing service, how does it know a review happened before it signs whatever the builder sends?
Founder & CEO of Netsujo. Building trustworthy AI agent systems, with a focus on task boundaries, verification, and production reliability. Creator of Agent Role Contracts (ARC).
Thanks, Iliya. That's a useful reproduction, and your question exposes the next trust boundary.
A signing service cannot know a review happened merely because the builder submits ACCEPT. If it signs that claim, we've only converted a forged verdict file into a signed forged verdict.
I'd separate the process into three parts:
Trusted dispatch: A controller pins the repository, full candidate SHA, base revision, policy, and unique run ID. It launches the reviewer in an isolated environment with credentials the builder cannot access.
Authenticated execution evidence: The reviewer runner records the actual review invocation, completion status, output digest, and verdict through a channel the builder cannot write to. The controller checks that the expected review job completed against the pinned candidate.
Conditional signing: The signing service accepts only that authenticated run evidence, not a builder-supplied verdict. It verifies the reviewer assignment, candidate, policy, and run identity before issuing a receipt. The merge gate independently checks the current candidate and its remaining obligations.
There's an important limit: even authenticated execution evidence cannot prove the quality of a review. It can establish that a controlled reviewer process ran and produced the recorded result under defined conditions.
And if the builder can control the reviewer environment, evidence channel, or signing credentials, we cannot claim independent authorization.
Our published Failure Lab #2 demonstrates subject and signing-key binding, not review-execution attestation. Your experiment identifies exactly what that fixture doesn't yet cover.
The next negative test I'd propose is simple: the builder submits a perfectly formed ACCEPT for the correct SHA, but no authenticated reviewer run exists. The signing service must refuse it.
That would give us a concrete, falsifiable test for reviewer provenance rather than another claimed identity field.
We're a place where coders share, stay up-to-date and grow their careers.
The forged producer is the fixture that falsifies my gate. A verdict there is a plain file: review.sh reads the full HEAD hash at the start, saves the verdict under .ai/reviews/ named by the first 12 characters, and writes the full hash on a Head: line. merge-check.sh refuses a missing file or a Head: line that names another commit, which covers your stale candidate row. Nothing covers your different signer row, because anything with write access to the repo can write under .ai/. review.sh also voids a review if HEAD moved while it ran, so when does your fixture read the candidate SHA, before the review starts or at signing?
Thanks, Iliya. In the fixture, the candidate SHA should be pinned before review starts—not first discovered at signing.
A trusted dispatcher captures full commit A and binds the run to it. The reviewer evaluates an isolated checkout of A, verifies the source identity (including any uncommitted changes) at the start and again before signing, and signs a receipt bound to A, the run, policy, and verdict. Signing never silently rebinds the review to a newer HEAD.
The merge gate independently resolves the current candidate (and, where relevant, base/merge result) and compares it with the authenticated receipt.
If the reviewed checkout changes during the run, no PASS is issued. If the branch advances from A to B but A remains an intact reviewed snapshot, the A receipt can remain evidence for A; it must not authorize B.
Your start/end HEAD checks cover an important race. The separate issue is producer authority: a matching
Head:line in a writable.ai/reviews/file is not an authenticated reviewer verdict.Our local lab tests the negative case with a different signing key and a pinned reviewer public key, but because both keys are created in one toy process, it does not prove real-world key custody.
The smallest additional test for your gate would keep HEAD=A, forge a PASS file with the correct full
Head: A, and requiremerge-check.shto reject it specifically for unauthenticated provenance. A separate race fixture would change the candidate during review and ensure no receipt is accepted for the changed candidate.That gives us two independently falsifiable properties: exact subject binding and reviewer-only issuance. Thanks for specifying where your gate already succeeds and where it does not.
I haven't run your forged PASS test, so what follows is the script's logic, with no run behind it.
merge-check.shasks for three things: a test pass record for the full HEAD hash, a verdict file for HEAD whoseHead:line matches, and an ACCEPT whose reviewer is a different engine from the builder. A hand-written file withHead: A, oneVerdict: ACCEPTline and another engine's name as reviewer meets every check on the verdict, so I expect it to pass, because the reviewer is only a name in a file. Your second test is covered: if HEAD moves or a file outside.ai/changes during the review,review.shvoids it and saves no verdict. Builder and reviewer both run on my machine, so where would you keep the reviewer's key so the builder can't sign with it?Thanks, Iliya. I checked
merge-check.sh, and your reading is correct: the verdict fields are checked, but reviewer provenance isn't authenticated.Your HEAD and working-tree checks already handle review-time drift.
On a shared machine with the same OS identity, I wouldn't claim the reviewer's private key is isolated from the builder.
For cryptographically independent approval, I'd use a separately controlled reviewer runtime or signing service, with the private key inaccessible to the builder. The merge gate would verify a signed receipt bound to the pre-pinned candidate SHA, policy, run identity, and verdict.
Without that trust boundary, the local gate remains a useful workflow guard, not independent authorization.
A forged ACCEPT fixture would be a useful next test.
Ran it. Throwaway repo, a real test pass for HEAD, then a verdict file written by hand: the full hash on the
Head:line,Builder: claude,Reviewer: codexand oneVerdict: ACCEPTline. No review ran, andmerge-check.shanswered OK and named Codex as the reviewer. The same file withclaudeon both lines was refused, so that check compares two names and says nothing about who typed them. The script's header calls it a local guard against merging the wrong commit, not a security boundary, which is your reading. With a separate signing service, how does it know a review happened before it signs whatever the builder sends?Thanks, Iliya. That's a useful reproduction, and your question exposes the next trust boundary.
A signing service cannot know a review happened merely because the builder submits
ACCEPT. If it signs that claim, we've only converted a forged verdict file into a signed forged verdict.I'd separate the process into three parts:
Trusted dispatch: A controller pins the repository, full candidate SHA, base revision, policy, and unique run ID. It launches the reviewer in an isolated environment with credentials the builder cannot access.
Authenticated execution evidence: The reviewer runner records the actual review invocation, completion status, output digest, and verdict through a channel the builder cannot write to. The controller checks that the expected review job completed against the pinned candidate.
Conditional signing: The signing service accepts only that authenticated run evidence, not a builder-supplied verdict. It verifies the reviewer assignment, candidate, policy, and run identity before issuing a receipt. The merge gate independently checks the current candidate and its remaining obligations.
There's an important limit: even authenticated execution evidence cannot prove the quality of a review. It can establish that a controlled reviewer process ran and produced the recorded result under defined conditions.
And if the builder can control the reviewer environment, evidence channel, or signing credentials, we cannot claim independent authorization.
Our published Failure Lab #2 demonstrates subject and signing-key binding, not review-execution attestation. Your experiment identifies exactly what that fixture doesn't yet cover.
The next negative test I'd propose is simple: the builder submits a perfectly formed
ACCEPTfor the correct SHA, but no authenticated reviewer run exists. The signing service must refuse it.That would give us a concrete, falsifiable test for reviewer provenance rather than another claimed identity field.