Skip to content

base red: cpu_class's missed-deadline test starts its chat on an agent's connection (#28963) - #30133

Merged
lawrencecchen merged 1 commit into
feat-cmux-nextfrom
acpmux-cpu-class-deadline-agent
Nov 1, 2026
Merged

lawrencecchen merged 1 commit into
feat-cmux-nextfrom
acpmux-cpu-class-deadline-agent

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Base red on feat (macOS): acpmux::cpu_class cpu_class_a_start_that_misses_its_deadline_says_what_its_harness_was_doing hits the 120 s nextest timeout. It fails at feat a30fe2b (job fae79b08e3411c76448859df, aws-m4pro-7) and in #30057's merge-head run 5dd8ef18.

Cause. #28963 (3214c6e, "the person's new chat never fails on a slow host") made the person's agent start wait with no deadline (hub/lifecycle.rs person_start). This test's client proves it is the person (_acpmux/person_prove), so the start it gates never fails, and the test waits until nextest kills it. #28963 moved its own deadline test in lifecycle_fixes.rs to an agent's connection, but tests/cpu_class.rs (macOS only) was missed.

Fix (test only). The chat is started and prompted on a connection that is not the person's (agent_client, as lifecycle_fixes.rs does), whose start keeps the deadline. The product does not change.

Testing

run ref result
red feat a30fe2b macOS fae79b08 (m4pro-7): TIMEOUT 120 s, compiled acpmux
green cpu_class head bbb0f0a macOS 5a0e676c (m4pro-3): 9/9, compiled acpmux
clippy head Linux 3bc234e0 (run 41271636272): pass

Observed / Not run

Observed: the runs above. Not run: Linux (the file is #![cfg(target_os = "macos")]).

Changelog

none

Proof

No capture: a test-only change.


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


Summary by cubic

Fixes the macOS-only cpu_class missed-deadline test so it no longer hits the 120-second nextest timeout.

Since #28963 gave the person's agent start no deadline, the test's client—which proves it is the person—never saw its start fail. The chat now starts on an agent's connection instead, whose start keeps the deadline, matching how lifecycle_fixes.rs handles it. Test-only change; no product behavior changes.

Written for commit bbb0f0a. Summary will update on new commits.

View guided diff Turn on auto-fix

…t's connection (#28963)

#28963 (3214c6e) gave the person's agent start no deadline; this test's
client proves it is the person, so its start never failed and the test hit
the 120 s nextest timeout on macOS (feat a30fe2b, job fae79b08). As
lifecycle_fixes.rs does since #28963, the deadline is checked on a connection
that is not the person's.
@lawrencecchen lawrencecchen added the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review bbb0f0a: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr30133 -f ref=acpmux-cpu-class-deadline-agent -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 3cb42d6; does not block

Shipped in:

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Turn on auto-fix | Re-trigger cubic

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (independent review subagent): SHIP at bbb0f0a

Read-only review. I built and ran nothing on this machine. I read the fleet logs named below.

1. Cause: correct.

  • Since 3214c6e, a start skips tokio::time::timeout when Session::person is set (hub/lifecycle.rs:791). person_start (lifecycle.rs:862) waits until the harness answers or exits. With FAKE_START_GATE removed, the harness never answers, so the old test hung until nextest's 120 s limit.
  • Only two places set Session::person:
    • lifecycle.rs:280, from NewRequest::person = person_asks(conn) (server/requests.rs:1224).
    • person_wrote() on a prompt where person_asks(conn) is true (server/requests.rs:1290).
  • person_asks (requests.rs:74) is true only for conn.is_person() || origin == LocalApp.
  • serve_connection uses Origin::Local (server/mod.rs:1427). Only a second request _acpmux/person_prove with a valid proof sets Conn::person (server/mod.rs:363).
  • The new agent_client (tests/cpu_class.rs:179) never sends initialize or a proof, so the session stays non-person through session/new, MUX_KILL and the prompt. The MUX_KILL handler (requests.rs:2178) does not touch person.

2. The test still checks what it claims.

  • agent_start_timeout_ms = 3_000 (cpu_class.rs:268). The test then asserts the deadline error, which names the harness's pid, its normal class, its CPU time and its threads (:270-274).
  • It also asserts that no agent_start_retried_at_normal event was logged (:276-279). The retry branch (lifecycle.rs:~805) runs only when harness.background() is set, so a start that timed out at normal class is not retried.
  • Because the test gets the error at all, it also proves that an agent's start keeps its deadline (cx-m5up). The green run's 3.257 s matches the 3 s budget.
  • The person connection is kept as _person (:260) to install the key and hold the daemon. It never touches the session.

3. No gate refuses the non-person connection.

  • Admission is advisory only (hub/admission.rs:~405, "disk floors and lane caps are advisory").
  • For session/new, person_check → session_new_check (hub/start_gate.rs:254) returns OK when no non-asking mode is asked for (StartMode::of is None). This test asks for none.
  • MUX_KILL has no person gate.
  • The helper is the same as tests/hub_integration/lifecycle_fixes.rs:533 agent_client.

4. Evidence (macOS fleet):

  • Red: fae79b08e3411c76448859df at a30fe2b (aarch64-apple-darwin). The test TIMEOUT at 120.008 s in the full run and 120.006 s alone: "failed in the full run and failed alone".
  • Green: 5a0e676c0c90e5760cebc275 at bbb0f0a. 9/9 cpu_class tests pass; the deadline test passes in 3.257 s.
  • Clippy: 3bc234e007e674cadbf7acce → cmuxterm-hq run 41271636272. cargo clippy --workspace --all-targets -- -D warnings passed at bbb0f0a.

Note (does not block):

  • That clippy run was on Linux (blacksmith-32vcpu-ubuntu-2404). tests/cpu_class.rs starts with #![cfg(target_os = "macos")] (:14), so Linux clippy compiles this file out.
  • The macOS test run compiled the change with no errors. The added code has no new imports and only one helper, which has a call site, so a clippy finding is unlikely.
  • No macOS clippy run covers this file.

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Check classification at head bbb0f0a (25 pass, 1 fail, 40 pending):

  • rerun (cmux-next defaults guard review, run 41272579110): cancelled by a newer run of the same group ("Canceling since a higher priority waiting request ... exists"). No step ran. It is not a check of this change.
  • Pending checks do not hold the PR.

Fleet: red fae79b08 at feat a30fe2b (macOS, TIMEOUT 120 s); green 5a0e676c at the head (macOS, cpu_class 9/9; the deadline test takes 3.3 s); clippy Linux 3bc234e0 (it does not compile this macOS-only file; the macOS test run compiled it with no warnings).
Review: SHIP at the head (issuecomment-6553323431).

@lawrencecchen lawrencecchen added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Nov 1, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 10 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpo4dr53nf/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpug9zk8__/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs
test_every_part_of_bun_run_check_runs_in_the_warn_branch (main.WebviewsWarnSplitCov
ersCheck.test_every_part_of_bun_run_check_runs_in_the_warn_branch)/
test_every_part_of_bun_run_check_runs_in_the_warn_branch (main.WebviewsWarnSplitCov
ersCheck.test_every_part_of_bun_run_check_runs_in_the_warn_branch)
View Logs
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)/
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)
View Logs

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

@lawrencecchen
lawrencecchen merged commit 09c48ed into feat-cmux-next Nov 1, 2026
235 of 260 checks passed
@lawrencecchen
lawrencecchen deleted the acpmux-cpu-class-deadline-agent branch November 1, 2026 04:44

This branch was previously deployed

3 inactive deployments
artifacts — bbb0f0a7 Deployed Nov 1, 2026 by lawrencecchen via add the Windows daemon to the tree #93551
sentry-dsyms — bbb0f0a7 Deployed Nov 1, 2026 by lawrencecchen via upload cmux-tui dSYMs to Sentry #93551
ci-routing-agent — bbb0f0a7 Deployed Nov 1, 2026 by lawrencecchen via cmux-tui tree preflight #93551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant