Repository navigation
refactor(agent-status): delete two launch-config accessors left with no callers - #22032
Conversation
…no callers #21844 removed the Codex launch-argument attention suppressor, which was the last production caller of two launch-config lookups. Both were left in place for a follow-up; this is it. `getAgentLaunchConfigForStatusMetadata` (renderer store) looked a launch config up from a loose metadata bag. Its sibling `getAgentLaunchConfigForStatusEntry` takes a real status entry and still serves the one live consumer, cold restore resume startup. Deleting the metadata accessor also orphaned its `getLaunchConfigForStatusMetadata` helper and the `AgentLaunchConfigStatusMetadata` parameter type, so those go too. `getAgentStatusLaunchConfigForPaneKey` (main runtime) returned a pane's launch config behind a launch-token fence. Its two remaining references were assertions in the launch-authority retirement test. They were a second view of a state bit the test already pins: retirement nulls `pty.launchToken`, and the surviving `verifyOrchestrationCompatibilityCaller` assertion fails when it does not. Verified by ablation — disabling only the `launchToken` nulling fails that assertion with the accessor already gone, so no coverage is lost. Retirement never cleared `launchConfig` itself, so there was no second property hiding in those assertions. Test mocks that existed only to satisfy the removed store method are stripped; the tests themselves are about other behaviour and stay. No behaviour change.
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (19)
💤 Files with no reviewable changes (13)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe store removes metadata-based launch configuration lookup, its contract type, helper, action, and public re-export. The runtime removes its pane-key launch configuration method. Runtime tests remove assertions for that method. Test fixtures and mocks are updated to use entry-based lookup or omit the removed action. Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This is dead-code removal with no behavioral surface — the two accessors lost their last production caller in #21844, and nothing in the HEAD tree still references them.
getAgentStatusLaunchConfigForPaneKeyremoved (src/main/runtime/orca-runtime-prune-mobile-session-tab-group-layout.ts) — a token-fenced launch-config reader on the prune runtime mixin, along with its now-unusedSleepingAgentLaunchConfigandcopySleepingAgentLaunchConfigimports.getAgentLaunchConfigForStatusMetadataremoved — the renderer store action, itsAgentStatusSlicemember, and its backinggetLaunchConfigForStatusMetadatahelper inagent-status-launch-config.ts; the survivinggetAgentLaunchConfigForStatusEntrykeeps its one live consumer incold-restore-resume-startup.ts.AgentLaunchConfigStatusMetadatatype removed —agent-status-contract.tsplus theagent-status.tsre-export, since only the deleted method described its argument.- Test store doubles trimmed — the
getAgentLaunchConfigForStatusMetadata: vi.fn(...)stub is dropped from ~10 mock state objects and their localMockStoreState/StoreStatetypes; each affected test targets unrelated behavior and remains.
Verification
I grepped the checked-out head for all four removed identifiers (bare and quoted): zero remaining references, so no dangling imports, RPC/reflection string lookups, or docs mentions. agent-status-launch-config.ts still consumes its surviving imports (getTabIdFromPaneKey, getLeafIdFromPaneKey, registryEntryMatchesStatus), so nothing was orphaned.
I also checked the PR's load-bearing coverage claim against source: retirePtyAgentLaunchAuthority (orca-runtime-get-orchestration-dispatch-authority.ts:127) nulls launchToken, launchIncarnationId, and launchAgent but never launchConfig, and verifyOrchestrationCompatibilityCaller requires a non-empty launchToken before hashing it. The two deleted assertions in terminal-creation-and-readiness.spec.ts were therefore a duplicate view of the launchToken nulling, which the surviving verifyOrchestrationCompatibilityCaller assertion already pins. Retirement behavior is additionally covered in orchestration-compatibility-authority.test.ts and orca-runtime-structured-tui-tab-binding.test.ts:152. The ablation reasoning in the PR body holds.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Electron check (hidden dev build)This pull request only deletes launch-config lookups that nothing calls. Those functions never painted a control, so there is no before/after behavior to show. The screenshot is the app shell on this branch, after opening a throwaway local git project in an isolated profile. What is on screen: the sidebar lists project PR 22032 seed and its main worktree as inactive, the file tree shows Backing state from the same window:
Not exercised: starting an agent, cold-restore resume (the surviving lookup's caller), SSH, or mobile. |
Review statusPASS — no code changes were needed.
No release action is required from this review. |


ELI5
Two small lookup functions had nothing left calling them. A recent cleanup removed their last real user, and they were deliberately left behind so they could be deleted separately. This deletes them.
What Changed
Nothing changes for anyone using the app. This is dead-code removal only.
Two functions that looked up an agent's "launch config" (the command, arguments, and environment an agent terminal was started with) are gone:
1.
getAgentLaunchConfigForStatusMetadata— a renderer store method. It found a launch config from a loose bag of identity fields. It has a sibling,getAgentLaunchConfigForStatusEntry, that does the same lookup from a real status entry, and that sibling still serves the one remaining consumer (cold-restore resume startup). Removing the method also orphaned thegetLaunchConfigForStatusMetadatahelper behind it and theAgentLaunchConfigStatusMetadatatype that only described its argument, so those were removed too.2.
getAgentStatusLaunchConfigForPaneKey— a main-process runtime method. It returned a terminal pane's launch config, but only if the caller presented the matching launch token.Test mocks that existed purely to satisfy the removed store method were stripped out. The tests holding those mocks are about other behaviour and remain.
Net: 106 lines removed, 6 added (−100).
Why
#21844 removed the Codex launch-argument attention suppressor. That suppressor was the last production caller of both functions. It read a pane's launch config, string-matched the arguments to guess whether the agent was in auto-approve mode, and suppressed a status row on that basis. Once that guessing was replaced by reading the real reviewer identity at the source, both lookups had no callers left.
Leaving an unused public accessor on a store slice and a runtime service is not free: it stays in the type contract, every test double has to keep implementing it, and the next person reading the file cannot tell whether it is load-bearing.
Why delete rather than keep them for a future caller. Each is a generic-looking accessor, so I checked whether it was genuinely redundant rather than merely idle:
pty.launchTokento null, and the accessor returnedundefinedpurely because of that null. The same test already assertsverifyOrchestrationCompatibilityCallerflips from non-null to null, which is driven by that identical field and runs through a path with many production callers. The remaining assertion onlistTerminalscovers the separatelaunchAgentclearing. Retirement never clearedlaunchConfigitself, so there was no third property hiding in the removed assertions.I confirmed that by ablation rather than by reading: with the accessor and its assertions already deleted, disabling only the
pty.launchToken = nullline makes the test fail on the survivingverifyOrchestrationCompatibilityCallerassertion. The behaviour is still pinned.Linked Issue
No issue. Follow-up to #21844, which orphaned both accessors and noted they would be removed separately.
Visual Proof
N/A— no behaviour change. This removes functions that had no callers, so there is no user-visible surface to show before or after.Testing
Verified against the full related suites, not just the touched files:
src/main/runtimesrc/renderer/src/components/terminal-panesrc/renderer/src/storesrc/renderer/src/hookstests/e2e/paired-runtime-rejected-input-remount.unit.test.tsAlso:
pnpm tcclean,oxlintclean on all 19 changed files,pnpm run check:code-quality:changedpassed with 0 new findings.Ablation check described under "Why": temporarily disabling the
launchTokennulling makes the retirement test fail on its surviving assertion, confirming the deleted assertions were a duplicate view rather than unique coverage. That change was reverted.Platforms: logic is platform-independent (no paths, shells, or process spawning touched). Exercised on macOS.
No tests were added: this removes code, and the one test that referenced the removed runtime method keeps its coverage through assertions that were already there.
AI Disclosure
Review
Reviewer note: the load-bearing judgement is in the second bullet under "Why" — whether the two deleted assertions in
terminal-creation-and-readiness.spec.tswere unique coverage. The ablation result is the evidence for "no".Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)