GeezerVison is showing github.com — pm-console edge: limit the report endpoint, keep the Android build at the edge, deploy by the repo's cf flow · Issue #12521 · developing-today/code
pm-console edge: limit the report endpoint, keep the Android build at the edge, deploy by the repo's cf flow #12521DescriptionThree smaller things left from putting the console on the edge (pm-stack/console/edge):
/console/edge/sync bypasses sign-in at Cloudflare because the laptop cannot sign in; the Worker checks the report's signature itself. A body with a bad signature is refused, but every one still wakes the Durable Object and is read. Add a limit per address before the body is read (the device paths already have one, Limiter in src/devices.ts).
- The signed Android build is downloaded from the laptop (
/console/pm-console.apk). With the laptop away the download fails. Keep a copy at the edge (R2 or the Worker's assets, uploaded by the sign step) and say in the app when the copy is older than the newest build.
- The Worker is deployed by
.github/workflows/pm-console-edge-deploy.yml with plain wrangler deploy. The repo's standard is the cf versions flow (see pkgs/queue-transport-alert/worker). Move it, keeping the health check and the rollback input.
Separately worth doing in the Android project (pm-stack/console/android): androidbrowserhelper 2.5.0 -> 2.7.4 and target SDK 36, which is what current Bubblewrap generates.
Filed from the session that put the console on the edge (code#12505, #12511, #12515, #12517). Activitydeveloping-today commented on Nov 22, 2026 dezren39 commented on Nov 22, 2026 agent-note:v1
state: picked_up
task: 21032
lane: oc-code-04
stage: claimed
Claimed queue task 21032. Fresh verification: #12521 is OPEN with no hold labels; related cutover PRs #12505, #12511, #12515, #12517 are MERGED. I am validating the remaining requested scope for triage and routing. dezren39 commented on Nov 22, 2026 agent-note:v1
state: triaged
task: 21032
lane: oc-code-04
stage: verified
Triage verdict: real and current; not satisfied by the merged edge cutover work. Four independently testable scopes remain: (1) apply per-address limiting before reading /console/edge/sync request bodies; (2) keep signed APK artifacts at the edge and surface staleness versus newest build; (3) migrate deployment from plain wrangler deploy to the repo cf versions flow while retaining health check and rollback input; (4) update androidbrowserhelper 2.5.0→2.7.4 and target SDK 36. These are beyond a small fix and should be split/sized as implementation work. Related PRs #12505, #12511, #12515, #12517 are MERGED. dezren39 commented on Nov 22, 2026 agent-note:v1
state: done
task: 21032
lane: oc-code-04
stage: triaged
Queue triage task completed as triaged. Issue remains OPEN with status/ready and triage/real-and-current, routed to appropriately scoped implementation follow-ups. dezren39 commented on Nov 24, 2026 🤖 Item-4 note (task 22189, lane oc-code-04): androidbrowserhelper 2.5.0→2.7.4 + target/compile SDK 34→36 (plus required AGP 8.5.2→8.9.1 and Gradle 8.9→8.11.1) in PR #14206. CI build green: pm-console-android.yml run 45358619368 (success, unsigned path — signing key not in CI). Explicit follow-up: the signed build was NOT tried on a phone from this seat — needs a device check before release. Item 3 (cf cutover, draft #12561) still awaits the environments/tokens decision. dezren39 commented on Nov 24, 2026 Main-CI watch recurrence: pm-console-edge deploy failed again on main — run 45373361222 (push, head e87bfb9), failed job deploy pm-console-edge (step: Test the console and its edge). Deduped to this open issue and live fix task 21140 per main-ci-failure-fix-trigger — no duplicate issue/task filed.
dezren39 commented on Nov 24, 2026 dezren39 commented on Nov 24, 2026 Main-CI watch binding: fix task 23038 queued on repo-health-code-pilot for the pm-console-edge deploy main failure in run 45373361222 (failed job deploy pm-console-edge, test pm-stack/console/test/platform.test.ts:140 — expected 4 fleet-binary reads, got 5). Prior triage task 21140 is terminal, so this is a fresh fix track against this issue, not a duplicate. Dispatch deferred this pass: session enumeration failed (session-count: session list payload has no 'data' array — conductor global-stop); dispatch packet saved in the watch's dispatch-packets. Session: none yet — task remains queued for lane pickup / next pass dispatch.
dezren39 commented on Nov 24, 2026
Fix task 23038 — done-check verdict: the failure is already fixed on main; the fifth read was legitimate, the test was stale.
Root cause. Run 45373361222 (head e87bfb9, PR #14286 merge) failed pm-stack/console/test/platform.test.ts:140 — expect(asked).toHaveLength(4), got 5. The fifth fleet-binary read is a real, wanted read: commit 1ea134634 (the decision-events deploy work) made the decision-events Worker Actions-deployed in pm-stack/platform/workers.json, so Ops.platform() now asks once for the list plus once per distinct deploy workflow it names — five reads, each exactly once. The production code is right; the test hardcoded "20 Workers / 4 reads" and broke the next time the list changed.
Fix already landed. Commit cf9d0aba3 ("test(pm-console): take what the Workers list should read as from the list itself", merged via PR #14290, merge 6dfb0637a) rewrote the test to derive its expectations from workers.json itself — worker count and read count (1 + distinct workflows) now come from the file, so adding a Worker or a deploy workflow no longer breaks it.
Verification (remote, on main). The very next pm-console-edge deploy run on main, 45374270931 at head 6dfb0637a (the #14290 merge), concluded success; its test step shows the named test — "read through the fleet binary: the repository's list, with the last deploy of each Worker that Actions deploys" — (pass), 289,504 expect() calls in the suite. No code change from this lane and no PR: the fix predates this task's pickup.
#12521 itself stays open on its remaining scope (item 3's environments/tokens decision; the signed-build phone check from item 4) — this note closes only the run-45373361222 fix track (task 23038). dezren39 commented on Nov 24, 2026 agent-note:v1 — main-ci watch recurrence
State: deduped (live fix retained)
Found via: main-ci watch, pass 2026-11-24T15:30Z
New main-branch failure for workflow pm-console-edge deploy: run 45425727853 (push, head SHA 83bffcc) — https://github.com/developing-today/code/actions/runs/45425727853
Failed job: deploy pm-console-edge (step: Type-check the console).
This workflow already has a live fix track: task 23038 on repo-health-code-pilot against this issue (filed 2026-11-24T10:25Z for run 45373361222). Issue verified OPEN this pass; queue task state could not be verified (fleet queue broker tunnel unavailable), so per dedupe rule the fix is treated as live. No duplicate issue, task, or session filed. dezren39 commented on Nov 24, 2026 agent-note:v1
state: recurrence — new main failure, prior fix task terminal, fresh fix track enqueued
Found via: main-ci watch (main-ci-failure-fix-trigger, fleet)
Recurrence of the pm-console-edge deploy main-branch failure:
- Run: https://github.com/developing-today/code/actions/runs/45441275620 (push, branch main, head 40b75e0)
- Failed job: deploy pm-console-edge — step "Type-check the console"
- Log excerpt:
../test/console.test.ts(794,7): error TS2769: No overload matches this call. Object literal may only specify known properties, and 'credentials' does not exist in type '{ state: string; scopes: string[]; }'.
../test/console.test.ts(818,125): error TS2322: Type 'string' is not assignable to type 'null'.
Dedupe check this pass: the previous fix task 23038 for this workflow is verified terminal (done, completed 2026-11-24T10:29:43Z via fleet queue show), and this issue is still OPEN, so per the watch's rules this is a fresh round — a new small_fix task is enqueued against this reused issue (no duplicate issue filed). One fix track per failing workflow; duplicates are suppressed until this issue closes. dezren39 commented on Nov 24, 2026 agent-note:v1
state: fix task enqueued; dispatch deferred (session enumeration failed)
Found via: main-ci watch (main-ci-failure-fix-trigger, fleet)
Binding for the fresh fix track for run 45441275620:
- Queue task: 23596 on repo-health-code-pilot (small_fix, queued) — packet: hidden_files/main-ci-watch-packet-45441275620.json
- Session: none yet. Dispatch deferred this pass: session enumeration failed (
session-count.py: "session list payload has no 'data' array") — the conductor's global-stop condition, so no session was launched. Dispatch packet saved to hidden_files/dispatch-packets/dispatch-23596-code-12521.json; the queued task remains for lane/conductor dispatch on the Workhorse route (opencode-route/workhorse).
dezren39 commented on Nov 24, 2026 Fix landed (task 23596, lane oc-code-04). PR #14490 merged (934fc5a), test-only fix to pm-stack/console/test/console.test.ts: widened the directory() credential cast to the merged shape {state, scopes, credentials, created, revoked_at} and annotated the credentialState fixture's revoked_at as string | null. Production ops.ts unchanged.
Verification: local npx tsc --noEmit -p ../tsconfig.json clean and bun test 653 pass/0 fail; main-branch pm-console-edge deploy run https://github.com/developing-today/code/actions/runs/45444133561 (head 934fc5a) concluded success — the acceptance criterion.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|