oficina / equipo Public

Brief: real end-to-end coordinator path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude 116010f5f9e74ed41fbc0636672b11123c6e88ae parent 0fa1a48
1 file changed, +52 −0
  • docs/superpowers/plans/CODEX-BRIEF-e2e-coordinator.md +52 −0
diff --git a/docs/superpowers/plans/CODEX-BRIEF-e2e-coordinator.md b/docs/superpowers/plans/CODEX-BRIEF-e2e-coordinator.md
new file mode 100644
index 00000000..69e4964e
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-BRIEF-e2e-coordinator.md
@@ -0,0 +1,52 @@
+# Brief: real end-to-end coordinator path, and why turns are never claimed
+
+Branch `e2e-coordinator` from main 0fa1a48 (DEPLOYED). Paul's messages now
+create coordinator turns (instance DB `coordinator_turns`: four rows, all
+`state=queued`, `job_id=0`, empty `claim`; binding auto-bound to claude-a,
+later switched by Paul to claude-b). The docs-t1 runner (unit
+equipo-runner.service, service.env, release 0fa1a48) is online,
+heartbeats, reports claude-a Available=1 (claude-b unavailable: certs
+are per account), but never claims a coordinator turn. Each half is
+tested with fakes; the bridge has never run for real. Paul (2026-11-06):
+"It feels like maybe there's a websocket or protocol or connector bridge
+missing that needs its own set of unit tests here." He is right; stop
+discovering this through him.
+
+Deliver:
+1. Diagnose the claim gap with evidence: what the runner polls for, what
+ the instance offers, the conditions for a coordinator turn to be
+ claimable (binding/connection/selection/certification/person/runner
+ ownership — note the runner belongs to paul@tito.io and the binding
+ to claude-b now), and why none is satisfied. Read-only instance DB via
+ `carlos db query --app equipo --account oficina`.
+2. A REAL local end-to-end harness, `make e2e-live` (opt-in, never in
+ default CI): starts the actual instance binary on 127.0.0.1 with a
+ scratch DB and EQUIPO_EXECUTION_ENABLED, a test team/person, enrols a
+ scratch runner against it (no device-code human step: use the test
+ seam the enrolment tests use, never in production builds), uses the
+ pinned Claude 2.1.312 and ONE dedicated home (claude-a, paul@tito.io)
+ through the production launcher, sends a coordinator message through
+ the same HTTP/form path the browser uses, and waits for a coordinator
+ reply in the feed; also proves the propose_project card appears when
+ asked about an unknown repo. Fails with the exact stage that broke.
+ Small prompts; budget per run <= 6 model turns. Certification of the
+ policy is required as in production (use the release manifest; if a
+ test-only certificate is needed, generate it only in the harness).
+3. Contract tests at the instance<->runner boundary for the coordinator
+ path: recorded request/response fixtures shared by both sides
+ (poll/claim/heartbeat/turn delivery/reply), so either side drifting
+ fails CI.
+4. Fix the claim gap (and anything else the harness finds) until
+ `make e2e-live` passes twice in a row.
+5. Optimistic send (Paul): the sent message appears in the feed the
+ instant Enter is pressed (client-side pending bubble), reconciled
+ with the server copy; show a subtle sending state only if the post
+ takes >500 ms; on failure the bubble shows retry. Test it.
+AUTHORISATION: live model use only via the harness on claude-a, <= 30
+turns total; do not touch the production instance data or Paul's
+conversation; do not stop the docs-t1 runner service. New strings
+`// COPY REVIEW PENDING`. Targeted tests, ONE full `make -k ci` (rerun at
+most twice). Commit subject < 80, body `Co-Authored-By: Astra
+<noreply@openai.com>`; commit only, the controller pushes.
+CONTROLLER-REPORT-e2e-coordinator.md. Loopback only; stop servers;
+scratch removed; no copy-review server. Print a five-line summary.