Files
archy/.planning/phases/09-botfights-platform-upgrade/09-07-SUMMARY.md
T

14 KiB

phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, requirements-completed, coverage, duration, completed, status
phase plan subsystem tags requires provides affects tech-stack key-files key-decisions requirements-completed coverage duration completed status
09-botfights-platform-upgrade 07 infra
podman
app-catalog
rpc
botfights
jwt
arena-federation
demo
phase provides
09-botfights-platform-upgrade (plan 05) botfights:1.2.1 image in the registry, canonical arena running it at https://botfights.archipelago-foundation.org
phase provides
09-botfights-platform-upgrade (plan 06) apps/botfights/manifest.yml at 1.2.1 (generated_secrets JWT_SECRET, default-on ARENA_UPSTREAM_URL), signed catalog published
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
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
created modified
.planning/phases/09-botfights-platform-upgrade/09-DEMO-CHECKLIST.md
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.
BOT-04
id description requirement verification human_judgment
D1 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 BOT-04
kind ref status
other 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 pass
false
id description requirement verification human_judgment
D2 JWT_SECRET delivered as a podman secret (per-install, 0600, 64 hex chars), not a plaintext container env value BOT-04
kind ref status
other 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 pass
false
id description requirement verification human_judgment
D3 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 BOT-03
kind ref status
other 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) pass
false
id description verification human_judgment
D4 Local database (115 bots / 102,440 fights) preserved untouched by the update — proxy mode never writes to it
kind ref status
other 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 pass
false
id description verification human_judgment
D5 App survives a podman restart of the container (gate-relevant) and the arena itself is unaffected by all of the above
kind ref status
other 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 pass
false
id description verification human_judgment
D6 09-DEMO-CHECKLIST.md exists with the arena URL, node UI URL, prompt URL, click paths, and the standalone-fallback command
kind ref status
other 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) pass
false
id description requirement verification human_judgment rationale
D7 Real NIP-07 signer login on archi-dev-box: extension approval, no bare-pubkey request, session survives reload (D-01/BOT-01) BOT-01
true 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 description requirement verification human_judgment rationale
D8 Cross-node fighter visibility confirmed visually: node UI and arena UI show the same fighters/live fight rounds (D-03/BOT-03) BOT-03
true 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 description requirement verification human_judgment rationale
D9 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) BOT-02
true 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").
~35min 2026-07-31 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 install87b7b603 (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).