Skip to content

Persist cook phases before Lab dispatch#7901

Merged
chubes4 merged 2 commits into
mainfrom
fix/7891-cook-preexecution-phases
Jul 13, 2026
Merged

Persist cook phases before Lab dispatch#7901
chubes4 merged 2 commits into
mainfrom
fix/7891-cook-preexecution-phases

Conversation

@chubes4

@chubes4 chubes4 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Fixes #7891.
Fixes #7892.

Root cause

The controller created its durable Lab proxy only inside exec_lab_context, after workspace materialization and dependency hydration had completed. During those Homeboy-owned setup phases, the caller's cook ID had no lifecycle record and status could not explain the active work or provider policy.

Changes

  • Resolve the stable caller-supplied agent-task run ID before workspace staging and pass that same identity through materialization.
  • Persist a controller-owned proxy at the start of materialization.
  • Update its phase through materializing, hydrating, and dispatching.
  • Record runner identity, source checkout metadata, remote workspace when known, configured provider rotation candidates, and truthful provider_state: pending before model execution.
  • Preserve the existing fix: rotate stalled agent-task providers #7758 attempt/rotation history and fix: preserve agent task run metadata across Lab offload #7894 runner-child handoff/reconciliation contract under the same caller ID.

How to test

  1. Run cargo test controller_proxy_records_pre_execution_phase_progress -- --test-threads=1.
  2. Run cargo test core::agent_task_lifecycle::tests -- --test-threads=1.
  3. Start homeboy agent-task cook --runner <runner> --lab-only --run-id test-preflight ... against a workspace that requires materialization.
  4. While workspace setup is active, run homeboy agent-task status test-preflight --full.
  5. Confirm status resolves before provider dispatch and reports metadata.phase as materializing or hydrating, metadata.provider_state as pending, configured metadata.provider_rotation, the selected runner, and source checkout identity.
  6. Confirm the same caller-ID record advances to dispatching, binds the runner child after daemon acceptance, and retains provider attempt history if rotation occurs.

Verification

  • cargo fmt --check passed.
  • cargo check passed.
  • New focused test passed: 1 passed, 0 failed.
  • Agent-task lifecycle suite passed: 42 passed, 0 failed.
  • cargo test --lib: 7,171 passed, 34 failed, 18 ignored. The 34 failures are existing environment/baseline failures across extension discovery, fixture configuration, signal timing, and unrelated deploy/audit tests; the affected lifecycle suite is green.

Backwards compatibility

Additive metadata only. Existing run IDs, runner handoff records, attempt history, and status consumers remain valid. Commands without an agent-task run ID do not create a proxy.

AI assistance

  • AI assistance: Yes
  • Tool(s): GPT-5.6 Sol via OpenCode
  • Used for: Implemented pre-execution lifecycle persistence, provider provenance, and regression coverage under Chris Huber's direction

@homeboy-ci

homeboy-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — homeboy

Lint

review lint — passed

ℹ️ Full options: homeboy self docs commands/lint
ℹ️ Save lint baseline: homeboy review lint homeboy --baseline
Deep dive: homeboy review lint homeboy --changed-since 225f2bf

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-homeboy-review-lint-homeboy-Linux contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-homeboy-review-lint-homeboy-Linux contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/homeboy/actions/runs/29223505287

Test

⚠️ review test — baseline red

Deep dive: homeboy review test homeboy --changed-since 225f2bf

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-homeboy-review-test-homeboy-Linux contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-homeboy-review-test-homeboy-Linux contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/homeboy/actions/runs/29223505287

Audit

review audit — passed

  • structural — 46 finding(s)
  • field_patterns — 17 finding(s)
  • core_boundary_leak:core-agnostic-source — 16 finding(s)
  • intra-method-duplication — 9 finding(s)
  • dead_code — 5 finding(s)
  • test_quality — 5 finding(s)
  • Types — 3 finding(s)
  • near-duplication — 3 finding(s)
  • docs — 2 finding(s)
  • duplication — 2 finding(s)
  • Total: 111 finding(s)

Deep dive: homeboy review audit homeboy --changed-since 225f2bf

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-homeboy-review-audit-homeboy-Linux contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-homeboy-review-audit-homeboy-Linux contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/homeboy/actions/runs/29223505287
Tooling versions
  • Homeboy CLI: homeboy 0.283.1+bab65bc99e1d-dirty+bab65bc99
  • Extension: rust from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: f80cdf4c
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 5ded07b into main Jul 13, 2026
3 checks passed
@chubes4 chubes4 deleted the fix/7891-cook-preexecution-phases branch July 13, 2026 10:59
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.

agent-task cook: persist caller run ID as immediate lifecycle parent agent-task cook: persist parent lifecycle phases before Lab materialization

1 participant