pub enum ContextSourceExclusionV1 {
LifecycleNotLive {
lifecycle: HarnessRunLifecycleV1,
},
NoBinding,
NoActiveManagedSession,
NodeIncarnationUnknown {
node_id: HarnessSelectorV1,
node_incarnation: HarnessSelectorV1,
known_incarnations: Vec<HarnessSelectorV1>,
},
ManagedSessionRecordMismatch {
record_id: HarnessSelectorV1,
workspace_id: HarnessSelectorV1,
instance_id: u64,
generation: u64,
node_has_records: u32,
},
ManagedSessionsPageTruncated {
record_id: HarnessSelectorV1,
page_len: u32,
total: u32,
},
MonitorUnavailable,
ProjectionNotLive {
availability: ProjectionAvailabilityV1,
freshness: ProjectionFreshnessV1,
transport_incomplete: bool,
},
DurableNodeUnknown {
node_id: HarnessSelectorV1,
},
}Expand description
Names, with its compared inputs, the exact reason context_source_option
(hatchery-harness-service::runtime) declined to surface a run as a
context_sources candidate. Instrumentation only, never a policy
decision – the admission logic itself is unchanged by this type’s
existence; it only makes an already-silent exclusion observable from
launch-options and the harness’s own logs (context source excluded).
One variant per early exit in that function, Live and Durable branches
alike; a Live-branch-only or Durable-branch-only condition says so in its
own doc comment.
Variants§
LifecycleNotLive
The run’s lifecycle is neither Running nor Waiting, and it
carries no durable context pack (which would have taken the Durable
branch instead of this lifecycle gate).
Fields
lifecycle: HarnessRunLifecycleV1NoBinding
The run carries no binding at all – Live or Durable branch alike.
NoActiveManagedSession
The bound session identity is not Managed at all (Durable branch),
or (Live branch) it is Managed with no active_session.
NodeIncarnationUnknown
Live branch only: no entry in the runtime inventory carries this
run’s exact node_id + node_incarnation pair (the Durable branch
re-resolves the node’s CURRENT incarnation by node_id alone
instead; see DurableNodeUnknown). known_incarnations names the
incarnation(s) the inventory DOES hold for that node_id, bounded at
CONTEXT_SOURCE_EXCLUSION_KNOWN_INCARNATIONS_MAX.
Fields
node_id: HarnessSelectorV1node_incarnation: HarnessSelectorV1known_incarnations: Vec<HarnessSelectorV1>ManagedSessionRecordMismatch
The matched node’s managed_sessions page carries no record whose
record_id/workspace_id/active_binding (workspace, instance,
generation) match the run’s binding, and that page was NOT cut for
size – the record genuinely does not exist on this node right now.
node_has_records is the page’s own length, for scale.
ManagedSessionsPageTruncated
Same missing-record shape as ManagedSessionRecordMismatch, but the
node’s managed_sessions_truncated flag was set: the page the
harness received is a PREFIX of the node’s full record set, so the
matching record may simply sit past that cut rather than genuinely be
absent. page_len is the page’s own length, total the node’s full
managed_session_count.
Live branch only: execute_operator_monitor returned an error for
this run.
ProjectionNotLive
Live branch only: the monitor projection resolved but is not live enough to route an export through right now.
DurableNodeUnknown
Durable branch only: the pack’s node_id is not currently known by
the runtime inventory at all (any incarnation), so there is no route
to resolve the pack through right now.
Fields
node_id: HarnessSelectorV1