Consume the staged fleet program: entitled composition of the overlay's tuned values; unentitled byte-identical (#1131) - #1132
Merged
Conversation
… field-by-field validation + composition of the staged program manifest onto the base knobs' injectable surfaces The knob table maps 1:1 onto the shipped option surfaces (#1070/#1072/#1092 — TransportClassifierConfig / ModeTransitionConfig / ProposalQueueConfig), citing the base's own DEFAULT_* constants — consume, never re-define (the #1068 precedent). Unknown fields rejected loudly (the freeze validator's unclassified class mirrored); whole-program composition (a partially- understood tuned program never composes); the ADR-0003 skew rule client-side (field-by-field revalidation against the current base's contract, skew named in the receipt, stale fields skipped with recorded reasons); unentitled / absent → base defaults exactly, byte-identical (asserted through the REAL constructors, not just the composed config object).
…eceipt on the fleet status detail Additive only: the program resolves inside the existing staged-fleet block (the same entitlement-gate inputs as the data-plane dispatch) and its receipt rides GET /amicode/fleet/status as the `program` key — the cockpit's provenance surface says where the tuning came from. An unentitled boot never reaches the line (zero fleet surfaces, byte-identical); the composed values feed the mode-machine family's injectable knobs via the resolveFleetProgram + composeFleetConfigs seam wherever the machinery is constructed.
… owner's LANDED manifest (amicissimo#418)
The sibling cast landed the fleet-program manifest with a different shape
than the one this slice assumed: values ride `surfaces` — an array of
fleet-class surface objects (transport-classifier-tuning /
mode-transition-budgets / proposal-queue-tuning, the freeze validator's
PROGRAM_SURFACE_IDS) — each field a DESCRIPTOR {name, base_default, value,
composes, base_version, description}, not a plain number. The resolver's
parse now consumes the real shape: surface id → section mapping, per-field
descriptor validation, the `composes` pointer validated against the base
knob it claims (a wrong pointer is a rejection naming BOTH refs), and the
`base_default` claim CROSS-CHECKED against the installed base's DEFAULT_*
constants — disagreement is named drift on the receipt, never silently
accepted (composition proceeds; the tuned value is explicit and validated).
KNOWN_TOP_LEVEL_KEYS: program → surfaces. description/base_version per
field tolerated as documentation; unclassified descriptor keys reject
loudly (the freeze validator's table-driven floor mirrored). The sixteen
semantics hold unchanged; the fixtures are now a byte-shape copy of the
owner's landed manifest (values verbatim, nothing sanitized). New tests:
wrong composes ref, missing composes, base_default drift surfaced, base
_default agreement (no false positives), missing base_default, unknown
surface, unclassified descriptor key.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6 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.
P4b companion — the consumption wiring for the fleet program (amicissimo#419, merged): when the fleet entitlement stages the program manifest, the extension's fleet machinery composes the tuned values into the base knobs' injectable surfaces (#1070 classifier, #1072 engine budgets, #1092 queue retries); unentitled → base defaults, byte-identical (asserted deep-equal; the overlay source is never even READ).
What lands:
fleet_program.ts—resolveFleetProgram()(entitlement gate FIRST, mirroring fleet_staging; never throws — every failure collapses into a not-composed result with a named reason), parsing the contract owner's LANDED manifest shape (surfaces + per-field descriptors): surface-id → section mapping mirroring freeze.py's PROGRAM_SURFACE_IDS; per-field validation (positive finite numbers); thecomposespointer cross-checked (a wrong ref rejects naming both the manifest's claim and the base's documented ref); the manifest'sbase_defaultcross-checked against the installed base's DEFAULT constants — disagreement is SURFACED as named drift without blocking (the tuned value is explicit; composed_fields stamp the installed constant); skew (base_version ≠ vendored pin) named in the receipt with field-by-field revalidation; unknown knob/section/surface/top-level rejected loudly; whole-program composition only (tuned values are coherent as a set).composeFleetConfigs(values)is the one-call helper feeding the three constructors'config?: Partial<...>seams. Provenance renders on the fleet status route (program: overlay_id, base_version, composed_fields[10]).The shape-adaptation story, on the record: this slice was cast in PARALLEL with the manifest's owner (#418) against the documented contract; the owner landed a richer shape (surfaces + descriptor objects). The drift was caught by a cross-repo integration check BEFORE either merged (after one sloppy first check that passed vacuously — redone properly), and this branch was shape-adapted to the owner's landed manifest: zero residual drift (every knob name, composes ref, and base_default matches the base constants).
Gate evidence (director re-run): the consumption suite 23/23; typecheck clean; full suite at baseline (4 environmental failures, verified reproducing on base). Merge is per the standing green directive.