Skip to content

browse --session before the command, Gemini AQ. keys, /verify trust across worktrees, and two more fixes from outside reports - #4684

Merged
capy-ai[bot] merged 4 commits into
mainfrom
fix/outside-browse-design
Nov 22, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
fix/outside-browse-design

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Five bugs reported by outside contributors are fixed, each with a test that fails on main: browse --session before the command, a stray blank tab in the handoff window, new Gemini keys refused by $D setup, /verify asking for trust again in every worktree, and /context-restore missing a second Claude profile's transcripts.
Nothing to do after merge.

What changed, item by item
Report What was wrong Fix
#4662 part 1 (TayTaySwizzle) browse --session x goto … failed with Unknown command: '--session'; help and BROWSER.md promised an automatic per-agent session that Windows never gets A leading --session <name> moves right after the command, where it is read, and chain still reads its flow from stdin; help and BROWSER.md say Windows needs BROWSE_SESSION per agent
#4330 for #4323 (Simba3696) The headed handoff window kept the blank tab its new browser context opened, which no browse command could see or close restoreState closes the new window's own startup tab if it is still untracked and on about:blank
#4239 / #4283 (slamtanna, Lockyer228) Google AI Studio now issues Gemini keys starting with AQ.; $D setup refused them and auto-detection called them OpenAI keys AQ. is accepted and detected as Gemini; gstack's secret scan, browse's cookie masks and the live check's log redaction recognize it too
#4407 (kylewludwig) gstack-checks trust was keyed by the checkout folder, so each new git worktree was untrusted Trust is shared by every folder git lists as a worktree of the repository; the command-set hash must still match, and rows written before this still count
#4559 part 1 (tomg65) The transcript fallback looked only in ~/.claude It reads ${CLAUDE_CONFIG_DIR:-~/.claude} (and ${CODEX_HOME:-~/.codex} for Codex)
Security read

The /verify trust change widens one grant to the folders git worktree list names for that repository (a planted .git file does not qualify, and GIT_DIR, GIT_COMMON_DIR and GIT_WORK_TREE are cleared for the lookup), and only for an identical command set: the hash covers every check command, package.json script and runner input, so a worktree that declares different commands is still untrusted (tested). Anyone who can add a worktree can already edit the trusted checkout. The new git rev-parse --git-common-dir call has a 10 s timeout and falls back to the folder key. The Gemini change only widens a prefix check on a key the user types; the key still goes only to Google's endpoint, and the shared redaction pattern google.api_key (MEDIUM, warns at pre-push) and browse's cookie masks now match AQ. keys. No new dependencies, network calls or CI changes. Outside branches were read as text only and rebuilt on main.

Left out

#4662's third point (subagents in one harness process share a session) needs a design choice; #4559's second point (spotting work done after a checkpoint in other repositories) is a new feature.

Linked reports

Refs #4662
Refs #4330
Refs #4239
Refs #4407
Refs #4559

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL browse/src/chromium-profiles.ts:171 A leading --session now lands right after the command, so browse --session a profiles list reads --session as its subcommand
  • INFORMATIONAL sf-700960dd3197 security finding, details recorded privately
  • INFORMATIONAL sf-1887ad341ed1 security finding, details recorded privately
  • INFORMATIONAL test/gstack-checks.test.ts:125 the new worktree test sits under the next test's Value comment (skipped, below the floor)
  • INFORMATIONAL lib/checks.ts:235 trusting a worktree whose checks differ replaces the other worktree's grant, so it asks again (skipped, below the floor)
  • Low (second-model and adversarial reads): --path-format needs git 2.31 (now falls back to the folder key), --session=<name> leading form still unsupported, stray-tab fix only matches about:blank.
Documentation

Status: current. The docs already match this branch's changes and nothing was edited.

Scope: 19 files changed on fix/outside-browse-design against c2b4f0d (3 commits), plus one unstaged edit to the changelog fragment. Changes covered: browse --session before the command, the stray blank tab in the handoff window, AQ. Gemini keys in $D setup / redaction / cookie masking, /verify trust shared across a repository's worktrees, and CLAUDE_CONFIG_DIR/CODEX_HOME transcript lookup in /context-restore. I searched the repo's Markdown and template docs for key prefixes, transcript paths, session flags and trust keying.

Documentation health:

  • BROWSER.md: current. It already documents --session before or after the command and the Windows note.
  • context-restore/sections/transcripts.md: current. It already matches the resolver change.
  • docs/CONTRIBUTOR_REFERENCE.md: current. The AIza example is still accurate, and AQ. is optional (redaction prose, so I left it alone).
  • docs/skill-routing-and-contracts.md, docs/hosts.md, docs/ADDING_A_HOST.md, docs/troubleshooting.md, docs/BROWSER_INTERNALS.md, README.md: current. Nothing in them contradicts the change.

Coverage debt: /verify's worktree-shared trust appears only in the changelog fragment; no reference doc covers how /verify keys trust (a common gap, reference-only). AQ. Gemini keys appear only in the $D setup usage text and the changelog. Neither needs a new page; /document-generate can fill them later.

Diagram drift: none found.

Exploratory QA

Status: pass. Functional smoke, 6 captures: worktree trust and a forged .git folder, a leading --session with chain on stdin, AQ. keys in $D setup and redaction. Captures 004-006 rerun on the fixed tree. No live browser handoff or Gemini call was probed.

Agent notes

Lane GSTA-801 for GStack Minder (GST-3483). Failing-first tests: browse/test/proxy-config (#4662), browse/test/handoff (#4330), design/test/gemini-provider (#4239), test/gstack-checks (#4407), test/context-restore-transcripts (#4559). gen:skill-docs --host all regenerated context-restore/sections/transcripts.md. Guard run: typecheck clean; module-size ratchet, parity suite, bun-entry isolation, spawnSync tripwire, gen-skill-docs, browse build and design tests: 744 pass, 0 fail.

/ship run ship-4684-run1 (subagent of GSTA-801). Pre-Landing Review: 16 issues — 0 auto-fixed, 6 asked (4 fixed, 2 skipped), 0 deferred, 10 noted. Gate edits: none detected (GATE_SCAN tagged=0 at 70fa5d6). Review fixes in 70fa5d6 (Review-Finding trailers p1v/outside-voice#1-4). Evals: E2E Evals ran in CI on the pull request.

Approvals

No approvals recorded for branch fix/outside-browse-design.
Plan: exempt: bug fix from outside reports; bug fixes skip /autoplan
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4684,
  "head": "5a043b35771ad6408193590892819b649128ce4b",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "tagged": 0,
    "findings": []
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44998376368,
      "attempt": 1,
      "tree": "d5c1e2d12fbbf141dd0a6beedd23565effd3cfbd"
    }
  ],
  "calls": 43,
  "session_kind": "unattended",
  "run": "ship-4684-run1",
  "head_tree": "d5c1e2d12fbbf141dd0a6beedd23565effd3cfbd",
  "product_patch_id": "d3db3cd85c1ce09e5a21a74b104c1af7a772bd67",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 72,
    "rules": "630fd3101899e28e",
    "base": "9cfbbb94fdc336548d28ba9347acdc9d3d1e994f",
    "registry": "9cfbbb94fdc336548d28ba9347acdc9d3d1e994f",
    "gate_scan": {
      "tagged": 0,
      "head": "5a043b35771ad6408193590892819b649128ce4b"
    },
    "reasons": [
      "gate-class",
      "risk:auth",
      "risk:security",
      "runtime=72"
    ],
    "risk": [
      "auth",
      "security"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @d5c1e2d12fbb (8 checks, current for 5a043b35771a)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44998376368/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44998376368/attempts/1",
    "free-tests.yml/cso-windows-launcher: https://github.com/garrytan/gstack/actions/runs/44998376368/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44994974565/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=d5c1e2d12fbb tests=38824 skipped=105 runs=44998376368/1 profiles=ci-reuse/free-tests heads=5a043b35771a verified=2026-11-22T07:38:01.035Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [
      4239,
      4330,
      4407,
      4559,
      4662
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "BROWSER.md, README.md, docs/, AGENTS.md, CLAUDE.md, context-restore/, verify/"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 4,
    "deferred": 0,
    "noted": 10,
    "fixed": 4,
    "scope": "frozen",
    "rounds": 2,
    "est_input_tokens": 17026,
    "ledgers_read": 5,
    "dispatches": {
      "specialist-batched": 2,
      "red-team": 2
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "auth"
    ],
    "rules": "b3f6f8b4843c0c30",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "d3db3cd85c1ce09e5a21a74b104c1af7a772bd67",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

Open in Capy

…script folder fixes from outside reports

browse --session works before the command and the docs note Windows has no
automatic session (#4662); the handoff window closes its stray blank tab
(#4330); $D setup accepts AQ. Gemini keys (#4239); /verify trust is keyed by
repository so every worktree shares it (#4407); /context-restore reads
CLAUDE_CONFIG_DIR and CODEX_HOME (#4559).

Co-authored-by: Basim Rauf <[email protected]>
Co-authored-by: Lockyer <[email protected]>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 22, 2026 06:03
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ndoff tabs safe

Worktree trust now applies only to folders git lists as worktrees of the
repository, so a planted .git file cannot borrow another repository's trust.
Redaction and browse cookie masks recognize AQ. Gemini keys. A leading
--session goes right after the command, so chain still reads stdin. The
handoff cleanup closes only the window's own startup tab.

Review-Finding: p1v/outside-voice#1 reader=outside-voice
Review-Finding: p1v/outside-voice#2 reader=outside-voice
Review-Finding: p1v/outside-voice#3 reader=outside-voice
Review-Finding: p1v/outside-voice#4 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant