docs(09-07): Task 1 complete + verified, Tasks 2/3 stopped at blocking human checkpoints

archi-dev-box BotFights 1.2.1 install fully automated-verified (image, arena federation,
per-install secret, data preservation, restart survival, arena unaffected). Tasks 2/3
(real NIP-07 signer login, real cloud-agent-from-prompt) require a human/external agent
per the plan's own design and 09-RESEARCH.md Pitfall 5 — stopped here rather than
simulated. STATE/ROADMAP/REQUIREMENTS intentionally left untouched per this run's
explicit instruction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-31 05:09:08 -04:00
co-authored by Claude Fable 5
parent 87b7b603fd
commit ec3ef2f7c2
@@ -0,0 +1,173 @@
---
phase: 09-botfights-platform-upgrade
plan: 07
subsystem: infra
tags: [podman, app-catalog, rpc, botfights, jwt, arena-federation, demo]
requires:
- phase: 09-botfights-platform-upgrade (plan 05)
provides: "botfights:1.2.1 image in the registry, canonical arena running it at https://botfights.archipelago-foundation.org"
- phase: 09-botfights-platform-upgrade (plan 06)
provides: "apps/botfights/manifest.yml at 1.2.1 (generated_secrets JWT_SECRET, default-on ARENA_UPSTREAM_URL), signed catalog published"
provides:
- "archi-dev-box running BotFights 1.2.1, installed through package.check-updates + package.update RPC (the real signed-catalog path), verified end-to-end"
- ".planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md — the demo-day run sheet"
affects: []
tech-stack:
added: []
patterns:
- "package.check-updates RPC (no params) refreshes the catalog and reloads manifests when it changed — the automatable equivalent of the UI's 'check for updates'"
- "package.update RPC ({id: app_id}) is async; poll `podman inspect <name> --format '{{.Config.Image}}::{{.State.Status}}::{{.State.Health.Status}}'` until image tag + healthy"
key-files:
created:
- .planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md
modified: []
key-decisions:
- "Used the real RPC path (package.check-updates then package.update, id=botfights) rather than any hand-placed container edit — matches what the UI's per-app Update button drives and what CLAUDE.md/D-04 requires (T-09-34 mitigation)."
- "Local RPC auth: ARCHY_HOST=127.0.0.1 ARCHY_SCHEME=http, password ThisIsWeb54321@ (the second candidate, password123, failed with 'Password Incorrect') — confirmed via tests/lifecycle/lib/rpc.bash's rpc_login."
- "x250-dev (100.72.136.6, Tailscale) was unreachable this session (SSH connect timeout) — dev-pair rule recorded as satisfied on archi-dev-box only, with an explicit follow-up note in the demo checklist to repeat Task 1 there if it comes back online before the demo."
- "Task 2 and Task 3 are gate=\"blocking\" checkpoint:human-verify tasks requiring a real browser NIP-07 extension and a real cloud agent — neither is automatable (09-RESEARCH.md Pitfall 5: no window.nostr mock exists anywhere in the test suite). Per this run's explicit instruction, execution stopped here rather than simulating or skipping these checks; the demo-rehearsal checklist below is the structured hand-off for a human/relay to complete them."
requirements-completed: [BOT-04]
coverage:
- id: D1
description: "archi-dev-box's botfights container updated to 1.2.1 through package.check-updates + package.update RPC (the normal orchestrator app-update path), not hand-placed"
requirement: BOT-04
verification:
- kind: other
ref: "rpc_call package.check-updates -> {catalog_apps:66, catalog_changed:true, manifests_reloaded:55, refreshed:true}; journalctl: 'app-catalog: release-root signature verified'; rpc_call package.update {id:botfights} -> {status:updating}; podman inspect botfights --format image::status::health -> 146.59.87.168:3000/lfg2025/botfights:1.2.1::running::healthy"
status: pass
human_judgment: false
- id: D2
description: "JWT_SECRET delivered as a podman secret (per-install, 0600, 64 hex chars), not a plaintext container env value"
requirement: BOT-04
verification:
- kind: other
ref: "podman inspect botfights --format Config.Env -> archy-env-botfights-jwt_secret=******* (masked, secret-type env, no plaintext JWT_SECRET=); podman inspect --format Config.Cmd/Args shows --secret archy-env-botfights-jwt-secret,type=env,target=JWT_SECRET; sudo stat -c '%a %s' /var/lib/archipelago/secrets/botfights-jwt-secret -> 600 64"
status: pass
human_judgment: false
- id: D3
description: "Node is a live thin client of the shared arena: local /api/bots matches the arena's fighter set exactly, in both the default and ?type=classic views"
requirement: BOT-03
verification:
- kind: other
ref: "curl http://127.0.0.1:9100/api/bots -> 104; curl https://botfights.archipelago-foundation.org/api/bots -> 104 (match); ?type=classic both -> 15 (match)"
status: pass
human_judgment: false
- id: D4
description: "Local database (115 bots / 102,440 fights) preserved untouched by the update — proxy mode never writes to it"
verification:
- kind: other
ref: "sudo stat -c '%s %Y' /var/lib/archipelago/botfights/botfights.db -> 367144960 1782916151, byte-identical before and after the update and after a podman restart"
status: pass
human_judgment: false
- id: D5
description: "App survives a podman restart of the container (gate-relevant) and the arena itself is unaffected by all of the above"
verification:
- kind: other
ref: "podman restart botfights -> came back running::healthy within ~60s, same env (ARENA_UPSTREAM_URL intact), /api/bots still 104; curl https://botfights.archipelago-foundation.org/api/health -> {status:ok} throughout"
status: pass
human_judgment: false
- id: D6
description: "09-DEMO-CHECKLIST.md exists with the arena URL, node UI URL, prompt URL, click paths, and the standalone-fallback command"
verification:
- kind: other
ref: "test -f .planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md; grep -c botfights.archipelago-foundation.org -> multiple matches (arena URL, prompt URL, fallback section)"
status: pass
human_judgment: false
- id: D7
description: "Real NIP-07 signer login on archi-dev-box: extension approval, no bare-pubkey request, session survives reload (D-01/BOT-01)"
requirement: BOT-01
verification: []
human_judgment: true
rationale: "No window.nostr mock exists in the Playwright suite (09-RESEARCH.md Pitfall 5) — requires a real browser extension (nos2x/Alby) and a human to click through. Not automatable."
- id: D8
description: "Cross-node fighter visibility confirmed visually: node UI and arena UI show the same fighters/live fight rounds (D-03/BOT-03)"
requirement: BOT-03
verification: []
human_judgment: true
rationale: "Data-parity was proven via curl (D3 above); the remaining check is a human visually confirming the same in a real browser session and watching a live fight's rounds stream incrementally — not automatable from this session."
- id: D9
description: "A cloud-hosted AI agent builds a working bot from the unified prompt URL alone, registers, and fights, visible in the archi-dev-box UI (D-02/BOT-02)"
requirement: BOT-02
verification: []
human_judgment: true
rationale: "Requires standing up a real cloud agent session outside this execution context and observing whether it can complete the flow from the prompt alone, or reporting the exact point it got stuck. Explicitly a checkpoint:human-verify task in the plan (gate=\"blocking\")."
duration: ~35min
completed: 2026-07-31
status: awaiting-human-verification
---
# Phase 9 Plan 7: archi-dev-box BotFights 1.2.1 Update + Demo Checklist Summary
**archi-dev-box updated to BotFights 1.2.1 through the real signed-catalog RPC path (package.check-updates → package.update), verified proxy-mode fighter parity with the canonical arena, per-install JWT secret, untouched local database, and restart survival — Task 1 fully done and automated-verified; Tasks 2/3 (real nostr signer login, real cloud-agent-from-prompt) are blocking human checkpoints, stopped here per this run's explicit instruction rather than simulated.**
## Performance
- **Duration:** ~35 min
- **Started:** 2026-07-31T08:52Z
- **Completed (Task 1):** 2026-07-31T09:00Z
- **Tasks:** 1 of 3 executed (Task 1 auto; Tasks 2/3 are `checkpoint:human-verify gate="blocking"`, stopped for hand-off)
- **Files modified:** 1 (new)
## Accomplishments
- Confirmed the archipelago service was already active on archi-dev-box (running since 20:45 the previous evening) — no service start needed, contrary to the plan's precondition note that it "was inactive at planning time."
- Logged into the local RPC (`http://127.0.0.1/rpc/v1`) using `tests/lifecycle/lib/rpc.bash`'s `rpc_login`, with `ThisIsWeb54321@` (the working candidate — `password123` failed with `Password Incorrect`).
- Triggered `package.check-updates`: the local `/var/lib/archipelago/app-catalog.json` cache (previously stuck at 1.1.0, dated 2026-07-23) refreshed to 1.2.1, `manifests_reloaded: 55`, and `journalctl` recorded the release-root signature verification log line (`did:key:z6MkkidEnEpo6qHMCNSZoNKWtvQvxq3whnaME9wGgEFhq7ur`).
- Triggered `package.update {id: botfights}`: the orchestrator's normal upgrade path stopped, pulled, and recreated the container — no manual container edit, no manifest disk edit. Reached `146.59.87.168:3000/lfg2025/botfights:1.2.1` / `running` / `healthy` within ~40s.
- Verified every acceptance criterion in the plan: image tag, `ARENA_UPSTREAM_URL` present, `JWT_SECRET` delivered as a podman secret (`--secret ...,type=env,target=JWT_SECRET`, masked in `podman inspect`, backed by a 0600/64-hex-char file at `/var/lib/archipelago/secrets/botfights-jwt-secret`) with **no plaintext `JWT_SECRET=`** anywhere in the container env, local `/api/bots` matching the arena's fighter set exactly (104 default + 15 classic, both sides), the unified prompt serving with the arena hostname substituted, and the local database byte-identical before/after (`367144960` bytes / mtime `1782916151` — same numbers 09-04-SUMMARY recorded, confirming zero data loss across three plans' worth of work on this same file).
- Additionally exercised the plan's gate-relevant "survives a podman restart" check (not just acceptance criteria but explicitly called out in the objective): `podman restart botfights` came back healthy with the same env and the same live fighter parity — and the arena's own `/api/health` stayed `ok` throughout, confirming nothing on the shared side was disturbed.
- `x250-dev` (100.72.136.6) was unreachable (SSH connection timed out) — recorded as a known limitation, not treated as a failure; the checklist tells whoever picks this up later to repeat Task 1 there if it comes online.
- Wrote `.planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md`: URLs (arena, node UI, prompt), the exact click paths for all three human checks, what's already automated-verified, and the one-env-var standalone fallback if the arena is unreachable on demo day.
## Task Commits
1. **Task 1: Update archi-dev-box to 1.2.1 through the signed catalog and verify the real install**`87b7b603` (feat) — `.planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md`. Pushed to `gitea-ai main`.
**Task 2/3:** `checkpoint:human-verify gate="blocking"` — not executable from this session (real browser NIP-07 extension, real cloud agent). See "Demo-Rehearsal Checklist for Hand-off" below.
**Plan metadata:** this SUMMARY, committed separately in `archy` (`git push gitea-ai main`). Per this run's explicit instruction, `.planning/STATE.md` / `REQUIREMENTS.md` / `ROADMAP.md` were intentionally **not** touched.
## Files Created/Modified
- `.planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md` — the demo-day run sheet: URLs, click paths for all three human checks, what's already verified, and the standalone-fallback command.
## Decisions Made
See `key-decisions` in frontmatter. Most notable: used the exact RPC path a real UI click would drive (`package.check-updates` then `package.update`), confirmed via `tests/lifecycle/lib/rpc.bash`'s existing helper rather than hand-rolling curl/cookie plumbing — this is both faster and more faithful to "the real user path" per CLAUDE.md's "test before claiming fixed" rule.
## Deviations from Plan
**1. [Informational, not a deviation from correctness] archipelago service was already running.** The plan's precondition text said the service "was inactive at planning time" and Task 1's action step 1 said to start it. By execution time it was already active (running ~8h). No action needed; recorded here only because the plan explicitly called out checking this.
No Rule 1-4 auto-fixes were needed — the update went through cleanly on the first attempt with no code/config bugs encountered in this plan's own scope. (Plans 09-05/09-06 already found and fixed the real bugs — the poll-route shadow and the JWT_SECRET crash-loop risk — that made this update safe to run in the first place.)
## Issues Encountered
- `x250-dev` unreachable (SSH connect timeout on its Tailscale IP) — not a bug introduced by this plan, matches the plan's own contingency instruction ("if it is still offline, record that the dev-pair rule was satisfied on one node only and why").
## User Setup Required
**Three human checks remain, per the plan's own design (BOT-01/BOT-02/BOT-03 require a human/real external agent — CLAUDE.md's "test before claiming fixed" and 09-RESEARCH.md Pitfall 5 both call this out explicitly, not a gap in this session's work).** See the Demo-Rehearsal Checklist below and `.planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md` for the full click-by-click version.
## Next Phase Readiness
- The demo machine (archi-dev-box) is proven ready at the infra layer: correct image, correct secret handling, correct arena parity, survives a restart, arena side unaffected. Nothing here should block the demo.
- What remains is entirely human/external-agent verification, not further engineering — this plan's Task 1 closed every automatable acceptance criterion in `09-VALIDATION.md`'s "Manual-Only Verifications" list except the three that were always going to require a human/real agent by design.
- Once a human completes Tasks 2/3 (or reports where they got stuck), this SUMMARY should be updated (or a follow-up note appended) recording the verbatim verdicts, and the standard state-update step (STATE.md/ROADMAP.md/REQUIREMENTS.md) should be run — both were intentionally skipped this session per the explicit instruction to leave them untouched.
---
*Phase: 09-botfights-platform-upgrade*
*Completed (Task 1 only — Tasks 2/3 pending human verification): 2026-07-31*
## Self-Check: PASSED
- `.planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md` confirmed present on disk.
- Commit `87b7b603` confirmed in `git log --oneline` and confirmed pushed to `gitea-ai main` (`46313496..87b7b603 main -> main`).
- All D1-D6 automated verification commands re-confirmed against live container/RPC state at write time (image :1.2.1 healthy, ARENA_UPSTREAM_URL present, no plaintext JWT_SECRET, /api/bots parity 104/15, db bytes/mtime unchanged, restart survived, arena health ok).