Repository navigation
test(pm-console): signed-in flows and the alarm in the real Worker runtime (#13499) - #13526
Merged
Merged
Conversation
… Worker runtime (#13499) The edge smoke run now signs its own sign-in token: a key the run makes, whose public half the host stand-in serves as the issuer's key set. The Worker's fetch of the issuer's https key-set address is sent to the stand-in by two local-only Worker vars (KEYS_FROM / KEYS_TO), the same stand-in shape as GITHUB_API_ORIGIN and HOST_ORIGIN; the issuer address in the settings is never rewritten and no validation is relaxed. With that, the run checks in workerd what only a signed-in caller reaches: who the edge says is calling, an action done once under a name and answered again from the record, the platform read (the stand-in now serves the repository's Workers list and deploy runs as GitHub would), and -- with the host gone -- an action held for a machine, listed by the machines read, and taken back. An alarm set by the object is watched firing and doing its work: the object's clock minute is shortened for the run by a local-only var (OWN_CLOCK_MS, plumbed through EdgeOptions), a device takes notifications, a state read starts the clock, and the run waits for what the owner is told about to be read again unasked once it goes stale. Verified on the laptop in the real runtime: the full smoke run passes every check (SMOKE_PRIMARY=1, wrangler dev), the console's bun suite passes 358/358, and both wrangler dry-run deploys build.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 49 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13499
What
pm-stack/console/scripts/edge-smoke.tsran the Worker bundle in workerd but could only check what needs no sign-in: the smoke issuer pointed at a real Cloudflare Access key set the run does not hold a key for. This gives the run its own issuer and checks the signed-in flows and the Durable Object alarm in the real runtime./jwks(the demo script's shape). The issuer in the host's config ishttps://smoke.invalidwith an https key-set address, so no config validation is relaxed. Two new local-only Worker vars,KEYS_FROM/KEYS_TO, rewrite only this Worker's fetch of that one address to the stand-in — the same pattern as the existingGITHUB_API_ORIGIN/QUEUE_DB_ORIGIN/HOST_ORIGINstand-in vars, and never set where deployed./console/api/menames the owner; a namedpush.classaction is done once and its second arrival is answered from the record (again: true); the platform read is answered at the edge from the repository's own list (the GitHub stand-in now servespm-stack/platform/workers.jsonand workflow runs) with no machine asked.OWN_CLOCK_MSshortens the object's clock minute for the run (plumbed throughEdgeOptions.ownClockMs; unset keeps the minute). A device takes notifications, a signed-in state read starts the clock, and the run waits until what the owner is told about is read again unasked after it goes stale — proof an alarm the object set fired and did its work.message.send(holdable, not edge-direct) is held rather than lost, listed by the machines read, and taken back withheld.drop.Verification (laptop, real runtime)
SMOKE_PRIMARY=1 bun run scripts/edge-smoke.tsagainstwrangler devwith the workflow's vars: all checks passed (including every pre-existing check).bun testinpm-stack/console: 358 pass, 0 fail.wrangler deploy --dry-runfor both the Worker and the init config: builds clean.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.