Skip to content

Status, 2026-11-02 (end of the 2026-11-01 run)

What’s done, what’s left for you, and what’s left for the agent. The detail is in 2026-11-01-day.md (the run’s report) and 2026-11-01-your-actions.md.

  • Every screen and API is built. Customer screens 1–36, admin 37–55, all dashboard-api routes, and the apps/api request path. All are in open PRs.

  • Your answers to the run’s 14 questions are recorded (decisions log, Operator answers to the 2026-11-01 day run), and the code they needed is built: Q3.1–Q3.6, PRs #49–#55.

  • Server (as-built sections 15–17):

    • the app databases (staging and production) are installed;
    • a daily production backup to R2 runs, kept 30 days;
    • production Bifrost is under tracked values;
    • the tunnel and the gateway allow-list are in place;
    • four Workers VPC Services exist;
    • database roles are set up, and six Hyperdrive configs are bound (#64, merged).
  • Secrets set: CREDENTIAL_KEY_V1 on all four Workers; BETTER_AUTH_SECRET_APP and _ADMIN, TURNSTILE_SECRET_KEY and RESEND_API_KEY on both dashboard-api Workers. The Turnstile site key and per-environment senders are in main.

  • Cloudflare: the dead-letter queues, the Pages projects, the R2 lifecycle rule.

  • Backend stack (#31 → #62) brought up to date with main and pushed (merge commits, no force):

    • migrations renumbered 0008–0011;
    • #61’s key-auth fix kept in #36;
    • main’s job history kept in #40 and #48 (so #48’s “one write path” part is dropped);
    • #42 fixed for rate_sig_figs.

    All checks pass (dashboard-api 340/340, also on Postgres 17).

  1. Reset staging’s database and apply the migrations again (needed now: the migration numbers changed).
    • On the droplet:
      Terminal window
      kubectl -n postgres-staging exec -it app-db-cluster-1 -c postgres -- psql -U postgres -d router_africa \
      -c "drop schema if exists core cascade" -c "drop schema if exists logs cascade" -c "drop schema if exists drizzle cascade"
    • Then as before: terminal 1, the SSH port-forward (with KUBECONFIG=~/.kube/config); terminal 2, git checkout api.p1.06-roles && git pull && npm ci, then read -rs PGPW and DATABASE_URL="postgres://migrator:${PGPW}@localhost:15432/router_africa?sslmode=require" npm run migrate -w packages/db.
    • Check: 12 migrations recorded, and the grants check passes (as last time).
  2. Review and merge the PRs in stack order: the backend stack is #31 → #62, and the README’s Current status has the full order. /ra-dev-pr-review <n> checks one against the specs.
  3. Niobi: scoped 2026-11-02 (architecture/niobi-integration.md): direct collections API with our own top-up screen; webhook IP [redacted-ip]; droplet IP whitelisted; staging uses the sandbox. Sandbox credentials are in Bitwarden (into the staging secret at P6.01). Nothing left to ask Niobi: M-Pesa is 10–250,000, and Malawi is set aside for now.
  4. Maansa: credentials available (2026-11-02); the operator is scoping the integration separately (FX source, Q3.7).
  5. Droplet memory Dropped 2026-11-02: the droplet stays at 4 GB (decisions log, Operator decisions, 2026-11-02 (afternoon)). A reboot for the pending Ubuntu updates is still due at a quiet moment.
  6. Later: Google sign-in (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET).
  7. Staging admin Access (P8.01) Done 2026-11-02: Access application on admin-staging.router.africa and *.router-africa-admin.pages.dev, staff allow-list, Cloudflare login (decisions log, Admin origin access, revised).
  8. Edge rate limits (P8.07): deferred. When picked up: check the zone’s plan (Free 1 rule, Pro 2, Business 5; staging gets rules only on Business, so staging never edits production’s), create rules named ra-edge:api and ra-edge:auth with the edge_rate_limited JSON 429 body (api-errors.md), a custom token (Zone WAF Edit and Zone Read on router.africa), and Worker secrets CLOUDFLARE_EDGE_LIMITS_TOKEN and CLOUDFLARE_ZONE_ID on dashboard-api production.

A. Bring the rest of the open PRs up to date with main:

  • the screens stack #14 → #20 → #25 … #30 → #47;
  • the pipeline #38 and #54. #38’s base (p0.12-quality-gates, #13) is merged, so it’s retargeted to main. #54 adds the real-Postgres job.
  • the infra stack #57 → #60 → #63;
  • the standalone PRs #18, #19, #22 and #24.
  • #16 (fx-markup-pricing) looks superseded by the merged #59 (“Fx markup pricing”). Confirm with the operator before closing it.

B. The queue:

  1. Q3.8: turn on the usage-queue consumers with their dead-letter queues. The queues exist, and main’s wrangler.toml still has the consumers commented out.
  2. Q3.9: the staging mock gateway (no staging Bifrost).
  3. P3.01: the Bifrost adapter, behind the GATEWAY_INFERENCE and GATEWAY_MANAGEMENT bindings, using the routes the allow-list passes.
  4. P0.09: the self-hosted runner (no longer waits on memory; the droplet stays at 4 GB). Production migrations wait for it.
  5. P0.13: check the private path from a deployed Worker (after P3.01).
  6. Q3.7: Maansa FX, after the operator’s Maansa scope.
  7. Context PR #17: update it with this status, then stop the run.
  • One dashboard test (top-up) and a few first-in-file tests can time out under a full parallel run; all pass when run alone.
  • Postgres VPC Services run without certificate checks until a Cloudflare Origin CA certificate is in place (decisions log).
  • The route split is nginx, not Traefik. Revisit at the pre-launch lockdown (decisions log).

Progress (2026-11-02, after the compaction)

Section titled “Progress (2026-11-02, after the compaction)”
  • A is done (04:18). Every open PR is up to date with main, checks pass, and the branches are pushed (merge commits, no force):
    • the screens stack #14 → #47;
    • the pipeline #38 (now based on main) and #54. #38 replaces ci.yml and niobi-proxy-deploy.yml, so main’s hardening of those files moved into its workflows: actions pinned to commits, gitleaks pinned by digest, a PR scans only its own commits, and a new weekly-secret-scan.yml;
    • the infra stack #57 → #63 (helm lint passes);
    • #18, #19, #22 and #24. #19’s context bump is still current.
  • #16: waiting for the operator (close as replaced by #59?).
  • Q3.8 done: #68, based on #62. The usage-events consumers are on, with their dead-letter queues; niobi-callbacks stays off.
  • Q3.9 done: #69, based on #68. The new packages/gateway has a stateless mock; staging’s two Workers pick it with GATEWAY_MODE = "mock". To see a failure in staging, put [mock:provider_overloaded] (or another reason) in a message.
  • P3.01 done (with P2.03): #71, based on #69, and #70, the allow-list route GET /api/models/details, based on #63.
  • The run is stopped. P0.09, P0.13 and Q3.7 are blocked on you.
  1. Reset staging’s database and migrate again Done 2026-11-02. Migrated from api.p3.01-bifrost-adapter. Checked on the droplet: 12 migrations recorded; api can insert into core.holds and can’t read core.users. Port 15432 was held by something on the droplet (not a port-forward), so the tunnel used droplet port 25432: ssh -L 15432:localhost:25432 … port-forward svc/app-db-cluster-rw 25432:5432. Local port and DATABASE_URL unchanged.
  2. #16: close it as replaced by #59? Closed 2026-11-02. #59 merged its exact head (6d0a17ff6), including the reviewer’s fix commits (b8e39ca17, 0e8c8588b, 966807ef8, 35c3c8b6a).
  3. The admin cap’s period in Bifrost: monthly (1M), as built in #71, or another? Monthly, confirmed 2026-11-02 (decisions log, Admin spend cap period: monthly). The reviewer’s fixes across all closed PRs are recorded in the decisions log, Code review fixes, P0–P4.
  4. Review and merge in stack order:
    • backend #31 → #62 → #68 → #69 → #71;
    • infra #57 → #60 → #63 → #70; after #70, helm upgrade route-split … (in #70);
    • screens #14 → #47;
    • pipeline #38 → #54;
    • #18, #19, #22, #24.
  5. Then, from the earlier list: Niobi (credentials from the operator; scope from docs.niobi.co), Maansa, Google sign-in. Resend is verified, Datadog is deferred, one Turnstile widget is fine.
  6. After the first production deploy (P0.13): check the five points in #71’s description with a low-limit key.

Every open code PR is merged (2026-11-02), with the reviewer’s fixes: commits on #31, #38, #50, #51, #57, #60 and #63, and the fix PRs #72–#75, #90 and #91. They’re recorded in the decisions log, Code review fixes, 2026-11-02. The screens stack (#14, #20, #25–#30), #18, #19 and #24 were closed because their commits reached main through #65. The phase files and the README’s Current status now say merged. On main the gates pass, real Postgres included; migrate and the deploys skip until the runner exists.

  1. Turn off Hyperdrive query caching. Done 2026-11-05: caching.disabled: true in all six. All six configs have it on (checked 2026-11-03). The runbook’s create commands lacked the flag until the reviewer’s fix in #63. For each id in as-built section 17: npx wrangler hyperdrive update <id> --caching-disabled, then check that wrangler hyperdrive get <id> shows caching.disabled: true.
  2. Upgrade three droplet releases from main Done 2026-11-05 (all at revision 2; checks in as-built section 16):
    • route-split: forwards exactly the path it checked (the reviewer’s fix) and adds GET /api/models/details (#70, needed by the adapter’s model list);
    • cloudflared: pod hardening;
    • db-backup: pod hardening.
  3. P0.09, the self-hosted runner, then set SELF_HOSTED_RUNNER=true. The first staging deploy waits on it.
  4. Optional: CLOUDFLARE_PAGES_PREVIEW_TOKEN (Pages edit only) as a GitHub secret, for PR previews (secrets-inventory.md).
  5. GitHub Actions is stopped by billing (found 2026-11-05). Every run on main since 2026-11-04 failed with no job started: “recent account payments have failed or your spending limit needs to be increased” (Settings → Billing and plans). So #95–#105 merged without CI. Once it’s fixed, run Gates by hand on main (real Postgres on) before relying on #105’s claim_and_hold: its concurrency tests have never run.
  6. Staging’s database is behind main: it has 0000–0011; main adds 0012–0015 (the usage rollup, the hold’s window columns, the unbilled index, claim_and_hold). The pipeline can’t migrate until the runner exists, so migrate by hand as in item 1 of What’s left for you now, from main. Expect 16 migrations recorded.
  7. Still open from before: custom domains for the Pages projects (P0.07), Maansa scope (Q3.7), Google sign-in, edge rate limits (deferred).