founding seam + Go: the device plan carries each machine's PLACE and its CONNECT FACTS — a plan of machines nobody has reached #1416

Closed
opened 2026-09-12 04:48:19 +00:00 by ben · 6 comments
Owner

Why

DDR 0241. #1391 made the device plan seam truth — Draft.Placement{devices, where} with PlacementDevice{id, name, kind, mem_mb, mem_source, gateway}, server-checked against the 80% ceiling. What it does NOT carry is what DDR 0240 now reads off each machine at selection, and without that the plan describes machines the build cannot reach.

What to build

  • PlacementDevice gains the device's identity and its connect facts: which place it lives in (rented / own-vps / self-hosted), its address or location, and the DeviceFacts read at connect (#1413) — host, os, arch, cores, mem, disk, SSH host key.
  • mem_source flips to measured off that read rather than off pairing, and ordered survives only for a rented machine that does not exist yet.
  • save-placement refuses a plan carrying a machine that was never connected (the rented exception aside), the same way it already refuses an over-ceiling drop.
  • The Review and the S12 hand-off enumerate the FLEET, not the one machine the Access choice names.

Acceptance criteria

  • AC1 — a plan with two machines round-trips through the versioned founding-state document and resumes intact, facts and all (against the bridge).
  • AC2 — save-placement refuses an unconnected non-rented machine, naming it, and leaves the draft unchanged.
  • AC3 — Review lists every machine with its measured size and what is placed on it.
  • AC4 — the fit gate measures against the reported size; a machine with no size cannot appear on the bench at all.

Contract

DDR 0241 decisions 1, 2 and 6; DDR 0240 decision 5; builds on #1391 (merged to main, not yet on founding-ui-two-colour-rail-ceremony).

## Why DDR 0241. #1391 made the device plan seam truth — `Draft.Placement{devices, where}` with `PlacementDevice{id, name, kind, mem_mb, mem_source, gateway}`, server-checked against the 80% ceiling. What it does NOT carry is what DDR 0240 now reads off each machine at selection, and without that the plan describes machines the build cannot reach. ## What to build - `PlacementDevice` gains the device's identity and its connect facts: which place it lives in (`rented` / `own-vps` / `self-hosted`), its address or location, and the `DeviceFacts` read at connect (#1413) — host, os, arch, cores, mem, disk, SSH host key. - `mem_source` flips to `measured` off that read rather than off pairing, and `ordered` survives only for a rented machine that does not exist yet. - `save-placement` refuses a plan carrying a machine that was never connected (the rented exception aside), the same way it already refuses an over-ceiling drop. - The Review and the S12 hand-off enumerate the FLEET, not the one machine the Access choice names. ## Acceptance criteria - AC1 — a plan with two machines round-trips through the versioned founding-state document and resumes intact, facts and all (against the bridge). - AC2 — `save-placement` refuses an unconnected non-rented machine, naming it, and leaves the draft unchanged. - AC3 — Review lists every machine with its measured size and what is placed on it. - AC4 — the fit gate measures against the reported size; a machine with no size cannot appear on the bench at all. ## Contract DDR 0241 decisions 1, 2 and 6; DDR 0240 decision 5; builds on #1391 (merged to `main`, not yet on `founding-ui-two-colour-rail-ceremony`).

This was generated by AI during triage.

Triage Notes

Routing: needs-design (missing-design gate).

What we've established:

  • This issue's stated Contract names DDR 0240 / DDR 0241 as the decisions it builds against, and cites them by decision number in the body and acceptance criteria.
  • Those DDRs do not exist in docs/adr/ — the highest-numbered record is 0239-design-the-coa-first-founding-branch-and-the-bring-it-home-walk.md, and no doc in the repo even references 0240/0241. The design-tier contract the agent would build against hasn't been produced yet.
  • Related sibling #1413 (which this work depends on / is paired with) is itself needs-design; #1391 and #1392 are closed/merged.

