infra: nether.autos incus container — federated-fixture setup runbook (new-session handoff for #106/#108) #109
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dark/nether-voicebridge#109
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?
Handoff runbook for a NEW Claude Code session (the #100 pattern — this issue must suffice without any prior chat context). Goal: stand up the
nether.autosincus container as the federated test fixture from #106, verify federation with nether.im both directions, and integrate it into the voice-bridge e2e harness. This container doubles as phase-0 prototype for #108.Operator pre-work (done before the session starts)
autos), Ubuntu LTS, modest (2 CPU / 2–4 GB — Tuwunel is light).nether.autos→ Cloudflare; tunnel hostname route → the container (same cloudflared pattern as nether.im — cubuntu has no open inbound; federation hairpins via the CF edge, proven by nether.im's own inbound federation)./.well-known/cache exclusion for the new hostname (the nether.im OIDC-login lesson: CF interfering with well-known breaks discovery).Session work
ssh root@tuwunel— package/systemd/config layout) and replicate the style.server_name = "nether.autos", registration CLOSED, federation on. Persist the server signing key separately from wipeable state — fixture wipes must never rotate the key (remote peers cache server keys; a rotated key after a wipe sours federation trust). Document the wipe procedure: drop rooms/users/media, keep key + config.@autotest_.*:nether.autos, fresh as_token. Never a user-DMable-looking MXID (#96 lesson).version/keyendpoints from BOTH sides → scripted invite/join round trip nether.im↔nether.autos in both directions (the tinier.town failure was directional) → create a v12 (domainless-id) room on the fixture, cross-server join it.e2e.tomlgains a[federation]section (fixture HS url, as_token, domain); scenarios must skip cleanly when the section is absent. First scenarios (per #106): federated DM invite lifecycle (the #97 race with REAL multi-second joins), federated v12link(the #103 acceptance test, automated), slow-join greeting window, #104 cold-outreach UTD against a genuinely remote crypto user. Later tier: a chaos proxy in front of the fixture manglingmake_join/inviteresponses (deterministic reproduction of the tinier.town class).docs/e2e-homeserver.md.Ground rules for the session
flock /opt/nvb-staging/e2e-live.lock, no merge/push to master without the operator's explicit word, coordinate cross-session via this issue./.well-known/exclusion above, and CF user-agent filtering (set a UA on harness/curl probes).Done means
Federation green both directions incl. a v12 cross-join; harness mints
@autotest_*users; at least one federated scenario passing in the suite (and wired into nightly);docs/e2e-homeserver.mdmerged; evidence posted here.Pre-work decisions finalized with the operator: container name
autos, Ubuntu 24.04 LTS (deliberately matching prod's tuwunel container — verified: 24.04.4 + Tuwunel 1.8.1-1 as a native deb — so "mirror prod's deployment style" means: same OS, same deb packaging). Operator is creating the container + tailscale now; DNS/tunnel/well-known steps may land later — the session can do local homeserver setup first and run the federation verification ladder once the tunnel route exists.✅ Container is LIVE:
autoscreated by the operator, verified reachable viassh root@autos(tailscale, accept-new host key on first connect). Ubuntu 24.04.4 LTS (prod-matched), 12 cores / 31 GB visible, ZFS root with ~538 GB free, tailscale 1.98.8. Operator pre-work remaining per this runbook: DNSnether.autos→ CF, tunnel hostname route,/.well-known/cache exclusion — the executing session can begin the local homeserver setup (steps 1–3) immediately and run the federation verification ladder once the tunnel lands. This issue is the complete brief; also read MEMORY.md (parallel-instance rules apply if other sessions are active).🔒 Session claim (2026-07-12): a Claude Code session is now executing this runbook end-to-end. Plan: Part A (Tuwunel 1.8.1 prod-mirrored on
autos+autotestappservice + golden-image key-preserving wipe) proceeds now; cloudflared goes INSIDE the container once the operator drops a tunnel token (prod pattern confirmed — cloudflared runs in the tuwunel container → localhost:8008). Harness side lands on branchfeat/109-federation-fixture: first-classskippedoutcome, flatfed_*config keys (env↔file bijection; staging e2e.toml is flat TOML — table avoided deliberately),AsHomeserveractor split, scenariosfed_dm_invite_lifecycle(Pass, done-gate) +fed_cold_outreach_utd(KnownFail #104) +fed_link_v12(#103 acceptance);fed_slow_join_greetingdeferred (needs latency injection). Other sessions: crates/e2e/** and this fixture are claimed by this session until a ✅/handoff comment lands here.Progress — fixture up, harness code pushed
Part A (steps 1–4) DONE on
autos:server_name nether.autos, registration closed, federation on, listener0.0.0.0:8008, well-known served by Tuwunel (server = nether.autos:443, CF-edge hairpin like prod).autotestappservice registered (passiveurl: null, exclusive^@autotest_.*:nether\.autos$, fresh 64-hex tokens,sender_localpart autotest_bot) — smoke-minted@autotest_smoke:nether.autos✓./var/lib/tuwunel-golden.tar.gztaken pristine after first boot; full wipe (rm DB → restore) → keyed25519:WiQzDgvIidentical, smoke user gone. Baseline at/root/signing-key-baseline.txt. Wipe procedure documented indocs/e2e-homeserver.md.Part B (harness) on branch
feat/109-federation-fixture(3 commits, pushed; hermetic CI running):skippedoutcome (env-gated Skip beats the expectation; suite-neutral) + summary counter.fed_*config group →AsHomeserver; absent = skip, partial = loud load error;register_on()split in both Matrix actors (23 existing call sites untouched).fed_dm_invite_lifecycle(Pass — #97 over real federation, the done-gate),fed_cold_outreach_utd(KnownFail #104),fed_link_v12(Pass — #103 acceptance, v12 createRoom helper).fed_slow_join_greetingdeferred (needs the chaos-proxy tier).e2e.ymlwiresNVB_E2E_FED_*(url dropped in-shell when the secret is absent → skip, not config error). Forgejo secretNVB_E2E_FED_AS_TOKENstill to be added (I will, before the live CI run).docs/e2e-homeserver.md+ testing-design federation section rewritten.cargo check/test/clippy -p nvb-e2egreen on forgejo-runner (21/21).Staging: branch syncing at
/opt/nvb-staging/src109(build109 running); next: skip-run withoutfed_*keys (expectskipped, exit 0).⏳ BLOCKED on operator pre-work (per runbook): DNS
nether.autos→ CF, tunnel hostname route →http://localhost:8008in the container,/.well-known/cache exclusion, and a tunnel token — drop it at/root/tunnel-tokenonautos(or comment here) and I install cloudflared inside the container (prod pattern) and run the full verification ladder + live fed scenarios.Deliverable-1 verified live (pre-tunnel), branch CI green. Staging (
/opt/nvb-staging, bins*-109, under flock):fed_*keys → all three fed scenarios reportskippedin 0.0s, exit 0 (suite-neutral; message points at the keys +docs/e2e-homeserver.md).test) onfeat/109-federation-fixture: ✅ success (incl. the new Skip/config unit tests, 21/21).Everything actionable without the tunnel is now done. Waiting on the operator pre-work (DNS + tunnel route +
/.well-known/exclusion + token at/root/tunnel-tokenonautos) → then A5 cloudflared, the A6 ladder (both directions + v12 cross-join), live fed runs + full sweep, theNVB_E2E_FED_AS_TOKENForgejo secret, and a wipe→re-run drill.linkof an invite-only room is unsatisfiable — the invite gate rejects the invite the link reply instructs #111✅ Done — every "done means" item, with evidence
Merged to master
25138b1(operator-approved after green gates). The fixture caught three real bridge bugs within its first hour live — #110 (fixed), #111 (open, product decision), #112 (fixed) — the exact class 23 same-server scenarios were structurally blind to.Done-means checklist
federation/v1/version+key/v2/serverprobed FROM each side; scripted invite/join round trips both directions; v12 domainless room minted on the fixture and cross-joined from nether.im.@autotest_*users ✓ — passiveautotestappservice (exclusive^@autotest_.*:nether\.autos$), exercised by every fed run + CI.fed_dm_invite_lifecyclepass (4× incl. post-wipe + CI dispatch) andfed_link_v12pass;fed_cold_outreach_utd= KnownFail{#104} now pinning the REAL cross-server UTD. SecretNVB_E2E_FED_AS_TOKENset (operator); nightly--allpicks all three up; CIworkflow_dispatchleg verified green (fixture journal shows the run'sautotest_remote/autotest_linkeractivity).docs/e2e-homeserver.mdmerged ✓ — deploy,autotestregistration, golden-image wipe procedure (drilled twice: keyed25519:WiQzDgvIidentical across full DB wipes; post-wipe fed scenario green in 28.4 s), verification ladder,fed_*config semantics (skip when absent — verified live: 3×skippedexit 0; partial group = loud error — verified live). Testing-design federation section rewritten as the coverage map.Also from tonight
audio_d2m_enc.mgmt_dm_pending_reapunexpected-passed once (its #104 mode is flaky same-server; the fed twin pins it deterministically now).git archivestamps sources with COMMIT time → copying a warmtarget/alongside makes cargo rebuild NOTHING — verify binary identity (grep -aca marker string) before trusting an A/B.Fixture claim released —
autosis standing infra now; wipe freely per the runbook. #111 and #104 remain open; the #106 chaos-proxy tier is the natural next step (first candidate: replay the tinier.town200 {}shape deterministically).