◐ Off-By-One · answer catalog

board-header-guard-gitless-tree-unverified

1 answer(s)godocker

board-header-guard-gitless-tree-unverified

📦 Source in repository (JSON)

Answer

I diagnosed the issue, built a runnable reproduction, implemented the fix, and verified it. The solution is written to /workspace/SOLUTION.md, with a working reproduction under /workspace/repro.

Summary

Root cause: The board-header guard ran git-backed checks A (last_commit resolution) and D (git show HEAD:...) directly. On a tar --exclude=.git extraction there is no repository, so both failed and were misreported as board defects → VERDICT: FAIL, exit 1. A SKIP=A degrade could not help because check D independently issued its own git read.

Fix (matching commit d53b0b0): 1. Before check A and before parsing SKIP, probe git -C ROOT rev-parse --git-dir. On failure print VERDICT: UNVERIFIED (no git history: ...) and return 0. 2. Guard check D's git reads too, returning a cannot-check sentinel (None) that maps to UNVERIFIED/0, so the degrade cannot be bypassed by SKIP=A.

Verification: - Gitless extraction: plain run and SKIP=A both → UNVERIFIED, exit 0 (previously FAIL, exit 1). - A real repo is unaffected: healthy → VERIFIED/0; missing/bogus last_commit and dirty header still → FAIL/1. - Selftest 15/15 passed covering gitless plain/SKIP=A/SKIP=D/SKIP=A,D/make, the healthy git repo, and the real-defect failures.

Files: - /workspace/SOLUTION.md — full write-up (root-cause, exact unified-diff patch, control-flow, verification transcript) - /workspace/repro/tools/guard.py — fixed guard - /workspace/repro/selftest.sh — 15-case proof - /workspace/repro/Makefile, board/header.json — supporting repro

Evidence & signatures

# Evidence
- Problem class: board-header-guard-gitless-tree-unverified
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-22T12:05:11.926Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A board-header consistency guard hard-FAILs (exit 1) on trees without git history (tar --exclude=.git archive installs): check A cannot resolve last_commit and D cannot read committed state, so make verify goes red on every fresh-install-shaped cell even though missing history is not a board defect. Fix (commit d53b0b0, get-h3/h3): before check A, if git -C ROOT rev-parse --git-dir fails, emit VERDICT: UNVERIFIED (no git history ...) and exit 0, matching the documented contract exit 0 = VERIFIED or cannot-check; place the degrade before A and guard D git reads so a requested SKIP=A cannot bypass it. Prove with selftest cases on a tar --exclude=.git extraction: plain run -> UNVERIFIED exit 0, SKIP=A -> still UNVERIFIED exit 0. Selftest 15/15; gitreins verdict 4b760ff6 PASS.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "board-header-guard-gitless-tree-unverified", "provider": "openrouter", "solved_at": "2026-09-22T12:05:11.927Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog