chore: make the never-mutated socket payload a let - #12153
austinywang wants to merge 1 commit into
Conversation
|
Warning Review limit reachedNext included review available in 22 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
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. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Full |
|
Full CI on this branch stops at |
The Swift warning budget gate (tests-build-and-lag) fails on main with "variable 'payload' was never mutated" for this declaration, which is returned unchanged. Use let so the budget check passes again without touching the budget file. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H8Eci7rC11iSuCw4F4DE2g
fbd79d9 to
8288d60
Compare
|
#12154 landed; rebased onto main and re-dispatched full CI: https://github.com/manaflow-ai/cmux/actions/runs/34220955654 |
|
After rebasing onto main (post #12154), full CI reached the warning-budget step: https://github.com/manaflow-ai/cmux/actions/runs/34220955654. The
|
`tests-build-and-lag` fails "Validate Swift warning budget" on every branch that merges current main: #10564 deleted 20 lines from .github/swift-warning-budget.tsv, including the entries for five warnings that still exist (AppDelegate+PaneMemoryGuardrail x2, SessionIndexTableController x2, CmuxTuiSnapshotParser, SurfaceCatalogModel), and the browser keyboard replay `payload` dictionary is declared `var` but never mutated. Restore exactly those five budget lines and make `payload` a `let` (the same change as #12153) so the check passes against the current build output. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hgp819aHrzykKJnpSvrWk2
|
Heads-up: #12168 fixes the remaining four post-refresh warnings you listed (SessionIndexTableController isolation ×2, CmuxTuiSnapshotParser unreachable default, SurfaceCatalogModel unused rowID) plus the CmuxTerminal test compile break (#12161), and includes this PR's |
…-budget warnings (#12159), un-normalized pbxproj, stale hook-test expectations (#12177) (#12168) * ci: unbreak main's macOS lane (#12161, #12159) The CmuxTerminal test target no longer compiled after #10564 added a `UUID` parameter to FakeTerminalEngine.swift, which imported only GhosttyKit; add `import Foundation`. The "Validate Swift warning budget" step also failed on five warnings that landed after the budget refresh: wrap the boundsDidChangeNotification observer body (queue: .main) in MainActor.assumeIsolated in SessionIndexTableController, drop the unreachable `default` from the exhaustive `switch resourceID.kind` in CmuxTuiSnapshotParser, stop binding an unused `rowID` in SurfaceCatalogModel, and make the never-mutated `payload` in TerminalController a `let` (identical to #12153). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 * ci: normalize project.pbxproj so the workflow guard passes main's pbxproj carries the StackAccountAvatarViewTests entries (#12145) out of normalized order, so scripts/check-pbxproj.sh fails "Validate pbxproj objectVersion pin and normalization" in workflow-guard-tests on every full CI run. Output of scripts/normalize-pbxproj.py, no content change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 * fix: parenthesize confusable trailing closures in the pane memory guardrail The full CI run on this branch had one bucket left over the Swift warning budget: two "trailing closure in this context is confusable with the body of the statement" warnings in postAggregateMemoryPressureWarning's guard condition. Pass the closures as parenthesized arguments, matching the existing call later in the file. No behavior change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 * test: assert journal pane targeting instead of the removed prompt/pre-tool clear (#12177) #11976 routes attention through the journal reconciler and removed the explicit `clear_notifications --tab --panel` from the Claude prompt-submit and pre-tool-use hook paths; the app clears attention from the emitted agent_journal_append event instead. Two ClaudeHookLifecycleCleanupTests still asserted the old command and failed on every full CI run. Assert the new contract: the agent.turn.started / agent.state.changed event names the resolved (moved) pane, sibling and fallback panes are untouched, and no workspace-wide clear is sent. Verified by replaying both hooks against a post-#11976 CLI with a port of the mock socket server. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…2161), over-budget warnings (manaflow-ai#12159), un-normalized pbxproj, stale hook-test expectations (manaflow-ai#12177) (manaflow-ai#12168) * ci: unbreak main's macOS lane (manaflow-ai#12161, manaflow-ai#12159) The CmuxTerminal test target no longer compiled after manaflow-ai#10564 added a `UUID` parameter to FakeTerminalEngine.swift, which imported only GhosttyKit; add `import Foundation`. The "Validate Swift warning budget" step also failed on five warnings that landed after the budget refresh: wrap the boundsDidChangeNotification observer body (queue: .main) in MainActor.assumeIsolated in SessionIndexTableController, drop the unreachable `default` from the exhaustive `switch resourceID.kind` in CmuxTuiSnapshotParser, stop binding an unused `rowID` in SurfaceCatalogModel, and make the never-mutated `payload` in TerminalController a `let` (identical to manaflow-ai#12153). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 * ci: normalize project.pbxproj so the workflow guard passes main's pbxproj carries the StackAccountAvatarViewTests entries (manaflow-ai#12145) out of normalized order, so scripts/check-pbxproj.sh fails "Validate pbxproj objectVersion pin and normalization" in workflow-guard-tests on every full CI run. Output of scripts/normalize-pbxproj.py, no content change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 * fix: parenthesize confusable trailing closures in the pane memory guardrail The full CI run on this branch had one bucket left over the Swift warning budget: two "trailing closure in this context is confusable with the body of the statement" warnings in postAggregateMemoryPressureWarning's guard condition. Pass the closures as parenthesized arguments, matching the existing call later in the file. No behavior change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 * test: assert journal pane targeting instead of the removed prompt/pre-tool clear (manaflow-ai#12177) manaflow-ai#11976 routes attention through the journal reconciler and removed the explicit `clear_notifications --tab --panel` from the Claude prompt-submit and pre-tool-use hook paths; the app clears attention from the emitted agent_journal_append event instead. Two ClaudeHookLifecycleCleanupTests still asserted the old command and failed on every full CI run. Assert the new contract: the agent.turn.started / agent.state.changed event names the resolved (moved) pane, sibling and fallback panes are untouched, and no workspace-wide clear is sent. Verified by replaying both hooks against a post-manaflow-ai#11976 CLI with a port of the mock socket server. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPAVb9SSqAnuUnPEFQguE9 --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
|
Closing as already on main: merging this branch into main at 8421357 produces main's own tree, so there's nothing left to land. The branch is kept; reopen if something here is still missing. Part of the backlog cleanup in manaflow-ai/cmuxterm-hq#563. |
Summary
Main's full CI currently fails the Swift warning budget in
tests-build-and-lagwith+1 Sources/TerminalController.swift: variable 'payload' was never mutated; consider changing to 'let' constant(see https://github.com/manaflow-ai/cmux/actions/runs/34057995765 on main and the same finding on the #12137 branch). The declaration at line 8779 builds a dictionary and returns it unchanged, so this makes it alet. No budget file change.Verification
ci.ymldispatched on this branch so theValidate Swift warning budgetstep can confirm the count is back under budget (link in the comments).🤖 Generated with Claude Code
https://claude.ai/code/session_01H8Eci7rC11iSuCw4F4DE2g
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Changes the
payloadvariable inTerminalController.swiftfromvartoletto fix the failing Swift warning budget check. The value is returned unchanged, so there's no behavior change.Written for commit 8288d60. Summary will update on new commits.
Note
Low Risk
Single declaration change with no logic or API behavior change; only silences an unused-mutation compiler warning.
Overview
Fixes a Swift warning budget failure on main by declaring the success-path response dictionary as
letinstead ofvarin the browser keyboard replay handler insideTerminalController.swift.When native keyboard replay delivers, the handler still returns the same workspace/surface IDs and v2 refs; nothing in that path mutates the dictionary after it is built.
Reviewed by Cursor Bugbot for commit 8288d60. Bugbot is set up for automated code reviews on this repo. Configure here.