own-VPS spec gate: ADR 0030's 4 GiB floor rejects the exact droplet the app's own remedy recommends renting #439
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
Reference
Matou/idss#439
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?
Failure: rehearsal drive
20260811T180057Zprogressed cleanly through own-VPS enrollment and pairing (state/founding-state.json: everyown-vpsstage throughsupply/pairsucceeded) and then red at the spec gate:Comparison:
internal/enroll/ledger.go:806(specShortfalls), floor defined atinternal/founding/standup.go:71-74(GatewayFloor.MinMemBytes = 4 << 30, citing ADR 0030). Rendered correctly byapp/src/components/founding/FoundingSpecGateFail.vue(S9x card) — this is not a UI bug.Why this matters: the target droplet (170.64.179.132) is the same DigitalOcean 2vCPU/4GB tier the app's own remedy card recommends (
FoundingSpecGateFail.vue: "Rent a server instead — Sized right, about $12/month"). Real cloud '4 GB' droplets report slightly under 4 GiBMemTotalto the kernel (firmware/hypervisor-reserved region) — this is universal, not specific to this box. As coded,GatewayFloor.MinMemBytesis an exact binary-GiB comparison with zero headroom, so the app's own suggested remedy cannot pass its own gate. Anyone renting the recommended tier hits this every time.Side effect: because the JourneyFailure fires mid-row (
app/tests/e2e/fixtures/journey.ts:106-137,waitForLeg), the test throws beforedriveLegsruns, soartifacts/legs.jsonstays[]and.sandcastle/rehearsal-report.shfalls back to the genericwizardlabel/signature — worth knowing since that signature bucket is shared with unrelated pre-legs reds and won't discriminate this cause from others.Suspected layer: policy/ADR, not code defect.
docs/adr/0030-hardware-minima.md:8-14frames 4 GiB as deliberately chosen — "the honest floor, not a comfortable target" — grounded in measured swap pressure on a reference VPS at ~1.9 GB used, and explicitly marked provisional pending S13 Q9 (Nix build placement). LooseningMinMemBytesto admit real-world '4 GB' droplets has genuine OOM-risk consequences the ADR was written to guard against.What plugging it needs (human ruling): pick one — (a) give
GatewayFloor.MinMemBytesexplicit headroom for realistic reported RAM (e.g. decimal-GB or a small percentage margin) and amend ADR 0030 with the new number and rationale, or (b) leave the floor as-is and change the remedy copy / rehearsal droplet provisioning to recommend/use a tier that actually clears it (e.g. the next size up), or (c) some combination. Either changes an ADR-encoded constant or user-facing remedy guidance — out of scope for an unattended mechanical heal.drive
20260811T180057Zred atwizard:drive red at wizard — the wizard died before any leg ranevidence:
test-results/…/20260811T180057Z/on matou-workstation (legs.json, droplet-journal.txt, trace)RULED (Ben, 2026-08-11): fix the floor to measured-MemTotal in decimal GB with kernel-reserve headroom — a real 4 GB cloud box must pass. This is the last gate before a green rehearsal.
The change
internal/founding/standup.goGatewayFloor.MinMemBytes: replace4 << 30(4 GiB = 4,294,967,296) with a decimal-GB floor carrying headroom for the firmware/hypervisor-reserved region cloud "4 GB" boxes never expose to the kernel.3_800_000_000(3.8 GB) is the value: this run's droplet reportsMemTotal4,106,100,736 (~3.82 GiB / 4.1 GB decimal), so 3.8e9 passes it with ~0.3 GB margin while still rejecting a genuine 2 GB box (2.1e9) unambiguously. (2 GiB=2.15e9 also fails cleanly; the gap 3.8–2.15 is wide.)gib()(standupfmt.go) rounds to whole GB, so "needs 4 GB" stays the operator-facing number even though the byte floor is 3.8e9 — that rounding is why the failing card read the nonsensical "has 4 GB — needs 4 GB". After the fix a 4 GB box passes silently; only a truly-under box fails, and its headline reads a real shortfall (e.g. "has 2 GB — needs 4 GB").MemTotal, not nominal RAM — nominal "4 GB" hardware presents ~3.8–4.1 GB to the kernel, so the enforced byte floor sits below the nominal number by design. State the value (3.8 GB) and the reason (kernel/firmware reserve) so the next reader doesn't "tidy" it back to 4<<30. The recommended tier (8 GB) is unaffected. Guard it: a seam/unit test asserting a 4,106,100,736-byte probe PASSES the gate and a 2,147,483,648-byte probe FAILS onmem— that pins the intent against a future GiB regression.Scope note from the reporter, worth folding into #435's orbit (not here): a spec-gate fail fires mid-row so
legs.jsonstays[]and the report buckets under the genericwizardsignature — fine for now (this is the only live wizard-bucket cause), but the eventual per-cause signature wants the fault's own key.Flip to ready-for-agent on landing this ruling.
Landed as
874060bonorigin/main, following Ben's ruling (2026-08-11) recorded above.Change:
internal/founding/standup.goGatewayFloor.MinMemBytesis now3_800_000_000(3.8 GB decimal) instead of4 << 30(4 GiB) — the memory floor is enforced against measuredMemTotal, not nominal RAM. A nominal 4 GB cloud box (the DO 2vCPU/4GB tier the S9x remedy recommends) presents ~3.8–4.1 GB to the kernel because of the firmware/hypervisor reserve, so the old exact-GiB floor rejected the app's own recommended remedy. The new floor passes this drive's droplet (MemTotal4,106,100,736, ~0.3 GB margin) while still failing a genuine 2 GB box (2,147,483,648) onmem. Thegib()headline still rounds to "needs 4 GB", so a true shortfall reads honestly.ADR 0030 amended: the declared memory floor is now documented as measured
MemTotal= 3.8 GB with the kernel-reserve rationale, so it is not tidied back to4 << 30. Recommended tier (8 GB) unaffected.Guard test:
TestSpecGate_RealFourGBDropletPasses_TwoGBFails(internal/founding/standup_test.go) asserts 4,106,100,736 PASSES and 2,147,483,648 FAILS onmem, pinning the intent against a future GiB regression.Catalogue's separate
RoleGatewayfloor was left untouched (out of the ruling's scope; that path is not the own-VPS spec gate). Fullinternal/founding/...,internal/catalogue,internal/enroll/...,internal/join/...,internal/provision/...suites green; go-ci pre-push gate passed. Unblocks the next own-VPS rehearsal drive past the spec gate.