Repository navigation
fix(orcad): count a degraded daemon's in-process terminals in the terminal census - #25545
Merged
OrcaWin merged 1 commit intoOct 5, 2026
Merged
Conversation
…minal census In degraded mode fresh terminals run on the local fallback inside orcad, but the census read only daemon adapters, so an update or stop saw 0 live sessions and killed running agents.
Contributor
|
This run was cancelled 🛑 The workflow was cancelled before completion. Please check the link below for details. |
7 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ELI5
Before an update or a stop, the managed Orca server counts the terminals still running on its host. If it counts zero, it restarts or stops freely. When the background terminal process was running in a reduced mode, new terminals ran inside the server process itself, and the count left them out. The server could then report "nothing running", restart, and kill those terminals and the agents in them. Now they are counted.
What Changed
Before
collectOrcadTerminalCensuslisted only the daemon's sessions.listLiveDaemonSessionsWithProtocolwalksgetAllAdapters(), which never includes that fallback.After
countInProcessFallbackTerminals()indaemon-provider-state.ts, and adds them toliveSessions.startedSinceActivationbecomes unknown, because those terminals carry no creation time to compare.DegradedDaemonPtyProvider.fallbackis now a public read-only field rather than private.Why
listProcesses()already includes the daemon's sessions, so using it would count those twice.Linked Issue
Phase 3 round-5 review (high, internal).
Visual Proof
N/A. No UI changes; the visible effect is that an update or stop now waits for, or reports, these terminals instead of killing them.
Testing
New tests:
orcad-terminal-census.test.ts:degraded-daemon-pty-provider.test.ts: a fresh terminal on a degraded provider shows up infallback.listProcesses()and not in the daemon adapters.Ran locally:
pnpm tc:node, the changed-code gate (0 findings), oxlint, the format check, and the tests above.pnpm build:orcadpasses with zeroelectronandnode:sqliteimports.Review
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
SSH execution boundary: the host still owns the verdict. A list it can't read is reported as unverifiable, never as zero. The census message's shape is unchanged; only its numbers differ.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)