Skip to main content

Module config

Module config 

Source
Expand description

Operation configuration (spec §7.3, §13.1, §13.3).

One input class carries configuration, it is the genesis record, and it decodes inside the absolute bootstrap boundary. This module fixes what travels in it.

Three rules shape the whole field tree:

  1. Boot-only by construction. Every knob here is admissible exactly once, through ConfigureOperation. The live surface is the closed LivePolicyPatch union; a knob that appears in both would re-create the historical situation where ConfigureRun.governance and LoadGovernancePolicy shared one implementation and therefore made the boot/live distinction unenforceable (§13.1 现状注记).
  2. No implicit defaults survive the boundary. OperationConfig is the sparse host input; resolve_operation_config normalises it into a dense ResolvedOperationConfig, and that is what the genesis record stores. A replay therefore never re-applies a newer binary’s defaults (§7.3).
  3. Validation is atomic. One illegal field rejects the whole ConfigureOperation and changes nothing: resolve_operation_config returns Result and owns no state, so a partial application is not expressible.

Host concerns explicitly absent (§7.3 配置边界 table, §13.3): host effect retry/backoff, spool / blob directories, provider endpoint / key / protocol, checkpoint storage location, and memory_path. They are host executor and store configuration; a kernel that accepted them would be persisting facts it cannot reproduce.

Structs§

BudgetGrant
RunGroup admission result. reservation_id is opaque — the kernel enforces the grant locally and reports terminal usage against the same identity; it never interprets it.
CollectionLimits
Named per-collection entry bounds. Absent ⇒ that collection inherits max_collection_entries.
ConfigDefaults
The kernel’s compile-time baseline plus the bootstrap ceiling to resolve against.
ContextPolicy
Stable, replayable context behaviour. Every ratio is fixed-point ppm.
EntropyWatchPolicy
Entropy watch. The three historical f64 knobs are fixed-point ppm (§7.1.1, §13.3): a threshold that differs by one ULP between languages is a different kernel decision.
ExecutionPolicy
Budgets and loop guards (§13.3 · SetCriteriaGate, SetRepeatFuse, SetEntropyWatch, and the SchedulerBudget the constructor may no longer accept, §13.1).
FeaturePolicy
The feature switches §13.3 folds together.
HostEffectSupport
The host’s explicit declaration of which effect kinds it can execute (§7.3, DEC-8).
KernelLimits
Operation-scoped structural limits. These may only tighten KernelBootstrapLimits; widening any axis rejects the whole ConfigureOperation.
MemoryPolicy
Validation / recall / promotion thresholds (§13.3 · SetMemoryPolicy).
MilestonePhase
One phase of a VerificationContract.
OperationConfig
Boot configuration for one operation (§7.3).
PayloadPolicy
Where the kernel draws the inline/external line for a tool result (§7.10).
PressureThresholds
The five pressure thresholds. Replaced as one value: a partial threshold ladder is how the strictly-increasing invariant gets violated one field at a time.
PromptBudget
Host-counted request overhead and hard reserves, deducted before the kernel renders any content.
RateWindow
RepeatFusePolicy
ResolvedCollectionLimits
ResolvedContextPolicy
ResolvedEntropyWatch
ResolvedExecutionPolicy
ResolvedFeaturePolicy
ResolvedGovernancePolicy
ResolvedKernelLimits
Structural limits after resolution: the three absolute axes plus a dense per-collection table. Every named bound is concrete here, so no later stage has to re-derive “which ceiling applies to this container”.
ResolvedMemoryPolicy
ResolvedOperationConfig
The dense, defaults-free configuration written into the genesis record (§7.3).
ResolvedPayloadPolicy
ResolvedRecoveryPolicy
ResolvedRepeatFuse
ResolvedSchedulerPolicy
ResolvedSignalPolicy
ResourceQuota
Declarative caps enforced at the syscall trap. Absent axis ⇒ uncapped, which is a value.
SchedulerPolicy
Ready-queue ordering weights. This is a strict value object with no format discriminator.
SkillMetadata
TailBounds
Soft watermark and hard limit of the journal tail, on both axes §12.3 names: canonical input count and bytes.
VerificationContract
One verification contract: an ordered cascade of phases the operation must pass in sequence.

Constants§

MAX_RECOVERY_ATTEMPTS
Ceiling shared by both semantic recovery ladders.
MAX_SCHEDULER_WEIGHT
Upper bound of any scheduler weight.

Functions§

resolve_operation_config
Normalise a sparse OperationConfig into the dense record the kernel stores, rejecting the whole configuration if any field — or any relationship between fields — is illegal.