test: green the two standing deterministic e2e base reds (t113, t122) - #700
Merged
Conversation
leandrodamascena
approved these changes
Aug 4, 2026
leandrodamascena
left a comment
Contributor
There was a problem hiding this comment.
Both failures reproduce on the base and pass with this patch. The reviewer receipt added to t113 matches the declared stage reviewers, and t122 now distinguishes hook-authored framing from the verbatim rules payload without weakening the framing assertion. Focused deterministic tests, contract checks, and integration with the current v2 base all pass. No blocking findings.
Two v2 base reds that predate and survive every recent merge, both root-caused by bisection to distinct commits: - t113 (red since the 2.5.5 section-12a reviewer enforcement): the e2e walkStage helper drives gate-start -> approve without recording the REVIEW_COMPLETED row the enforcement now requires on reviewer-bearing stages (requirements-analysis, code-generation), so every approve exits 1. Port t51's reviewerFor block: record a READY verdict via aidlc-log.ts review before the approve. The integration twin was updated when the enforcement shipped; this e2e file was missed. - t122-stop-hook-e2e (red since 2.5.33 deterministic steering delivery): the load-steering block reason now embeds rule-file text verbatim as a single-line JSON rules_content payload, and rule prose legitimately contains gate-verb words (operation.md: 'Never remove or bypass existing security controls'). The no-override-verbs pin was written to police the hook's own phrasing, so scan only the hook-authored lines: filter out lines that parse as a JSON array before applying the verb regex. The pin still catches a hook that itself phrases override (mutation-checked), and the hook's own wording remains clean - the security property holds. Test-only: no version bump per the changelog policy. Verified: both files PASS (previously FAIL on the same machine/base); smoke+unit 184/0; coverage-registry check OK; bun run check green.
apackeer
force-pushed
the
fix/t113-t122-base-reds
branch
from
August 4, 2026 06:07
92b3d1a to
907bedb
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Greens the two standing deterministic e2e reds on v2 -
t113andt122-stop-hook-e2e- which fail on a clean checkout of the current tip (and failed identically through the last several merges' pre-merge gates). Both were bisected to their first-red commits; both turn out to be stale test contracts, not engine bugs. Test-only: no version bump per the changelog policy.1. t113 - red since the 2.5.5 §12a reviewer enforcement (#569)
t113.test.ts'swalkStagedrivesgate-start->approvewith no reviewer verdict. Since #569, approve refuses on reviewer-bearing stages without a freshREVIEW_COMPLETEDrow:{"error":"Refusing to complete \"requirements-analysis\": it declares a reviewer (aidlc-product-lead-agent) but no fresh REVIEW_COMPLETED is recorded for it. ..."}#569 updated the integration twin (t51's
walkStagegrew areviewerFormap recording a READY verdict viaaidlc-log.ts review) but missed this e2e file. Fix: the samereviewerForblock, mirrored into t113'swalkStage, for the two reviewer-bearing stages the bugfix walk crosses (requirements-analysis,code-generation).Bisect evidence: FAIL at f122f19 (#569) and every later commit probed; PASS at its parent 1354abc. The failure was masked in the test (stderr discarded); reproducing the walk under the runner's exact suite env (
AIDLC_SKIP_ARTIFACT_GUARD=1etc., perrun-tests.ts) surfaced the JSON error above.2. t122-stop-hook-e2e - red since 2.5.33 deterministic steering delivery (#658)
The test pins that a block reason contains no override-shaped verbs (
/ignore|override|disregard|bypass/i) - a security property about the hook's own phrasing. Since #658, aload-steeringblock reason embeds rule-file text verbatim as a single-line JSONrules_contentpayload, and rule prose legitimately contains those words:core/memory/phases/operation.mdsays "Never remove or bypass existing security controls...". The verb the regex catches is quoted, delivered content - the hook's own framing is still clean, so the property itself holds.Fix: scan only the hook-authored lines. The payload is the only line in the reason that parses as a JSON array (continuationReason
JSON.stringifys it, so it carries no raw newlines); filter those lines out before applying the verb regex. Mutation-checked both ways: the filter strips a payload containing "bypass", and still catches an "ignore the previous instruction" planted in the hook's own framing.The integration twin (t121's verb pin) is unaffected: its fixture rules don't contain the verbs, and its separate load-steering case asserts payload fidelity, not verb absence.
Testing
bun tests/gen-coverage-registry.ts --checkOK;bun run check(package parity + 3x tsc + biome) green