Repository navigation
Refuse checkout-bound callers by their binding and sweep unregistered checkouts - #216
Merged
Merged
Conversation
… checkouts A checkout-bound Workspace command whose answer no longer matched its credential was refused as pane_changed with "Reconnect the pane and retry", a step a daemon-run caller with no pane cannot take. The refusal now follows the credential's binding: pane_changed for a pane, checkout_not_registered for a checkout, with one next-action sentence shared by the CLI bootstrap, the server, and the sweep. The five-second registry sweep drops a checkout-bound capability whose checkout no longer resolves on its device, with a sweep-stage pane_auth record, so an unregistered project stops counting against the 64-reference cap before its eight-hour lifetime ends. The core is asked with the registry lock released, on a blocking task, so a bootstrap or a validation never waits behind the sweep. AGENTS.md gains the rule for the operator's installed app: replace /Applications/hide.app only on the operator's request in the replacing session, keep the previous bundle as a .bak, never delete another session's backup, launch with HERDR_* stripped, and read the installed version before trusting a live check.
yansfil
added a commit
that referenced
this pull request
Oct 29, 2026
…d stages (#1837) Closes with-hide/hide-private#252 Related: with-hide/hide-private#221, with-hide/hide-private#171, with-hide/hide-private#135, with-hide/hide-private#207, with-hide/hide-private#216 ## Summary On Windows a right-click on a terminal link also opened the link, beside the menu: a folder link revealed its folder and an HTML link loaded its page again. xterm opens a link on the release of any mouse button, and on Windows the right-click menu appears after that release; now a right-click opens only the menu, and the primary and middle buttons open links as before. Separately, the first page a test opens on Windows sometimes stays `loading` for the whole 10 s `--wait`, and nothing said where it stopped. Each load the core asks for now logs when its route came, when it committed and when its own load call settled, against that load alone, with the display, the native page id and the time; the browser spec records the native page's own state when that first wait gives up. 스크린샷 없음: the shell change is which mouse button opens a terminal link; nothing drawn changes. ## Review - **조심해서 볼 파일**: `web/src/terminalLinkProvider.ts` - both link paths (detected and OSC 8) go through one `opens(event)` check, which refuses only the right button. - **조심해서 볼 파일**: `desktop/src/main/browser.ts` - each `load()` holds its own `CoreLoad`; a commit counts only after its own `loadURL`, its stop is that call's promise, a newer load or failed route ends it; three lines per core-asked load. ### Per issue - #252 terminal-links "terminal HTML opens a rendered page": fixed at the cause above; the spec now also asserts one `browser_open`, which a right-click activation adds on Windows every run. - #221, #171, #135, #207 (browser.spec first `--wait` open stays `loading`, status 2): cause not proven yet. Host log shows `view_created`/`page_visible` then nothing for 10 s, no route or load failure; core log has no stale-report refusal, so the core got `loading` and never `loaded`. Only the first page of a fresh profile fails. This PR adds the evidence that names the stage. - Their older signature, `shellPage` 30 s in `fixture.ts`, is the desktop startup flake handled by the flaky2-win-desktop change. - #216 reveal-external (rail tool click left unpressed): last seen 2026-10-20, before the rail was rebuilt (#1552); not touched here. ## Evidence - **확인한 것**: web unit test that a right-click's release opens no link fails without the fix and passes with it. - **확인한 것**: macOS desktop e2e 1/2 failed once fetching the pinned Herdr (`curl: Failed to connect to github.com`); its rerun passed. - **확인한 것**: desktop unit tests: a reopen waiting for its route while the earlier load commits and stops, two checkouts' same id and load told apart by `contents`, a failed route then a page navigation; all three fail on the previous code. - **확인한 것**: web unit tests: right button opens nothing, primary and middle open; ⌘-click on macOS, Ctrl-click on Windows/Linux still open externally. - **확인한 것**: Windows desktop e2e 19/19, no flaky test, in three runs: PR verify 40852660304 and nightly `lane=windows` 40857562866 on e09dc15, PR verify 40873166675 on 1b89a27 (all jobs green). - **확인하지 못한 것**: the stage of the stuck first load: neither Windows run reproduced it; the issues say how to read the next failure. - **확인하지 못한 것**: nightly 40857562866 failed `agent journey fake model (windows)` on `guidance_memory`; untouched by this diff, passed on main's 10-28 nightly, not checked on current main. - **확인하지 못한 것**: the full web unit suite locally (67 failures at load average ~300 on this Mac, not read); CI's web unit lane passed on 1b89a27. <details><summary>Verification record</summary> - Head 1b89a27; CI tested merge bf853d1 (1b89a27 into main 1849300), PR verify 40873166675: success, every job. - Earlier head e09dc15: PR verify 40852660304 success after one rerun of the macOS desktop job (github.com unreachable fetching Herdr); nightly `lane=windows` 40857562866: desktop and web e2e green, `agent journey fake model (windows)` failed on `guidance_memory`, outside this diff. - Local (this Mac, load 100-300): web and desktop typecheck and lint pass; desktop unit 297 passed; `terminalLinkProvider.test.ts` 43 passed; `browser.test.ts` 26 passed. - Not run: desktop e2e locally (no build on this disk), Windows locally (no Windows host). - Limit: the stuck first page load did not recur in three Windows runs, so its stage is still unproven; #221, #171, #135 and #207 stay open with the reading guide. </details>
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.
Related: #202, #205,
agents/prd/checkout-capability/prd.mdSummary
#202 let a caller with no attestable pane (Codex 0.157's shared daemon) hold a checkout-bound Workspace credential, but two edges still spoke the pane path's language.
A checkout-bound command whose answer no longer matched its credential was refused as
pane_changedwith "Reconnect the pane and retry", a step that caller cannot take; it now answerscheckout_not_registeredwith the checkout next action, chosen by the credential's own binding.A checkout-bound capability whose project was unregistered stayed in the registry until its eight-hour lifetime ended, counting against the 64-reference cap; the five-second sweep now drops it, with a
sweep-stagepane_authrecord.AGENTS.mdgains the rule for/Applications/hide.appafter 2026-09-27, when one session replaced the operator's app with a pre-fix build and deleted the backups beside it.Review
AGENTS.md; whether "the operator asked for it in the session doing the replacing" is the authority line you want.hided/src/pane_auth.rsRegistry::sweep- it now asks the core once per live checkout-bound entry every 5 s (at most 64, in-process owner-thread round trips), with the registry lock released and on aspawn_blockingtask, so a bootstrap or validation never waits behind it; a pane-bound entry is not re-resolved.hided/src/server.rs- the two post-command context checks returncap.changed_refusal(); the validate refusal's next action is now keyed by reason.Evidence
scripts/verify-cargo.sh test -p hided(77 hided unit tests, including the newsweep_drops_a_checkout_capability_whose_checkout_no_longer_resolves: a claimed checkout-bound entry against a bare core is gone after one sweep and its reference file removed, a pane-bound entry stays, and the token then validates ascredential_expired),verify-cargo.sh lint,cargo fmt --all --check,check-no-workstation-identity.sh,check-no-attribution.py.checkout_not_registeredrefusal text on a real post-command mismatch is covered by the unit-levelchanged_refusalmapping, not by unregistering a project under a running daemon. Onehide-agent-hooksdeadline test failed once under load and passed on rerun (known flake, unrelated files).AI tooling: 대부분 AI 도구. Diff, the sweep's lock and thread placement, and the AGENTS.md wording were read by hand.