Delegate the staged-publishing challenge pause to the fleet - #308
Closed
John-David Dalton (jdalton) wants to merge 1 commit into
Closed
Delegate the staged-publishing challenge pause to the fleet#308John-David Dalton (jdalton) wants to merge 1 commit into
John-David Dalton (jdalton) wants to merge 1 commit into
Conversation
The staged-publishing configurator kept its own copy of the fleet's challenge pause. The copy existed for one reason: the fleet pause used to reload the URL on every fresh pause, and on a live run that reload closed the trusted-publisher form the write lane had just opened, then provoked more challenges with the reload traffic. The fleet pause now waits in place and never navigates, so the copy had nothing left to diverge for and only kept later fixes to the challenge rhythm out of this repo. Both call sites now use pauseForChallenge, which also brings the branded holding screen and the injectable clock. The no-navigation invariant is now asserted against the pause the run really uses rather than an injected stand-in.
John-David Dalton (jdalton)
marked this pull request as ready for review
August 6, 2026 18:54
Collaborator
Author
John-David Dalton (jdalton)
deleted the
jdalton/delegate-staged-publishing-pause
branch
August 6, 2026 18:58
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.
The staged-publishing configurator kept its own copy of the fleet's challenge pause,
pauseForOperatorInPlace. This removes the copy and calls the fleet'spauseForChallengeat both sites.The copy existed for exactly one reason, and the reason is gone. The fleet pause used to
gotothe URL on every fresh pause. On a live run that reload closed the trusted-publisher form the write lane had just opened, and the reload traffic then provoked the very Cloudflare challenges it was pausing for — settings page, form opens, reload, challenge, pause, reload, once per lap. So this module stripped thegotoand kept its own version. The fleet pause now waits in place and never navigates, so the copy had nothing left to diverge for and was only holding later fixes to the challenge rhythm out of this repo: the branded holding screen, the rerun hint, and the injectable clock all land here for free now.The no-navigation invariant is now asserted against the pause the run actually uses. Every existing test in that file injects a fake
pause, which proves the wait loop's own restraint but says nothing about what it delegates to. The new test drives the real pause and countsgotocalls.This is blocked on a cascade and must not merge yet.
mainstill carries the olderbrowser-session.mts, whosepauseForChallengenavigates at line 235. Against that base this change reintroduces the exact regression it describes, and the new test catches it — see below. The in-place pause is already cascaded into working checkouts; it just has not reachedmain. Once it does, this goes green with no edits.Evidence for the ordering dependency
Same commit, same tree, two bases:
test/scripts/npm/maintoday (03c21f7a0)The single failure is the new test, and it fails the right way —
expected 2 to be 1, the secondgotobeing the fleet pause reloading the page.Baseline on
mainwithout this commit is 260 passed, 22 files, so there are no pre-existing failures in this suite.What was deliberately left alone
The write lane stays local. The fleet's
driveVerifiedSavestill re-navigates on every attempt (driveFormEditsdoes apage.gotoper pass), soconfigure-staged-publishing-write.mtskeeps opening the form once and treating the in-place re-read as the arbiter of success.fetchJsonInPagestays local. The fleet'sfetchInPagereturns only status and body; this one also returns the URL the fetch finally landed on, which is the only thing separating the access page from npm's sign-in interstitial when both answer HTTP 200 JSON.The wait loop does not move onto
runChallengeAware. That helper models three outcomes; this loop classifies seven readiness states, and collapsing them would lose the sign-in, two-factor, and unsettled distinctions the module exists for.The operator overlay is untouched.
Lint, format, and the
playwright-launches-are-sanctionedcheck all pass.Note
Medium Risk
Touches live npm browser operator flows during Cloudflare/2FA pauses; behavior now depends on fleet
pauseForChallengestaying in-place (no reload). PR description notes merge is blocked until that fleet change is onmain.Overview
Staged-publishing browser automation stops maintaining a local copy of the fleet challenge pause and calls
pauseForChallengefrombrowser-session.mtsinwaitForAccessPageand during trusted-publisher writes.pauseForOperatorInPlaceis removed from the operator module (along with its gate/cooldown imports). Operator helpers now focus on overlays, notifications, and tab hygiene; comments document that the no-navigation pause contract lives in the fleet.Tests extend the fake
Pageso the real fleet pause can run without a browser, and addthe DELEGATED fleet pause never navigates either, which asserts only the wait loop’s initialgotooccurs across challenge polling—not a second navigation from the pause.Reviewed by Cursor Bugbot for commit 98c040d. Configure here.