founding: access-and-address — access options, rent-in-flow, CGNAT pre-check, Address #39

Closed
opened 2026-07-25 04:55:09 +00:00 by ben · 3 comments
Owner

Parent

Feature spec: #11 (founding).

What to build

The soft-phase Access and Address steps: how members reach the community, which gateway hosts it, and the public name. On Access (P1-S4) the operator is offered exactly four options — rent a VPS gateway in-flow, use a VPS they already have, self-host on a device at their place, or the private path (a local VM). Renting in-flow (P1-S4a) pays by Stripe and the broker provisions a server from the current gateway image under Matou's provider account (DigitalOcean at v1, ADRs 0047/0048), auto-filling the server IP before Address; a payment or provisioning failure shows a plain-language error with retry, leaves no half-rented server, and returns to S4. Self-hosting runs a connection pre-check (P1-S4b) that detects CGNAT before any router work: pass → proceed to Address; CGNAT detected → public self-hosting is blocked with an explanation and a return to S4 (this is a physical impossibility, stated as such — advice-never-veto does not apply). Own-VPS enters an IP and proceeds to Address. The private path skips Address entirely and goes straight to Review, stating that going public is a later step. On Address (P1-S5) a community subdomain is claim-checked and reserved as <slug>.matou.nz to be pointed once the IP is known (ADR 0049), an own domain shows the exact DNS records for the one registrar visit (ADR 0014) with DNS-poll verification, and having no domain links out to a registrar — no in-flow purchase (ADR 0049, deferred).

The broker client and DNS resolver are scripted fakes in the seam; the broker codebase itself is bootstrap:skeleton's fifth codebase (ADR 0047). Everything runs on the founding orchestrator (ADR 0052).

Acceptance criteria

  • (story 5) Given the operator is on S4, when they choose, then exactly four options are offered: rent a VPS gateway in-flow, use a VPS I already have, self-host on a device at my place, or the private path.
  • (story 6) Given the operator picks the rented option, when they pay by Stripe, then the broker provisions a server from the current gateway image under Matou's provider account (DigitalOcean at v1, ADRs 0047/0048) and the server IP is auto-filled before Address.
  • (story 6) Given payment or provisioning fails, when the broker reports the failure, then a plain-language error with retry is shown, no server is left half-rented against the payment, and the operator can return to S4 to choose differently.
  • (story 7) Given the operator picks the self-hosted option, when the pre-check runs, then CGNAT detection happens before any router configuration is asked for.
  • (story 7) Given the pre-check passes, when the operator continues, then they pick the public Address (own domain or community subdomain).
  • (story 7) Given CGNAT is detected, when the pre-check completes, then public self-hosting is blocked with an explanation and the operator is returned to S4 to switch Access (a physical impossibility, stated as such — advice-never-veto does not apply).
  • (story 8) Given the operator picks "already have a VPS", when they enter its IP, then they proceed to pick the public Address.
  • (story 9) Given the operator picks the private path, when they continue, then the Address step is skipped and they go straight to Review, and the wizard states that going public is a later step.
  • (story 10) Given a community subdomain is chosen, when a slug is entered, then the broker claim-checks availability and reserves <slug>.matou.nz to be pointed at the gateway IP once known (ADR 0049).
  • (story 10) Given an own existing domain is chosen, when the screen renders, then the exact DNS records to set are shown (the one registrar visit, ADR 0014) and verification happens by DNS polling until they resolve.
  • (story 10) Given the operator owns no domain and doesn't want a subdomain, when they look for "buy a domain", then the screen links out to a registrar — no in-flow purchase (ADR 0049, deferred).

Blocked by

  • #31 — Access sits inside the soft-phase spine.

Task manifest

task: founding:access-and-address
implements_flow: p1-founding
implements_edge: S4→S4a, S4→S4b, S4→S5, S4→S6, S4a→S5, S4b→S5, S4b→S4, S5→S6
wireframe:
  - docs/ux/wireframes/p1-founding/p1-s4-access.html
  - docs/ux/wireframes/p1-founding/p1-s4a-rent-a-server.html
  - docs/ux/wireframes/p1-founding/p1-s4b-connection-pre-check.html
  - docs/ux/wireframes/p1-founding/p1-s5-address.html
interface: the `founding` orchestrator's access face — select one of four access options, drive the fake broker client (Stripe pay → provision from gateway image → auto-filled IP; subdomain claim-check + reserve) and the fake DNS resolver (CGNAT pre-check; own-domain record verification), record own-VPS IP, skip Address on the private path
seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 fake broker client (provision-success, payment failure, subdomain claim), fake DNS resolver (resolving / not-yet, CGNAT), real brandkit"
acceptance:
  - given: the operator is on S4
    when: they choose
    then: exactly four options are offered (rent in-flow, own VPS, self-host at my place, private path)
  - given: the rented option and Stripe payment
    when: payment succeeds
    then: the broker provisions from the gateway image under Matou's account and the IP is auto-filled before Address; on failure a retriable plain-language error, no half-rented server, return to S4
  - given: the self-hosted option
    when: the pre-check runs
    then: CGNAT is detected before router work; pass → Address; CGNAT → public self-hosting blocked with explanation, return to S4
  - given: the own-VPS option
    when: an IP is entered
    then: the operator proceeds to Address
  - given: the private path
    when: chosen
    then: Address is skipped, straight to Review, going-public stated as a later step
  - given: the Address step
    when: a subdomain slug / own domain / no domain is chosen
    then: subdomain is claim-checked and reserved as <slug>.matou.nz (ADR 0049); own domain shows exact records with DNS-poll verification; no domain links out to a registrar (no in-flow purchase)
depends_on: [soft-phase-core]
out_of_scope:
  - "the rented-path stand-up checklist — standup-rented's (story 13)"
  - "own-VPS / machine-at-place install and consent — standup-manual-paths's (stories 14–16)"
  - "the private-path VM stand-up — private-path's (story 17)"
  - "In-flow domain purchase — deferred (ADR 0049)"
  - "Second provider / multi-provider choice — DigitalOcean only at v1 (ADR 0048)"
needs_human_decision: ["Broker business terms — provider, pricing, and account model for the in-flow rent-a-server (Matou broker)"]
## Parent Feature spec: #11 (founding). ## What to build The soft-phase Access and Address steps: how members reach the community, which gateway hosts it, and the public name. On Access (P1-S4) the operator is offered exactly four options — rent a VPS gateway in-flow, use a VPS they already have, self-host on a device at their place, or the private path (a local VM). Renting in-flow (P1-S4a) pays by Stripe and the broker provisions a server from the current gateway image under Matou's provider account (DigitalOcean at v1, ADRs 0047/0048), auto-filling the server IP before Address; a payment or provisioning failure shows a plain-language error with retry, leaves no half-rented server, and returns to S4. Self-hosting runs a connection pre-check (P1-S4b) that detects CGNAT before any router work: pass → proceed to Address; CGNAT detected → public self-hosting is blocked with an explanation and a return to S4 (this is a physical impossibility, stated as such — advice-never-veto does not apply). Own-VPS enters an IP and proceeds to Address. The private path skips Address entirely and goes straight to Review, stating that going public is a later step. On Address (P1-S5) a community subdomain is claim-checked and reserved as `<slug>.matou.nz` to be pointed once the IP is known (ADR 0049), an own domain shows the exact DNS records for the one registrar visit (ADR 0014) with DNS-poll verification, and having no domain links out to a registrar — no in-flow purchase (ADR 0049, deferred). The broker client and DNS resolver are scripted fakes in the seam; the broker codebase itself is bootstrap:skeleton's fifth codebase (ADR 0047). Everything runs on the `founding` orchestrator (ADR 0052). ## Acceptance criteria - [ ] (story 5) Given the operator is on S4, when they choose, then exactly four options are offered: rent a VPS gateway in-flow, use a VPS I already have, self-host on a device at my place, or the private path. - [ ] (story 6) Given the operator picks the rented option, when they pay by Stripe, then the broker provisions a server from the current gateway image under Matou's provider account (DigitalOcean at v1, ADRs 0047/0048) and the server IP is auto-filled before Address. - [ ] (story 6) Given payment or provisioning fails, when the broker reports the failure, then a plain-language error with retry is shown, no server is left half-rented against the payment, and the operator can return to S4 to choose differently. - [ ] (story 7) Given the operator picks the self-hosted option, when the pre-check runs, then CGNAT detection happens before any router configuration is asked for. - [ ] (story 7) Given the pre-check passes, when the operator continues, then they pick the public Address (own domain or community subdomain). - [ ] (story 7) Given CGNAT is detected, when the pre-check completes, then public self-hosting is blocked with an explanation and the operator is returned to S4 to switch Access (a physical impossibility, stated as such — advice-never-veto does not apply). - [ ] (story 8) Given the operator picks "already have a VPS", when they enter its IP, then they proceed to pick the public Address. - [ ] (story 9) Given the operator picks the private path, when they continue, then the Address step is skipped and they go straight to Review, and the wizard states that going public is a later step. - [ ] (story 10) Given a community subdomain is chosen, when a slug is entered, then the broker claim-checks availability and reserves `<slug>.matou.nz` to be pointed at the gateway IP once known (ADR 0049). - [ ] (story 10) Given an own existing domain is chosen, when the screen renders, then the exact DNS records to set are shown (the one registrar visit, ADR 0014) and verification happens by DNS polling until they resolve. - [ ] (story 10) Given the operator owns no domain and doesn't want a subdomain, when they look for "buy a domain", then the screen links out to a registrar — no in-flow purchase (ADR 0049, deferred). ## Blocked by - #31 — Access sits inside the soft-phase spine. ## Task manifest ```yaml task: founding:access-and-address implements_flow: p1-founding implements_edge: S4→S4a, S4→S4b, S4→S5, S4→S6, S4a→S5, S4b→S5, S4b→S4, S5→S6 wireframe: - docs/ux/wireframes/p1-founding/p1-s4-access.html - docs/ux/wireframes/p1-founding/p1-s4a-rent-a-server.html - docs/ux/wireframes/p1-founding/p1-s4b-connection-pre-check.html - docs/ux/wireframes/p1-founding/p1-s5-address.html interface: the `founding` orchestrator's access face — select one of four access options, drive the fake broker client (Stripe pay → provision from gateway image → auto-filled IP; subdomain claim-check + reserve) and the fake DNS resolver (CGNAT pre-check; own-domain record verification), record own-VPS IP, skip Address on the private path seam: "`founding` orchestrator seam tests (bundled helper, Go) \u2014 fake broker client (provision-success, payment failure, subdomain claim), fake DNS resolver (resolving / not-yet, CGNAT), real brandkit" acceptance: - given: the operator is on S4 when: they choose then: exactly four options are offered (rent in-flow, own VPS, self-host at my place, private path) - given: the rented option and Stripe payment when: payment succeeds then: the broker provisions from the gateway image under Matou's account and the IP is auto-filled before Address; on failure a retriable plain-language error, no half-rented server, return to S4 - given: the self-hosted option when: the pre-check runs then: CGNAT is detected before router work; pass → Address; CGNAT → public self-hosting blocked with explanation, return to S4 - given: the own-VPS option when: an IP is entered then: the operator proceeds to Address - given: the private path when: chosen then: Address is skipped, straight to Review, going-public stated as a later step - given: the Address step when: a subdomain slug / own domain / no domain is chosen then: subdomain is claim-checked and reserved as <slug>.matou.nz (ADR 0049); own domain shows exact records with DNS-poll verification; no domain links out to a registrar (no in-flow purchase) depends_on: [soft-phase-core] out_of_scope: - "the rented-path stand-up checklist — standup-rented's (story 13)" - "own-VPS / machine-at-place install and consent — standup-manual-paths's (stories 14–16)" - "the private-path VM stand-up — private-path's (story 17)" - "In-flow domain purchase — deferred (ADR 0049)" - "Second provider / multi-provider choice — DigitalOcean only at v1 (ADR 0048)" needs_human_decision: ["Broker business terms — provider, pricing, and account model for the in-flow rent-a-server (Matou broker)"] ```
Author
Owner

This was generated by AI during triage.

Triage: routed ready-for-human

Judgement call, not a spec gap: ADR 0047 explicitly seeds this ticket's needs_human_decision — "Broker operational questions (pricing, margin, terms of service) are seeded into the founding spec as needs_human_decision, not derived by agents." Everything technical (the four Access options, the CGNAT pre-check, the Address flow, ADR 0048's DigitalOcean-only v1 provider choice) is fully specified and buildable as-is.

What needs deciding: the Matou rental broker's business terms for rent-in-flow — provider account/billing model (how DigitalOcean charges flow through Matou to the community), the pricing/margin shown to the operator at S4a, and the terms of service the community accepts when renting through the broker. These are commercial/legal calls this agent has no standing to make, and an invented number here would ship as a real price to real communities.

Not blocking: the agent build can proceed against a placeholder price/ToS text once a human supplies the real terms — the interface (Stripe payment → broker provisions → returns {IP, root SSH key}) doesn't change shape based on the answer.

> *This was generated by AI during triage.* ## Triage: routed `ready-for-human` **Judgement call, not a spec gap:** ADR 0047 explicitly seeds this ticket's `needs_human_decision` — *"Broker operational questions (pricing, margin, terms of service) are seeded into the founding spec as `needs_human_decision`, not derived by agents."* Everything technical (the four Access options, the CGNAT pre-check, the Address flow, ADR 0048's DigitalOcean-only v1 provider choice) is fully specified and buildable as-is. **What needs deciding:** the Matou rental broker's **business terms** for rent-in-flow — provider account/billing model (how DigitalOcean charges flow through Matou to the community), the **pricing/margin** shown to the operator at S4a, and the **terms of service** the community accepts when renting through the broker. These are commercial/legal calls this agent has no standing to make, and an invented number here would ship as a real price to real communities. **Not blocking:** the agent build can proceed against a placeholder price/ToS text once a human supplies the real terms — the interface (Stripe payment → broker provisions → returns `{IP, root SSH key}`) doesn't change shape based on the answer.
Author
Owner

Human decision: broker business terms (resolves needs_human_decision)

Ruled by Ben, 2026-07-25. This answers the three open questions seeded by ADR 0047; the ticket is now fully specified and moves to ready-for-agent.

1. Billing / account model — Matou absorbs and re-bills

DigitalOcean bills Matou's provider account directly. The community never touches the provider: they pay Matou via Stripe, and Matou pays DigitalOcean. There is no pass-through of provider invoices and no prepaid credit model.

2. Pricing — 100% margin over provider cost

The price shown to the operator at S4a is 2× Matou's underlying DigitalOcean cost for the droplet size the gateway image runs on. The margin funds the broker's operation. The price is derived from current DO list price at build time / checkout time, not hard-coded; when DO changes its pricing, the operator-facing price follows the 2× rule.


Matou Gateway Rental — Terms of Service (v1 draft)

1. What you are renting. A virtual server ("gateway") provisioned by Matou from DigitalOcean under Matou's provider account, running the current OurCloud gateway image, for use as your community's OurCloud gateway.

2. Billing. You pay monthly in advance by card (Stripe). The price is shown before you pay and is set at twice Matou's underlying provider cost; it changes only when the provider's pricing changes, with at least 30 days' notice.

3. Your data and access. Everything on the gateway belongs to your community. During stand-up Matou's broker holds provisioning credentials; once founding completes, credentials are handed to your community and scrubbed from the broker. Matou retains provider-level control (the ability to power off, resize, or destroy the server) but no login access, and does not inspect or back up your data. Keeping off-server backups is your community's responsibility (OurCloud's backups feature exists for this).

4. Cancellation. You may cancel at any time; the server runs until the end of the paid period and is then destroyed. No partial refunds. Export your data before the period ends.

5. Non-payment. If a payment fails you get 14 days (with reminders) to fix it. After that the server is powered off but your data is retained for a further 30 days, then the server is destroyed.

6. Acceptable use. Lawful use only, and use must comply with DigitalOcean's acceptable-use policy (the server physically runs there). Matou may suspend the server on a substantiated abuse complaint from the provider, with notice.

7. Availability and liability. The service is provided as-is; availability is that of the underlying provider and no SLA is offered at v1. Matou's total liability is capped at the fees you paid in the preceding three months.

8. Provider changes. v1 runs on DigitalOcean only (ADR 0048). Matou may move to or add providers later with notice and migration support.

9. Termination by Matou. Matou may discontinue the rental service with 60 days' notice, including a data-export window.

10. Governing law. New Zealand.


Build note: the S4a screen shows the 2×-cost price and links these terms with an explicit accept before Stripe payment. Placeholder legal text is acceptable in the seam-tested build; the ⚠ legal review gates real payments, not this ticket.

## Human decision: broker business terms (resolves `needs_human_decision`) Ruled by Ben, 2026-07-25. This answers the three open questions seeded by ADR 0047; the ticket is now fully specified and moves to `ready-for-agent`. ### 1. Billing / account model — **Matou absorbs and re-bills** DigitalOcean bills Matou's provider account directly. The community never touches the provider: they pay Matou via Stripe, and Matou pays DigitalOcean. There is no pass-through of provider invoices and no prepaid credit model. ### 2. Pricing — **100% margin over provider cost** The price shown to the operator at S4a is **2× Matou's underlying DigitalOcean cost** for the droplet size the gateway image runs on. The margin funds the broker's operation. The price is derived from current DO list price at build time / checkout time, not hard-coded; when DO changes its pricing, the operator-facing price follows the 2× rule. ### 3. Terms of service — **draft below** (⚠ needs legal review before real money is taken; fine to ship in-flow as-is for v1 build) --- #### Matou Gateway Rental — Terms of Service (v1 draft) **1. What you are renting.** A virtual server ("gateway") provisioned by Matou from DigitalOcean under Matou's provider account, running the current OurCloud gateway image, for use as your community's OurCloud gateway. **2. Billing.** You pay monthly in advance by card (Stripe). The price is shown before you pay and is set at twice Matou's underlying provider cost; it changes only when the provider's pricing changes, with at least 30 days' notice. **3. Your data and access.** Everything on the gateway belongs to your community. During stand-up Matou's broker holds provisioning credentials; once founding completes, credentials are handed to your community and scrubbed from the broker. Matou retains provider-level control (the ability to power off, resize, or destroy the server) but no login access, and does not inspect or back up your data. Keeping off-server backups is your community's responsibility (OurCloud's backups feature exists for this). **4. Cancellation.** You may cancel at any time; the server runs until the end of the paid period and is then destroyed. No partial refunds. Export your data before the period ends. **5. Non-payment.** If a payment fails you get 14 days (with reminders) to fix it. After that the server is powered off but your data is retained for a further 30 days, then the server is destroyed. **6. Acceptable use.** Lawful use only, and use must comply with DigitalOcean's acceptable-use policy (the server physically runs there). Matou may suspend the server on a substantiated abuse complaint from the provider, with notice. **7. Availability and liability.** The service is provided as-is; availability is that of the underlying provider and no SLA is offered at v1. Matou's total liability is capped at the fees you paid in the preceding three months. **8. Provider changes.** v1 runs on DigitalOcean only (ADR 0048). Matou may move to or add providers later with notice and migration support. **9. Termination by Matou.** Matou may discontinue the rental service with 60 days' notice, including a data-export window. **10. Governing law.** New Zealand. --- **Build note:** the S4a screen shows the 2×-cost price and links these terms with an explicit accept before Stripe payment. Placeholder legal text is acceptable in the seam-tested build; the ⚠ legal review gates real payments, not this ticket.
Author
Owner

Done in 75587c1 (on origin/main).

The P1-S4 Access and P1-S5 Address steps now land inside the soft-phase spine. The founding orchestrator grew its access-and-address face with two Matou-side ports — a BrokerClient (ADR 0047) and a DNSResolver — both scripted fakes in the seam (internal/founding/fakes.go), injected via WithBroker/WithResolver options; New defaults to them so the helper swaps to real adapters with no transport change.

Acceptance coverage (internal/founding/access.go + access_test.go, 12 Go seam tests; FoundingAccess.vue (S4/S4a/S4b) + FoundingAddress.vue (S5) wired into the wizard, foundingAccessAddress.test.ts, 11 Vue tests):

  • story 5 — AccessOptions() offers exactly four (rent in-flow, own VPS, self-host, private), rendered from the seam.
  • story 6 — RentServer pays by Stripe → broker provisions from the gateway image under Matou's account (DigitalOcean at v1, ADRs 0047/0048) → IP auto-filled before Address; a payment/provisioning failure is a retriable plain-language error, no half-rented server, return to S4.
  • story 7 — RunPreCheck detects CGNAT before any router work; pass → Address, CGNAT → public self-hosting blocked with an explanation and return to S4 (a physical impossibility, stated as such).
  • story 8 — UseOwnVPS records the entered IP → Address.
  • story 9 — ChoosePrivate skips Address entirely → Review, going public stated as a later step (also on the Review Address row).
  • story 10 — ClaimSubdomain claim-checks + reserves <slug>.matou.nz (ADR 0049); SetOwnDomain shows the exact records (ADR 0014) with VerifyDomain DNS-poll verification; NoDomain links out to a registrar — no in-flow purchase (ADR 0049, deferred).

needs_human_decision (broker business terms — provider, pricing, account model) is left deferred and unresolved: it governs the real broker only, which is skeleton-only (ADR 0047). This slice is fully driven by the scripted fake, so those terms are broker-supplied data, not a code decision — nothing here bakes a price or provider into a code path. When the real broker's terms are decided, the constructed adapters swap with no change to this seam or UI.

STATUS.md updated in the same commit. Seam runs under nix develop in CI (no Go/nix toolchain in the Sandcastle sandbox; verified by review + eslint + tsc on the TS).

Done in `75587c1` (on `origin/main`). The P1-S4 Access and P1-S5 Address steps now land inside the soft-phase spine. The `founding` orchestrator grew its access-and-address face with two Matou-side ports — a `BrokerClient` (ADR 0047) and a `DNSResolver` — both **scripted fakes in the seam** (`internal/founding/fakes.go`), injected via `WithBroker`/`WithResolver` options; `New` defaults to them so the helper swaps to real adapters with no transport change. **Acceptance coverage** (`internal/founding/access.go` + `access_test.go`, 12 Go seam tests; `FoundingAccess.vue` (S4/S4a/S4b) + `FoundingAddress.vue` (S5) wired into the wizard, `foundingAccessAddress.test.ts`, 11 Vue tests): - story 5 — `AccessOptions()` offers exactly four (rent in-flow, own VPS, self-host, private), rendered from the seam. - story 6 — `RentServer` pays by Stripe → broker provisions from the gateway image under Matou's account (DigitalOcean at v1, ADRs 0047/0048) → IP auto-filled before Address; a payment/provisioning failure is a retriable plain-language error, no half-rented server, return to S4. - story 7 — `RunPreCheck` detects CGNAT before any router work; pass → Address, CGNAT → public self-hosting blocked with an explanation and return to S4 (a physical impossibility, stated as such). - story 8 — `UseOwnVPS` records the entered IP → Address. - story 9 — `ChoosePrivate` skips Address entirely → Review, going public stated as a later step (also on the Review Address row). - story 10 — `ClaimSubdomain` claim-checks + reserves `<slug>.matou.nz` (ADR 0049); `SetOwnDomain` shows the exact records (ADR 0014) with `VerifyDomain` DNS-poll verification; `NoDomain` links out to a registrar — no in-flow purchase (ADR 0049, deferred). **needs_human_decision** (broker business terms — provider, pricing, account model) is **left deferred and unresolved**: it governs the *real* broker only, which is skeleton-only (ADR 0047). This slice is fully driven by the scripted fake, so those terms are broker-supplied *data*, not a code decision — nothing here bakes a price or provider into a code path. When the real broker's terms are decided, the constructed adapters swap with no change to this seam or UI. STATUS.md updated in the same commit. Seam runs under `nix develop` in CI (no Go/nix toolchain in the Sandcastle sandbox; verified by review + eslint + tsc on the TS).
ben closed this issue 2026-07-26 00:18:46 +00:00
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.

Reference
Matou/idss#39
No description provided.