Skip to content

Plan questions block only new dispatches - #253

Merged
dinoderek merged 8 commits into
mainfrom
task/engine-233
Nov 20, 2026
Merged

dinoderek merged 8 commits into
mainfrom
task/engine-233

Conversation

@dinoderek

Copy link
Copy Markdown
Owner

Objective

A question on a plan blocks only new dispatches in that plan. Finished tasks still move to in-review, request and get merges, and recovery dispatch runs; only the asking task is held, through its own question. Engine task t233 (plan p226, O5).

Gates

Lane Result Evidence
./dev test (every required lane) PASS head 4f444b5: format, vet, lint, unit, coverage, file-length, imports, versions, docs-check, harness-names all PASS (.test-ai-results/summary.md)
  • New or changed tests:
    • internal/control/plan_question_test.go: under an open plan question a running task reaches in-review and queues, a new task's reserve is refused, a vanished task is dispatched again, the asker is refused and a sibling's merge is accepted.
    • internal/control/plan_status_test.go: plan status stays blocked; plan reads carry a derived, never-stored question, refused on create.
    • internal/control/question_test.go, external_test.go, sessions_test.go: the asker is held, a sibling is not; a task's own question still blocks; a plan's does not hold external completion or a task's session row.
    • internal/controlrun/placement_test.go, inbox_test.go, recovery_test.go: quota resume, wakes and vanish recovery follow the task's own question; a held new task is not placed.
    • internal/reconcile/decide_test.go: with one free slot a held new task does not starve a recovery.
    • internal/ui/sessions_test.go, internal/cli/ui_acceptance_test.go, ui_browser_test.go: the dashboard shows the plan's question only on tasks waiting to start.
  • Not run, with reason: none. This host's umask is 0077, so the file-mode tests need umask 022; gates ran with it.

Rulings

Ruling (risk: low): OwnQuestion and PlanQuestion are the two function names.
Ruling (risk: low): an "earlier attempt" is any attempt record for the task (control.NewStartHold), one predicate shared by reserve and the coordinator's placement.
Ruling (risk: low): plan reads gain a read-only question field, because once tasks stop inheriting the plan's question no session row reports an operator-asked one when no planner runs; the dashboard reads it.
Ruling (risk: low): server.md now says an executor whose root cause is already an open plan question asks on its own task, since that question no longer holds it. Plugin version 0.18.2.

Review

  • Fresh reviewer: claude-opus-5-5, five rounds. CHANGES_REQUESTED three times, all fixed: the dashboard lost an operator-asked plan question with no planner running; the session feedback doc misstated the API; held new tasks could take placement slots and starve a recovery. The last two rounds are APPROVED, the final one on this head.
  • Declined findings (all optional):
    • CheckDispatch rechecks only the task's own question, as the card decided; the race window is tiny.
    • release()'s plan-wide loop is now mostly defensive; left as is.
    • No controlrun test that a sibling's queued merge is called under a plan question; eligibility is covered by the control and reconcile tests.
    • The dashboard marks a todo task with an earlier attempt as held although recovery would dispatch it; rare.
  • Review hard: internal/control/state.go (NewStartHold and reserve); internal/control/messages.go (OwnQuestion, asker via the update's task); internal/reconcile/tasks.go (ready).

Deviations

None. No budget, baseline, threshold or //nolint change.

Harness and model: Claude Code, claude-sonnet-5-5.

🤖 Generated with Claude Code

dinoderek and others added 8 commits November 20, 2026 10:20
Split PendingQuestion into OwnQuestion (a task's own questions, including
one it asked on its plan) and PlanQuestion. Only reserve of a task with no
earlier attempt consults the plan's questions; every other check uses the
task's own. The plan's derived blocked status is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVBhwDTpgumzeYY1X5H
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A plan question asked by the operator, with no planner session running,
was reported by no session row once tasks stopped inheriting it. Plan
reads now carry the question, and the dashboard's task table uses it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVBhwDTpgumzeYY1X5H
Without this, a held new task could take the one free slot each pass and be
refused by the server, starving a recovery ranked below it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVBhwDTpgumzeYY1X5H
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVBhwDTpgumzeYY1X5H
@dinoderek
dinoderek merged commit 6c51486 into main Nov 20, 2026
1 check passed
@dinoderek
dinoderek deleted the task/engine-233 branch November 20, 2026 10:37
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