Repository navigation
feat(placement): ADR 0072 phase 2 — authoritative affinity + retire local_snapshots (#548) - #587
Merged
Merged
Conversation
|
The latest Buf updates on your PR. Results from workflow CI / buf (pull_request).
|
nikhilunni
force-pushed
the
epic/548-gcs-free-resume
branch
from
July 6, 2026 13:30
be8f416 to
5b310e8
Compare
nikhilunni
force-pushed
the
epic/548-phase2-affinity
branch
from
July 6, 2026 13:30
d42520d to
264bbcf
Compare
nikhilunni
force-pushed
the
epic/548-gcs-free-resume
branch
3 times, most recently
from
July 7, 2026 06:45
8bd5563 to
b26914c
Compare
…ocal_snapshots (#548) Rebased onto main past #586/#598. Renumbered at land: migration 0090_drop_hosts_local_snapshots -> 0091 (main took 0090); ADR refs 0075 -> 0078. WIRE_VERSION 10 -> 11 (lockstep coord+host roll; v10 hosts drain from scheduling until the fleet rolls). Review fixes folded in: - the TS tier now follows the retirement: buf-generated fleet_pb.ts regenerated (web + orchestrator) and the four web consumers of the always-zero localSnapshots field removed (the un-regenerated codegen would have failed CI's drift check; the Fleet page rendered a dead '0 snapshots' datum). - snapshot_host_veto's cap arm now emits the promised `cap:<name>` label (bare "cap" made fc_snapshot_version-vs-bundle-stamp spikes undiagnosable from the metric). - pick_from's tier doc no longer claims capacity-BLIND affinity (tier-0 is capacity-checked by construction). - HostUtilization's rustdoc un-interleaved from the disk-floor consts; migration comment corrected (said WIRE 9->10; actual 10->11) before checksum-freeze; README/DESIGN heartbeat field lists updated; ADR gains the possession-freshness divergence note. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014jJi2vqAaxt3Q5UKxbe4Gx
nikhilunni
force-pushed
the
epic/548-phase2-affinity
branch
from
July 7, 2026 07:14
264bbcf to
243d2f2
Compare
nikhilunni
marked this pull request as ready for review
July 7, 2026 07:14
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.
Phase 2 of epic #548 (GCS-free resume), stacked on #586 (phase 1). Move 1 of ADR 0072.
Placement's warm-host choice becomes derived from the durable authority (PG
snapshots.host_id) and vetoed only by observed host state — never by a mirror nobody populates.Tier-0 authoritative affinity (
placement.rs)ScheduleContextdrops the deadprefer_snapshot_id(× the never-populatedlocal_snapshots), gainssnapshot_host: Option<HostId>fromSnapshotRecord::host_id.pick_fromrunssnapshot_host_vetobefore the soft tiers: an alive, schedulable snapshot-host with disk headroom (free work_dir ≥ the chunk-cache floor) and RAM/CPU fit is picked always — its NVMe already holds the divergent set. Every veto incrementsengram_resume_affinity_fallback_total{reason}(dead|cordoned|wire_skew|cap|digest_not_ready|disk_full|ram_full|cpu_full) — the fallback is never again silent.resolve_cold_boot_spec) so "hard-full" is a real veto, not a vibe.Retire the dead mirror end-to-end
local_snapshotswasVec::new()-hardcoded in the heartbeat loop for its entire life — a no-op affinity tier. Deleted: theHeartbeatwire field,HostRecord/HostHeartbeatfields,HostLocalSnapshot/LocalSnapshotReport, the coord HTTP DTO + PG upsert/select + row decode, the fleet-view proto count (reserved 7, satisfies bufFIELD_NO_DELETE), the api DTO + CLI display, and thehosts.local_snapshotscolumn (migration 0082).Notes
HOST_DISK_CACHE_FLOOR_BYTES/_MIBmove toengram-core; the host-agent floor aliases it (no second threshold, per the issue).host_wire_version_okuntil the host MIG rolls — the accepted clean-break deploy window (0 users).sqlx::query— no.sqlxregen needed.Testing
Placement table tests: tier-0 authority (
authoritative_snapshot_host_wins_when_healthy) + every fallback reason (snapshot_host_vetoes_fall_through_to_soft_tiers). Full workspace compiles incl.--tests; clippy-D warnings+ fmt clean; 91 placement/heartbeat/host unit tests green.Phases 3 (peer-first fill, rides #547) and 4 (evict-time prestage + rung-3 parked-local) follow.
🤖 Generated with Claude Code