Repository navigation
feat(workers): dispatch one continuous task (M4-R7-01) - #340
Conversation
Test-First: src-tauri/src/workers.rs::dispatch_once_launches_one_admitted_task_with_one_durable_intent Co-Authored-By: OpenAI Codex (GPT-5) <47299143+Cuarroc@users.noreply.github.com>
Test-First: src-tauri/src/workers.rs::dispatch_once_launches_one_admitted_task_with_one_durable_intent Co-Authored-By: OpenAI Codex (GPT-5) <47299143+Cuarroc@users.noreply.github.com>
No-Test: session handoff journal only Co-Authored-By: OpenAI Codex (GPT-5) <47299143+Cuarroc@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa811dcc60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .reserve_development_tokens(&task.goal_id, &run.id, purpose, tokens, Some(&run.id)) | ||
| .await | ||
| .map_err(DispatchRefusal::Admission)?; |
There was a problem hiding this comment.
Roll back the claim when pre-launch admission fails
When token reservation is refused—for example because the root budget is exhausted or the estimate exceeds the 200,000-token limit—the claim and run intent above have already committed, so this returns with the task still running, an unresolved intent run, and no launch row. Subsequent dispatch_once calls only select open tasks, startup reconciliation only handles runs that have launch rows, and lease expiry cannot safely authorize reclaiming the task; make claim/intent/reservation atomic or explicitly resolve and release this known-not-started attempt before returning.
AGENTS.md reference: AGENTS.md:L128-L130
Useful? React with 👍 / 👎.
| task.status == "open" | ||
| && context.goals.iter().any(|goal| { | ||
| goal.id == task.goal_id | ||
| && goal.status == "open" | ||
| && goal.admitted |
There was a problem hiding this comment.
Skip blocked tasks when selecting the next dispatch
When the first open task has an incomplete dependency—for example, its prerequisite is already running—while a later independent task is runnable, this predicate still selects the blocked task. claim_continuous_task then returns dependency is not completed without changing its state, so every subsequent call selects the same task and the independent work is starved; if the dependency failed or was cancelled, the project stalls indefinitely. Select a task whose dependencies are complete or continue past task-local admission refusals.
Useful? React with 👍 / 👎.
|
Queued — the merge queue status continues in this comment ↓. |
…rvation fails Test-First: src-tauri/src/workers.rs::workers::tests::dispatch_once_retains_intent_for_reconciliation_when_token_reservation_fails Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No-Test: generated documentation snapshot Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 26 minutes 45 seconds in the queue, including 14 minutes 38 seconds running CI. Required conditions to merge
|
Der Scheduler kann jetzt genau eine fällige Aufgabe sicher bis zum Worker-Start führen.
Ohne das nur in Tests erzeugbare Permit bleibt der Produktionspfad deaktiviert.
Die bestehenden Continuous-Schalter und Fähigkeiten bleiben unverändert aus.
Report
What changed
Evidence
NICHT ABGEDECKT
Review
Review: Stufe-B-Reviewer Claude (Sonnet 5.5) erledigt; Tier-A-Zweitreview durch den Orchestrator weiter ausstehend.
Open points
Review disposition
Reviewer: Claude (Sonnet 5.5, Stufe B, andere Familie als Autor codex). Kandidat fa811dc, Fix-Kopf 187669e, Merge-Kopf 62bd1ea (main eingemerged, Konflikt gelöst, prepush exit 0, CI grün).
scheduler.rs— scheitert die Token-Reservierung nach Claim und Intent, blieb der Run als unlaunchterintentmit laufendem Claim liegen (Launch-Fehler dagegen gehen überwith_launch_reconciliationaufreconciling). Fix: Run wird aufreconcilinggesetzt. Test-First:dispatch_once_retains_intent_for_reconciliation_when_token_reservation_fails(rot: left "intent", grün danach). Evidence:cargo test ... workers::tests::dispatch_once_exit 0, 2 passed;gates.sh lane prepushexit 0;red-first.sh --planexit 0.launch_worker, Drift-Gate ohne neuen Fund.