Why needs-design, not ready-for-agent: the design-to-agent missing-design gate routes any issue whose referenced design contract (flow / wireframe / seam / design DDR) is missing or unconfirmed back to the design tier (grill-ux-with-docs / wireframe / DDR authoring) for this feature before implementation. The acceptance criteria here are anchored to specific DDR decisions, so an agent cannot build against them until 0240/0241 land.

This is a deterministic gate check, not an ADR 0174 judgement call — fully revertible by relabelling once the DDRs are written and confirmed. No human residue.

To unblock: author DDR 0240 and DDR 0241 (the founding-v2 device-plan / selection-proves-the-device decisions), then relabel for the normal pipeline.

> *This was generated by AI during triage.* ## Triage Notes **Routing: `needs-design` (missing-design gate).** **What we've established:** - This issue's stated **Contract** names **DDR 0240 / DDR 0241** as the decisions it builds against, and cites them by decision number in the body and acceptance criteria. - Those DDRs **do not exist** in `docs/adr/` — the highest-numbered record is `0239-design-the-coa-first-founding-branch-and-the-bring-it-home-walk.md`, and no doc in the repo even references 0240/0241. The design-tier contract the agent would build against hasn't been produced yet. - Related sibling **#1413** (which this work depends on / is paired with) is itself `needs-design`; #1391 and #1392 are closed/merged. **Why `needs-design`, not `ready-for-agent`:** the design-to-agent missing-design gate routes any issue whose referenced design contract (flow / wireframe / seam / design DDR) is missing or unconfirmed back to the design tier (`grill-ux-with-docs` / `wireframe` / DDR authoring) for this feature before implementation. The acceptance criteria here are anchored to specific DDR decisions, so an agent cannot build against them until 0240/0241 land. This is a deterministic gate check, not an ADR 0174 judgement call — fully revertible by relabelling once the DDRs are written and confirmed. No human residue. **To unblock:** author DDR 0240 and DDR 0241 (the founding-v2 device-plan / selection-proves-the-device decisions), then relabel for the normal pipeline.
Author
Owner

Build reference + the TS half this ticket also owns

Go (internal/founding/placement.go, on main): PlacementDevice gains place (rented|own-vps|self-hosted), ip, preset + region (rented only — what the build
rents, DDR 0237 decision 8), facts DeviceFacts, checks_passed. mem_source:
ordered for rented (preset), measured off facts.mem_mb otherwise. SavePlacement
joins the facts #1413 held by NAME and refuses a non-rented machine with none
(ErrPlacement, named).

The renderer drops exactly this today, so the seam would receive a plan it cannot build:

  • FoundingDevicePlacement.vue:314-326 onPlanned keeps only name/kind/memMb/location
    from PlannedDevice{place, preset, region, memMb, price, ip, location}
    (adddevice/addDevice.ts) — carry place, ip, preset, region onto the bench's
    PlacementDevice (devicePlacement.ts:23).
  • FoundingJourney.vue onPlacementContinue stamps memSource:'measured' for ANY
    memMb — a rented device is ordered.
  • FakeFoundingClient.savePlacement (founding.ts:3429) accepts anything; make it
    refuse an unconnected non-rented device the way validatePlacement will.

Drop this ticket's "Review and the S12 hand-off enumerate the FLEET" bullet: that is T1.

Amended by the review fixes (2026-09-12)

The TS half named above is DONE: PlacementDevice (both the seam's and the bench's — one type now, devicePlacement.ts extends the seam's) carries place, ip, preset, region, memSource: 'ordered' | 'measured'; onPlanned keeps them; onPlacementContinue sends the bench's device as-is and holds the plan only after save-placement succeeds. Go's placement.go (on main) has to grow the same fields — that is what is left here, plus joining the facts #1413 holds by name.

Label

needs-design stays until founding-ui-two-colour-rail-ceremony merges to main: the DDRs, the frames and the TS half this ticket builds against live on that branch, and a swarm worker builds from main. At the merge, flip to ready-for-agent — nothing else gates it.

## Build reference + the TS half this ticket also owns Go (`internal/founding/placement.go`, on main): `PlacementDevice` gains `place (rented|own-vps|self-hosted)`, `ip`, `preset` + `region` (rented only — what the build rents, DDR 0237 decision 8), `facts DeviceFacts`, `checks_passed`. `mem_source`: `ordered` for rented (preset), `measured` off `facts.mem_mb` otherwise. `SavePlacement` joins the facts #1413 held by NAME and refuses a non-rented machine with none (`ErrPlacement`, named). The renderer drops exactly this today, so the seam would receive a plan it cannot build: - `FoundingDevicePlacement.vue:314-326 onPlanned` keeps only `name/kind/memMb/location` from `PlannedDevice{place, preset, region, memMb, price, ip, location}` (`adddevice/addDevice.ts`) — carry `place`, `ip`, `preset`, `region` onto the bench's `PlacementDevice` (`devicePlacement.ts:23`). - `FoundingJourney.vue onPlacementContinue` stamps `memSource:'measured'` for ANY `memMb` — a rented device is `ordered`. - `FakeFoundingClient.savePlacement` (`founding.ts:3429`) accepts anything; make it refuse an unconnected non-rented device the way `validatePlacement` will. Drop this ticket's "Review and the S12 hand-off enumerate the FLEET" bullet: that is T1. ## Amended by the review fixes (2026-09-12) The TS half named above is DONE: `PlacementDevice` (both the seam's and the bench's — one type now, `devicePlacement.ts` extends the seam's) carries `place`, `ip`, `preset`, `region`, `memSource: 'ordered' | 'measured'`; `onPlanned` keeps them; `onPlacementContinue` sends the bench's device as-is and holds the plan only after `save-placement` succeeds. Go's `placement.go` (on `main`) has to grow the same fields — that is what is left here, plus joining the facts #1413 holds by name. ## Label `needs-design` stays until `founding-ui-two-colour-rail-ceremony` merges to `main`: the DDRs, the frames and the TS half this ticket builds against live on that branch, and a swarm worker builds from `main`. At the merge, flip to `ready-for-agent` — nothing else gates it.
Author
Owner

The branch merged to main (fcf1c5b2): DDR 0240/0241, the S4d/S1c frames and the built TS half are on main now, so needs-design comes off and this is ready-for-agent — gated only by its native dependencies.

The branch merged to `main` (`fcf1c5b2`): DDR 0240/0241, the S4d/S1c frames and the built TS half are on `main` now, so `needs-design` comes off and this is `ready-for-agent` — gated only by its native dependencies.

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

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

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

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

close-report for #1416 — status success

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

envelope
{
  "issue": 1416,
  "status": "success",
  "commits": [
    "ad212bee",
    "f2f71a52"
  ],
  "changed_files": [
    "internal/founding/placement.go",
    "internal/founding/connectcheck.go",
    "internal/founding/export_test.go",
    "internal/founding/placement_test.go",
    "STATUS.md",
    "control-plane/cmd/control-plane/compose.go",
    "internal/stackexport/store.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/founding/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/founding/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/founding/*.go",
      "exit_code": 0
    }
  ],
  "criteria": {
    "AC1 — a plan with two machines round-trips through the versioned founding-state document and resumes intact, facts and all (against the bridge)": "TestHandle_SavePlacementJoinsConnectedFactsAndResumes (placement_test.go): a two-machine plan (own-vps gateway + added own-vps machine) drives save-placement over the bridge (o.Handle/OpSavePlacement), then a FRESH orchestrator over the same store resumes it — both devices carry their joined facts, measured MemMB, place/ip and checks_passed. Backed by placement.go joinConnectedFacts + Placement.clone deep-copying Facts.",
    "AC2 — save-placement refuses an unconnected non-rented machine, naming it, and leaves the draft unchanged": "TestHandle_SavePlacementRefusesUnconnectedNonRented (placement_test.go): an added own-vps machine 'Office mini PC' with no connect facts is refused by name (ErrPlacement) and a resume finds no plan on the draft. placement.go joinConnectedFacts returns the named refusal before the assignment.",
    "AC3 — Review lists every machine with its measured size and what is placed on it": "The seam half is proven by AC1: the resumed Placement enumerates every device with its measured MemMB and the where-map of what runs on it. The Review/S12 screen enumeration is #1448 (T1) per Ben's 2026-09-12 note on the issue ('Drop this ticket's Review/S12 enumerate-the-FLEET bullet: that is T1').",
    "AC4 — the fit gate measures against the reported size; a machine with no size cannot appear on the bench at all": "joinConnectedFacts sets MemMB = facts.MemMB (measured) for a connected machine, which validatePlacement's 80% ceiling then measures against (proven in AC1: the gateway resumes MEASURED at 16 GB, not its ordered 4 GB card); an unconnected non-rented machine (no size) is refused (AC2). The obsolete 'unknown memory draws no ceiling' test is replaced, reflecting DDR 0241 decision 6."
  },
  "summary": "The founding device plan's PlacementDevice now carries each machine's place/ip/preset/region + the connect facts (#1413) and checks_passed; save-placement joins the facts held by name, flips mem_source to measured, and refuses an unconnected non-rented machine by name.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1416 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1416, "status": "success", "commits": [ "ad212bee", "f2f71a52" ], "changed_files": [ "internal/founding/placement.go", "internal/founding/connectcheck.go", "internal/founding/export_test.go", "internal/founding/placement_test.go", "STATUS.md", "control-plane/cmd/control-plane/compose.go", "internal/stackexport/store.go" ], "tests": [ { "command": "go test ./internal/founding/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/founding/", "exit_code": 0 }, { "command": "gofmt -l internal/founding/*.go", "exit_code": 0 } ], "criteria": { "AC1 — a plan with two machines round-trips through the versioned founding-state document and resumes intact, facts and all (against the bridge)": "TestHandle_SavePlacementJoinsConnectedFactsAndResumes (placement_test.go): a two-machine plan (own-vps gateway + added own-vps machine) drives save-placement over the bridge (o.Handle/OpSavePlacement), then a FRESH orchestrator over the same store resumes it — both devices carry their joined facts, measured MemMB, place/ip and checks_passed. Backed by placement.go joinConnectedFacts + Placement.clone deep-copying Facts.", "AC2 — save-placement refuses an unconnected non-rented machine, naming it, and leaves the draft unchanged": "TestHandle_SavePlacementRefusesUnconnectedNonRented (placement_test.go): an added own-vps machine 'Office mini PC' with no connect facts is refused by name (ErrPlacement) and a resume finds no plan on the draft. placement.go joinConnectedFacts returns the named refusal before the assignment.", "AC3 — Review lists every machine with its measured size and what is placed on it": "The seam half is proven by AC1: the resumed Placement enumerates every device with its measured MemMB and the where-map of what runs on it. The Review/S12 screen enumeration is #1448 (T1) per Ben's 2026-09-12 note on the issue ('Drop this ticket's Review/S12 enumerate-the-FLEET bullet: that is T1').", "AC4 — the fit gate measures against the reported size; a machine with no size cannot appear on the bench at all": "joinConnectedFacts sets MemMB = facts.MemMB (measured) for a connected machine, which validatePlacement's 80% ceiling then measures against (proven in AC1: the gateway resumes MEASURED at 16 GB, not its ordered 4 GB card); an unconnected non-rented machine (no size) is refused (AC2). The obsolete 'unknown memory draws no ceiling' test is replaced, reflecting DDR 0241 decision 6." }, "summary": "The founding device plan's PlacementDevice now carries each machine's place/ip/preset/region + the connect facts (#1413) and checks_passed; save-placement joins the facts held by name, flips mem_source to measured, and refuses an unconnected non-rented machine by name.", "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.

Reference
Matou/idss#1416
No description provided.