Skip to content

pm-console: check the signed-in flows and the alarm in the real Worker runtime #13499

Closed

Description

@dezren39

Today. The Worker's code is tested under bun (357 tests), and scripts/edge-smoke.ts runs the bundle in the real runtime (workerd) before each deploy. The smoke run has no sign-in to present, so everything behind the owner's sign-in is checked only under bun: the actions the edge does itself, once-only by name, what is held and taken back, the Machines and Platform reads. The alarm that wakes the object (notifications with nobody looking, the wake after a refusal) is not run in the real runtime at all. Bun is not the runtime: a report that hung for twenty seconds there once passed every bun test.

What done looks like.

  • The smoke run signs its own token with a key it also serves as the issuer's (as scripts/edge-demo.ts does), so it can make signed-in requests of the Worker in workerd.
  • It then checks, in the real runtime: an action done once under a name and answered again from the record; one held with the host down, listed by the Machines read, and taken back; the Platform read; and that an alarm set by the object fires and does its work (a short interval set by a variable for the run).
  • It stays in the deploy workflow as the gate it is today.

Design record: doc/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core/.


Generated by Claude Code

Activity

  1. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    source/agentCreated by an agent worker
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane AAT claim: taking #13499 — pm-console: check the signed-in flows and the alarm in the real Worker runtime.

    Premise + ownership check (fresh, 2026-11-23): issue open, labels kind/test, app/pm-stack, source/agent; comments count-confirmed at 1 (only the automated Kaneo link from developing-today[bot] 2026-11-23T17:09:18Z); no lane claim, no user/* label, no design/ratification gate, not on the hard-skip list. fleet agent next returned no claimable task (queue rung down / shortlist empty), so this was picked directly from GitHub.

    Candidates rejected in this sweep: #13073 (xaltha claim + PR #13113 open), #5549 / #5504 (fixes already merged per their own done notes), #13337 (Lane AAB claim), #8970 (criterion 3 blocked on the mux slice; multiple releases recorded), #12668 (xaltha, PR #13041), #12050 (xaltha, PR #13184), #10972 / #10973 (xaltha lanes, hosted form landed / PR #13155), #13466 (Lane AAR claim), #13464 (decided + PR #13475 by oc-code-08), #13430 (oc-code-08, PR #13482), #13421 (Lane AAM claim), #13498 (Lane AAN claim, flag-held), #13393 (Lane AAO claim), #13342 (Lane AAQ claim), #13408 (premise depends on PR #13406 landing first — the shared formatter forms it builds on are not on main yet), #13349 (main-broken holder agent-next-26-local live, PR #13371).

    Plan: verify the premise on a laptop worktree off main (branch lane-aat-13499) — pm-stack/console/scripts/edge-smoke.ts runs the bundle in workerd with no sign-in, so signed-in flows and the DO alarm are unchecked in the real runtime. Extend the smoke run to sign its own token (same shape as scripts/edge-demo.ts), then check in workerd: an action done once under a name and answered again from the record; one held with the host down, listed by the Machines read, and taken back; the Platform read; and an alarm set by the object firing and doing its work (short interval via a run variable). Keep the smoke in the deploy workflow as the gate it is today. Verify by running the smoke locally on the laptop, land via PR, merge when verified.

  4. added a commit that references this issue on Nov 23, 2026
  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane AAT outcome: DONE — #13499 landed via PR #13526, merged as 3eb33d179b5274a8039c9d1bb47032d8909763b3; this issue is closed by it.

    What landed

    • scripts/edge-smoke.ts: the run now has its own sign-in issuer — an RS256 keypair it generates, whose public half the host stand-in serves at /jwks. The issuer in the host config is https://smoke.invalid with an https key-set address, so the pinned https validation for issuers is untouched. New signed-in checks in workerd: /console/api/me names the owner; a named push.class action is done once and its second arrival is answered from the record (again: true); the platform read is answered at the edge (the GitHub stand-in now serves the repository's pm-stack/platform/workers.json + workflow runs) with no machine asked; a device takes notifications and a signed-in state read starts the object's clock, and the run waits for what the owner is told about to be read again unasked after it goes stale; with the host gone, a message.send is held, listed by the machines read, and taken back via held.drop.
    • edge/src/worker.ts: two local-only vars. KEYS_FROM/KEYS_TO rewrite only this Worker's fetch of the issuer's key-set address to the stand-in (the GITHUB_API_ORIGIN/HOST_ORIGIN stand-in pattern; the settings themselves are never rewritten). OWN_CLOCK_MS shortens the object's clock minute for the run — the "short interval set by a variable for the run" the issue asks for.
    • edge/src/edge.ts: EdgeOptions.ownClockMs plumbing (unset keeps the 60 s minute).
    • The deploy workflow's smoke step passes both var pairs; the smoke stays the deploy gate it was.

    Verification (laptop, real runtime — not the sandbox)

    • SMOKE_PRIMARY=1 bun run scripts/edge-smoke.ts against wrangler dev with the workflow's exact vars: all checks passed, including every pre-existing one (first run of the new checks caught and fixed three shape mismatches in my own assertions and the missing stand-in routes; the final run is clean).
    • bun test in pm-stack/console: 358 pass, 0 fail.
    • wrangler deploy --dry-run for the Worker and the init config: both build.
    • The merge push runs the same smoke in the deploy workflow on main, which is the standing CI proof for this gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/testTest coverage, test infrastructure, or test-only fixessource/agentCreated by an agent workerstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions