Skip to content

feat(board-unblock): auto-repair dropped .console/task.md sections on goal PRs - #385

Merged
ProtocolWarden merged 2 commits into
mainfrom
feat/board-unblock-console-repair
Jun 22, 2026
Merged

feat(board-unblock): auto-repair dropped .console/task.md sections on goal PRs#385
ProtocolWarden merged 2 commits into
mainfrom
feat/board-unblock-console-repair

Conversation

@ProtocolWarden

Copy link
Copy Markdown
Owner

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.md during a task and can drop a required heading (e.g. ## Objective) → the Custodian .console structure detector 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 openOPEN_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 and commit a single file on a branch, no clone needed.
  • 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 — a structurally-valid task.md is left untouched.
  • Wired into BoardUnblockTask.run_once across all configured repos (repos without .console simply 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-.console skip, and the run_once wiring. ruff / ty / Custodian clean.

Pairs with #384 (the detector-id collision fix): #384 makes the finding legible, this makes it auto-recoverable. Together, a dropped .console heading can no longer wedge the goal lane.

🤖 Generated with Claude Code

ProtocolWarden and others added 2 commits June 22, 2026 17:34
… 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>
@ProtocolWarden
ProtocolWarden merged commit d3c4335 into main Jun 22, 2026
23 checks passed
@ProtocolWarden
ProtocolWarden deleted the feat/board-unblock-console-repair branch June 22, 2026 22:30
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