P2P Production Handoff - 2026-05-08

This is a local agent handoff note for the 2026-05-08 careervector thread. It intentionally contains no secret values.

Cloudflare auth

Wrangler deploy/auth works on this machine with the Cloudflare Email plus Global API Key stored in /home/richc/.agent/secrets/cloudflare.md.

Use those values only as process environment variables:

CLOUDFLARE_EMAIL="$cf_email" CLOUDFLARE_API_KEY="$cf_key" npx wrangler whoami

Do not print the values. Do not use the Workers AI API token as the deploy credential.

Architecture frame

The point of this work is not just "make a deploy pass". The architecture goal is:

  • Canonical workspace state lives in Yjs/subdocs, with D1 as durable backing and query surface where needed.
  • Workspace Intelligence must truthfully represent what the system is doing: queued work, claims, activity, fallbacks, and results.
  • Browsers are the cheap first executor for workspace work. Server fallback is last resort.
  • WebRTC/P2P between active browser sessions should reduce Cloudflare request volume while keeping sessions aligned.
  • Cloudflare still remains the durability/ordering/fallback authority so edits are not lost when browsers disappear.

Original remaining-work table from the thread

Item Status after 2026-05-08 deploy Notes
Production promotion Done Remote D1 migrations applied, realtime deployed, web version b36a725a-7bc9-4079-9931-d429126a4661 promoted to 100 percent production traffic.
Scheduled fallback verification Still pending Need production proof that a stale queued request is claimed by the scheduled fallback, bounded, committed through canonical ops, and visible in Workspace Intelligence.
Remaining runtime architecture gaps Still pending Continue eliminating D1-first exceptions and legacy compatibility paths once migrations are proven. Known examples from the thread: process-command atomicity wrapper, jobs API ID allocation path, legacy workspace patch/delete/import/read-only surfaces, and old bootstrap/snapshot compatibility.
Frugality audit after deploy Still pending Need live browser/session request-volume proof that idle UI plus browser-worker tabs do not issue unnecessary status/intelligence/claim calls.
Broader regression pass Partially done Focused checks, build, dry-run, and production browser E2E passed. Broader unit/e2e sweep is still a separate confidence pass.

What was completed in the 2026-05-08 continuation

  • 1f79721 Read job-exists from jobs subdoc
  • e18d7dd Fix p2p stateless fallback probing
  • c905dc3 Make production promotion non-interactive

Production changes completed:

  • Applied migrations/add-p2p-signals.sql remotely.
  • Applied migrations/add-process-request-fallback-index.sql remotely.
  • Deployed careervector-realtime.
  • Uploaded and promoted careervector-web version b36a725a-7bc9-4079-9931-d429126a4661.
  • Patched apps/web/package.json so deploy:production:promote requires WORKER_VERSION_ID and does not fall into Wrangler's interactive selector.

Browser/live verification completed:

PLAYWRIGHT_BASE_URL=https://careervector.corbet.ch CI=true \
  npm run test:e2e -- e2e/p2p-probe-smoke.spec.ts e2e/qa-realtime-gate.spec.ts --project=chromium --reporter=list

Result: 2 passed.

Live realtime health also returned {"ok":true,...} from https://careervector-realtime.corbet.workers.dev/health.

Next agent should start here

  1. Do not redo Cloudflare credential discovery. Use /home/richc/.agent/secrets/cloudflare.md with CLOUDFLARE_EMAIL and CLOUDFLARE_API_KEY.
  2. Start with scheduled fallback production proof and idle request-volume/frugality proof.
  3. Then continue retiring remaining D1-first/legacy paths only after each migration is proven.
  4. Keep browser verification mandatory for user-visible and realtime/workspace-intelligence changes.
Source: wiki/content/archive/2026-05/agent-runs/p2p-production-handoff-2026-05-08.md