engine-adapters: store-fleet-projection — fleet state reads the config repo + enroll ledger, never a second database #167
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/idss#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending.
What to build
The fleet-state store real (ADR 0103 §3): a projection over the config repo's inventory plus the enroll ledger — never a parallel device database that could drift from what clan deploys. Feeds the P4 assess/select reads, monitoring's silence-classification input, and backups' target recommendation with one shared fleet.
Acceptance criteria
Blocked by
Task manifest
Done in
386208f(on origin/main).What shipped:
internal/fleetstate/projection.go—Projection, the real productionfleetstate.Reader(ADR 0103 §3): a live dual-source read over the config-repo inventory + the enroll ledger, never a parallel device database.Devices/Device/Datasets/Gaps/Healthyread re-derives from its sources, so P4 assess/select, P5 monitoring silence classification, and P7 backups target recommendation share ONE fleet; a lost projection re-derives losslessly on restart (AC3).Inventoryport — a node removed from inventory drops from every consumer at once (AC2). Per-node resources/network/install facts from the enroll ledger (EnrollLedger, satisfied by*enroll.Ledger), keyed by the grant node identity (AC1).Healthydelegates to provisionings default-deny bit (Health, injected at compose; nil → default-deny) — coverage is re-derivable, not part of the inventory+ledger derivation (ADR 0103 §3).WithPatternsoverlay, honestlyUptimeNewuntil monitoring supplies one.MemoryInventoryis the injectable inventory source; the real config-repo reader lands with the compose root (#181). Contracts unchanged —Projectionsatisfiesfleetstate.Reader,monitor.FleetStateandbackup.FleetStateas they stand.Evidence:
internal/fleetstate/projection_test.goproves all three acceptance clauses over a REALenroll.Ledger(dual-source derivation, one-fleet-across-P4/P5/P7 after a removal, lossless re-derivation).go build/vet/full suite clean. STATUS.md header + milestone log updated in the same commit.Next (#181): wire the real config-repo inventory reader + provisioning health read into the projection (ADR 0107); observed patterns from monitoring.