Repository navigation
test(release): check a cached 0.8.0 phone app against a 0.9.0 relay - #211
Merged
gregpriday merged 9 commits intoNov 19, 2026
Merged
gregpriday merged 9 commits into
gregpriday merged 9 commits into
Conversation
- compat-check scenario 4 runs the released phone app in Chromium across the relay upgrade and the app's own update - phone-app.mjs holds the browser loader, the push subscription fixture and the declaration judge
…d keep page snapshots on failure - document scenario 4 in docs/operations.md
…ation counts - the fixture records the worker's answer to the app's FEATURES question and when the app stops waiting - the judge binds the old-worker question to the mixed page, refuses an unknown worker state and an incomplete trace, and runs on the whole trace at the end - requests are timed at their start and named by page; the advisory checks follow a ticket from the cached page - the new worker installs while the cached page is open, so the mixed page always finds it waiting - exact display checks in the updated app, a full count of the desktop's notices, and a skipped scenario never counts as run - the browser leaves the signals to the runner
…ly after the app's own handler - every post-swap ticket of the cached page is checked for what it declares - subscription posts are counted only for pages, and tied to the page that sent them - the cached page's update check is not awaited; SIGHUP stops the run like SIGINT - a missing Chromium is a warning before the installs, and fails scenario 4 only once it applies - judge tests for each predicate's edges
…, as the page traced it
…worker from Node - Playwright's waitForFunction resolves on an async predicate's promise, so the waiting worker is polled with evaluate - the declaration is taken from the updated page's own trace, then its answer is awaited after the reload - every ticket of the cached page is checked once the cached phase is over, one without features included - transfer lists that can be read only once, and response bodies that stall, no longer hold the fixture or the run
…d bound the worker poll - the fixture replaces only a transfer list that is not already an array, and never copies the app's options - the body drain's timer no longer holds the process, and the row's features must be a list
gregpriday
deleted the
feature/issue-195-check-a-cached-0-8-0-phone-app-against-a
branch
November 19, 2026 15:24
Merged
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.
Adds scenario 4 to
pnpm compat:check: the released 0.8.0 phone app, running in Chromium with its own service worker, kept loaded while its relay moves to the new version, until the app updates itself in place. Scenarios 1 to 3 use a simulated phone; this one runs the released app's own code, worker, IndexedDB and update path, which is what a phone with a cached 0.8.0 shell actually does.Resolves #195
What scenario 4 checks
PushManagerhands out a subscription onpush.compat-check.invalid, a reserved name that never resolves, allowed throughPUSH_ENDPOINT_ALLOW.decisions updatedoes, while the page stays open. The cached page is only moved within itself (pushState+popstate), so no navigation loads the new shell, and every action is checked to come from that same document.advisory-deadlines-v1noragent-stopped-push-v1, and the directory lists it as the only phone or tablet;not_supported: no-capable-readerby the CLI (exit 1, nothing on stdout) and by the library; the relay's question list is unchanged, and Home, synced past later questions, never shows it;no-subscription, and the row records no send;no-subscription. After "Restart to update" the new worker takes over and answers that it can show the push, the same subscription declaresagent-stopped-push-v1, and the relay picks it for the next request and tries to send it (failed, since the host never answers). The row is read back at the end: still one, the same one, enabled and declaring.tools/compat-check/phone-app.mjsholds the browser loader, the in-page fixture andjudgeDeclarations. The fixture stubsPushManagerand records every subscription the app sends, every message it posts a worker, the worker's own answer to the app'sFEATURESquestion, and the registration's workers as the page saw them at each moment. The judge fails the run on a declaration made before the update, while the new worker waited, with the worker state unknown, or without the active worker having said it can show the push. It also fails it on a missing question to the old worker, a second subscription, a withdrawn declaration, or a trace with fewer subscriptions than the browser saw sent. The scenario's log isphone-4.jsonl, with screenshots when it stops.Other changes
--onlytakes 1 to 4.startRelaytakes extra Worker variables. The actor's invite returns its link, its approval can compare the code the phone shows, and it can list the device directory.E2E_CHROMIUM, or the e2e package's playwright-core build). The browser leaves signal handling to the runner, which now also stops everything onSIGHUP.--oldthat already has advice or agent-stopped pushes skips scenario 4 and says so. A skipped scenario never counts as run, so a run where every chosen scenario skipped fails.docs/operations.mddescribes scenario 4 and its prerequisites, replacing "A phone app cached from an older release is not covered here."Testing
node --test tools/compat-check/phone-app.test.mjs(new, added totest:tools): 29 tests. The judge accepts a correct trace, and each rule has a case that fails when the rule is removed. Together withtools/release/release.test.mjs: 56/56 pass.pnpm compat:check --old 0.8.0(new side packed from this branch ondevelopat 5c98a1e, against the v0.8.0 release): all four scenarios pass, 3.1 min. Scenario 4 was re-run alone after each later fix and passes on the final head.tools/release/release.test.mjs: 56/56 pass.Open
From the final review pass, not fixed here:
worker/tests/push-jobs.test.ts.no-subscription,failed), not observed outbound requests. The relay only sends to https endpoints on port 443 at a hostname, so a local observer for the reserved host is not possible.