Skip to content

fix(dispatch,gate): release settled attempt records, read a bold Lane header - #660

Merged
tieubao merged 4 commits into
masterfrom
feat/attempt-release-lane-header
Sep 16, 2026
Merged

tieubao merged 4 commits into
masterfrom
feat/attempt-release-lane-header

Conversation

@tieubao

@tieubao tieubao commented Sep 16, 2026

Copy link
Copy Markdown
Member

Two follow-ups from the same session, one PR. Spec: docs/specs/SPEC-293-attempt-release-lane-header.md (Lane: full). Proof: docs/verification/attempt-release-lane-header.md. Impl notes: docs/implementation-notes/attempt-release-lane-header.md. Board: ID-885.

1. dispatch Step 6 never released an attempt record

SPEC-290 wired most attempt-state.sh verbs into commands/dispatch.md and left out release, so kit-attempts/ grew for the life of the checkout. Step 6 now releases a settled task first in the per-goal GC sequence, and says plainly that release deletes the record whole (attempt history included), so the durable trail is the merged branch and the run ledger.

2. the ship-gate could not read a bold Lane header

A worker wrote **Lane**: full and the push was BLOCKED with "Spec has no 'Lane:' header". The three parsers now share one expression:

grep -m1 -iE '^(\*\*)?Lane(\*\*)?:'
sed -E 's/^(\*\*)?[Ll]ane(\*\*)?:(\*\*)?[[:space:]]*//; s/[[:space:]].*$//'

hooks/ship-gate.sh, commands/ship.md, commands/mega.md. A leading - list marker is refused on purpose: specs use - **Lane:** ... in prose, and accepting it would parse a sentence as the lane. commands/spec.md now emits the plain canonical Lane: line, which its template omitted entirely.

hooks/codex-hooks.json re-pins the ship-gate content hash.

Verification

bash tests/run-all.sh -> all 151 suites passed, 0 skipped.

tests/test-ship-gate-fail-closed.sh covers the three accepted header shapes and keeps the missing-header BLOCKED case. tests/test-meta.sh pins the attempt-state.sh release call in commands/dispatch.md. tests/test-attempt-state.sh case 21 already covered the release verb.

Negative control (lib/gate/negctl.sh): reverting the grep to ^Lane: takes the suite RED (exit 1), restore returns it green. Verdict PASS.

… header

Two follow-ups from the same session.

commands/dispatch.md Step 6 never called attempt-state.sh release, so every
dispatched task left a record in kit-attempts/ for the life of the checkout.
Step 6 now releases a settled task first in the per-goal GC sequence and says
that release keeps nothing.

hooks/ship-gate.sh parsed the spec lane with '^Lane:' only, so a spec written
as '**Lane**: full' was BLOCKED for having no lane header. The three parsers
(ship-gate.sh, commands/ship.md, commands/mega.md) now accept the two bold
forms through one grep and one sed. A leading list marker stays refused:
specs use '- **Lane:** ...' in prose, and accepting it would parse a sentence
as the lane. commands/spec.md now emits the plain canonical line, which its
template omitted entirely.

hooks/codex-hooks.json re-pins the ship-gate.sh content hash.
@tieubao
tieubao merged commit 8c0bebf into master Sep 16, 2026
1 check passed
@tieubao
tieubao deleted the feat/attempt-release-lane-header branch September 23, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant