session: deploy coa.matou.nz and prove phase 2 (phase-2 plan Task 12) #39
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
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
Matou/coa#39
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?
Plan
docs/superpowers/plans/2026-08-28-coa-phase-2.mdTask 12. Live host + real email + real commit onmain→ready-for-session.Steps
make host LIMIT=matou -t coain matou-distributed-servers (role ticket there).https://coa.matou.nz/and/api/healthanswer.matou-smoke, shared backend, contactben@matou.nz. Expect 200 withpageUrl;/c/matou-smokerenders; email arrives fromnotify@mail.matou.nz;community: matou-smokeauthored bycoa-serveronorigin/main; no ci run for that push.docker exec coa pnpm --filter @coa/server resend matou-smokere-sends.communities/matou-smokewith a normal commit from the laptop (the one sanctioned deletion — never a real submission), re-run the playbook so the host pulls it.STATUS.mdheader → Phase 2 complete + log lines;docs/GOTCHAS.mdfor whatever bit (bind-mount uid, Caddy reading the checkout, first-push protection).depends_on
coarole (Task 11, that repo)out_of_scope
Anything phase 3.
Blocked: the deploy artifact (matou-distributed-servers
coarole, Task 11) does not existSession on matou-workstation, first attempt. I hold this host's standing (coa checkout reset to
origin/main,FORGEJO_TOKEN, host SSH). I stopped before doing anything irreversible because the ticket's hard prerequisite is missing.What Task 12 needs: Step 1 is
make host LIMIT=matou -t coainmatou-distributed-servers, which runs thecoaAnsible role in that repo. That role is Task 11 (a ticket in that repo's tracker) and is this ticket's explicitdepends_on.Evidence the role has not landed (checked
/home/dev/matou/matou-distributed-servers, freshlygit fetched):git ls-tree -r origin/main— noroles/coa(33 roles present, none named coa).coaon any branch or remote ref (git for-each-ref,git ls-remote— empty).playbooks/host.ymllists roles explicitly; there is nocoarole and nocoatag, so-t coaselects zero tasks.https://coa.matou.nz/→ HTTP 404 and/api/health→ "Not found" (DNS + Caddy answer; the coa app is simply not deployed)..sandcastle/Dockerfile, the vendored harness image) — production deploy is exclusively the matou-distributed-servers role per the phase-2 plan Task 11.Without the role there is nothing to deploy, so Steps 1–5 (deploy, smoke submission, resend, cleanup, record) cannot begin.
Why human
coarole must be authored and landed inmatou-distributed-servers(Task 11) first. That is a different repo on gitlab; this host env has onlyFORGEJO_TOKEN, no gitlab credentials — a coa session cannot do it, and Rule 1 (work only this ticket) forbids picking it up here.ready-for-sessionwould only burn attempts to reach the same conclusion — hence routing to human now rather than after the two-attempt counter.Unblock path: land the
matou-distributed-serverscoarole (Task 11 in that repo's tracker), then re-dispatch this ticket as a session — the standing session can then run Steps 1–5 as written.Ruled by agent under the two-way-door doctrine (ADR 0002) — veto anytime. No commits, no pushes, no deploy attempted; working tree clean, nothing under
communities/touched.Unblocked — the role exists; the host checkout was looking at the wrong remote
Ruled by human (Ben) with the interactive session, 2026-08-31 03:4x UTC.
The
coarole landed on ForgejoMatou/matou-distributed-serversmainat36043246(PR #4, merged 03:11 UTC, closes #3). The workstation checkout/home/dev/matou/matou-distributed-serverstracks the GitLab remote (gitlab.com:matou-collective/…), whosemainwas still7809249— so a freshgit fetchthere genuinely showed noroles/coa. Forgejo was a strict superset (ahead by exactly the two role commits, no divergence).Fix applied:
mainfast-forwarded to3604324(git push gitlab origin/main:mainfrom Ben's laptop) — both remotes now agree.3604324;roles/coa/{defaults,tasks,templates}present,playbooks/host.ymlhas thecoablock,host_vars/matou.ymlhascoa_enabled: true.Prerequisites re-verified: coa #38 closed (deploy key
coa_forgejo_deploy_key+stalwart_notify_app_passwordin the vault), coa PR #66COA_HOSTmerged, mds #3 closed. Re-dispatching asready-for-session; Steps 1–5 as written.Blocked →
ready-for-human: this session cannot reachmatouand this host's vault lacks the coa credentialsSecond session attempt. Ruled by agent under ADR 0002 (two-way-door doctrine) — veto anytime. I stopped before touching anything irreversible because Task 12's prerequisites (a reachable
matouhost + the coa credential bytes) are both absent on the host this session was dispatched to, and neither is a two-way door I can open.Where this session is running
matou-dev-server-01— NetBird IP100.83.253.239, FQDNmatou-dev-server-01.netbird.selfhosted, meshnetbird.dev.matou.nz(the dev mesh).netbird status -dpeers:matou-dev-server-01/02/03only./home/dev/matou/matou-distributed-serversis present, current (3604324,roles/coa+coa_enabled: trueinhost_vars/matou.yml) — the #38/GOTCHAS-12 fixes are in place.Blocker A — the deploy target
matouis not reachable from here (infra)matou(inventoryansible_host: 100.98.48.68, public143.198.134.168,coa.matou.nz) lives on the production meshnetbird.matou.nzand is not a peer of this dev-mesh host:ip route get 100.98.48.68→via 134.199.144.1 dev eth0(falls through the public default route, notwt0).ssh dev@100.98.48.68→connect to host 100.98.48.68 port 22: Network is unreachable.ansible-playbook playbooks/host.yml --limit matou --tags coa --check→UNREACHABLE! … Network is unreachable.https://coa.matou.nz/→404(app not deployed; matches the first-attempt evidence).The ticket/runbook assume the session runs on matou-workstation, which is on the production mesh. The runner dispatched #39 to a dev-cluster host instead. I cannot join this host to the production mesh — that is an infra/security-posture change, not a two-way door.
Blocker B — this host's vault is missing both coa secrets (one-way door)
/home/dev/matou/matou-distributed-servers/secrets.ymlis a gitignored, local file (untracked;git check-ignore→.gitignore:7; mtime 2026-07-21, never updated).ansible-vault view secrets.ymldecrypts fine (198 lines) but its top-level keys contain neithercoa_forgejo_deploy_keynorstalwart_notify_app_password(both appear only as references inhost_vars/matou.ymlandroles/coa, never as definitions; noinventory/secrets/, no env override).roles/coa/tasks/main.yml's first task asserts both are set, so even with mesh reachability the run would fail at "Sanity-check coa inputs".#38 installed these bytes into Ben's laptop vault (that's what proved the push); they were never propagated to this host's local
secrets.yml. Credential bytes are explicitly a one-way door (ADR 0002 / plan Task 11a) — never the agent's to mint or copy.What a human needs to do (either path clears both blockers)
coa_forgejo_deploy_key+stalwart_notify_app_password) — the environment #38 was proven from; orsecrets.yml.Nothing in Task 12 (deploy → smoke → resend → cleanup → record) is upstream-independent of the deploy, so there is no two-way part to land from here. Leaving Steps 1–5 exactly as written.
Relabelling
ready-for-humanand adding this as the## Why humanresidue. No repo changes made beyond a STATUS.md log line recording this attempt.Done — phase 2 proven from Ben's laptop (the only seat with prod-mesh reach + the vault)
Ruled by human (Ben) with the interactive session, 2026-08-31.
Step 1 — deploy. mds PR #4 (role) + PR #5 (
coa_uid1001: uid 1000 on matou isdev; node user remapped at build; guard refuses a taken uid) merged;ansible-playbook host.yml -l matou -t coa→ok=17 changed=10 failed=0.https://coa.matou.nz/,/apply,/api/health200. Deploy key verified from inside the container (git ls-remote originover mesh SSH).Step 2 — smoke
matou-smoke(shared backend, contact ben@matou.nz).200 page-readybutpublishError: paths are ignored by .gitignore—.gitignorecarriedcommunities/*/since4c500ec, contradicting ADR 0003. Fixed inea9359f(+tools/repo-hygiene.test.ts, GOTCHAS 13), pulled onto the host.200 page-ready,/c/matou-smokerendered ("Matou Smoke", build pending),ade14f2 community: matou-smokeonmainauthoredcoa-server <notify@mail.matou.nz>(rebased cleanly over an unrelated push), zero commit statuses on it vsci / seamon the preceding normal push (#37 works).Message deliveredtoben@matou.nzfromnotify@mail.matou.nzat 05:16:41, 05:23:24 (the two submits) and 05:27:31 (resend).Step 3 —
docker exec coa pnpm --filter @coa/server resend matou-smoke→ "sent to ben@matou.nz", delivered (above).Step 4 — cleanup.
ba46779removescommunities/matou-smoke(laptop commit); role re-run pulled it,/c/matou-smoke→ 404. On the way:resendhad rewrittenstatus.jsonafter publish, dirtying the checkout and blocking the role'sforce: falsepull → GOTCHAS 14, follow-up #82 (phase 3).Step 5 — record. STATUS.md header → Phase 2 complete (
6f422d1),/api/health→phase: 2, GOTCHAS 12 (mds two remotes), 13, 14.Not done by the factory because the session host (matou-dev-server-01) is on the dev mesh and its vault lacks the coa secrets — a standing gap if #39-style tickets are to run unattended (no ticket filed; Ben's call).
Follow-up: the standing gap noted at close is fixed (2026-08-31). matou-workstation now has a second NetBird daemon on the production mesh (
netbird-prod,wt1, peermatou-workstation100.98.216.186),matoutrusts itsdevkey (mds PR #8, host-scoped), and its vault carriescoa_forgejo_deploy_key+stalwart_notify_app_password(mdsscripts/factory-deploy-seat.sh, runbookdocs/runbooks/factory-deploy-seat.md). Verified from the workstation:ansible matou -m ping→ pong;host.yml -l matou -t coa --check→ ok=13 failed=0. Phase-3 #81 can run as a normal session ticket.