"Upgrade to 8 GB" on the placement bench never reaches the rental — the plan says 8 GB, Access still says 4 GB, and the rent follows Access #1777

Closed
opened 2026-09-23 16:46:43 +00:00 by ben · 2 comments
Owner

Symptom

On the 2026-09-23 cold manual founding of whakatohea-demo, the operator upgraded the gateway from 4 GB to 8 GB on the service-placement screen, then laid the services out. The box that was provisioned is a 4 GB s-2vcpu-4gb (2 vCPU, MemTotal 4015412 kB, 78 GB disk, $30/month recorded) — the broker's default preset, not the upgrade.

The upgrade button changes nothing outside the component

app/src/components/founding/FoundingDevicePlacement.vue:471:

function takeUpgrade(): void {
  const next = upgrade.value;
  if (!next) return;
  gatewayMb.value = next.memMb;
  devices.value = devices.value.map((d) => (d.gateway ? { ...d, memMb: next.memMb } : d));
}

That is the whole handler behind data-action="upgrade-gateway" / "Upgrade to 8 GB — $60/month". It sets a local ref and rewrites the local device array. It does not call the seam, does not emit, and does not touch the draft.

rentServer — the only thing that records a size — is called from exactly one place in the app: FoundingAccess.vue:374, on the S4a rent card. Nothing on the placement screen calls it. So the size the gateway is ordered at is fixed at S4a and the upgrade button cannot change it.

The draft ends up internally inconsistent, and nothing objects

SavePlacement (internal/founding/placement.go:156) records the plan, and joinConnectedFacts deliberately keeps a rented machine's ordered size (MemSource = MemOrdered) since the box does not exist yet. After the upgrade that ordered number is 8192.

Meanwhile d.Access.GatewayPreset / GatewayMemMB are still the S4a values — s-2vcpu-4gb / 4096.

  • validatePlacement (placement.go:287) checks ids, duplicate names, exactly one gateway and the fit gate. It never compares the plan's gateway MemMB against the Access order.
  • provision() (internal/founding/access.go:643) rents from Access: RentRequest{Region: d.Access.GatewayRegion, Preset: d.Access.GatewayPreset}.

So the draft simultaneously says "the gateway is an 8 GB ordered machine" (Placement) and "rent the 4 GB preset" (Access). The rent follows Access. The operator, the bench and the fit gate all believe 8 GB.

And the mismatch is then erased rather than reported

internal/founding/access.go:656-659:

d.Access.IP = res.IP
d.Access.GatewayPreset = res.Size     // the RESULT overwrites the ORDER
d.Access.GatewayMemMB = res.MemMB
d.Access.Summary = rentedSummary(res)

Nothing compares res.Size with what was asked for. The broker's answer overwrites the order, and the founding line then reads "Rented gateway — DigitalOcean · syd1 · 4 GB · $30/month" — a readback of what arrived, presented as though it were the choice.

Two silent fallbacks sit under that, on both sides of the wire:

  • app: resolvePreset (access.go:497) — an empty pick takes off.Presets[0], the cheapest
  • broker: Rentals.Rent (broker/internal/broker/rentals.go:362) — an empty preset takes cfg.Size, the default

So at no point in the path would ordering 8 GB and receiving 4 GB be noticed by anything.

Consequence

