Skip to content

Host-neutral contract core: containment lint + per-host budget + «fn» relocation (j8s4)#546

Merged
clkao merged 1 commit into
mainfrom
spacedock-ensign/fn-cleanup-containment
Jul 21, 2026
Merged

Host-neutral contract core: containment lint + per-host budget + «fn» relocation (j8s4)#546
clkao merged 1 commit into
mainfrom
spacedock-ensign/fn-cleanup-containment

Conversation

@clkao

@clkao clkao commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Makes the shared/host-neutral FO contract files genuinely host-neutral, enforces it with a lint, and fixes the budgeting metric to measure real per-host load. Post-sprint 0260 coherence cleanup; captain-directed into 0.26.0.

What ships

  • Containment lint (internal/contractlint/host_neutral_core_test.go) — the five shared core files (first-officer-shared-core, fo-dispatch-core, fo-write-core, fo-merge-core, ensign-shared-core) carry no host name or host tool token; host-specifics live only in the adapters. A containment/existence check (not a prose-grep), with a discriminator control. Reds 30/30 planted host words/tokens.
  • Per-host budget metric — replaces the sum-of-13 ratchet (a double-counting shorthand) with per-host load sets + per-host ratchets (claude 111,183 / codex 74,608 / pi 70,725, zero slack). A single-host regression reds only that host; the union of load sets equals the address-lint 13-file set so no measured file escapes.
  • «fn» relocation — the six → Claude:/Codex:/Pi: coverage arrows become kind-only → **runtime-binding** pointers; the host residue moved into the adapters. Every host's real FO session load drops (host-neutral shared core, host-specifics per-adapter).

Validation

  • Detached adversarial audit: refuted nothing material across relocation coherence, ratchet soundness, lint soundness, completeness — each guard empirically plant-tested (byte/token/ghost-path).
  • roborev contractlint: resolve Skill() cross-file prose pointers in the dangler oracle #459: one medium (per-host HOST-key parity) declined with a promote-condition (captain: only matters when adding a 4th host) — record in the entity.
  • Two disclosed non-blockers: a Codex/Pi background-discipline parenthetical that never fires; the per-host reduction came in smaller than the spike estimate (still drops, honestly reported).
  • go test ./... green.

g6's standing-teammate conflict left untouched (owned by g6); AC-4 deferred.

🤖 Generated with Claude Code

…-host budget + relocation

Three deliverables (j8s4):

1. Containment lint (AC-1): internal/contractlint/host_neutral_core_test.go
   asserts the five shared/host-neutral contract files carry no host name
   (claude|codex|pi|opus|sonnet|haiku|fable, word-bounded) and no host tool
   token (Claude vocabulary + the existing Codex/Pi vocabularies), with a
   discriminator control. Bare `acceptance` excluded with grounds (core
   workflow vocabulary; the Pi field token stays adapter-contained).

2. Per-host budget (AC-5): the sum-of-13 foPromptMetrics ratchet is replaced
   by per-host load sets (shared cores + host adapters + host-reachable
   trigger skills) with per-host baseline constants, so a one-host regression
   reds its own ratchet; the checkpoint logs all three loads and the
   mutable-address lint keeps the 13-file union (sync-checked).

3. Relocation + reconciliation (AC-2/AC-3): the six per-host arrow lines in
   fo-dispatch-core.md become kind-only runtime-binding pointers
   (runtimeBoundCapabilities +6); non-redundant residue moves to the
   adapters (Pi: interrupt-steering, cwd-on-every-call, advisory detail,
   model-space ownership; Claude: async binding, completion-signal tag,
   staleness caveat, ensign background-task surface + failure channel).
   The Fan-out checkpoint gains the host-neutral authoring rule binding a
   fan-out's shape to this host's «async-dispatch»/«addressable-worker»
   bindings. Two core/binding conflicts (wait_agent foreground-vs-idle,
   roster-reconcile ABSENT-vs-list_agents) dissolve by adapter ownership;
   the g6 idempotency conflict stays owned by g6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Journey cost delta

Scenario Runtime Model Turns Δ Cache Read Δ Cache Creation Δ Tokens Δ (total) Cost Δ (USD) Duration Δ (ms) Baseline
feedback-3-cycle-escalation claude claude-opus-4-8 -3 -120663 -1235 -122943 -0.0941 +620 latest published
feedback-3-cycle-escalation claude sonnet +1 +54260 +2385 +57054 +0.0313 -2598 latest published
filing claude claude-opus-4-8 -1 -38695 -355 -39094 -0.0226 +992 latest published
filing claude sonnet -2 -95411 -1773 -97985 -0.0472 -19683 latest published
gate-guardrail claude claude-opus-4-8 +0 -909 -118 -932 +0.0012 +7795 latest published
gate-guardrail claude sonnet -2 -75224 -945 -76378 -0.0292 -11858 latest published
keep-moving-posture claude claude-opus-4-8 +1 -43786 +487 -42092 +0.0327 +44945 latest published
keep-moving-posture claude sonnet -12 -820020 -4538 -828084 -0.4564 -82123 latest published
merge-hook-guardrail claude claude-opus-4-8 +0 -3389 +549 -2498 +0.0103 +4632 latest published
merge-hook-guardrail claude sonnet -1 -36768 +1761 -34542 +0.0026 -3426 latest published
rejection-flow claude claude-opus-4-8 +4 +128371 -10017 +106961 -0.2671 -119535 latest published
rejection-flow claude sonnet +5 +790609 +13859 +811542 +0.3991 +99336 latest published
self-evidence-merge-triage claude claude-opus-4-8 -16 -603745 -23454 -634916 -0.9288 -146263 latest published
self-evidence-merge-triage claude sonnet -16 -842831 -11519 -857425 -0.3418 -67633 latest published
shallow-boot claude claude-opus-4-8 +0 -943 -666 -2141 -0.0180 -4622 latest published
shallow-boot claude sonnet +1 +39305 +1038 +40737 +0.0216 +6418 latest published
shallow-boot-window claude claude-opus-4-8 +0 -65 -601 -665 +0.0000 +0 latest published
shallow-boot-window claude sonnet +1 +916 +122 +1042 +0.0000 +0 latest published
smallest-sufficient-mechanism claude claude-opus-4-8 -10 +388153 +5657 +396768 -0.5515 -102324 latest published
smallest-sufficient-mechanism claude sonnet -8 +34651 +121 +34309 -0.3804 -118449 latest published

@clkao
clkao merged commit 4f669e6 into main Jul 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant