Problem
The pre-pr-gate-hook blocks gh pr create unless a fresh .quality-gate-pass marker (within ~60 min, in the Bash-tool CWD) exists — a second artifact separate from the judge verdict the sprint flow already produces (.quality-review-result.json, decision=pass). Three frictions observed:
- Per-item rewrite required. The sprint TEST flow writes
.quality-review-result.json but not the marker; the pipeliner must (re)write .quality-gate-pass for the current item before every gh pr create.
- Env bypass unreachable.
AAM_PR_GATE_BYPASS=1 exported in the Bash-tool shell does not reach the hook — the hook runs as a harness-spawned process that doesn't inherit the tool shell's env.
- Stale markers falsely unlock. A leftover marker from a prior item (or prior sprint) is present on disk; it must be explicitly removed/overwritten so it can't gate the wrong item.
Evidence (dungeon-game Sprint 13)
Every one of the 5 PRs (#179–#183) required the pipeliner to detect a stale marker (e.g. an S13-001 marker still on disk when creating the S13-004 PR), delete it, and write a fresh per-item marker before gh pr create would pass. The env-var bypass was tried and confirmed non-functional.
Impact
Each PR carries avoidable pipeliner steps + a failure-then-retry on the first gh pr create. Easy to get wrong (wrong-item marker → false pass).
Recommended fix (any one)
- Hook reads the judge verdict directly — have
pre-pr-gate-hook consult .quality-review-result.json (item + decision) instead of requiring a separate freshness marker.
- Orchestrator stamps the marker during TEST — fold a per-item
.quality-gate-pass write (with stale-marker removal) into the documented TEST→REVIEW handoff so the pipeliner never has to.
- Make the env bypass actually reach the hook, and document it.
Related: #200, #180 (docs-only PR gate handling).
Problem
The
pre-pr-gate-hookblocksgh pr createunless a fresh.quality-gate-passmarker (within ~60 min, in the Bash-tool CWD) exists — a second artifact separate from the judge verdict the sprint flow already produces (.quality-review-result.json,decision=pass). Three frictions observed:.quality-review-result.jsonbut not the marker; the pipeliner must (re)write.quality-gate-passfor the current item before everygh pr create.AAM_PR_GATE_BYPASS=1exported in the Bash-tool shell does not reach the hook — the hook runs as a harness-spawned process that doesn't inherit the tool shell's env.Evidence (dungeon-game Sprint 13)
Every one of the 5 PRs (#179–#183) required the pipeliner to detect a stale marker (e.g. an S13-001 marker still on disk when creating the S13-004 PR), delete it, and write a fresh per-item marker before
gh pr createwould pass. The env-var bypass was tried and confirmed non-functional.Impact
Each PR carries avoidable pipeliner steps + a failure-then-retry on the first
gh pr create. Easy to get wrong (wrong-item marker → false pass).Recommended fix (any one)
pre-pr-gate-hookconsult.quality-review-result.json(item+decision) instead of requiring a separate freshness marker..quality-gate-passwrite (with stale-marker removal) into the documented TEST→REVIEW handoff so the pipeliner never has to.Related: #200, #180 (docs-only PR gate handling).