Fleet projection reader (schema pkg) + amico fleet status verb + bootstrap exception (#1068) - #1071
Merged
Merged
Conversation
…eshness + provenance rendering (#1068) The TS consumer of amicissimo's fleet-authority projection, placed at the repo's cross-package shared-contract seam (@amicode/schema root export, the validate/mode_registry precedent). Mirrors the Python contract module's rejection semantics exactly: contract_version checked first with a LOUD FleetContractVersionError naming both versions on stale/future/ absent; schema_version gate second; freshnessBetween implements §3 D1 (same epoch + higher counter = fresh, equal = stale, cross-epoch or rewind = unknown — force refetch, surfaced); renderFleetStatus renders per-section provenance BESIDE the data, base defaults for absent sections, carried freshness fields only. The module holds no clock at all — pinned by a source guard test. 23 unit cases modeled on the Python fixtures.
…ocation seam + bootstrap exception (#1068) The fleet-authority read: entitlement-gated through the premium machinery (PREMIUM_CODE + readCodes, now exported — one codes reader, no fork), checkout resolved via the AMICISSIMO_ROOT ladder, publisher invoked at a typed injectable subprocess seam (default: python3 -m fleet_authority publish --out <tmp> with cwd = checkout — the amicissimo#414 entry point), result read through the ONE shared reader. Bootstrap exception: absent entitlement/checkout states base-standalone with the grant path and exits 75 (FLEET_BOOTSTRAP_EXIT — distinct from 0/64/stack-trace), mode field untouched. The pinned status --session registry contract is byte-identical; --projection routes within the same verb. 11 tests: seam, ladder, fixture integration, stale-contract loud rejection, publisher-failure honesty, D1 previous-verdict, bootstrap x3, usage, router.
|
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
7 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.
P3b-1 of the approved fleet rearchitect (spec-20260913-114814 row 1 + D1) — the amicode half of the fleet authority: a TypeScript projection reader consuming amicissimo's contract v1 (the Python owns the format; the reader consumes, never redefines), the
amico fleet status --projectionverb (entitlement-gated, publisher invocation seam), and the bootstrap exception (absent entitlement/checkout → base-standalone stated, exit 75).What lands:
packages/schema/src/fleet_projection.ts— reader placement per the repo's cross-package contract-code convention (consumed by both amico-run and the future extension consumer, P3b-2): schema_version gate; contract_version checked against v1 with a LOUD rejection naming both versions (stale/future/absent); D1 freshness semantics (same epoch+higher=fresh, equal=stale, cross-epoch/rewind=unknown + force-refetch advisory) with a grep-style guard asserting the module has no Date reference at all — carried fields only, never computed age; per-section provenance rendered as metadata, never merged.python3 -m fleet_authority publish --out <tmp>(the Server Boot-ID and SSE Connection Resilience #414 companion's interface — the seam is typed and injected, every test mocks it), reads the projection through the shared reader, prints the per-section provenance summary.--previoussurfaces the D1 verdict.Gate evidence (director re-run): @amicode/schema 20 files passed (incl. 23 reader cases); amico-run 96 files passed (incl. 11 verb cases); both typechecks clean. Extension suite at baseline parity (9 evidenced environmental failures, byte-identical on detached origin/main). Scope: 10 files +1189/−4 (the −4 = readCodes exported from premium.ts for the one codes reader — the entitlement machinery reused, not forked).
Notes: the verb surface is
status --projectionbecause the bareamico fleet status(session registry) is pinned by existing tests — naming revisit flagged for P4 when the mode machine's verbs land. No ajv schema added on purpose — a second shape-schema would re-define amicissimo's format. Merge is per the standing green directive.