Repository navigation
feat(governor): TierConfig + tier_configs_for — first realization slice (priority #3) - #1618
Conversation
…ce (priority #3) GENOME-FOUNDRY-SENTINEL.md Part 2 prescribes a per-hardware-class `Vec<TierConfig>` — discrete-GPU emits five entries (Fast/Warm/Bench/Cold/Frozen), UMA emits four (no Warm). The Rust code is identical across hardware; only the vec shape varies. This is the substrate's hardware-portability spine: subsystems address tiers by role, never by ordinal, and the type system makes "Fast→Warm eviction on UMA" structurally impossible because there is no Warm entry on UMA. This slice adds the shape with the structural-absence invariant locked at the type/test level. It does NOT change `GovernorPolicy`, does NOT change downstream consumers, and intentionally leaves `configured_limit = 0` across the board — real capacity numbers come from policy_file TOML loading in a follow-up slice. Numbers without the shape are premature; the shape without the numbers is correct. Changes: - `core/continuum-core/src/genome/tier.rs`: - new `pub struct TierConfig { role, capacity, eviction }` with ts-rs export. `backing` field deferred to the next slice (when TierStore handles thread through). - new `pub fn tier_configs_for(hw: &HardwareClass) -> Vec<TierConfig>` that keys UMA via `hw.vram_mb == 0` (the existing implicit contract from `classify_hardware`, documented inline so a future PR that promotes `uma: bool` to a HardwareClass field doesn't silently invert this). - 5 regression tests pinning the load-bearing invariants: * `tier_configs_for_uma_has_no_warm` — 4 entries, no Warm * `tier_configs_for_discrete_has_warm` — 5 entries in canonical order * `tier_configs_for_uses_canonical_eviction_policy_per_role` * `tier_configs_for_emits_zero_capacity_until_policy_file_loads` — "shape, not numbers" gate * `tier_configs_for_addressable_by_role_uniformly_across_hardware` — substrate-doctrine smoke: same role lookup works on both hardware classes despite different vec lengths Verified: 5/5 tier_configs tests green on rust 1.95 (Mac, --features metal,accelerate); cargo fmt clean. Compose: this lands the "shape" half of realization-priority #3 (SubstrateGovernor) — the next slices wire TierConfig into GovernorPolicy and load real capacity bytes from the policy_file TOML. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Adversarial peer review (BIGMAMA): APPROVE-WITH-NITS — clean, well-scoped, GENOME-FOUNDRY-SENTINEL Part 2 contract honored, tests pin the load-bearing UMA-omits-Warm invariant. Compiles by inspection,
Tests are substantive (len+absence+order, policy mapping, zero-capacity guard, by-role uniformity), one Integration note for our lane intersection: to retire my |
…ifiedMemory CPU-floor default (#1628) * feat(inference): coordinator detects hardware silicon — retire the UnifiedMemory CPU-floor default Joel flagged the InferenceCoordinatorModule (#1619) shipping `TargetSilicon::UnifiedMemory` as the production default — the CPU/Mac-floor anchoring "GPU or bust" forbids. This wires the coordinator to the governor's existing hardware detection (Mac's #1335 hw_probe + classify_hardware, already on canary) so the prod default FOLLOWS the hardware instead of a hardcoded floor. - `coordinator_silicon_for(GovernorSilicon) -> TargetSilicon` — the seam between governor classification and the lane scheduler: AppleM → UnifiedMemory; NvidiaCuda/AmdRocm/IntelVulkan → Gpu; None → Cpu (honest, not a silent GPU pretense). (Per Mac's #1618 review: this bridge is the net-new code I own at the seam, since the two TargetSilicon enums don't share variants.) - `CoordinatorConfig::for_silicon(silicon)` — canonical floor-shape builder retargeted to a silicon class; `realistic_floor_default()` now delegates to `for_silicon(UnifiedMemory)` (de-dup); `detected()` = probe_hardware_profile → classify_hardware → translate → for_silicon. - `InferenceCoordinatorModule::with_detected_hardware()` (new production constructor) + ipc/mod.rs boot uses it. On the RTX 5090 the coordinator now targets `Gpu`; on Apple Silicon, `UnifiedMemory`; GPU-less, `Cpu`. One-shot startup probe (a few file reads + per-backend FFI) — acceptable per CONCURRENCY-STYLE-GUIDE. Per-tier budgets stay the realistic-floor numbers until the governor's policy-file slice refines them; this fixes the SILICON label, which is what Joel called out. Validated rust:1.95 (continuum-core --lib): 6 tests pass (translation maps discrete GPU→Gpu not floor / AppleM→UnifiedMemory / None→Cpu; for_silicon targets one silicon end-to-end; detected() self-consistent), whole lib compiles (no inference→governor cycle), CARGO_EXIT=0. Co-Authored-By: Claude Opus 4.8 <[email protected]> * chore(inference): drop dead with_realistic_floor, fix stale doc + test comment (reviewer nits, #1628) Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
Card 2a0d34cf: land the identity custody fix in base. 762adeb2 is the airc canary head + the read-never-mints identity custody fix (fix/read-never-mints-identity, card 4b2dbdf3): a READ of the work board on a named home no longer silently mints and overwrites a citizen's identity.key; init --as mints explicitly. Bumps every workspace pin in Cargo.toml [workspace.dependencies] (airc-core, airc-blobs, airc-protocol, airc-ipc, airc-bus, airc-lib, airc-wire, airc-trust, airc-work) and re-resolves Cargo.lock to the new rev (15 lock entries). This rev already carries #1623 (sealed progress / terminal reply lifecycle, which satisfied the c7083d04 BLOCKED note) plus #1618, #1624, #1630, #1633, #1635 on top. Suite status: airc suite green at 762adeb2 (identity_commands 10/10, airc-identity unit+doc). continuum suite re-run follows against this pin.
…y grant clears through Three airc commits: #1630 adds `cambrian-flex` (ONE-BUDGET slice 1; its first continuum user, the turn's allocation, follows), #1618 hook catch-up from an ORM index, #1624 one daemon initializer before store access. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…y grant clears through (#5728) * airc pin d26713b -> 38a22ab: adopt cambrian-flex, the one solver every grant clears through Three airc commits: #1630 adds `cambrian-flex` (ONE-BUDGET slice 1; its first continuum user, the turn's allocation, follows), #1618 hook catch-up from an ORM index, #1624 one daemon initializer before store access. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cargo.lock: only the airc packages move (d26713b -> 38a22ab) plus their new fs2 edge; canary's windows-sys/windows-core edges kept (Cormac on #5728) cargo update -p <airc crates> re-pointed eleven unrelated crates' windows-sys edges (0.61.2 -> 0.59/0.60) and iana-time-zone's windows-core (0.58 -> 0.57) even with the MSRV fallback off. The lock is canary's with only the airc-sourced [[package]] blocks replaced, in place; cargo metadata --locked accepts it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…rains (the conditions #5743 set) (#5761) #5743 reverted 38a22ab because airc #1618 derived every row at open and the M5's residents (1.7-12.8 GB stores) stalled 4-8+ min at boot. Its stated way forward: airc derives per page, never at open, and every store has a byte-budgeted, set-based drain. Both are now in airc canary: - #1654 (76e8e2d, card 70055c76): open is schema only (0.016 s on a copy of Paige's 1.55 GB store, against 23.4 s); indexes are built after the drain; a read derives nothing and says whether its file was settled; a store this binary wrote is settled at open by one index seek. - #1653 (86b153e, card e95d41a4): each kind declares its retention, and the drain runs in bounded windows on its own connection. Only the nine airc revs and their lock entries move (plus airc-lib's fs2 line); no other package re-resolves. `cargo check --locked` of continuum-airc-protocol, airc-test-fixtures, continuum-process and continuum-rooms passes on the new pin. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Summary
First realization slice on the SubstrateGovernor lane (realization-priority #3, per BIGMAMA's deconflict). GENOME-FOUNDRY-SENTINEL.md Part 2 prescribes a per-hardware-class
Vec<TierConfig>— discrete-GPU emits five entries (Fast/Warm/Bench/Cold/Frozen), UMA emits four (noWarm). The Rust code is identical across hardware; only the vec shape varies.This is the substrate's hardware-portability spine: subsystems address tiers by role, never by ordinal, and the type system makes "Fast→Warm eviction on UMA" structurally impossible because there is no Warm entry on UMA.
Scope
This slice adds the SHAPE with the structural-absence invariant locked at the type/test level. It deliberately does NOT:
GovernorPolicy(keeps the legacytier_sizes: TierSizesfor now — converting GovernorPolicy is a follow-up slice once consumers can read TierConfig);configured_limit = 0across the board — TOML loading fills this in a follow-up).Numbers without the shape are premature; the shape without the numbers is correct.
Changes
core/continuum-core/src/genome/tier.rs:pub struct TierConfig { role, capacity, eviction }withts-rsexport. Thebackingfield is deferred to the next slice (when TierStore handles thread through).pub fn tier_configs_for(hw: &HardwareClass) -> Vec<TierConfig>. UMA is keyed viahw.vram_mb == 0— the existing implicit contract fromclassify_hardware, documented inline so a future PR that promotesuma: boolto a HardwareClass field doesn't silently invert this.tier_configs_for_uma_has_no_warm— 4 entries, no Warm, Fast first / Frozen lasttier_configs_for_discrete_has_warm— 5 entries in canonical ordertier_configs_for_uses_canonical_eviction_policy_per_role— every emitted config carriesEvictionPolicy::canonical_for(role)tier_configs_for_emits_zero_capacity_until_policy_file_loads— "shape, not numbers" gatetier_configs_for_addressable_by_role_uniformly_across_hardware— substrate-doctrine smoke: same role lookup works on both hardware classes despite different vec lengthsVerified
cargo test -p continuum-core --lib tier_configs --features metal,accelerate→ 5/5 green on rust 1.95 (Mac).cargo fmtclean.Compose
Lands the "shape" half of realization-priority #3 (SubstrateGovernor). Next slices:
TierConfigintoGovernorPolicy(replace / supplementtier_sizes: TierSizes).policy_fileTOML loader fills realconfigured_limitfrom the per-hardware anchor numbers in the doc (M2 Air: Fast=2 LoRA layers + 2k KV tokens; 5090: Fast=8+16k; etc.).TierBackingRefinto TierConfig once TierStore handles exist.Independent of BIGMAMA's slice-3 (
PressureBroker::relieve()phase-2 withrevoke_leases_for) and the coordinator/lease-revocation reconcile lane. No overlap in touched files.Test plan
TierConfigand wire it intoGovernorPolicy.uma: boolto a HardwareClass field updatestier_configs_forto use it directly (the inline comment names this).🤖 Generated with Claude Code