The operator lays services out against 8 GB of headroom, the fit gate approves a plan for a machine that will never exist, and the community is founded on a box half that size. On this run the services then failed for an unrelated reason, and the catalogue refused to offer them again because of the floor bug (#1776) — but even a clean run would have placed a plan sized for 8 GB onto 4 GB of real memory.

What is proven, and what is inferred

Proven from the code: pressing Upgrade to 8 GB cannot change what is rented. The handler has no path to the seam, and the rent reads a field only S4a writes.

Inferred: that this is what happened on this specific run. founding-state.json is deleted at hand-off, so the draft's ordered preset no longer exists and the broker logs no preset (checked: the only broker line for this host is the stale-rental release). The run's own evidence is gone — which is itself part of the ask below.

Asks

  1. The upgrade must record the order. takeUpgrade should persist the new size the same way S4a does (re-recording the preset through the seam), so Placement and Access can never disagree. If persisting it there is wrong, the button should not exist — offering an upgrade that changes only a local number is worse than offering nothing.
  2. SavePlacement must refuse or reconcile a plan whose gateway MemMB differs from the Access order. A draft that describes two different machines should not be committable.
  3. Verify the rental against the order. After broker.Rent returns, compare res.Size to the preset that was requested and fail loud (ADR 0100) on a mismatch, instead of overwriting the order with the result. An operator who is billed for a size they did not pick must be told.
  4. Stop silently defaulting a missing pick to the cheapest box on both sides. An absent preset where one was expected is a fault, not a discount.
  5. Keep the order and the result on the community after hand-off. "I picked 8 GB and got 4" is exactly the question an operator asks once founding is over — which is precisely when founding throws the evidence away.

Relates to #1776 (the floors that then refused the services), #1393 (the size pick), DDR 0237/0240/0241, ADR 0047, ADR 0100, ADR 0189. Found on the same run as #1764, #1765, #1774.

## Symptom On the 2026-09-23 cold manual founding of `whakatohea-demo`, the operator upgraded the gateway from 4 GB to 8 GB on the service-placement screen, then laid the services out. The box that was provisioned is a **4 GB** `s-2vcpu-4gb` (2 vCPU, `MemTotal 4015412 kB`, 78 GB disk, `$30/month` recorded) — the broker's default preset, not the upgrade. ## The upgrade button changes nothing outside the component `app/src/components/founding/FoundingDevicePlacement.vue:471`: ```ts function takeUpgrade(): void { const next = upgrade.value; if (!next) return; gatewayMb.value = next.memMb; devices.value = devices.value.map((d) => (d.gateway ? { ...d, memMb: next.memMb } : d)); } ``` That is the whole handler behind `data-action="upgrade-gateway"` / *"Upgrade to 8 GB — $60/month"*. It sets a local ref and rewrites the local device array. It does not call the seam, does not emit, and does not touch the draft. **`rentServer` — the only thing that records a size — is called from exactly one place in the app**: `FoundingAccess.vue:374`, on the S4a rent card. Nothing on the placement screen calls it. So the size the gateway is *ordered* at is fixed at S4a and the upgrade button cannot change it. ## The draft ends up internally inconsistent, and nothing objects `SavePlacement` (`internal/founding/placement.go:156`) records the plan, and `joinConnectedFacts` deliberately keeps a rented machine's **ordered** size (`MemSource = MemOrdered`) since the box does not exist yet. After the upgrade that ordered number is **8192**. Meanwhile `d.Access.GatewayPreset` / `GatewayMemMB` are still the S4a values — `s-2vcpu-4gb` / **4096**. - `validatePlacement` (`placement.go:287`) checks ids, duplicate names, exactly one gateway and the fit gate. It **never compares the plan's gateway `MemMB` against the Access order.** - `provision()` (`internal/founding/access.go:643`) rents from Access: `RentRequest{Region: d.Access.GatewayRegion, Preset: d.Access.GatewayPreset}`. So the draft simultaneously says *"the gateway is an 8 GB ordered machine"* (Placement) and *"rent the 4 GB preset"* (Access). The rent follows Access. The operator, the bench and the fit gate all believe 8 GB. ## And the mismatch is then erased rather than reported `internal/founding/access.go:656-659`: ```go d.Access.IP = res.IP d.Access.GatewayPreset = res.Size // the RESULT overwrites the ORDER d.Access.GatewayMemMB = res.MemMB d.Access.Summary = rentedSummary(res) ``` Nothing compares `res.Size` with what was asked for. The broker's answer overwrites the order, and the founding line then reads *"Rented gateway — DigitalOcean · syd1 · 4 GB · $30/month"* — a readback of what arrived, presented as though it were the choice. Two silent fallbacks sit under that, on both sides of the wire: - app: `resolvePreset` (`access.go:497`) — an empty pick takes `off.Presets[0]`, **the cheapest** - broker: `Rentals.Rent` (`broker/internal/broker/rentals.go:362`) — an empty preset takes `cfg.Size`, the default So at no point in the path would ordering 8 GB and receiving 4 GB be noticed by anything. ## Consequence The operator lays services out against 8 GB of headroom, the fit gate approves a plan for a machine that will never exist, and the community is founded on a box half that size. On this run the services then failed for an unrelated reason, and the catalogue refused to offer them again because of the floor bug (#1776) — but even a clean run would have placed a plan sized for 8 GB onto 4 GB of real memory. ## What is proven, and what is inferred **Proven from the code:** pressing *Upgrade to 8 GB* cannot change what is rented. The handler has no path to the seam, and the rent reads a field only S4a writes. **Inferred:** that this is what happened on this specific run. `founding-state.json` is deleted at hand-off, so the draft's ordered preset no longer exists and the broker logs no preset (checked: the only broker line for this host is the stale-rental release). The run's own evidence is gone — which is itself part of the ask below. ## Asks 1. **The upgrade must record the order.** `takeUpgrade` should persist the new size the same way S4a does (re-recording the preset through the seam), so Placement and Access can never disagree. If persisting it there is wrong, the button should not exist — offering an upgrade that changes only a local number is worse than offering nothing. 2. **`SavePlacement` must refuse or reconcile** a plan whose gateway `MemMB` differs from the Access order. A draft that describes two different machines should not be committable. 3. **Verify the rental against the order.** After `broker.Rent` returns, compare `res.Size` to the preset that was requested and fail loud (ADR 0100) on a mismatch, instead of overwriting the order with the result. An operator who is billed for a size they did not pick must be told. 4. **Stop silently defaulting a missing pick to the cheapest box** on both sides. An absent preset where one was expected is a fault, not a discount. 5. **Keep the order and the result on the community after hand-off.** "I picked 8 GB and got 4" is exactly the question an operator asks once founding is over — which is precisely when founding throws the evidence away. Relates to #1776 (the floors that then refused the services), #1393 (the size pick), DDR 0237/0240/0241, ADR 0047, ADR 0100, ADR 0189. Found on the same run as #1764, #1765, #1774.

swarm-claim host=matou-dev-server-01 run=30963
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=30963 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1777 — status success

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

envelope
{
  "issue": 1777,
  "status": "success",
  "commits": [
    "ff4a526327f571bdcda17666c7cae5081e1925b7"
  ],
  "changed_files": [
    "STATUS.md",
    "app/src/components/founding/FoundingDevicePlacement.vue",
    "app/src/lib/founding.ts",
    "app/tests/unit/foundingDevicePlacement.test.ts",
    "internal/founding/access.go",
    "internal/founding/placement.go",
    "internal/founding/resizegateway_test.go",
    "internal/founding/stdio.go",
    "internal/founding/testing/fakes.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vue-tsc -p tsconfig.json (in app)",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vitest run tests/unit/foundingDevicePlacement.test.ts tests/unit/foundingAccessAddress.test.ts (in app)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Ask 1 — the upgrade must record the order (re-record the preset through the seam)": "New seam op resize-gateway / Orchestrator.ResizeGateway (internal/founding/access.go, stdio.go OpResizeGateway); FoundingDevicePlacement.vue takeUpgrade awaits client.resizeGateway(next.slug) before moving the bench; app+bridge+fake clients in app/src/lib/founding.ts. Proven by TestResizeGateway_RecordsTheOrderKeepingRegionAndStep and the app test 'Upgrade to 8 GB calls resize-gateway and moves the bench to the recorded size'.",
    "Ask 2 — SavePlacement must refuse or reconcile a plan whose gateway MemMB differs from the Access order": "validatePlacement (internal/founding/placement.go) refuses a rented gateway plan whose MemMB != the recorded order (GatewayPreset set + GatewayMemMB>0). Proven by TestSavePlacement_RefusesGatewayPlanThatDisagreesWithTheOrder (refuses, then accepts after ResizeGateway).",
    "Ask 3 — verify the rental against the order; fail loud on a mismatch instead of overwriting the order with the result": "provision (internal/founding/access.go) compares res.Size/res.MemMB to the ordered preset and returns a *BrokerError stage 'provision' (ADR 0100) before recording, leaving the order intact and no IP. Proven by TestCreateCommunity_RentSizeMismatchFailsLoud (order preserved, unfounded, retriable) using FakeBroker.ForceSize.",
    "Ask 4 (partial) — stop silently defaulting a missing pick to the cheapest box": "ResizeGateway refuses an empty pick (a resize with no target is a fault). Proven by TestResizeGateway_RefusesNonRentedUnsoldAndEmpty. The remaining app/broker resolvePreset empty->cheapest fallback (a load-bearing 'empty = default' contract) is deferred to #1783.",
    "Ask 5 — keep the order and the result on the community after hand-off": "Deferred to follow-up #1783 (touches the hand-off/scrub subsystem, not the founding seam)."
  },
  "summary": "The placement bench's Upgrade button now records the gateway size through a new resize-gateway seam op, SavePlacement refuses a plan that disagrees with the recorded order, and provision fails loud when the rented box does not match the order.",
  "reason": "Core reported bug (upgrade never reaches the rental; the mismatch erased rather than reported) fixed end to end; asks 4-second-half and 5 are larger adjacent changes filed as #1783.",
  "blockers": []
}
**close-report** for #1777 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1777, "status": "success", "commits": [ "ff4a526327f571bdcda17666c7cae5081e1925b7" ], "changed_files": [ "STATUS.md", "app/src/components/founding/FoundingDevicePlacement.vue", "app/src/lib/founding.ts", "app/tests/unit/foundingDevicePlacement.test.ts", "internal/founding/access.go", "internal/founding/placement.go", "internal/founding/resizegateway_test.go", "internal/founding/stdio.go", "internal/founding/testing/fakes.go" ], "tests": [ { "command": "go test ./internal/founding/...", "exit_code": 0 }, { "command": "go vet ./internal/founding/...", "exit_code": 0 }, { "command": "node_modules/.bin/vue-tsc -p tsconfig.json (in app)", "exit_code": 0 }, { "command": "node_modules/.bin/vitest run tests/unit/foundingDevicePlacement.test.ts tests/unit/foundingAccessAddress.test.ts (in app)", "exit_code": 0 } ], "criteria": { "Ask 1 — the upgrade must record the order (re-record the preset through the seam)": "New seam op resize-gateway / Orchestrator.ResizeGateway (internal/founding/access.go, stdio.go OpResizeGateway); FoundingDevicePlacement.vue takeUpgrade awaits client.resizeGateway(next.slug) before moving the bench; app+bridge+fake clients in app/src/lib/founding.ts. Proven by TestResizeGateway_RecordsTheOrderKeepingRegionAndStep and the app test 'Upgrade to 8 GB calls resize-gateway and moves the bench to the recorded size'.", "Ask 2 — SavePlacement must refuse or reconcile a plan whose gateway MemMB differs from the Access order": "validatePlacement (internal/founding/placement.go) refuses a rented gateway plan whose MemMB != the recorded order (GatewayPreset set + GatewayMemMB>0). Proven by TestSavePlacement_RefusesGatewayPlanThatDisagreesWithTheOrder (refuses, then accepts after ResizeGateway).", "Ask 3 — verify the rental against the order; fail loud on a mismatch instead of overwriting the order with the result": "provision (internal/founding/access.go) compares res.Size/res.MemMB to the ordered preset and returns a *BrokerError stage 'provision' (ADR 0100) before recording, leaving the order intact and no IP. Proven by TestCreateCommunity_RentSizeMismatchFailsLoud (order preserved, unfounded, retriable) using FakeBroker.ForceSize.", "Ask 4 (partial) — stop silently defaulting a missing pick to the cheapest box": "ResizeGateway refuses an empty pick (a resize with no target is a fault). Proven by TestResizeGateway_RefusesNonRentedUnsoldAndEmpty. The remaining app/broker resolvePreset empty->cheapest fallback (a load-bearing 'empty = default' contract) is deferred to #1783.", "Ask 5 — keep the order and the result on the community after hand-off": "Deferred to follow-up #1783 (touches the hand-off/scrub subsystem, not the founding seam)." }, "summary": "The placement bench's Upgrade button now records the gateway size through a new resize-gateway seam op, SavePlacement refuses a plan that disagrees with the recorded order, and provision fails loud when the rented box does not match the order.", "reason": "Core reported bug (upgrade never reaches the rental; the mismatch erased rather than reported) fixed end to end; asks 4-second-half and 5 are larger adjacent changes filed as #1783.", "blockers": [] } ``` </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#1777
No description provided.