Skip to content

Add independently deployable broker worker adapters - #21503

Merged
teamleaderleo merged 2 commits into
run-attach-linuxfrom
split/broker-worker-20261018
Oct 18, 2026
Merged

teamleaderleo merged 2 commits into
run-attach-linuxfrom
split/broker-worker-20261018

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Builds the independently deployable agent-broker worker on top of the runtime receipt layer in #21456. It owns the versioned adapter boundary, durable worker entrypoint, host-lease adapters, container/systemd packaging, and Big Red staging build path.

The worker receives credential-free envelopes and resolves provider credentials only from deployment configuration. The lease client keeps replay/fencing behavior in the shared runtime contract; unknown host classes fail closed.

Validation:

  • worker and adapter harnesses passed
  • host lease focused tests passed (18/18)
  • adapter tests passed (3/3)
  • complexity and diff checks passed
  • full typecheck was attempted but terminated after the existing large workspace compiler remained CPU-bound

Depends on #21456. No production deployment is included.

Changelog

none


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds an independently deployable agent-broker worker and the durable runtime seam it drives: claims generation-fenced jobs, runs them through versioned provider adapters, and writes sanitized receipts back to the ledger. Provider credentials stay in deployment configuration and adapters only; they never cross the job envelope or receipt boundary. Successful run attempts can be promoted into persistent workspaces under the same fencing rules.

  • Adds durable broker jobs, receipts, and host leases with generation fencing; expired leases are reclaimable and stale receipts are rejected.
  • Adds a versioned adapter boundary and worker loop with lease renewal, fail-closed host-class matching, and serialized result checks.
  • Adds Huge Blue and Freestyle host-lease adapters over HTTPS or SSH with flock-based fencing; missing credentials fail closed, and receipt metadata is scrubbed of secrets.
  • Persists runtime lifecycle, lease, and idempotency columns, projects broker receipts into run events, and exposes workspace lifecycle routes and run-attempt promotion with terminal-winner fencing.
  • Ships container and systemd packaging plus a Big Red staging build script; no production deployment is included.

Written for commit 8a82478. Summary will update on new commits.

View guided diff Turn on auto-fix

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: af603716-4aa7-4f98-9501-32713e95e26f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@blacksmith-sh

blacksmith-sh Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Found 13 test failures on Blacksmith runners:

Failures

Test View Logs
1f-double-ctrl-c-python: the wrapper still runs/
1f-double-ctrl-c-python: the wrapper still runs
View Logs
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='cmux-scheme-compile')/
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='cmux-scheme-compile')
View Logs
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='daemon-test')/
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='daemon-test')
View Logs
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='generated-files')/
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='generated-files')
View Logs
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='release-compile')/
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='release-compile')
View Logs
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='swift-test')/
test_every_mac_job_reads_the_placement (main.CmuxNextWiring.test_every_mac_job_read
s_the_placement) (job='swift-test')
View Logs
test_every_shadow_job_is_compare_only (main.ShadowJobTests.test_every_shadow_job_is
_compare_only) (workflow='cmux-tui-artifacts.yml', shadow='macos-cross-runtime-x86_64')
/test_every_shadow_job_is_compare_only (main.ShadowJobTests.test_every_shadow_job_i
s_compare_only) (workflow='cmux-tui-artifacts.yml', shadow='macos-cross-runtime-x86_64'
)
View Logs
test_every_shadow_job_is_compare_only (main.ShadowJobTests.test_every_shadow_job_is
_compare_only) (workflow='cmux-tui-artifacts.yml', shadow='macos-cross-shadow')/
test_every_shadow_job_is_compare_only (main.ShadowJobTests.test_every_shadow_job_is
_compare_only) (workflow='cmux-tui-artifacts.yml', shadow='macos-cross-shadow')
View Logs
test_fork_pull_requests_into_manaflow_ai_never_reach_an_owned_runner_label (main.Fo
rkRunnerRoutingTests.test_fork_pull_requests_into_manaflow_ai_never_reach_an_owned_runn
er_label)/
test_fork_pull_requests_into_manaflow_ai_never_reach_an_owned_runner_label (main.Fo
rkRunnerRoutingTests.test_fork_pull_requests_into_manaflow_ai_never_reach_an_owned_runn
er_label)
View Logs
test_no_workflow_falls_back_to_blacksmith_outside_manaflow_ai (main.ForkRunnerRouti
ngTests.test_no_workflow_falls_back_to_blacksmith_outside_manaflow_ai)/
test_no_workflow_falls_back_to_blacksmith_outside_manaflow_ai (main.ForkRunnerRouti
ngTests.test_no_workflow_falls_back_to_blacksmith_outside_manaflow_ai)
View Logs

...and 3 more test failures. View all on Blacksmith: run 39111358107, run 39111358141

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

CI fast guards failed on 8a82478d78 (https://github.com/manaflow-ai/cmux/actions/runs/39111358141). It does not block the merge; a red guard merged into main breaks it for every open PR.
The log named no failed step; see the run.

Agents: python3 scripts/ci/guard_attribution.py fix applies the mechanical fixes locally. This comment is updated in place on each push.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Probably yours: Fast static checks failed: a static check failed, FAILED localization (0.77s).

CI failed on 8a82478d78 (run 39111358141 attempt 1): 1 code, 6 unknown.

Job Verdict Why
Fast static checks code a static check failed
guards / workflow-guard-history unknown no known signature; failed step: Validate SwiftPM lockfile policy
guards / workflow-guard-tests / ci unknown no known signature; failed step: Propagate failed independent fast guard
guards / workflow-guard-tests / preflight unknown no known signature; failed step: Validate macOS runner guards
guards / workflow-guard-tests / quality-determinism unknown no known signature; failed step: Validate test determinism gate
web / web-db-migrations unknown no known signature; failed step: Database behavior tests
tests unknown no known signature; failed step: Check platform workflow routing
Matched log lines
Fast static checks: FAILED localization (0.77s)

Not re-run automatically: Fast static checks, guards / workflow-guard-history, guards / workflow-guard-tests / ci, guards / workflow-guard-tests / preflight, guards / workflow-guard-tests / quality-determinism are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Metadata/fencing repair pushed at 4621742bb90f0e0359969c1ba39bc27eeedc7cb3.

Restored safe metadata and nested credential rejection plus host-lease reservation/receipt fencing. Exact focused validation: 25 tests passed across persistent-workspace broker lifecycle and VM host-lease transport suites, including both credential-bearing metadata regressions; git diff --check passed.

The remaining hosted red guards are shared-base workflow/static fixtures, not this worker behavior.

@teamleaderleo
teamleaderleo marked this pull request as ready for review October 18, 2026 07:36
Base automatically changed from codex/huge-blue-runtime-receipts-20261018 to run-attach-linux October 18, 2026 07:59
@teamleaderleo
teamleaderleo force-pushed the split/broker-worker-20261018 branch from 4621742 to 846d8ad Compare October 18, 2026 08:06
@teamleaderleo
teamleaderleo force-pushed the split/broker-worker-20261018 branch from 846d8ad to 8a82478 Compare October 18, 2026 08:25
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

merge-override: Shared base guard and database fixture failures are inherited from the runtime branch; exact worker checks and focused metadata fencing tests pass.

@teamleaderleo
teamleaderleo merged commit f2449db into run-attach-linux Oct 18, 2026
58 of 69 checks passed
@teamleaderleo
teamleaderleo deleted the split/broker-worker-20261018 branch October 18, 2026 08:32
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