rehearsal-3: self-hosted parity teeth — claim-secret carriage (#505's pattern, second path) + full-install assembly seam test #519
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#519
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?
Part of rehearsal phase 3 — gateway from home (spec
docs/superpowers/specs/2026-08-14-183-phase-3-home-gateway-rehearsal-design.md, plandocs/superpowers/plans/2026-08-14-183-phase-3-home-gateway-rehearsal.md).The plan section below is the work, verbatim; its Interfaces block names what neighbouring tasks consume — keep those names exact.
Global constraints (apply to every step)
CONTEXT.md) in ALL copy, comments,commit messages: founding, gateway, agent, install command,
enrollment code — never installer/daemon/token/join-key.
error with the real reason, never a silent skip or a made-up value.
install command is a doorway, not a kept tool (ADR 0028).
closes #NNN(or any close keyword) in commits or issue bodiesfor the standing drive issue family — say "advances #NNN". Even DESCRIBING a
close can auto-close (2026-08-10 lesson, twice).
STATUS.mdin the same commit(CLAUDE.md rule); the drive-issue minting commit (Task 9) carries the
STATUS + runbook update for the whole arc.
.sandcastle/.env(it forwards into worker containers);host-only secrets live in the executor's
rehearsal-env.sh(2026-07-11lesson).
Task 5: Self-hosted parity teeth — claim-secret carriage + assembly seam test
Files:
internal/clan/enrollment.go(+enrollment_test.go) — thefull-install assembly the enrolled device's first deploy renders.
internal/founding/manualpath.goor the pair/deploy join point —wherever the self-hosted path threads founding facts into the render (find
the own-VPS thread from #505
782ecbband mirror it; read that commitFIRST).
assembly.
Interfaces:
Consumes: #505's landed pattern (
git show 782ecbb— enrollment.go,vmguest.go, ownvpspath.go: the three inseparable parts a live heartbeat
needs: sops-shipped
OURCLOUD_CLAIM_SECRET,OURCLOUD_COMMUNITY_APEX,wired into the control-plane unit env;
productionAddressHeartbeatincontrol-plane/cmd/control-plane/main.go:459rests without them).Produces: a self-hosted founding's gateway boots with the heartbeat ARMED
(not resting) — Task 7's
heartbeat-repointleg depends on this; and theseam test that reds any GOTCHAS-#12 divergence (baseline present,
control-plane unit, sshd, root keys, one wan0 unit, ledger dir, claim
secret, apex) in the SELF-HOSTED assembly, not only own-VPS's.
Step 1: Failing test — clone the own-VPS carriage test from #505's
enrollment_test.goaddition for the self-hosted/manual assembly: renderthe full-install gateway for a paired self-hosted device with a recorded
<slug>.idss.nzaddress + secret; assert the rendered unit env/sops carryapex + secret.
Step 2: Red → implement by mirroring #505's thread → green —
go test ./internal/clan/... ./internal/founding/....Step 3: Failing seam test — extend the #401-family assembly test
(find it:
git log --oneline --grep="#401", the eval-the-seed seam test) witha self-hosted case asserting the checklist above; run red where anything is
missing; fix the render, not the test.
Step 4: Green + commit —
founding: the self-hosted gateway carries its claim secret and full baseline — #505's pattern, second path (advances the phase-3 ratchet, spec 2026-08-14).Blocked — needs a human ruling (design/scoping). Posted the question below to Mattermost (thread
9orndbntq3grdys3ip89tuamwh); it timed out with no reply in 20 min. Swappingready-for-agent→ready-for-human. A late reply resumes the same thread; the next ask for #519 will pick it up.The blocker: Task 5 asks to mirror #505's claim-secret thread onto the SELF-HOSTED (
AccessSelfHosted, "machine at your place") path, "wherever the self-hosted path threads founding facts into the render." Tracing the code, that landing site does not exist:installOwnVPS(internal/founding/ownvpspath.go) builds the fullGatewayFacts(apex +PublicGatewayFacts+ClaimSecret+ the claim-secretAnswer) and callso.clan.Enroll(FullInstall, Gateway: ...), which renderscontrol-plane.nix(renderControlPlaneSurface). That is the thread #505 added the claim secret to.internal/founding/manualpath.goBeginStandup) onlyMintCodes and rests atStandupInstallMachine. The device runs the install command, pairs viaOrchestrator.Pair, thenRunReachability→RunDeploy.RunDeployapplieso.clan.Config().Head(). Nothing on the self-hosted path ever writes amachines/<node>/gateway config or sets anyGatewayFacts— the draft's apex/claim-secret are consumed only for broker name-wiring (wireName→broker.PointSubdomain), never a render. The device-side takeover (internal/provision/takeover.go) EnrollsFullInstallwith noGatewayfacts either, and has no channel to receive the founding facts.AttachGateway/renderControlPlaneSurface(they all inject a fake clan seam); the only real gateway render/eval isinternal/clan/seedcommunity_eval_test.go, driven from hand-built facts, not the self-hosted path.So "mirror #505's claim-secret thread" has no home: the self-hosted gateway isn't rendered founding-side at all yet. Building that render (the full
PublicGatewayFactsassembly from the pairing probe + reachability, of which the claim secret is one field) is much larger than a claim-secret mirror and isn't in this ticket's file list (internal/clan/enrollment.go+internal/founding/manualpath.go).Options put to the human:
(A) Task 5 is blocked on a missing prerequisite: the self-hosted founding path needs its own gateway render first (a self-hosted analogue of
installOwnVPSat the pair/deploy join point). File that as a separate ticket and block #519 on it.(B) The self-hosted gateway is meant to render DEVICE-SIDE via the agent-contract takeover (
internal/provision/takeover.go, which today EnrollsFullInstallwith noGatewayfacts). Task 5 should thread apex+claim-secret+answers into thatEnrollRequest— but that needs a channel to carry the founding facts (apex + S5 secret) from the operator's draft to the device. If so, where is that channel expected to come from?(C) Narrow Task 5 to the SHARED full-install render only: prove (an enrollment carriage test + the #401 eval-smoke self-hosted case) that the FullInstall assembly carries claim secret + apex when
GatewayFactsset them (post-#505 it does), and land the actual self-hosted founding wiring in a follow-up ticket. (Ships tests, but the production self-hosted gateway still wouldn't carry the claim secret until that follow-up.)To re-arm: rule on A/B/C (and for B, name the founding→device facts channel), then re-add
ready-for-agent.Relabelled
ready-for-agentunder ADR 0174 (b183490): the task body contains no human step — it is TDD code work mirroring #505's landed pattern (782ecbb) — and it has no open blocking dependencies. This was the mislabelling class ADR 0174 retires.swarm-claim host=elitebook-distributed-server-03 run=6185
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The earlier blocked note put options A/B/C to a human and timed out; ADR 0174
(
b183490) then re-armed this as code work. Re-tracing confirms the note'sfinding:
renderControlPlaneSurfacealready carries the claim secret + apexsince #505, but the self-hosted founding path never assembles
GatewayFactsorcomposes a gateway dir at all (it pairs via
o.enroll.PairandRunDeployapplies
Config().Head(); only own-VPS/private callo.clan.EnrollwithGateway).Ruling (a two-way door — revertible by commit, test-provable, not on the
one-way-door list): ship Task 5 as the parity teeth its title and the
phase-3 spec (section c) name — the deliverable there is explicitly "the
VM-vs-full-install divergence class costs a test failure, not one droplet per
port." Landed:
TestEnroll_FullInstallGatewayCarriesClaimSecret(
internal/clan/enrollment_test.go) — the enroll configure stage bakes acontrol-plane.nixcarrying theourcloud-claim-secretgenerator +OURCLOUD_CLAIM_SECRETexport +OURCLOUD_COMMUNITY_APEX, imported byconfiguration.nix.TestSelfHostedGatewayAssembly_CarriesFullBaseline(
internal/clan/seedcommunity_eval_test.go, the #401 family) — composes thefull-install dir via the real production
AttachGatewayand asserts the wholeGOTCHAS #12 checklist: control-plane unit (#443), sshd + scraped root keys
(#414), exactly one
10-wan0unit with the route riding it (#414), ledger dir(#442), claim secret + apex (#505/ADR 0136), no
gateway-guest.niximport(#399). Both run in CI (no
OURCLOUD_EVAL_SMOKEgate); both proven to bite(flip
ClaimSecret→ red).Scope carried to a follow-up (#535): the founding-side self-hosted gateway
RENDER wiring — a self-hosted analogue of
installOwnVPSthat assemblesGatewayFactsat the pair/deploy join point so a PRODUCTION self-hosted gatewayboots the heartbeat ARMED — does not yet exist and is a larger build than a
claim-secret mirror (it needs apex/IP/ports/root-keys assembled from the draft +
probes, option A of the blocked note). Task 7's
heartbeat-repointleg dependson #535, so the self-hosted drive cannot green until it lands; the teeth here
guard the assembly #535 must produce.
close-report for #519 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope