GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(browser): end the sign-in mirror cleanly and keep loopback cookies on their machine by Hona · Pull Request #486 · anomalyco/opencode-rune

Conversation

@Hona

@Hona Hona commented Nov 21, 2026

Copy link
Copy Markdown
Member

Fixes READER-12's critical #14 on #353, "Share sign-ins with remote servers" (notes/review-rd294.md, item 14). #353 is in published builds since dev-455.

The mirror is two-way, as official's is

Official packages/gui-plugins/src/browser/profile/link.ts:8-12,85-96 (at db2d889c) mirrors the person's profile and each remote server's partition both ways, with no host filter. The review assumed it was one-way; it is not.

Orchestrator decision: keep it two-way (parity), and never let loopback cookies cross. This is recorded in ours.md 4.1a.

Changes (apps/browser-engine/src/cookies.rs)

  • (a) Turning sharing off while a sync is running:
    • Each remote partition's mirror now has a cancel state (still sharing / sharing turned off / signed out everywhere), set by set_share_sign_ins(false), clear_all and on_partition_dropped.
    • A sync in progress checks it after reading both stores and before every write, as official checks state.stopped (link.ts:51,55).
    • When the last write of a cancelled batch has landed, the batch wipes the remote partition again. Official also waits for in-flight writes before removing cookies (stop(forget) waits for its queues, link.ts:104-115).
    • After a sign-out, the batch also removes the cookies it wrote into the person's profile.
    • Turning sharing off now also clears each remote partition's HTTP sign-ins.
  • (b) Loopback cookies: cookies for localhost, *.localhost, 127.0.0.0/8 and ::1 never cross in either direction. A remote server's localhost belongs to that other machine, not to the person's own localhost.
  • (c) Caller guard: require_settings_caller (apps/desktop/.../browser/cookies.rs) also requires scope.in_flight.is_empty(), as extensions.rs and history.rs already do.

Proof (proof/previews/share-hardening/)

prove-share.ts runs against a scratch engine profile only, with a loopback page server and a loopback tunnel proxy. It runs 1500 profile cookies and 1500 remote cookies:

  • A: sharing turned off at 0, 20, 60, 150, 400 and 1000 ms after turning it on.
  • B: loopback cookies seeded on both sides.
  • C: "Sign out everywhere" at 0 to 400 ms into a remote-to-profile sync.

Results:

Case Before (#286 engine) After (this PR)
A: cookies left in the remote partition after turning sharing off 167 (at 0 ms); 0 at the other gaps 0 at every gap
B: remote loopback cookies copied into the profile 3 0
B: the person's loopback cookies copied to the remote 2 0
B: a normal remote cookie copied into the profile (two-way kept) yes yes
C: cookies left in the profile / remote after sign-out 0 / 0 0 / 0
  • C did not reproduce the race before the fix at these timings. It stays covered by the same cancel state.
  • Files: result-before.json, result-after.json.

Engine revision: no bump. The published engine is revision 4 and dev is already at 5.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Hona
fix(browser): end the sign-in mirror cleanly and keep loopback cookie…
9003cd7
…s on their machine (READER-12 #14)
@Hona
Hona merged commit f183e8f into dev Nov 21, 2026
6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Hona
Hona deleted the browser-settings/share-hardening-2 branch November 21, 2026 09:25
@github-actions

github-actions Bot commented Nov 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR test build retired — merged into dev. Install or auto-update OpenCode (Rune) from https://anoma.ly/release/opencode/desktop-rune/dev/macos-arm64-dmg.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Hona Hona mentioned this pull request Nov 21, 2026
fix(browser): a quick sharing off/on can no longer delete the person's sign-ins #523
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Hona
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.