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:
- Boot-only by construction. Every knob here is admissible exactly once, through
ConfigureOperation. The live surface is the closedLivePolicyPatchunion; a knob that appears in both would re-create the historical situation whereConfigureRun.governanceandLoadGovernancePolicyshared one implementation and therefore made the boot/live distinction unenforceable (§13.1 现状注记). - No implicit defaults survive the boundary.
OperationConfigis the sparse host input;resolve_operation_confignormalises it into a denseResolvedOperationConfig, and that is what the genesis record stores. A replay therefore never re-applies a newer binary’s defaults (§7.3). - Validation is atomic. One illegal field rejects the whole
ConfigureOperationand changes nothing:resolve_operation_configreturnsResultand 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§
- Budget
Grant - RunGroup admission result.
reservation_idis opaque — the kernel enforces the grant locally and reports terminal usage against the same identity; it never interprets it. - Collection
Limits - Named per-collection entry bounds. Absent ⇒ that collection inherits
max_collection_entries. - Config
Defaults - The kernel’s compile-time baseline plus the bootstrap ceiling to resolve against.
- Context
Policy - Stable, replayable context behaviour. Every ratio is fixed-point ppm.
- Entropy
Watch Policy - Entropy watch. The three historical
f64knobs are fixed-point ppm (§7.1.1, §13.3): a threshold that differs by one ULP between languages is a different kernel decision. - Execution
Policy - Budgets and loop guards (§13.3 ·
SetCriteriaGate,SetRepeatFuse,SetEntropyWatch, and theSchedulerBudgetthe constructor may no longer accept, §13.1). - Feature
Policy - The feature switches §13.3 folds together:
SetMemoryEnabled,SetKnowledgeEnabled,SetPlanToolEnabled,SetStableCoreToolsand the tool dispatch gate (§13.1’s one genuinely boot-only item in this group). - Host
Effect Support - The host’s explicit declaration of which effect kinds it can execute (§7.3, DEC-8).
- Kernel
Limits - Operation-scoped structural limits. These may only tighten
KernelBootstrapLimits; widening any axis rejects the wholeConfigureOperation. - Memory
Policy - Validation / recall / promotion thresholds (§13.3 ·
SetMemoryPolicy). - Milestone
Phase - One phase of a
VerificationContract. - Operation
Config - Boot configuration for one operation (§7.3).
- Payload
Policy - Where the kernel draws the inline/external line for a tool result (§7.10).
- Pressure
Thresholds - 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.
- Prompt
Budget - Host-counted request overhead and hard reserves, deducted before the kernel renders any content.
- Rate
Window - Repeat
Fuse Policy - Resolved
Collection Limits - Resolved
Context Policy - Resolved
Entropy Watch - Resolved
Execution Policy - Resolved
Feature Policy - Resolved
Governance Policy - Resolved
Kernel Limits - 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”.
- Resolved
Memory Policy - Resolved
Operation Config - The dense, defaults-free configuration written into the genesis record (§7.3).
- Resolved
Payload Policy - Resolved
Recovery Policy - Resolved
Repeat Fuse - Resolved
Scheduler Policy - Resolved
Signal Policy - Resource
Quota - Declarative caps enforced at the syscall trap. Absent axis ⇒ uncapped, which is a value.
- Scheduler
Policy - Ready-queue ordering weights. No
versionfield: §16.1 leaves exactly two revision markers on the wire (abi_version,checkpoint_version), and a per-policy version is the third one DEC-6 removed. - Skill
Metadata - Tail
Bounds - Soft watermark and hard limit of the journal tail, on both axes §12.3 names: canonical input count and bytes.
- Verification
Contract - One verification contract: an ordered cascade of phases the operation must pass in sequence.
Enums§
- Tool
Dispatch Gate - Fail-closed dispatch (§13.1).
Exposedexecutes only tools this operation actually advertised to the model;Registeredis the permissive escape hatch.
Constants§
- MAX_
RECOVERY_ ATTEMPTS - Ceiling shared by both semantic recovery ladders, matching the legacy validator.
- MAX_
SCHEDULER_ WEIGHT - Upper bound of any scheduler weight, matching the legacy validator.
Functions§
- resolve_
operation_ config - Normalise a sparse
OperationConfiginto the dense record the kernel stores, rejecting the whole configuration if any field — or any relationship between fields — is illegal.