Files
orca/src/shared/execution-host/runtime-listing-host-scope.ts
T
Neil 6018fca4de refactor: group shared settings, profiles and execution hosts (#43047)
* refactor: place shared settings profiles and host contracts with owners

* fix: retire stale cleanup validation contacts

* refactor: consolidate imports from concrete owners

* refactor: bind new card fixture to profile defaults owner

* style: format rebased concrete host import

* refactor: consolidate project header color owner imports

* fix: load released phone readers after folder moves

* fix: preserve released chat readers and current owner imports
2026-11-16 04:03:33 -08:00

23 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { parseExecutionHostId, type ExecutionHostId } from './execution-host'
/** Bounded listing evidence applies only to covered hosts; absent scopes on old hosts prove no coverage
* (docs/reference/ssh-execution-boundary.md). */
export type RuntimeListingHostScope = {
hostIds: ExecutionHostId[]
omittedHostIds: ExecutionHostId[]
}
/** omittedHostIds discloses even retired peers, not coverage owed. Paired runtime peers own their control planes
* and are never this runtime’s enumeration duty; counting them as gaps latched remote panes (#18595). */
export function hostScopeCensusIsComplete(scope: RuntimeListingHostScope | undefined): boolean {
// A host too old to publish a scope cannot claim one; absence is never completeness.
if (scope === undefined) {
return false
}
// Require a legible covered ID: validators only prove an array. Requiring all IDs legible would reject future host kinds forever.
if (!scope.hostIds.some((hostId) => parseExecutionHostId(hostId))) {
return false
}
return scope.omittedHostIds.every((hostId) => parseExecutionHostId(hostId)?.kind === 'runtime')
}