feat(board-unblock): auto-repair dropped .console/task.md sections on goal PRs - #385
Merged
Merged
Conversation
… goal PRs Closes the self-heal gap that stalled goal/c99f3159 and the entire goal lane: the board worker rewrites .console/task.md during a task and can drop a required section heading (e.g. '## Objective'); the Custodian .console structure detector then fails the PR's audit; the reviewer has no auto-fix path for audit findings, so it escalates to a human and leaves the PR OPEN — and OPEN_PR_GATE then blocks every new goal task until that PR clears. One dropped heading wedged the whole lane for hours. Fix: - GitHubPRClient.get_file_content + update_file (GitHub Contents API) — read/commit a single file on a branch without a clone. - console_repair.repair_console_structure — for each open goal/improve PR, restore any missing required task.md section heading (Objective / Overall Plan / Current Stage), mirroring the detector's exact rule. Idempotent (valid task.md untouched). - Wired into BoardUnblockTask.run_once across all configured repos (repos without .console skip); best-effort and only when applying, so a flaky repo/repair never breaks the unblock loop. 45 board_unblock + console-repair unit tests pass (detect/repair/idempotency, goal vs non-goal branches, missing-console skip, the run_once wiring). ruff/ty/audit clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Closes the self-heal gap that let a single audit finding stall the entire goal lane (the #374 incident).
The failure chain: the board worker rewrites
.console/task.mdduring a task and can drop a required heading (e.g.## Objective) → the Custodian.consolestructure detector fails the PR'saudit→ the reviewer has no auto-fix path for audit findings, so it escalates to a human and leaves the PR open →OPEN_PR_GATEthen blocks every new goal task until that PR clears. One dropped heading wedged the whole lane for hours.Fix
GitHubPRClient.get_file_content+update_file(GitHub Contents API) — read and commit a single file on a branch, no clone needed.console_repair.repair_console_structure— for each opengoal/|improve/PR, restore any missing requiredtask.mdsection heading (Objective/Overall Plan/Current Stage), mirroring the detector's exact rule. Idempotent — a structurally-validtask.mdis left untouched.BoardUnblockTask.run_onceacross all configured repos (repos without.consolesimply skip). Best-effort and only when applying, so a flaky repo/repair can never break the unblock loop.Tests
45 board_unblock + console-repair unit tests pass: detect/repair/idempotency, goal-vs-non-goal branches, missing-
.consoleskip, and therun_oncewiring. ruff / ty / Custodian clean.🤖 Generated with Claude Code