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-apiroutes, and theapps/apirequest 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_V1on all four Workers;BETTER_AUTH_SECRET_APPand_ADMIN,TURNSTILE_SECRET_KEYandRESEND_API_KEYon bothdashboard-apiWorkers. The Turnstile site key and per-environment senders are inmain. -
Cloudflare: the dead-letter queues, the Pages projects, the R2 lifecycle rule.
-
Backend stack (#31 → #62) brought up to date with
mainand 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).
- migrations renumbered
For you
Section titled “For you”- 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, thenread -rs PGPWandDATABASE_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).
- On the droplet:
- 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. - 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. - Maansa: credentials available (2026-11-02); the operator is scoping the integration separately (FX source, Q3.7).
Droplet memoryDropped 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.- Later: Google sign-in (
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET). Staging admin Access (P8.01)Done 2026-11-02: Access application onadmin-staging.router.africaand*.router-africa-admin.pages.dev, staff allow-list, Cloudflare login (decisions log, Admin origin access, revised).- 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:apiandra-edge:authwith theedge_rate_limitedJSON 429 body (api-errors.md), a custom token (Zone WAF Edit and Zone Read onrouter.africa), and Worker secretsCLOUDFLARE_EDGE_LIMITS_TOKENandCLOUDFLARE_ZONE_IDondashboard-apiproduction.
For the agent
Section titled “For the agent”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 tomain. #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:
- Q3.8: turn on the usage-queue consumers with their dead-letter queues. The queues exist, and
main’swrangler.tomlstill has the consumers commented out. - Q3.9: the staging mock gateway (no staging Bifrost).
- P3.01: the Bifrost adapter, behind the
GATEWAY_INFERENCEandGATEWAY_MANAGEMENTbindings, using the routes the allow-list passes. - P0.09: the self-hosted runner (no longer waits on memory; the droplet stays at 4 GB). Production migrations wait for it.
- P0.13: check the private path from a deployed Worker (after P3.01).
- Q3.7: Maansa FX, after the operator’s Maansa scope.
- Context PR #17: update it with this status, then stop the run.
Known notes
Section titled “Known notes”- 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 replacesci.ymlandniobi-proxy-deploy.yml, somain’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 newweekly-secret-scan.yml; - the infra stack #57 → #63 (
helm lintpasses); - #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/gatewayhas a stateless mock; staging’s two Workers pick it withGATEWAY_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.
What’s left for you now
Section titled “What’s left for you now”Reset staging’s database and migrate againDone 2026-11-02. Migrated fromapi.p3.01-bifrost-adapter. Checked on the droplet: 12 migrations recorded;apican insert intocore.holdsand can’t readcore.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 andDATABASE_URLunchanged.#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).The admin cap’s period in Bifrost: monthly (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.1M), as built in #71, or another?- 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.
- 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.
- After the first production deploy (P0.13): check the five points in #71’s description with a low-limit key.
After the merge (2026-11-03)
Section titled “After the merge (2026-11-03)”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.
For you
Section titled “For you”Turn off Hyperdrive query caching.Done 2026-11-05:caching.disabled: truein 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 thatwrangler hyperdrive get <id>showscaching.disabled: true.Upgrade three droplet releases fromDone 2026-11-05 (all at revision 2; checks in as-built section 16):mainroute-split: forwards exactly the path it checked (the reviewer’s fix) and addsGET /api/models/details(#70, needed by the adapter’s model list);cloudflared: pod hardening;db-backup: pod hardening.
- P0.09, the self-hosted runner, then set
SELF_HOSTED_RUNNER=true. The first staging deploy waits on it. - Optional:
CLOUDFLARE_PAGES_PREVIEW_TOKEN(Pages edit only) as a GitHub secret, for PR previews (secrets-inventory.md). - GitHub Actions is stopped by billing (found 2026-11-05). Every run on
mainsince 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 onmain(real Postgres on) before relying on #105’sclaim_and_hold: its concurrency tests have never run. - Staging’s database is behind
main: it has0000–0011;mainadds0012–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, frommain. Expect 16 migrations recorded. - Still open from before: custom domains for the Pages projects (P0.07), Maansa scope (Q3.7), Google sign-in, edge rate limits (deferred).