Skip to content

refactor(agent-task): Cook read surfaces project CookRunState (#18499) - #18511

Merged
chubes4 merged 2 commits into
mainfrom
fix/issue-18499-homeboy
Nov 19, 2026
Merged

chubes4 merged 2 commits into
mainfrom
fix/issue-18499-homeboy

Conversation

@chubes4

@chubes4 chubes4 commented Nov 19, 2026

Copy link
Copy Markdown
Member

Slice 3 of #18436 (tracked in #18499). This replaces #18507, which closed automatically when its stacked base fix/issue-18436-homeboy was deleted on the #18495 merge. Rebased onto main, with no other changes.

Summary

Every Cook read surface (status, cook verdict, summary, notify, scheduler, durable-state probe) now projects CookRunState::of(record) and legal_actions() instead of classifying candidate_recoverable, running or stale itself. The status recovery step comes from the same source as recover's plan, so status no longer reports none where recover would regate, publish or rearm.

What changed

  • Read surfaces route through CookRunState and legal_actions(). Their local classification is deleted.
  • Added a guard test (read_projection_guard.rs) that fails if candidate_recoverable classification reappears outside the allowed files.
  • Fixed the status-vs-recover disagreement for gate_environment_unavailable→regate, selected-attempt→publish, and gate-feedback→rearm. The candidate_continuation tests cover all three.

Verification

On candidate 2699bdf, before the rebase:

  • cargo fmt --check: passed.
  • cargo check -p homeboy-core -p homeboy-agents -p homeboy-cli --all-targets: passed.
  • Contract crate tests: 63/63 passed.
  • candidate_continuation, single-threaded: 15/15 passed.
  • homeboy-agents lib: 2489 passed, 2 ignored, 0 failed.

After the rebase onto main, cargo check passes. A Cook rework run will repeat the full gates on this PR.

Remaining on #18436

AI assistance

Homeboy Cook (roadie/cook-heavy, served claude-opus-5-5 and gpt-6.1-sol) wrote the change. Claude (via Roadie/Pi) diagnosed the gate regressions, rebased the branch, and opened this PR. Chris Huber directed the work and owns it.

@chubes4

chubes4 commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Verified on rebased head f778fa0. cargo test -p homeboy-agents --lib: all 2488 tests pass. The full run hit the local hermetic timeout under Lab load; 5 timing flakes passed with --exact --test-threads=1, and the 690 tests that hadn't run passed in a follow-up run. CI is green. The rework Cook agent-task-34537ce3 found nothing to change, then failed in the controller (see #18001), so this verification was done by hand. (Claude via Roadie.)

@chubes4
chubes4 marked this pull request as ready for review November 19, 2026 03:23
@chubes4
chubes4 merged commit 17924a1 into main Nov 19, 2026
17 checks passed
@chubes4
chubes4 deleted the fix/issue-18499-homeboy branch November 19, 2026 04:17
chubes4 added a commit that referenced this pull request Nov 19, 2026
chubes4 added a commit that referenced this pull request Nov 19, 2026
…8511 read projections (#18524)

Main is red after #18510 and #18511 merged one after the other. Each PR
was green against its own base. Together, these fail deterministically
on the Lab and in CI:
- `homeboy-agents
orchestration::tests::review_preserves_authoritative_aggregate_absence`:
expected `CandidateRecoverable`, got `Succeeded`.
- `homeboy-agents
agent_task_service::cook::tests::cook_observation_agrees_across_real_stores_without_mutation`
- `homeboy-cli
…status_run_fixtures::agent_task_status_published_receipt_wins_over_terminal_and_promotion_snapshots`

Bisect: 1ae3148 (before #18510) passes, and c303bf1 (#18510) fails.
#18510 makes the persisted CookRunState override derivation, while
#18511's read projections and these tests depend on the derived verdict.
One example is an unverified success that reads as
`CandidateRecoverable`.

This reverts #18510's CookRunState persistence. It keeps #18510's
unrelated `deps.rs` fix, where a deadline that wins the cancel race
stays a timeout. #18498 reopens so the persistence can reland rebased on
#18511.

Lab at this SHA: the 3 tests above pass, and `cook_run_state` passes
5/5.

---
Written by Claude (claude-opus via Claude Code): bisected the red main
and prepared the revert.
homeboy-ci Bot added a commit that referenced this pull request Nov 19, 2026
### Added
- report runner pressure and Homeboy-owned root sizes in status and runner doctor

### Changed
- persisted CookRunState (#18510) conflicts with #18511 read projections

### Fixed
- a superseded Cook step settles when its owner's mission is fenced
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