the catalogue says the Community front door is Unavailable on the gateway it is running on — "4 GB" floors are 4 GiB, which no 4 GB machine has (#439, never applied to the catalogue) #1776

Closed
opened 2026-09-23 16:42:32 +00:00 by ben · 3 comments
Owner

The shortest version

On the freshly founded whakatohea-demo (a rented DigitalOcean 4 GB gateway), the control panel's Browse tab shows the Community front door as UNAVAILABLE — "not running yet, needs a 4 GB device".

The front door is running on that gateway. It is serving the page that says it cannot run there. The same page's header reads "ALL SERVICES HEALTHY".

The cause: "4 GB" in a floor means 4 GiB, which no 4 GB machine has

internal/catalogue/catalogue.go:1055:

func floor(threads int, memGB, diskGB int64) enroll.SpecFloor {
	return enroll.SpecFloor{
		MinCPUCores:  threads,
		MinMemBytes:  memGB << 30,
		MinDiskBytes: diskGB << 30,
	}
}

4 << 30 = 4,294,967,296. A cloud "4 GB" machine presents less than that to the kernel — the firmware and hypervisor reserve a region they never expose. Measured on this gateway:

MemTotal:  4015412 kB   = 4,111,781,888 bytes   (3.83 GiB)
nproc:     2
disk:      83,426,205,696 bytes

Short of the floor by ~175 MiB. The fleet record carries the same figure (/var/lib/idss/enroll.json: "mem_bytes":4111781888), so nothing is mis-probed — the number is right and the floor is unsatisfiable.

provision.FleetMeetsFloor (internal/provision/assess.go:456) therefore finds no qualifying device, FloorMet comes back false, and CatalogueScreen.vue:243 renders the inert Unavailable span instead of Install.

This exact bug was already found and fixed once — in the other floor

internal/founding/standup.go:82-97:

// MinMemBytes is enforced against measured MemTotal, not nominal RAM. A nominal
// "4 GB" cloud box (the tier the S9x remedy card recommends renting) presents
// ~3.8–4.1 GB to the kernel … so an exact 4 GiB (4 << 30) floor rejected the app's
// own recommended remedy every time (#439). The floor is 3.8 GB decimal …
// Do NOT "tidy" this back to 4 << 30 — see ADR 0030.
var GatewayFloor = enroll.SpecFloor{
	MinCPUCores:  2,
	MinMemBytes:  3_800_000_000,
	MinDiskBytes: 40 << 30,
}

So founding measures this droplet against 3.8e9 and accepts it — which is why the community exists at all — and the catalogue measures the same droplet against 4 << 30 and refuses it. Two floors in one product, disagreeing about the same machine, and only one of them carries the #439 lesson.

The floors also contradict their own measurements

These are device-size gates, unrelated to the steady memory that was actually measured (#1479/#1480, ADR 0030/0243). Sitting on this 4 GB gateway, with the community's size band up-to-20 (so no per-member extras apply):

service floor measured steady memory panel
Community front door 4 GiB 640 MiB UNAVAILABLE (while running)
Files & documents 4 GiB 768 MiB UNAVAILABLE
Document editing 4 GiB 768 MiB UNAVAILABLE
Calendar & contacts 4 GiB ~0 — it enables an app on the already-running Nextcloud UNAVAILABLE
Chat 2 GiB — Install
Document archive 2 GiB — Install
Mail 2 GiB — Install
Static sites 1 GiB — Install

Everything at the 2 GiB tier and below offers Install; everything at 4 GiB is refused. The cut is exactly where the unit error bites.

And the comment directly above the Files floor states the intended reading in so many words:

"768 MiB holds that peak with headroom … far below the earlier 2048 MiB estimate. … the 4 GB floor is unchanged and confirmed roomy."

The author believed a 4 GB device passes that floor. The code refuses it. ADR 0243's measured finding — that the whole catalogue fits a 4 GB gateway — is on the author's side.

A prediction worth checking rather than assuming

The broker also sells s-4vcpu-8gb ("8 GB · 4 vCPU · 160 GB", $60/month). An 8 GB droplet reports roughly 7.7–7.8 GiB by the same reserve, so meetings (floor(4, 8, 20) = 8 GiB) would likely be Unavailable on the largest box sold too. Not verified — nobody has stood one up. Worth confirming before the fix, because it decides whether this is a one-tier slip or a pattern at every tier.

The refusal also misreports the machine

internal/provision/assess.go:429:

return fmt.Sprintf("needs %d GB — this device has %d", s.Floor.MinMemBytes>>30, d.Resources.MemBytes>>30), true

4111781888 >> 30 is 3, so an operator who rented a 4 GB server is told their device "has 3". Even after the floors are fixed, integer-truncating GiB always understates the machine and invites exactly the "but I have 4 GB" confusion. The disk line has the same truncation.

Asks

  1. Make every floor honest about a real machine of that size. Either express them as measured byte counts the way founding's does (3_800_000_000), or have floor() convert a marketing-GB size into the bytes such a machine actually reports. The second keeps the declarations readable while making them true — and it fixes every tier at once, including the 8 GB one.
  2. Pin founding's floor and the catalogue's floor against each other in a test. They describe the same thing, they currently disagree, and nothing catches it. A test asserting that a machine founding accepts as a gateway can host the services founding places on it would have caught this before any community saw it.
  3. A running service must never read Unavailable. Whatever the floor says, the fleet demonstrably runs the front door. That contradiction should be impossible to express — a test over a fleet with a running service asserting its card never renders the refusal.
  4. Fix the refusal wording so memory and disk are reported the way the machine's owner knows them.
  5. Sweep the remaining floor(...) declarations for the same class of error — any floor(_, N, _) where N matches a common machine size is suspect.

Provenance

Found on Ben's 2026-09-23 cold manual founding. First filed and deleted the same day for over-reaching: the original inferred the panel state from the fleet record rather than confirming it. This version rests on the screen itself, the measured figures in the code's own comments, and the #439 fix that the catalogue never received.

Relates to ADR 0030, ADR 0243, DDR 0225, #439, #1436, #1479/#1480. Found alongside #1764, #1765, #1774; independent of all three.

## The shortest version On the freshly founded `whakatohea-demo` (a rented DigitalOcean 4 GB gateway), the control panel's Browse tab shows the **Community front door** as **UNAVAILABLE — "not running yet, needs a 4 GB device"**. The front door is running on that gateway. It is serving the page that says it cannot run there. The same page's header reads "ALL SERVICES HEALTHY". ## The cause: "4 GB" in a floor means 4 GiB, which no 4 GB machine has `internal/catalogue/catalogue.go:1055`: ```go func floor(threads int, memGB, diskGB int64) enroll.SpecFloor { return enroll.SpecFloor{ MinCPUCores: threads, MinMemBytes: memGB << 30, MinDiskBytes: diskGB << 30, } } ``` `4 << 30` = 4,294,967,296. A cloud "4 GB" machine presents less than that to the kernel — the firmware and hypervisor reserve a region they never expose. Measured on this gateway: ``` MemTotal: 4015412 kB = 4,111,781,888 bytes (3.83 GiB) nproc: 2 disk: 83,426,205,696 bytes ``` Short of the floor by ~175 MiB. The fleet record carries the same figure (`/var/lib/idss/enroll.json`: `"mem_bytes":4111781888`), so nothing is mis-probed — the number is right and the floor is unsatisfiable. `provision.FleetMeetsFloor` (`internal/provision/assess.go:456`) therefore finds no qualifying device, `FloorMet` comes back false, and `CatalogueScreen.vue:243` renders the inert `Unavailable` span instead of `Install`. ## This exact bug was already found and fixed once — in the other floor `internal/founding/standup.go:82-97`: ```go // MinMemBytes is enforced against measured MemTotal, not nominal RAM. A nominal // "4 GB" cloud box (the tier the S9x remedy card recommends renting) presents // ~3.8–4.1 GB to the kernel … so an exact 4 GiB (4 << 30) floor rejected the app's // own recommended remedy every time (#439). The floor is 3.8 GB decimal … // Do NOT "tidy" this back to 4 << 30 — see ADR 0030. var GatewayFloor = enroll.SpecFloor{ MinCPUCores: 2, MinMemBytes: 3_800_000_000, MinDiskBytes: 40 << 30, } ``` So founding measures this droplet against 3.8e9 and accepts it — which is why the community exists at all — and the catalogue measures the same droplet against `4 << 30` and refuses it. **Two floors in one product, disagreeing about the same machine**, and only one of them carries the #439 lesson. ## The floors also contradict their own measurements These are *device-size* gates, unrelated to the steady memory that was actually measured (#1479/#1480, ADR 0030/0243). Sitting on this 4 GB gateway, with the community's size band `up-to-20` (so no per-member extras apply): | service | floor | **measured steady memory** | panel | |---|---|---|---| | Community front door | 4 GiB | **640 MiB** | UNAVAILABLE *(while running)* | | Files & documents | 4 GiB | **768 MiB** | UNAVAILABLE | | Document editing | 4 GiB | **768 MiB** | UNAVAILABLE | | Calendar & contacts | 4 GiB | **~0** — it enables an app on the already-running Nextcloud | UNAVAILABLE | | Chat | 2 GiB | — | Install | | Document archive | 2 GiB | — | Install | | Mail | 2 GiB | — | Install | | Static sites | 1 GiB | — | Install | Everything at the 2 GiB tier and below offers Install; everything at 4 GiB is refused. The cut is exactly where the unit error bites. And the comment directly above the Files floor states the intended reading in so many words: > "768 MiB holds that peak with headroom … far below the earlier 2048 MiB estimate. … **the 4 GB floor is unchanged and confirmed roomy.**" The author believed a 4 GB device passes that floor. The code refuses it. ADR 0243's measured finding — that the whole catalogue fits a 4 GB gateway — is on the author's side. ## A prediction worth checking rather than assuming The broker also sells `s-4vcpu-8gb` ("8 GB · 4 vCPU · 160 GB", $60/month). An 8 GB droplet reports roughly 7.7–7.8 GiB by the same reserve, so `meetings` (`floor(4, 8, 20)` = 8 GiB) would likely be Unavailable on the largest box sold too. **Not verified** — nobody has stood one up. Worth confirming before the fix, because it decides whether this is a one-tier slip or a pattern at every tier. ## The refusal also misreports the machine `internal/provision/assess.go:429`: ```go return fmt.Sprintf("needs %d GB — this device has %d", s.Floor.MinMemBytes>>30, d.Resources.MemBytes>>30), true ``` `4111781888 >> 30` is **3**, so an operator who rented a 4 GB server is told their device "has 3". Even after the floors are fixed, integer-truncating GiB always understates the machine and invites exactly the "but I have 4 GB" confusion. The disk line has the same truncation. ## Asks 1. **Make every floor honest about a real machine of that size.** Either express them as measured byte counts the way founding's does (`3_800_000_000`), or have `floor()` convert a marketing-GB size into the bytes such a machine actually reports. The second keeps the declarations readable while making them true — and it fixes every tier at once, including the 8 GB one. 2. **Pin founding's floor and the catalogue's floor against each other in a test.** They describe the same thing, they currently disagree, and nothing catches it. A test asserting that a machine founding accepts as a gateway can host the services founding places on it would have caught this before any community saw it. 3. **A running service must never read Unavailable.** Whatever the floor says, the fleet demonstrably runs the front door. That contradiction should be impossible to express — a test over a fleet with a running service asserting its card never renders the refusal. 4. **Fix the refusal wording** so memory and disk are reported the way the machine's owner knows them. 5. **Sweep the remaining `floor(...)` declarations** for the same class of error — any `floor(_, N, _)` where N matches a common machine size is suspect. ## Provenance Found on Ben's 2026-09-23 cold manual founding. First filed and deleted the same day for over-reaching: the original inferred the panel state from the fleet record rather than confirming it. This version rests on the screen itself, the measured figures in the code's own comments, and the #439 fix that the catalogue never received. Relates to ADR 0030, ADR 0243, DDR 0225, #439, #1436, #1479/#1480. Found alongside #1764, #1765, #1774; independent of all three.

swarm-claim host=elitebook-distributed-server-03 run=30959
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=30959 (automated multi-host claim — lowest live claim id works this ticket)
Author
Owner

Found on the same run and closely related: #1777 — the gateway was ordered up to 8 GB on the placement bench and 4 GB was provisioned, because the upgrade button never reaches the rental. That is why this community is on a 4 GB box at all; these floors are what then refused the services on it.

Found on the same run and closely related: #1777 — the gateway was ordered up to 8 GB on the placement bench and 4 GB was provisioned, because the upgrade button never reaches the rental. That is why this community is on a 4 GB box at all; these floors are what then refused the services on it.

close-report for #1776 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1776,
  "status": "success",
  "commits": [
    "0db0b0e23b73479885b3ec7b0232d5796783be2b"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/compose_enroll_test.go",
    "docs/GOTCHAS.md",
    "internal/catalogue/catalogue.go",
    "internal/catalogue/catalogue_test.go",
    "internal/controlapi/catalogue.go",
    "internal/controlapi/catalogue_read_integration_test.go",
    "internal/enroll/enroll.go",
    "internal/enroll/ledger.go",
    "internal/founding/gatewayfloor_pin_test.go",
    "internal/join/gate.go",
    "internal/provision/assess.go",
    "internal/provision/fit.go",
    "internal/provision/impact.go",
    "internal/provision/realmachine_floor_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/catalogue/... ./internal/provision/... ./internal/controlapi/... ./internal/enroll/... ./internal/join/... ./internal/founding/... ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "go test ./... (91 packages ok, 0 FAIL)",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: build + vet + golangci-lint) — 0 issues",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Ask 1 — every floor honest about a real machine of that size (floor() converts marketing GB into the bytes such a machine reports)": "internal/enroll/enroll.go adds BytesPerMarketingGB (950,000,000); internal/catalogue/catalogue.go floor() builds memory as memGB*BytesPerMarketingGB (disk stays GiB, byte-equal to founding.GatewayFloor) — fixes every tier at once, verified by internal/provision/realmachine_floor_test.go (measured 4 GB droplet hosts front-door/files/docs-editing/calendar; 8 GB droplet hosts meetings)",
    "Ask 2 — pin founding's floor and the catalogue's floor against each other": "internal/founding/gatewayfloor_pin_test.go TestGatewayFloor_MatchesCatalogueFrontDoor asserts catalogue.FloorFor(RoleGateway) == founding.GatewayFloor byte-for-byte; TestFoundingAcceptedGateway_HostsItsFrontDoor asserts the measured droplet clears both",
    "Ask 3 — a running service must never read Unavailable": "internal/controlapi/catalogue.go forces floor_met=true on any placed (running) service; internal/controlapi/catalogue_read_integration_test.go TestCatalogueRead_RunningServiceNeverReadsUnavailable (meetings placed on a sub-floor 4 GB device reads running, floor_met=true, 'running on ...')",
    "Ask 4 — fix the refusal wording so memory and disk are reported the way the machine's owner knows them": "enroll.MarketingGB (rounds to nearest 10^9) now words every floor/device memory figure across internal/provision/assess.go (deviceReason, gatewayHeadroom.reason, DeviceView, headroom view), internal/provision/fit.go (needsLine), internal/provision/impact.go, internal/controlapi/catalogue.go (floorNeed), internal/join/gate.go (spec-gate Need-vs-Got) — a 4 GB box reads '4' not '3'; refusal device disk reported via MarketingGB too. Verified by TestGenuineTwoGBBox_StillRefusedAtTheFourGBFloor ('needs 4 GB — this device has 2')",
    "Ask 5 — sweep the remaining floor(...) declarations for the same class of error": "The single floor() lever fixes every floor(_, N, _) tier at once; the same sweep made the per-OS vmHostFloor OS-headroom (8/12/16 GB) decimal in internal/enroll/ledger.go — the 8 GB Meetings prediction is now confirmed and pinned (TestRealEightGBDroplet_HostsMeetings)"
  },
  "summary": "Catalogue memory floors now use the marketing-byte convention (N GB = N*950,000,000, not N GiB) so a real 4 GB gateway hosts the front door instead of reading Unavailable; the floor is pinned to founding's, a running service can never read Unavailable, and memory is reported the way an operator knows their machine.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1776 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1776, "status": "success", "commits": [ "0db0b0e23b73479885b3ec7b0232d5796783be2b" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/compose_enroll_test.go", "docs/GOTCHAS.md", "internal/catalogue/catalogue.go", "internal/catalogue/catalogue_test.go", "internal/controlapi/catalogue.go", "internal/controlapi/catalogue_read_integration_test.go", "internal/enroll/enroll.go", "internal/enroll/ledger.go", "internal/founding/gatewayfloor_pin_test.go", "internal/join/gate.go", "internal/provision/assess.go", "internal/provision/fit.go", "internal/provision/impact.go", "internal/provision/realmachine_floor_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/catalogue/... ./internal/provision/... ./internal/controlapi/... ./internal/enroll/... ./internal/join/... ./internal/founding/... ./control-plane/...", "exit_code": 0 }, { "command": "go test ./... (91 packages ok, 0 FAIL)", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: build + vet + golangci-lint) — 0 issues", "exit_code": 0 } ], "criteria": { "Ask 1 — every floor honest about a real machine of that size (floor() converts marketing GB into the bytes such a machine reports)": "internal/enroll/enroll.go adds BytesPerMarketingGB (950,000,000); internal/catalogue/catalogue.go floor() builds memory as memGB*BytesPerMarketingGB (disk stays GiB, byte-equal to founding.GatewayFloor) — fixes every tier at once, verified by internal/provision/realmachine_floor_test.go (measured 4 GB droplet hosts front-door/files/docs-editing/calendar; 8 GB droplet hosts meetings)", "Ask 2 — pin founding's floor and the catalogue's floor against each other": "internal/founding/gatewayfloor_pin_test.go TestGatewayFloor_MatchesCatalogueFrontDoor asserts catalogue.FloorFor(RoleGateway) == founding.GatewayFloor byte-for-byte; TestFoundingAcceptedGateway_HostsItsFrontDoor asserts the measured droplet clears both", "Ask 3 — a running service must never read Unavailable": "internal/controlapi/catalogue.go forces floor_met=true on any placed (running) service; internal/controlapi/catalogue_read_integration_test.go TestCatalogueRead_RunningServiceNeverReadsUnavailable (meetings placed on a sub-floor 4 GB device reads running, floor_met=true, 'running on ...')", "Ask 4 — fix the refusal wording so memory and disk are reported the way the machine's owner knows them": "enroll.MarketingGB (rounds to nearest 10^9) now words every floor/device memory figure across internal/provision/assess.go (deviceReason, gatewayHeadroom.reason, DeviceView, headroom view), internal/provision/fit.go (needsLine), internal/provision/impact.go, internal/controlapi/catalogue.go (floorNeed), internal/join/gate.go (spec-gate Need-vs-Got) — a 4 GB box reads '4' not '3'; refusal device disk reported via MarketingGB too. Verified by TestGenuineTwoGBBox_StillRefusedAtTheFourGBFloor ('needs 4 GB — this device has 2')", "Ask 5 — sweep the remaining floor(...) declarations for the same class of error": "The single floor() lever fixes every floor(_, N, _) tier at once; the same sweep made the per-OS vmHostFloor OS-headroom (8/12/16 GB) decimal in internal/enroll/ledger.go — the 8 GB Meetings prediction is now confirmed and pinned (TestRealEightGBDroplet_HostsMeetings)" }, "summary": "Catalogue memory floors now use the marketing-byte convention (N GB = N*950,000,000, not N GiB) so a real 4 GB gateway hosts the front door instead of reading Unavailable; the floor is pinned to founding's, a running service can never read Unavailable, and memory is reported the way an operator knows their machine.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1776
No description provided.