Founding gateway size: stop silently defaulting a missing preset to the cheapest box, and keep the order+result past hand-off (follow-up from #1777) #1783

Closed
opened 2026-09-23 17:37:27 +00:00 by matou-build-agent · 4 comments

Follow-up from #1777 (which fixed the core bug: the "Upgrade to 8 GB" bench button now records the order through the resize-gateway seam, a placement plan that disagrees with the order can't commit, and a rented box that doesn't match the order fails loud). Two of #1777's five asks were deferred there as larger-than-the-bug changes and are tracked here.

Ask 4 (second half) — stop silently defaulting a missing preset to the cheapest box

#1777 closed the new surface: ResizeGateway refuses an empty pick outright. But the two documented empty→default fallbacks the ticket named still stand:

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

These are load-bearing: RentServer documents "empty = the offer's default", the fake broker mirrors it, and many seam tests drive RentRequest{} expecting the default. Making "empty where a pick was expected" a fault means reworking that contract across RentServer, the fake, the broker, and the tests — a design change, not a one-liner. The S4a rent card already seeds the first preset, so an empty-with-presets pick does not occur from the UI today; this is defence-in-depth against a future caller.

Ask 5 — keep the order AND the result on the community after hand-off

"I picked 8 GB and got 4 GB" is exactly the question an operator asks once founding is over — which is precisely when founding throws the evidence away (founding-state.json is deleted at hand-off). The order (recorded by resize-gateway) and the provisioned result should survive onto the community's durable config so the answer is recoverable post-founding. This touches the hand-off/scrub subsystem, not the founding seam.

Found while working #1777.

Follow-up from #1777 (which fixed the core bug: the "Upgrade to 8 GB" bench button now records the order through the `resize-gateway` seam, a placement plan that disagrees with the order can't commit, and a rented box that doesn't match the order fails loud). Two of #1777's five asks were deferred there as larger-than-the-bug changes and are tracked here. ## Ask 4 (second half) — stop silently defaulting a missing preset to the cheapest box #1777 closed the *new* surface: `ResizeGateway` refuses an empty pick outright. But the two documented empty→default fallbacks the ticket named still stand: - app: `resolvePreset` (`internal/founding/access.go`) — an empty pick takes `off.Presets[0]` (the cheapest). - broker: `Rentals.resolvePreset` (`broker/internal/broker/rentals.go`) — an empty preset takes `cfg.Size` (the default). These are **load-bearing**: `RentServer` documents "empty = the offer's default", the fake broker mirrors it, and many seam tests drive `RentRequest{}` expecting the default. Making "empty where a pick was expected" a fault means reworking that contract across `RentServer`, the fake, the broker, and the tests — a design change, not a one-liner. The S4a rent card already seeds the first preset, so an empty-with-presets pick does not occur from the UI today; this is defence-in-depth against a future caller. ## Ask 5 — keep the order AND the result on the community after hand-off "I picked 8 GB and got 4 GB" is exactly the question an operator asks once founding is over — which is precisely when founding throws the evidence away (`founding-state.json` is deleted at hand-off). The order (recorded by `resize-gateway`) and the provisioned result should survive onto the community's durable config so the answer is recoverable post-founding. This touches the hand-off/scrub subsystem, not the founding seam. Found while working #1777.
Author
Member

This was generated by AI during triage.

Triage: enhancement + ready-for-agent

Category — enhancement. Neither ask is a live defect. #1777 already closed the reported bug (the "Upgrade to 8 GB" bench records the order through resize-gateway, a disagreeing plan can't commit, a mismatched box fails loud). Ask 4's remaining fallbacks are unreachable from the UI today ("the S4a rent card already seeds the first preset"), so this is defence-in-depth; Ask 5 is a durability improvement. Verified both are real and unimplemented:

  • resolvePreset (internal/founding/access.go:549) still returns off.Presets[0] — the cheapest — on an empty pick.
  • Rentals.resolvePreset (broker/internal/broker/rentals.go:362,523) still takes cfg.Size; the "empty pick takes the broker's default" contract is documented at rentals.go:619,644 and driven by RentRequest{} in the seam tests.
  • The founding-state scrub that discards the evidence at hand-off lives in internal/founding/handoff.go.

Ruled by agent under ADR 0174 — veto anytime

The ruling (Ask 4's direction): make "empty where a pick was expected" a fault at both resolvePreset sites, mirroring #1777's ResizeGateway (which already refuses an empty pick). Rework the "empty = the offer's default" contract across RentServer, the fake broker, and the seam tests so the default is expressed by an explicit default-preset request, not by an absent one.

Why it is a two-way door: the change is revertible by a later commit/label change, and it is proven by the existing broker/founding seam tests (the tests that today drive RentRequest{} expecting the default become the tests that prove the new fault contract). It touches no personal credential, no security-posture widening, no member-facing trust accept, no data destruction, and no non-routine spend — so it is off the one-way-door list.

What proves it: red-first seam tests at both sites (empty-with-presets → fault; an explicit default-preset request → the default box), the reworked fake broker, and the full internal/founding + broker Go suites green.

Agent brief

Goal. Close the two deferred halves of #1777: (4) stop silently defaulting a missing preset to the cheapest box, and (5) keep the order + the provisioned result on the community past hand-off.

Ask 4 — empty pick is a fault.

  • internal/founding/access.go resolvePreset (line 549): an empty pick with priced presets present must return an error, not off.Presets[0]. Preserve the genuine no-priced-presets read-only path.
  • broker/internal/broker/rentals.go resolvePreset (lines 362/523): rework the "empty = cfg.Size" fallback (documented 619/644) so the offer default is requested explicitly. Update RentServer's contract doc, the fake broker (cmd/rehearsal-broker / the founding test fakes), and every seam test that drives RentRequest{} expecting a silent default.
  • Keep #1777's ResizeGateway empty-refusal as the reference shape for the fault.

Ask 5 — order + result survive hand-off.

  • The order is recorded by resize-gateway onto Access; the provisioned result is what provision verified. Persist both onto the community's durable config so "I picked 8 GB and got 4 GB" is answerable after founding-state.json is scrubbed (internal/founding/handoff.go).
  • Add a read path + test proving the pair survives the scrub. The durable-config location/shape is the agent's call (two-way, test-proven).

Acceptance.

  1. An empty-with-presets pick faults at both resolvePreset sites; an explicit default-preset request still yields the default box.
  2. The fake broker and all RentRequest{}-driven seam tests express the default explicitly and pass.
  3. After hand-off/scrub, the order and the provisioned result are both readable from durable community config, proven by a test.
  4. Full internal/founding + broker Go suites green; gofmt/vet/golangci-lint clean.

Note: broker changes land in a deployed-service tree (broker/**); the deploy rail (deploy-pending) handles installation post-merge — no live-infra work in this ticket.

Relates to #1777, #1393, #1375; ADR 0047/0100/0189, DDR 0237/0240/0241, ADR 0174.

> *This was generated by AI during triage.* ## Triage: `enhancement` + `ready-for-agent` **Category — `enhancement`.** Neither ask is a live defect. #1777 already closed the reported bug (the "Upgrade to 8 GB" bench records the order through `resize-gateway`, a disagreeing plan can't commit, a mismatched box fails loud). Ask 4's remaining fallbacks are unreachable from the UI today ("the S4a rent card already seeds the first preset"), so this is defence-in-depth; Ask 5 is a durability improvement. Verified both are real and unimplemented: - `resolvePreset` (`internal/founding/access.go:549`) still returns `off.Presets[0]` — the cheapest — on an empty pick. - `Rentals.resolvePreset` (`broker/internal/broker/rentals.go:362,523`) still takes `cfg.Size`; the "empty pick takes the broker's default" contract is documented at `rentals.go:619,644` and driven by `RentRequest{}` in the seam tests. - The founding-state scrub that discards the evidence at hand-off lives in `internal/founding/handoff.go`. ## Ruled by agent under ADR 0174 — veto anytime **The ruling (Ask 4's direction):** make "empty where a pick was expected" a **fault** at both `resolvePreset` sites, mirroring #1777's `ResizeGateway` (which already refuses an empty pick). Rework the "empty = the offer's default" contract across `RentServer`, the fake broker, and the seam tests so the default is expressed by an *explicit* default-preset request, not by an absent one. **Why it is a two-way door:** the change is revertible by a later commit/label change, and it is proven by the existing broker/founding seam tests (the tests that today drive `RentRequest{}` expecting the default become the tests that prove the new fault contract). It touches no personal credential, no security-posture widening, no member-facing trust accept, no data destruction, and no non-routine spend — so it is off the one-way-door list. **What proves it:** red-first seam tests at both sites (empty-with-presets → fault; an explicit default-preset request → the default box), the reworked fake broker, and the full `internal/founding` + `broker` Go suites green. ## Agent brief **Goal.** Close the two deferred halves of #1777: (4) stop silently defaulting a missing preset to the cheapest box, and (5) keep the order + the provisioned result on the community past hand-off. **Ask 4 — empty pick is a fault.** - `internal/founding/access.go` `resolvePreset` (line 549): an empty pick with priced presets present must return an error, not `off.Presets[0]`. Preserve the genuine no-priced-presets read-only path. - `broker/internal/broker/rentals.go` `resolvePreset` (lines 362/523): rework the "empty = `cfg.Size`" fallback (documented 619/644) so the offer default is requested *explicitly*. Update `RentServer`'s contract doc, the fake broker (`cmd/rehearsal-broker` / the founding test fakes), and every seam test that drives `RentRequest{}` expecting a silent default. - Keep #1777's `ResizeGateway` empty-refusal as the reference shape for the fault. **Ask 5 — order + result survive hand-off.** - The order is recorded by `resize-gateway` onto `Access`; the provisioned result is what `provision` verified. Persist both onto the community's durable config so "I picked 8 GB and got 4 GB" is answerable after `founding-state.json` is scrubbed (`internal/founding/handoff.go`). - Add a read path + test proving the pair survives the scrub. The durable-config location/shape is the agent's call (two-way, test-proven). **Acceptance.** 1. An empty-with-presets pick faults at both `resolvePreset` sites; an explicit default-preset request still yields the default box. 2. The fake broker and all `RentRequest{}`-driven seam tests express the default explicitly and pass. 3. After hand-off/scrub, the order and the provisioned result are both readable from durable community config, proven by a test. 4. Full `internal/founding` + `broker` Go suites green; gofmt/vet/golangci-lint clean. Note: broker changes land in a deployed-service tree (`broker/**`); the deploy rail (`deploy-pending`) handles installation post-merge — no live-infra work in this ticket. Relates to #1777, #1393, #1375; ADR 0047/0100/0189, DDR 0237/0240/0241, ADR 0174.
Author
Member

swarm-claim host=bens-mac-04 run=30980
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=30980 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1783 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 4c922c7449 is not a valid commit object (fabricated, or never pushed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'broker/internal/broker/rentals.go' is not in the diff of the claimed commits
  • changed_files: 'broker/internal/broker/rentals_preset_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/access.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/access_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/draft.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/handoff.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/handoff_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/i18nseam_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/manualpath_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/orchestrator.go' is not in the diff of the claimed commits
  • changed_files: 'internal/founding/testing/fakes.go' is not in the diff of the claimed commits
envelope
{
  "issue": 1783,
  "status": "success",
  "commits": [
    "4c922c7449"
  ],
  "changed_files": [
    "STATUS.md",
    "broker/internal/broker/rentals.go",
    "broker/internal/broker/rentals_preset_test.go",
    "internal/founding/access.go",
    "internal/founding/access_test.go",
    "internal/founding/draft.go",
    "internal/founding/handoff.go",
    "internal/founding/handoff_test.go",
    "internal/founding/i18nseam_test.go",
    "internal/founding/manualpath_test.go",
    "internal/founding/orchestrator.go",
    "internal/founding/testing/fakes.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/... ./internal/controlapi/... ./internal/brokerclient/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/... ./cmd/...",
      "exit_code": 0
    },
    {
      "command": "cd broker && go test ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command golangci-lint run ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command bash -c 'cd broker && golangci-lint run ./internal/broker/'",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. An empty-with-presets pick faults at both resolvePreset sites; an explicit default-preset request still yields the default box": "app: internal/founding/access.go resolvePreset returns a claim-stage *BrokerError (key founding.validation.sizeMissing) on empty-with-presets, proven by TestRentServer_EmptyPickWithPresetsIsRefusedNoAccess (and the explicit default s-2vcpu-4gb still records the default box); broker: broker/internal/broker/rentals.go resolvePreset returns a claim-stage *ProvisionError on empty-with-presets, proven by TestRent_EmptyPickWithPresetsIsAFaultNoDroplet, with TestRent_DefaultSizeTakesConfiguredPreset now passing the explicit default slug",
    "2. The fake broker and all RentRequest{}-driven seam tests express the default explicitly and pass": "internal/founding/testing/fakes.go FakeBroker.Rent now faults on empty-with-presets (mirrors the real broker); the RentServer/RentRequest{}-driven seam tests (access_test.go toReviewRentedSubdomain callers + RegionPick, i18nseam_test.go, manualpath_test.go) express the explicit default s-2vcpu-4gb; full founding + broker suites green",
    "3. After hand-off/scrub, the order and the provisioned result are both readable from durable community config, proven by a test": "AccessChoice.GatewayOrderedPreset/GatewayOrderedMemMB record the order distinctly (RentServer/ResizeGateway); handoff.go CompleteHandOff persists founding.GatewaySizing via GatewaySizingStore BEFORE the scrub deletes founding-state.json, and Orchestrator.FoundedGatewaySizing reads it back — proven by TestStory_GatewaySizingOrderAndResultSurviveTheScrub (order 8 GB / result 4 GB both readable after the state file is gone) and TestStory_GatewaySizingAbsentOnNonRentedHandOff",
    "4. Full internal/founding + broker Go suites green; gofmt/vet/golangci-lint clean": "go test ./internal/... ./cmd/... and cd broker && go test ./... exit 0; gofmt -l clean; go vet clean; golangci-lint 0 issues on both modules via the nix develop .#go-ci gate (also run by the pre-push hook on the successful push to main)"
  },
  "summary": "Empty gateway-size picks now fault at both resolvePreset sites (app + broker) instead of silently renting the cheapest box, and the gateway order + provisioned result survive the hand-off scrub on durable community config with a read path and tests.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1783 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 4c922c7449 is not a valid commit object (fabricated, or never pushed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'broker/internal/broker/rentals.go' is not in the diff of the claimed commits - changed_files: 'broker/internal/broker/rentals_preset_test.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/access.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/access_test.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/draft.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/handoff.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/handoff_test.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/i18nseam_test.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/manualpath_test.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/orchestrator.go' is not in the diff of the claimed commits - changed_files: 'internal/founding/testing/fakes.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1783, "status": "success", "commits": [ "4c922c7449" ], "changed_files": [ "STATUS.md", "broker/internal/broker/rentals.go", "broker/internal/broker/rentals_preset_test.go", "internal/founding/access.go", "internal/founding/access_test.go", "internal/founding/draft.go", "internal/founding/handoff.go", "internal/founding/handoff_test.go", "internal/founding/i18nseam_test.go", "internal/founding/manualpath_test.go", "internal/founding/orchestrator.go", "internal/founding/testing/fakes.go" ], "tests": [ { "command": "go test ./internal/founding/... ./internal/controlapi/... ./internal/brokerclient/... ./internal/clan/...", "exit_code": 0 }, { "command": "go test ./internal/... ./cmd/...", "exit_code": 0 }, { "command": "cd broker && go test ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command golangci-lint run ./internal/founding/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command bash -c 'cd broker && golangci-lint run ./internal/broker/'", "exit_code": 0 } ], "criteria": { "1. An empty-with-presets pick faults at both resolvePreset sites; an explicit default-preset request still yields the default box": "app: internal/founding/access.go resolvePreset returns a claim-stage *BrokerError (key founding.validation.sizeMissing) on empty-with-presets, proven by TestRentServer_EmptyPickWithPresetsIsRefusedNoAccess (and the explicit default s-2vcpu-4gb still records the default box); broker: broker/internal/broker/rentals.go resolvePreset returns a claim-stage *ProvisionError on empty-with-presets, proven by TestRent_EmptyPickWithPresetsIsAFaultNoDroplet, with TestRent_DefaultSizeTakesConfiguredPreset now passing the explicit default slug", "2. The fake broker and all RentRequest{}-driven seam tests express the default explicitly and pass": "internal/founding/testing/fakes.go FakeBroker.Rent now faults on empty-with-presets (mirrors the real broker); the RentServer/RentRequest{}-driven seam tests (access_test.go toReviewRentedSubdomain callers + RegionPick, i18nseam_test.go, manualpath_test.go) express the explicit default s-2vcpu-4gb; full founding + broker suites green", "3. After hand-off/scrub, the order and the provisioned result are both readable from durable community config, proven by a test": "AccessChoice.GatewayOrderedPreset/GatewayOrderedMemMB record the order distinctly (RentServer/ResizeGateway); handoff.go CompleteHandOff persists founding.GatewaySizing via GatewaySizingStore BEFORE the scrub deletes founding-state.json, and Orchestrator.FoundedGatewaySizing reads it back — proven by TestStory_GatewaySizingOrderAndResultSurviveTheScrub (order 8 GB / result 4 GB both readable after the state file is gone) and TestStory_GatewaySizingAbsentOnNonRentedHandOff", "4. Full internal/founding + broker Go suites green; gofmt/vet/golangci-lint clean": "go test ./internal/... ./cmd/... and cd broker && go test ./... exit 0; gofmt -l clean; go vet clean; golangci-lint 0 issues on both modules via the nix develop .#go-ci gate (also run by the pre-push hook on the successful push to main)" }, "summary": "Empty gateway-size picks now fault at both resolvePreset sites (app + broker) instead of silently renting the cheapest box, and the gateway order + provisioned result survive the hand-off scrub on durable community config with a read path and tests.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Member

close-report for #1783 — status success

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

envelope
{
  "issue": 1783,
  "status": "success",
  "commits": [
    "4c922c74436610dea77bb97fa3f27c04ffcdee49"
  ],
  "changed_files": [
    "STATUS.md",
    "broker/internal/broker/rentals.go",
    "broker/internal/broker/rentals_preset_test.go",
    "internal/founding/access.go",
    "internal/founding/access_test.go",
    "internal/founding/draft.go",
    "internal/founding/handoff.go",
    "internal/founding/handoff_test.go",
    "internal/founding/i18nseam_test.go",
    "internal/founding/manualpath_test.go",
    "internal/founding/orchestrator.go",
    "internal/founding/testing/fakes.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/... ./internal/controlapi/... ./internal/brokerclient/... ./internal/clan/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/... ./cmd/...",
      "exit_code": 0
    },
    {
      "command": "cd broker && go test ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command golangci-lint run ./internal/founding/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command bash -c 'cd broker && golangci-lint run ./internal/broker/'",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. An empty-with-presets pick faults at both resolvePreset sites; an explicit default-preset request still yields the default box": "app: internal/founding/access.go resolvePreset returns a claim-stage *BrokerError (key founding.validation.sizeMissing) on empty-with-presets, proven by TestRentServer_EmptyPickWithPresetsIsRefusedNoAccess (and the explicit default s-2vcpu-4gb still records the default box); broker: broker/internal/broker/rentals.go resolvePreset returns a claim-stage *ProvisionError on empty-with-presets, proven by TestRent_EmptyPickWithPresetsIsAFaultNoDroplet, with TestRent_DefaultSizeTakesConfiguredPreset now passing the explicit default slug",
    "2. The fake broker and all RentRequest{}-driven seam tests express the default explicitly and pass": "internal/founding/testing/fakes.go FakeBroker.Rent now faults on empty-with-presets (mirrors the real broker); the RentServer/RentRequest{}-driven seam tests (access_test.go toReviewRentedSubdomain callers + RegionPick, i18nseam_test.go, manualpath_test.go) express the explicit default s-2vcpu-4gb; full founding + broker suites green",
    "3. After hand-off/scrub, the order and the provisioned result are both readable from durable community config, proven by a test": "AccessChoice.GatewayOrderedPreset/GatewayOrderedMemMB record the order distinctly (RentServer/ResizeGateway); handoff.go CompleteHandOff persists founding.GatewaySizing via GatewaySizingStore BEFORE the scrub deletes founding-state.json, and Orchestrator.FoundedGatewaySizing reads it back — proven by TestStory_GatewaySizingOrderAndResultSurviveTheScrub (order 8 GB / result 4 GB both readable after the state file is gone) and TestStory_GatewaySizingAbsentOnNonRentedHandOff",
    "4. Full internal/founding + broker Go suites green; gofmt/vet/golangci-lint clean": "go test ./internal/... ./cmd/... and cd broker && go test ./... exit 0; gofmt -l clean; go vet clean; golangci-lint 0 issues on both modules via the nix develop .#go-ci gate (also run by the pre-push hook on the successful push to main)"
  },
  "summary": "Empty gateway-size picks now fault at both resolvePreset sites (app + broker) instead of silently renting the cheapest box, and the gateway order + provisioned result survive the hand-off scrub on durable community config with a read path and tests.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1783 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1783, "status": "success", "commits": [ "4c922c74436610dea77bb97fa3f27c04ffcdee49" ], "changed_files": [ "STATUS.md", "broker/internal/broker/rentals.go", "broker/internal/broker/rentals_preset_test.go", "internal/founding/access.go", "internal/founding/access_test.go", "internal/founding/draft.go", "internal/founding/handoff.go", "internal/founding/handoff_test.go", "internal/founding/i18nseam_test.go", "internal/founding/manualpath_test.go", "internal/founding/orchestrator.go", "internal/founding/testing/fakes.go" ], "tests": [ { "command": "go test ./internal/founding/... ./internal/controlapi/... ./internal/brokerclient/... ./internal/clan/...", "exit_code": 0 }, { "command": "go test ./internal/... ./cmd/...", "exit_code": 0 }, { "command": "cd broker && go test ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command golangci-lint run ./internal/founding/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command bash -c 'cd broker && golangci-lint run ./internal/broker/'", "exit_code": 0 } ], "criteria": { "1. An empty-with-presets pick faults at both resolvePreset sites; an explicit default-preset request still yields the default box": "app: internal/founding/access.go resolvePreset returns a claim-stage *BrokerError (key founding.validation.sizeMissing) on empty-with-presets, proven by TestRentServer_EmptyPickWithPresetsIsRefusedNoAccess (and the explicit default s-2vcpu-4gb still records the default box); broker: broker/internal/broker/rentals.go resolvePreset returns a claim-stage *ProvisionError on empty-with-presets, proven by TestRent_EmptyPickWithPresetsIsAFaultNoDroplet, with TestRent_DefaultSizeTakesConfiguredPreset now passing the explicit default slug", "2. The fake broker and all RentRequest{}-driven seam tests express the default explicitly and pass": "internal/founding/testing/fakes.go FakeBroker.Rent now faults on empty-with-presets (mirrors the real broker); the RentServer/RentRequest{}-driven seam tests (access_test.go toReviewRentedSubdomain callers + RegionPick, i18nseam_test.go, manualpath_test.go) express the explicit default s-2vcpu-4gb; full founding + broker suites green", "3. After hand-off/scrub, the order and the provisioned result are both readable from durable community config, proven by a test": "AccessChoice.GatewayOrderedPreset/GatewayOrderedMemMB record the order distinctly (RentServer/ResizeGateway); handoff.go CompleteHandOff persists founding.GatewaySizing via GatewaySizingStore BEFORE the scrub deletes founding-state.json, and Orchestrator.FoundedGatewaySizing reads it back — proven by TestStory_GatewaySizingOrderAndResultSurviveTheScrub (order 8 GB / result 4 GB both readable after the state file is gone) and TestStory_GatewaySizingAbsentOnNonRentedHandOff", "4. Full internal/founding + broker Go suites green; gofmt/vet/golangci-lint clean": "go test ./internal/... ./cmd/... and cd broker && go test ./... exit 0; gofmt -l clean; go vet clean; golangci-lint 0 issues on both modules via the nix develop .#go-ci gate (also run by the pre-push hook on the successful push to main)" }, "summary": "Empty gateway-size picks now fault at both resolvePreset sites (app + broker) instead of silently renting the cheapest box, and the gateway order + provisioned result survive the hand-off scrub on durable community config with a read path and tests.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1783
No description provided.