fix(ops): send apikey with push drain, read the web push public key from release/, record 2026-11-17 backlog evidence
The scheduled push drain got HTTP 401 because modern Supabase service keys need the apikey header next to Bearer. NAS deploy scripts fall back to release/webpush-vapid-public.key (public key only). Map, mobile SSOT and deployment runbooks are synced with the verified operations run in docs/evidence/2026-11-17-backlog-operations.md.
This commit is contained in:
parent
8d8aaf5794
commit
6791e29f27
16 changed files with 254 additions and 96 deletions
|
|
@ -43,7 +43,7 @@ Forgejo CI runs `check:migrations:test` and `check:migrations`. These gates vali
|
|||
| `realtime-token` | OpenAI Realtime ephemeral token (tier-gated, session quota) |
|
||||
| `generate-meeting-document` | AI document generation (minutes/report/idea-note/mindmap) |
|
||||
| `embed-chunks` / `search-knowledge` | RAG embeddings + semantic search. `knowledge_embedding` budgets are read from generated `PLAN_QUOTA`, whose source is `packages/core/src/plan-catalog.ts` |
|
||||
| `audio-purge` | Service-only audio object purge worker invoked by pg_cron. `config.toml` sets `verify_jwt = false` so modern service keys reach the handler; the handler then authorizes the exact service credential before queue/storage work. Isolated local runtime proof on 2026-11-04 covered missing/non-service key 401, service-key 200, direct drain, and `pg_cron` → Vault → `pg_net` → Edge → Storage deletion |
|
||||
| `audio-purge` | Service-only audio object purge worker invoked by pg_cron. `config.toml` sets `verify_jwt = false` so modern service keys reach the handler; the handler then authorizes the exact service credential before queue/storage work. Local proof (2026-11-04) and production proof (2026-11-17) both cover `pg_cron` → Vault → `pg_net` → Edge → Storage. In production the isolated probe queue and real WAV object changed `1 → 0`, with `net._http_response.status_code=200` at 09:00 UTC |
|
||||
| `content-report` | AI content reporting |
|
||||
| `team-invite` / `team-accept` | Team invitations |
|
||||
| `send-push` | Push delivery |
|
||||
|
|
@ -65,7 +65,7 @@ Integration/E2E: content-report red e2e, content-reporting (ps1/sql), mobile pla
|
|||
|
||||
## 2. Cloudflare worker (`server/cloudflare-worker/`)
|
||||
|
||||
- `wrangler.toml` — worker `d3ro-voice-api`, compat 2024-04-01, `BACKEND_ORIGIN="https://d3ro.chanpaca.net"` in source (Wave 7 `c68e81e`; note live Worker `fe6d9532-0052-48f5-b62c-45c86f6aaaa5` still retains pre-Wave-7 dashboard var `http://192.168.0.39:5050` from `--keep-vars`), optional custom domain route (commented).
|
||||
- `wrangler.toml` — worker `d3ro-voice-api`, compat 2024-04-01, `BACKEND_ORIGIN="https://d3ro.chanpaca.net"` in source and production (2026-11-17 deployment `b9e68793-b061-481f-a620-dab73a91a9d8`; `/worker-health` and proxied `/health` both HTTP 200), optional custom domain route (commented).
|
||||
- `src/index.ts`, `src/origin-policy.ts`, `src/push-drain.ts` — CORS preflight, `/worker-health`, origin policy + loop guard (`508`/`503`), null-body status handling (`204`/`205`/`304`), forwards to backend origin with `X-Forwarded-*` / `X-D3RO-Edge-Proxy` headers.
|
||||
- `server/cloudflare-site-bridge/` — Pages/Worker bridge hardened in Wave 7 with `508` loop guard, path smuggling `400`, and `deno.json` (`src/index.test.ts` 5/5 PASS).
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ Shared TS types for these live in `packages/api-client` (SSOT).
|
|||
- Push: Supabase owns tokens/devices/outbox/retries. Transports implemented for **FCM, Web Push (VAPID + RFC 8291), and APNs (.p8 token)**; the Cloudflare Worker cron drains the outbox every minute. Android still requires FCM at the device. Details: `docs/deployment/push-transport-without-firebase.md`.
|
||||
- Content safety: generation receipts + `content-report` **implemented**.
|
||||
- Data portability (`account-delete`, export/restore): **implemented**.
|
||||
- Audio purge source wiring, unit tests, and an isolated local pg_cron/Vault invocation are verified: the fixture queue, `audio_files` row, and Storage object each changed from one to zero and `net._http_response` recorded HTTP 200. Deployment and the production schedule/Vault/object path remain unverified.
|
||||
- Audio purge source wiring and local/production pg_cron paths are verified. On 2026-11-17 the production Vault was populated, and the 09:00 UTC scheduled invocation deleted an isolated real Storage object and its queue row (`1 → 0`), recording `net._http_response.status_code=200`.
|
||||
|
||||
External gates are enumerated in `docs/v3/MOBILE_APP_COMPLETION_SSOT.md` §0/§6 and mirrored in `11-gap-backlog.md` (`EXT-*`, `BE-*`).
|
||||
|
||||
|
|
@ -117,4 +117,4 @@ External gates are enumerated in `docs/v3/MOBILE_APP_COMPLETION_SSOT.md` §0/§6
|
|||
## Wave 7 hardening (2026-11-14, `c68e81e`, post-`v1.17.1`)
|
||||
|
||||
- **Supabase Edge Functions (`server/supabase/functions`, Deno `273 passed | 0 failed`):** `stt-proxy/handler.ts` rejects requests whose `Content-Length` exceeds the cap with `413` before buffering; `embed-chunks/handler.ts` refunds quota only on upstream provider failures; `_shared/quota.ts` fails closed by rethrowing DB errors other than `PGRST116` (`stt-proxy/handler.test.ts`, `embed-chunks/handler.test.ts`, `_shared/quota.test.ts`).
|
||||
- **Cloudflare Worker & Site Bridge (`server/cloudflare-worker`, Deno `15 passed | 0 failed`; `server/cloudflare-site-bridge`, Deno `5 passed | 0 failed`):** updated `wrangler.toml` default `BACKEND_ORIGIN` to `https://d3ro.chanpaca.net` (fixing the HTTP `403` error `1003` root cause in source; live Worker `fe6d9532-...` still holds the pre-Wave-7 dashboard var until redeployed without `--keep-vars` or updated), added `origin-policy.ts` rejecting non-HTTPS/private-IP/internal origins and proxy loops (`508`/`503`), handled null-body statuses (`204`/`205`/`304`), and applied origin validation to `push-drain.ts`; hardened `cloudflare-site-bridge` with `508` loop guard and path-smuggling `400` (`deno.json`, `src/index.test.ts`).
|
||||
- **Cloudflare Worker & Site Bridge (`server/cloudflare-worker`, Deno `15 passed | 0 failed`; `server/cloudflare-site-bridge`, Deno `5 passed | 0 failed`):** added public-HTTPS origin validation, proxy-loop/path-smuggling guards and null-body handling. **2026-11-17 production:** Worker `b9e68793-...` and Site Bridge `cca39627-...` deployed; `/worker-health`, proxied `/health`, landing, `/app/login`, and admin login all return HTTP 200. `push-drain.ts` now sends both Bearer and `apikey` service credentials; the project default secret key replaced the stale Worker key, and a real scheduled run logged `claimed=1 completed=1 pending=0`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue