fleetstate: a VM-mode device's Resources are the HOST's probe — the spec gate measures service floors against a machine the services never land on #1216
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1216
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?
Split out of #1215 (drive
20260904T105814Zevidence; did not cause that red — filed on its own so the fix is designed, not patched).internal/fleetstate/projection.go:278-283records a VM-mode device'sResourcesfrom the host probe (4 threads / 7 GB / 153 GB on the drive's droplet) with only theAllocatedboolean flipped — but the guest actually holds the dedication (1 thread / 1 GB / 10 GB,vmSpecFromFloor).deviceReason(internal/provision/assess.go:424-435) then measures service floors against the HOST's numbers, so the spec gate is vacuous for every VM-mode device: it passedfiles(floor 2/4/60) onto a 1 GB / 10 GB guest.The probe must stay the host's for
vmHostFloor's admission arithmetic (ADR 0030,internal/enroll/ledger.go:1038-1051) — the defect is that the projection re-reads the same field with a second meaning ("capacity of the node the services land on").Why this can't be patched gateway-side alone: the dedication is chosen (and user-adjustable) at join on the DEVICE (
join-transcript.txtshows the editableCPUs [1] Memory [1 GB] Disk [10 GB]frames), and it never crosses the wire. The honest fix adds the dedicated spec to what the device reports (pairing fact or landing), stores it in the ledger, and has the projection use it whenmode == VM— with the fake carrying the same refusal shape (GOTCHAS #158).Suggested layer:
internal/enroll(wire + ledger) →internal/fleetstate(projection reads the dedication) →internal/provision/assess.gountouched (it already readsResources).Triage: bug + ready-for-agent
Verified against the code. The claim holds:
internal/fleetstate/projection.go:278-283sets a device'sResourcesstraight from
f.probe.{CPUCores,MemBytes,DiskBytes}— the host probe —flipping only
Allocatedwhenf.mode == enroll.ModeVM.internal/provision/assess.go:424-441(deviceReason) readsd.Resources.*against the service
Floor, so for a VM-mode device the spec gate measuresthe role floors against the host's capacity, never the guest's dedication.
The gate is vacuous for every VM-mode device (a 1 GB / 10 GB guest passes the
filesfloor of 2/4/60).internal/enroll/enroll.go:130-146(ProbeReport) confirms Ben's why-it-can't-be-patched-gateway-side note: the wire carries only host capacity.
The chosen dedication (editable
CPUs/Memory/Diskat join on the device) hasno field on
ProbeReportand is not stored on the ledger fact, so theprojection currently has nothing else to read.
vmHostFloor's admission arithmetic(
internal/enroll/ledger.go:1031-1050, ADR 0030) — the defect is the second,conflated meaning the projection assigns the same field.
Agent brief
Goal. Make the fleetstate projection report a VM-mode device's dedicated
guest spec (not the host probe) so
deviceReason's spec gate measures servicefloors against the machine the services actually land on.
Layers (Ben's suggested path, confirmed sound):
internal/enroll— carry the chosen guest dedication (threads / mem / disk)from the device into the ledger fact. It is chosen and user-adjustable at
join on the device and never crosses the wire today, so a new reported field
is required. Implementation choice — pairing fact vs a landing fact — is
the implementing agent's to make (two-way door, provable by the tests below);
pick the one that keeps
vmHostFloor's admission arithmetic reading the hostprobe unchanged.
internal/fleetstate/projection.go:278-283— whenf.mode == ModeVM, readResourcesfrom the stored dedication instead of the host probe; keepAllocated: true. Full-install (ModeFull) devices keep reading the hostprobe.
internal/provision/assess.go— untouched; it already readsResources.Fake parity (GOTCHAS #158). The enroll seam fake must carry the same
refusal shape as the real adapter for the new dedication field — a fake that
answers a dedication where the real path would not is exactly the green-but-
unwired trap #158 documents. Add/extend the seam test so a VM-mode fact without
a dedication refuses rather than silently substituting the host probe.
Acceptance criteria:
of a service whose floor exceeds 1 GB / 10 GB (regression proving the gate is
no longer vacuous) — e.g.
files(2/4/60) refuses.Resourcesare unchanged (still the host probe).vmHostFlooradmission arithmetic still reads the host probe (ADR 0030 casefrom
internal/enroll/enroll_test.gostays green).with the host probe (GOTCHAS #158).
Context: split out of #1215; drive
20260904T105814Zevidence (did notcause that red). ADR 0030 (VM-host arithmetic), GOTCHAS #158 (fake refusal
shape).
Ruled ready-for-agent under ADR 0174 — veto anytime. Two-way door: the fix is
a revertible code change, provable by the acceptance-criteria tests above, with
no one-way-door residue (no credentials, no security-posture widening — it
tightens an over-permissive gate — no member-facing trust accept, no data
destruction, no spend, no hardware). The one open choice (pairing fact vs
landing) is an implementation detail the implementing agent decides.
swarm-claim host=matou-dev-server-01 run=17845
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1216 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope