provision/kit: carry the tenant bootstrap write token provisioner -> ProvisionResult -> KitSchema -> kit.json (#121, ADR 0008) #130
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
product-decision
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
You do not have permission to read 1 dependency
Reference
Matou/coa#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source: #121 / ADR 0008 (bootstrap token that binds to the org AID via TOFU). The coa-side plumbing that carries the write token from the provisioner into the kit.
What (all in this repo —
server/,packages/schema/)httpProvisioner.provision()(server/src/tenant-provisioner.ts) parses the write token from thePOST /admin/tenantsresponse and returns it inProvisionResult({ ok: true; configUrl: string; writeToken?: string }).staticProvisionerreturns none (local/dev has no tenant).KitSchema(packages/schema/src/kit.ts, the source of truth) gains an optional fieldconfigWriteToken(absent for self-hosted / static-provisioned kits).startBuild(server/src/build-pipeline.ts) threads the provisioner'swriteTokeninto the kit;CommunityStore.writeKitpersists it intokit.json.Contract
/admin/tenantsresponse per matou-infrastructure #12 (defaulttoken). coa tests inject afetchstub, so this is implementable against the agreed shape ahead of the infra change landing.Security note (ADR 0008)
kit.jsonis served publicly at/c/<slug>/kit.json— this is by design: the token is bootstrap-only and its power expires at the TOFU bind (matou-infrastructure #13). Do not treat it as a repo secret, but never echo it into server logs.Acceptance
httpProvisionerreturnswriteTokenparsed from the admin response;staticProvisioneromits it (TDD, red first).KitSchemavalidates a kit with and withoutconfigWriteToken;writeKit/readKitround-trip it.startBuildwritesconfigWriteTokenintokit.jsonwhen the provisioner returned one.make testgreen.Depends on
Out of scope
MATOU_CONFIG_SERVER_TOKENin the build env (that is the coa-builds child); matou-app backend behaviour; feature toggles / nav (phase 4).Filed by the coa standing session turning Ben's #121 ruling into the cross-repo breakdown.