Repository navigation
acpmux --group: a variant of a group's name joins that group; a refused group exits 2 as usage.group_name - #28730
Conversation
… and that the app matches the label ignoring case and outer spaces (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7016b1d4ce75ef44bdc7
…joins a group whose name is the same label ignoring case and outer spaces The group-name helpers move from CmuxNextApp to CmuxNextSidebar (SidebarEdits+NamedGroup.swift). Fixes manaflow-ai/cmuxterm-hq#4976 Sidebar-Look: no visual change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7016b1d4ce75ef44bdc7
|
Found 9 test failures on Blacksmith runners: Failures
|
…'s; the placement test calls SidebarEdits.group Sidebar-Look: no visual change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-7016b1d4ce75ef44bdc7
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by Default changesThis pull request changes 12 defaults at
Signed off on this commit by Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
|
Review (Codex gpt-6-astra, high): SHIP at 96ee062 Independent review of the full diff (BLOCK at 1627fa5, both findings fixed in 96ee062), then a delta review of the fix: SHIP. The defaults guard lists only moved-function hashes from AgentSessionWorkspace.swift; no setting, key or flag default changes. |
|
Review (codex gpt-6-astra high, next-review): BLOCK at ff23c86 BLOCK at ff23c86 Visual verdict: no images; Leo tries the build
Rust and Swift toolchains were unavailable in this environment, so verification was by code inspection. |
|
Awareness note from an agent lane that does not own this PR; it is not a review or a request to take the PR over. Awareness (independent Opus 5.5 medium subagent read, not a receipt; broker refused adoption because the owning session cannot be read): no blocking findings at ff23c86 Independent read of the exact head (router-review could not run, so this is an Opus 5.5 medium subagent read). No blocking findings.
Follow-ups:
|
|
Owned by an agent session · session |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (codex, router-review): SHIP at 37b9486 Reviewer: codex gpt-6-astra high, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at 37b9486 Visual verdict: no images; Leo tries the build No correctness findings. Follow-ups:
|
There was a problem hiding this comment.
2 issues found across 9 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Logic/SidebarEdits+NamedGroup.swift">
<violation number="1" location="Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Logic/SidebarEdits+NamedGroup.swift:12">
P2: This prefix-only check rejects legitimate group labels such as `ws_project` even though they are not object IDs. Validate the complete identifier shape rather than reserving every label with an ID prefix, so `--group` refuses actual IDs without blocking human names.</violation>
</file>
<file name="Packages/macOS/CmuxNext/Sources/CmuxNextApp/Handlers/AgentSessionWorkspace.swift">
<violation number="1" location="Packages/macOS/CmuxNext/Sources/CmuxNextApp/Handlers/AgentSessionWorkspace.swift:50">
P2: An explicitly supplied empty `--group` is silently treated as omitted, so `cmux agent open --group ""` bypasses validation and creates the session without a group. Preserve the empty string and let `validGroupName` reject it.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| let label = name.trimmingCharacters(in: .whitespacesAndNewlines) | ||
| guard !label.isEmpty else { return false } | ||
| let lower = label.lowercased() | ||
| if ["grp_", "ws_", "tab_", "pane_", "win_", "workspace_group:"].contains(where: lower.hasPrefix) { |
There was a problem hiding this comment.
P2: This prefix-only check rejects legitimate group labels such as ws_project even though they are not object IDs. Validate the complete identifier shape rather than reserving every label with an ID prefix, so --group refuses actual IDs without blocking human names.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Logic/SidebarEdits+NamedGroup.swift, line 12:
<comment>This prefix-only check rejects legitimate group labels such as `ws_project` even though they are not object IDs. Validate the complete identifier shape rather than reserving every label with an ID prefix, so `--group` refuses actual IDs without blocking human names.</comment>
<file context>
@@ -0,0 +1,66 @@
+ let label = name.trimmingCharacters(in: .whitespacesAndNewlines)
+ guard !label.isEmpty else { return false }
+ let lower = label.lowercased()
+ if ["grp_", "ws_", "tab_", "pane_", "win_", "workspace_group:"].contains(where: lower.hasPrefix) {
+ return false
+ }
</file context>
| let host = invocation["host"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 } | ||
| let group = invocation["group"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 } | ||
| if let group, !validGroupName(group) { | ||
| let givenGroup = invocation["group"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 } |
There was a problem hiding this comment.
P2: An explicitly supplied empty --group is silently treated as omitted, so cmux agent open --group "" bypasses validation and creates the session without a group. Preserve the empty string and let validGroupName reject it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At Packages/macOS/CmuxNext/Sources/CmuxNextApp/Handlers/AgentSessionWorkspace.swift, line 50:
<comment>An explicitly supplied empty `--group` is silently treated as omitted, so `cmux agent open --group ""` bypasses validation and creates the session without a group. Preserve the empty string and let `validGroupName` reject it.</comment>
<file context>
@@ -47,10 +47,12 @@ enum AgentSessionWorkspace {
let host = invocation["host"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 }
- let group = invocation["group"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 }
- if let group, !validGroupName(group) {
+ let givenGroup = invocation["group"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 }
+ if let givenGroup, !SidebarEdits.validGroupName(givenGroup) {
throw ActionFailure(message: "agent.openSessionWorkspace: group must be a non-empty human label, not a cmux id; omit group or use a label such as \"GUI push\"")
</file context>
| let givenGroup = invocation["group"]?.stringValue.flatMap { $0.isEmpty ? nil : $0 } | |
| let givenGroup = invocation["group"]?.stringValue |
|
Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at dcedcfd BLOCK at dcedcfd Visual verdict: no images; Leo tries the build
Swift and Cargo suites could not run because neither toolchain is installed. |
… tried only when no exact group is listed Searches every window for an exactly named group before a case or outer-space variant, falls back to a variant only when no group of exactly that name is listed (an exact group without the row gets a new row, as before), and looks the name up as given so a padded exact group still matches; a new group gets the trimmed name. Sidebar-Look: no visual change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fc739fd2f4e557ae7189
…cpmux) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-fc739fd2f4e557ae7189
dcedcfd to
e4453fc
Compare
|
Review (codex, router-review): SHIP at e4453fc Reviewer: codex gpt-6.1-sol xhigh, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at e4453fc Visual verdict: no images; Leo tries the build
Follow-ups:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes manaflow-ai/cmuxterm-hq#4976
For Leo's ask to productionize the acpmux daemon ("do we have more productionized stuff wrt the daemon ... let's go set up more fellas on it"). This finishes what #24581 left open:
acpmux new --groupmakes a stray sidebar group when a name is typed a little differently, and its refusal skips the usage envelope.What
--group "gui push","GUI push "or" Gui Push\n"now joins the existing "GUI push" group, and a re-homed lane finds its old row in that group. A group with exactly that name still wins over a case variant, and a new group gets the trimmed name. Before, any variant made a second "GUI push" group next to the first (group.name == name).validGroupName,group(named:accepting:in:),predecessor(named:inGroup:in:)and the newsameGroupNameare pure sidebar-tree functions. They move fromAgentSessionWorkspacetoSidebarEdits+NamedGroup.swiftin CmuxNextSidebar, next toSidebarEdits.canMove, which they use. CmuxNextApp shrinks by 35 lines (arch-ratchetapp_lines).--groupis a usage error. A blank or id-shaped--group(grp_…,ws_…, a UUID) used to exit 1 as a runtime error. It now exits 2 withdetail: group_nameanddata.reason: usage.group_namein the--jsonenvelope, still before any session is made.--grouphelp, the acpmux skill and the README say that the name is matched ignoring case and outer spaces, and that an id is refused with exit 2.Test
Red commit 48f6920 adds only tests:
cd cmux-tui && cargo test -p acpmux --lib -- a_group_is_a_human_label_and_never_an_object_id: the refusal must classify as exit 2 withusage.group_name. Green at head 96ee062:test result: ok. 39 passed; 0 failedwitha_group_is_a_human_label_and_never_an_object_id ... ok(fast-checks run 41159694793). Red: not run. The broker refused the run at the red commit twice (GitHub quota 403, then busy). The reviewer confirmed by reading that it fails on base, where the refusal is a plainbail!that classifies as exit 1 /error.AgentSessionGroupJoinTests.theSameLabelTypedAnotherWayJoinsTheGroup(CmuxNextAppTests): case and whitespace variants joing1and find the predecessor row, "GUI pushes" does not match, and an exact name beats a case variant, both for the group and for the re-homed row (added after review, 96ee062). On base, every variant returns nil. This lane VM has no fleet client, so the Swift suites run only in this PR's CI at its head.Observed / Not run
prepush-gate.pyreports no new violations; rustfmt is clean on the changed Rust files.acpmux new --group "gui push"into a sidebar that already has "GUI push". The Swift change is covered by the unit test above, not by a capture.No capture: the sidebar looks the same; the only change is which existing group a scripted
--groupopen joins.Default changes: the defaults guard lists the moved functions of
AgentSessionWorkspace.swift(a tunable source) by hash. No setting, key or flag default changes: the functions moved toSidebarEdits+NamedGroup.swift, and only group-name matching changed.Review
Independent review (Codex gpt-6-astra, high): BLOCK at 1627fa5 for a missed test caller (
AgentSessionGroupPlacementTestsstill calledAgentSessionWorkspace.group) and forpredecessornot preferring the exactly named group. Both were fixed in 96ee062, and the delta review gave SHIP at 96ee062.Changelog
acpmux new --groupjoins the existing sidebar group when the name differs only in case or outer spaces, instead of making a second group.Agent session: agent session
🤖 Generated with Claude Code