Skip to content

perf(acpmux): index live background processes instead of scanning history (carry #30712) - #31539

Closed
teamleaderleo wants to merge 3 commits into
feat-cmux-nextfrom
lane/e06a-30712
Closed

teamleaderleo wants to merge 3 commits into
feat-cmux-nextfrom
lane/e06a-30712

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Carries #30712 (a ChatGPT draft), rebased onto current feat-cmux-next with its commits unchanged.

Leo: "oh btw i talked with chatgpt and they raised a bunch more drafts and issues across cmuxterm-hq, cmux, and cmux-platform. some stuff worth looking at"

What

running_processes_read (called for every chat by host load and views) and any_process_running (idle, cancel and stop-if-idle) scanned a session's whole process history under the table lock. With thousands of completed records that is a linear scan per call.

The process table now keeps an ordered set of the running slots, maintained by insert, fold, upsert, lose_running and the read/rebuild paths. lose_running walks the set oldest-first, the same order as before. Test: hub::processes::process_active_tests (3,000 completed records plus ordered live slots).

No timer, observer or loop is added. No before/after number; this is a scan-to-index change with no harness in place.

Leo-ask: ask-e06a62154f

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Carries #30712 to replace linear scans of process history with a live index of running slots, so idle checks and running-process counts stay constant regardless of how many completed records accumulate.

Rebased onto feat-cmux-next and re-merged to stay current. ProcessTable now keeps an ordered set of active process indexes, updated on insert, upsert, fold, and lose_running; lose_running preserves the original oldest-first notification order. No timer, observer, or loop is added. Adds tests covering 3,000 completed records with interleaved status updates.

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

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Review d12b3c1: 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=pr31539 -f ref=lane/e06a-30712 -f platform=macos -f backend_mode=local

web and size checks: green

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, next-review): SHIP at 68534a4

SHIP at 68534a4

Visual verdict: unchanged by this diff

The live-index invariant is maintained across all process mutation paths. Focused tests could not run because Cargo is unavailable.

Follow-ups: none

cmux-bot[bot]
cmux-bot Bot previously approved these changes Nov 2, 2026

@cmux-bot cmux-bot 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.

cmux-bot approves 68534a4: an independent review passed this exact head (next-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high, sweep, via the review router; full diff from merge base d63ac15 to this head): SHIP at 68534a4

No P1/P2 findings.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 02:40 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 02:41 Inactive
@github-actions github-actions Bot added risk:low Risk tier (docs/ci/risk-tiers.md) and removed risk:normal Risk tier (docs/ci/risk-tiers.md) labels Nov 2, 2026
@cmux-bot
cmux-bot Bot dismissed their stale review November 2, 2026 02:44

A newer verdict blocks d12b3c1 (no independent SHIP at the head).

@blacksmith-sh

blacksmith-sh Bot commented Nov 2, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)/
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol xhigh, next-review): BLOCK at d12b3c1

BLOCK at d12b3c1
Visual verdict: no images; Leo tries the build

  1. [P1] [blocking] review/TARGET:5 — Review cannot be completed: review/pr.diff is empty, and no base checkout or Git history is available to establish the changes. Supply the actual diff so regressions can be reviewed.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Closing as superseded. The original #30712 merged as 5a0fd07, and the follow-up #31695 fixed the panic-ratchet red it caused. Merging this branch into feat-cmux-next now leaves the tree unchanged, so nothing is left to land.

This branch was previously deployed

3 inactive (2 outdated) deployments
ci-routing-agent — d12b3c1e Deployed Nov 2, 2026 by cmux-bot[bot] via wait for same-key tree publisher #98651
artifacts — 68534a46 Deployed Nov 2, 2026 by teamleaderleo via publish tree-addressed cmux-tui #98130
sentry-dsyms — 68534a46 Deployed Nov 2, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #98130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant