Skip to content

fix(acpmux): guard sidebar group labels and empty groups - #24581

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
fix/acpmux-group-safety
Oct 30, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
fix/acpmux-group-safety

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

acpmux new --group passes a caller string into cmux agent open, which can create persistent sidebar state. Blank/id-shaped labels can produce raw-id groups.

Leo asked us to audit these surfaces because “we ought to audit the skills/tools/commands/prompts/mcps we have all around cmux-next as well as acpmux and make sure stuff is clear and as we expect and we have good recovery and good error messages and that stuff is concise but informative”.

Change

  • Reject blank, UUID, and cmux object-id-shaped --group values before session/new, with an exact omit/use-a-label recovery.
  • Reject the same values at the cmux app action boundary.
  • Document that --group is opt-in persistent app state, does not move focus, and give exact list/remove/delete recovery commands.
  • Add focused Rust and Swift regression tests.

Validation

No capture: the app change only refuses id-shaped or blank group labels at the action boundary (an error string to the caller); nothing rendered changes.

  • git diff --check
  • cargo fmt --manifest-path cmux-tui/Cargo.toml --all
  • Rust and Swift tests are routed to the managed fleet per repository policy; no local native build was run.

Changelog

  • Fixed: reject object-id and blank sidebar group labels and document how to recover an unwanted group.

State: scoped
Owner: Codex 01a16a55-c3f2-79d1-8872-cb25f230352a
Head: d7ecc35 (merged base; dropped the pre-observation workspace guard per the BLOCK at 2e1c589)
Next: independent review and exact-head fleet checks
Evidence: focused unit tests added; formatting and diff checks passed
Stop: none

Agent-Session: https://cmux.com/deeplink/agent?harness=codex&session=01a16a55-c3f2-79d1-8872-cb25f230352a&host=huge-blue


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


Summary by cubic

Rejects acpmux new --group values that are blank or look like cmux object ids (grp_*, ws_*, UUIDs), so automation retries can't create persistent sidebar groups titled with raw ids.

Also documents that --group is opt-in app state that doesn't move focus, with recovery commands for unwanted placements.

Written for commit 2e1c589. Summary will update on new commits.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

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

Review d7ecc35: 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=pr24581 -f ref=fix/acpmux-group-safety -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: 605 commit(s) change the sidebar's drawing code without a Sidebar-Look: trailer or an entry in plans/cmux-next/sidebar-owner.md is not red on the base 644ebcd; do not merge until green; see lane-rules

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-u5s3a created for this PR by the cmux coordinator.

@blacksmith-sh

blacksmith-sh Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpoumxhsl_/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpv0059lsn/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

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Orphaned: no activity for 54 h, and no lane holds a lease on it. The orphan sweep could not merge feat-cmux-next in: conflicts in cmux-tui/crates/acpmux/docs/agent-surfaces.md, cmux-tui/crates/acpmux/skills/acpmux/SKILL.md. Listed for a lane to resolve.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra xhigh, next-review): BLOCK at 2e1c589

  • Packages/macOS/CmuxNext/Sources/CmuxNextApp/Handlers/AgentSessionWorkspace.swift:148 — join runs synchronously from the daemon’s workspace-list callback, before sidebar observations update sidebar.model.sections. The new workspace is therefore absent, so this guard returns for normal creations. applyPendingPlacements removes the pending callback before invoking it and never retries, leaving every newly opened --group workspace ungrouped.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

The BLOCK at 2e1c589 found join()'s "workspace still listed" guard runs
from the daemon's workspace-list callback before sidebar observations
update, so it skipped group creation for normal --group launches. Drop
the guard and keep the label validation. Base now allows --group without
--name (remote launches), so the merge keeps that and adds the label check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-710a4a518c009a6ad126
@github-actions

Copy link
Copy Markdown
Contributor

Default changes

This pull request changes 2 defaults at d7ecc35d7052 (what everyone gets without configuring anything):

  • tunable-source.CmuxNextApp/Handlers/AgentSessionWorkspace.swift:open: "49637ffb15627679a26a8555722d28ea7d5c133474f39d9592462e24488f43a4" -> "c53fd2a95ab5f487d3d7e008c2b8af0ec37df4421ba37d66359be082a14c705b"
  • tunable-source.CmuxNextApp/Handlers/AgentSessionWorkspace.swift:validGroupName: (none) -> "77900eaf377fb73b664ea8d86f0c9a6f8561a59dc224f5087400b53fa7d19f99"

Needs a review. It passes with an independent review receipt on this commit: a comment or review whose first line is Review (<reviewer>): SHIP at d7ecc35d7052fa344ac6defe8e497e5f6fc64bd3, from a member, not a self-review (the newest verdict naming the head decides; a later BLOCK beats an earlier SHIP), or with an approving review on this commit from @lawrencecchen or @austinywang (the call owners in .github/defaults-call-owners.json, never the author). A receipt posted as a review re-runs this check; after a plain comment, re-run it. The needs a call label alone does not pass, and a new push needs a new receipt.

Regenerate the snapshot with python3 scripts/ci/defaults_guard.py snapshot.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at d7ecc35

SHIP

No actionable findings. Static review only; Rust and Swift toolchains are unavailable in this box.

@teamleaderleo teamleaderleo removed the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 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 d7ecc35: an independent review passed this exact head (review box review-24581-d7ecc35d receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo
teamleaderleo merged commit 85f6133 into feat-cmux-next Oct 30, 2026
225 of 241 checks passed
@teamleaderleo
teamleaderleo deleted the fix/acpmux-group-safety branch October 30, 2026 00:17
lawrencecchen added a commit that referenced this pull request Oct 30, 2026
… workspace group …' line the docs check cannot resolve (#24581)
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

This branch had an error being deployed

1 failed and 3 inactive (1 outdated) deployments
sentry-dsyms — d7ecc35d Deployed Oct 29, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #78709
artifacts — d7ecc35d Deployed Oct 29, 2026 by teamleaderleo via publish to R2 #78709
ci-routing-agent — d7ecc35d Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #78709
cmux-tui-merge-tree — 2e1c589e Deployed Oct 23, 2026 by teamleaderleo via publish the merge tree #5246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant