Repository navigation
Refuse writes in a read-only run - #35
Merged
Merged
Conversation
Mpdreamz
force-pushed
the
feature/read-only-guard
branch
2 times, most recently
from
November 10, 2026 10:27
cb7496e to
b46a57d
Compare
…runner A journey run against a live site must not change it. NetworkGuardOptions.ReadOnly refuses every request that is not GET, HEAD or OPTIONS in Fetch.requestPaused, JourneyOptions.ReadOnly and WritableUrls expose it, the CLI gets --read-only and --writable, and @nullean/journeys gets readOnly and writableUrls through page.route. A refused write fails the step that made it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…dows
Disposing the test server while its serve loop starts another read makes Windows throw
ArgumentException ("The handle is invalid") from BeginGetContext. The loop already returns
on the other disposal errors; this adds that one. It failed the Windows build of two PRs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
force-pushed
the
feature/read-only-guard
branch
from
November 10, 2026 10:57
b948199 to
8ec90f8
Compare
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.
Why
A journey run against a live site (docs-builder's post-deploy checks, and a PR check against prod) must not change that site. Declaring a journey read-only isn't enough: a missing annotation would write.
What
NetworkGuardOptionswithReadOnlyandAllowWrites;Page.GuardNetworkAsync(allow, options). InFetch.requestPaused, any request that is not GET, HEAD or OPTIONS is failed as blocked by the client.BlockedRequest.RefusedWritecarries the method.JourneyOptions.ReadOnlyandWritableUrls(URL globs as inwait --url). A refused write fails the step withBlocked POST <url>: this run is read-only, ….cdp run --read-only --writable <glob>.@nullean/journeys:readOnlyandwritableUrlsinRunOptions, enforced inpage.routewith the same message.Writes are judged after the allow list, so third-party beacons stay reported-not-failed.
Verification
No release or publish.
🤖 Generated with Claude Code