Skip to content

gstack tells you what it's adding before it installs a background job or extension (GST-3239) - #4538

Merged
capy-ai[bot] merged 2 commits into
mainfrom
tell-users-before-adding-background-jobs
Nov 19, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
tell-users-before-adding-background-jobs

Conversation

@garrytan

@garrytan garrytan commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

gstack now tells you in one line what it's about to add, where you'll see it and how to remove it, before anything that keeps running or shows up goes onto your machine.
This follows the standing rule that nothing gets added to Garry's devices without that line and a name he'd recognize.
Nothing to do: behavior of the jobs themselves is unchanged.

Every path checked

A repo-wide search for launchd plists, launchctl, systemd user units, crontab, login items (SMAppService), browser extensions and device installs found these:

Path What it adds Status
sync-gbrain/SKILL.md.tmpl (and the guidance block it writes into CLAUDE.md) tells the agent to run gbrain autopilot --install, which adds launch agent com.gbrain.autopilot (systemd gbrain-autopilot.service or a crontab line on Linux) Fixed: the agent says the line above first. gbrain's own uninstall removes the plist, unit or crontab line.
bin/gstack-extension walks you through loading the gstack browse extension into your regular Chrome Fixed: prints the notice before it opens chrome://extensions.
bin/gstack-gbrain-source-wireup names ~/Library/LaunchAgents/com.gstack.brain-sync.plist Already fine: no gstack version writes this plist; the script only deletes it on --uninstall. The new test pins that.
open-gstack-browser/SKILL.md.tmpl fallback "Load unpacked" step Not an addition: it loads gstack browse into gstack's own browser window that you just opened, not your regular Chrome.
ios-qa/daemon/src/devicectl.ts installApp() would install an app on an iPhone Not an addition: no caller, and it would install your own app under test.
lib/gbrain-guards.ts mentions gbrain autopilot --install Not an addition: a refusal message naming an existing install.

The browse, design and iOS daemons run only while you use them and stop on idle; nothing registers them to start again.

Tests
  • bun test test/background-job-notice.test.ts test/parity-suite.test.ts test/spawnsync-timeout-tripwire.test.ts: 10 tests pass at 7ca81be.
  • Free test suite in CI, run 44612696281 at 7ca81be: green (1713 files).
  • macOS named regressions (run 44612696281) and Windows smoke (run 44611480307) at 7ca81be: green.
What changed

gstack-extension now says what it is adding, where you will see it and how to remove it, before it opens chrome://extensions

gstack-extension now says what it is adding, where you will see it and how to remove it, before it opens chrome://extensions.

Before/after as text: gstack-extension now says what it is adding, where you will see it and how to remove it, before it opens chrome://extensions
--- Before · before.txt · captured output
+++ After · after.txt · captured output
 Manual install (for your regular Chrome):
 
+  Adding a Chrome extension called gstack browse that adds the gstack side panel to your regular Chrome. You'll see it as the gstack browse icon in Chrome's toolbar and on chrome://extensions. Remove it with: chrome://extensions → gstack browse → Remove
+
   1. Opening chrome://extensions now...
      Could not open Chrome. Navigate to chrome://extensions manually.
   2. Toggle 'Developer mode' ON (top-right)

Before this, gstack could walk you into adding a background job or a browser extension without saying so. Now the /sync-gbrain guidance (and the block it writes into CLAUDE.md) has the agent say "Adding a background job called com.gbrain.autopilot that keeps gbrain's index of your repos fresh on a schedule. You'll see it under System Settings → General → Login Items on a Mac, or as gbrain-autopilot.service in systemctl --user on Linux. Remove it with: gbrain autopilot --uninstall" before it runs gbrain autopilot --install, and gstack-extension prints the same kind of line for the gstack browse Chrome extension.

Why

Garry's rule on 2026-11-19: "before adding anything that keeps running or shows up on my devices, tell me in one line what I'll see, why and how to remove it." Now every gstack path that adds such a thing says so first, and a test fails if a new one is added without that line.

Blast radius

Only two printed or spoken lines change. One is the sync-gbrain guidance text (template, generated SKILL.md and the CLAUDE.md block) and the other is one echo in bin/gstack-extension, and neither changes what gets installed. Script ran: bin/gstack-extension prints the notice before opening chrome://extensions both with and without a browser opener on PATH, and the gbrain names match gbrain's own src/core/autopilot-paths.ts and src/commands/autopilot.ts.

Pre-Landing Review

Pre-Landing Review: 1 issue — 1 auto-fixed, 0 asked, 0 deferred, 0 noted

  • [AUTO-FIXED] test/background-job-notice.test.ts:33 The exemptions for files that only mention an install step skipped the whole file, so a real install step added to one later would go unflagged → each exemption now names its exact line, a stale exemption fails its own test, and the devicectl.ts exemption (which matched no line) is gone. Commit 7ca81be.

The second review pass and the adversarial read of the fix found nothing.

Exploratory QA

Two smoke runs of bin/gstack-extension: with stubbed browser openers and with none on PATH. Both exit 0 and print the notice before chrome://extensions opens and before "Load unpacked". Verdict: pass. Limit: without pbcopy the script exits 127 before printing anything; that is older behavior outside this change.

Scope Drift

Scope Check: CLEAN. Intent: tell users before gstack adds a background job or extension. Delivered: the notice in the sync-gbrain guidance, CLAUDE.md and gstack-extension, plus a test that guards every install step.

Eval Results

No paid evals selected: bun run eval:select picked 0 behavioral probes and 0 quality judges for this diff.

Documentation

Scope: the six committed files from ab6a38b to 7ca81be (CLAUDE.md, sync-gbrain template and generated SKILL.md, bin/gstack-extension, a changelog.d fragment and a new test), plus every repo doc that mentions gbrain autopilot --install or gstack-extension.

Result: current. CLAUDE.md and the sync-gbrain template already hold the new one-line notice before the autopilot install, and they match each other. BROWSER.md's line describing gstack-extension is still accurate. No other doc describes these install steps, so nothing needed editing.

Debt: none found.

Agent notes

Agent notes

R115 (Garry 2026-11-19 19:17Z). Lane GSTA-664 for GSTA-36. The brief's known case (the wireup writing com.gstack.brain-sync.plist) turned out not to install anything; the real install paths were the gbrain autopilot guidance and gstack-extension.

Approvals

No approvals recorded for branch tell-users-before-adding-background-jobs.
Plan: exempt: Captain GStack Minder (GSTA-36) brief, 2026-11-19: Garry approved rule R115, which this implements; skip /autoplan
Plan check: PLAN_EXEMPT_UNKNOWN (gstack-approvals plan-check says why)

REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=1 scope=frozen dispatches=8
Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

{
  "schema_version": 1,
  "pr": 4538,
  "head": "7ca81be3833a56c30b5e565d56e5f22624c66d9c",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 10,
      "fail": 0,
      "skip": 0
    },
    "free": {
      "pass": 1713,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44612696281,
      "attempt": 1,
      "tree": "0a73d41e7afc0505e38abf049d17d22a1f65e3d4"
    }
  ],
  "calls": 23,
  "session_kind": "unattended",
  "run": "run",
  "head_tree": "0a73d41e7afc0505e38abf049d17d22a1f65e3d4",
  "product_patch_id": "e88797ff2c271ba1df9480b35c02f517d880a672",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 22,
    "rules": "1afa38a4be3b5eef",
    "base": "dab7549451e28ee4d89aa717cad06fdc00509106",
    "registry": "dab7549451e28ee4d89aa717cad06fdc00509106",
    "gate_scan": {
      "tagged": 0,
      "head": "7ca81be3833a56c30b5e565d56e5f22624c66d9c"
    },
    "reasons": [
      "runtime=22"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @0a73d41e7afc (8 checks, current for 7ca81be3833a)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44612696281/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44611480307/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=0a73d41e7afc tests=38396 skipped=104 runs=44612696281/1 profiles=ci-reuse/free-tests heads=7ca81be3833a verified=2026-11-19T20:58:58.532Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CLAUDE.md, AGENTS.md, CONTRIBUTING.md, sync-gbrain/SKILL.md.tmpl (plus BROWSER.md read by the auditor)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 4,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "gate_dispositions": []
}

Open in Capy

… or extension (GST-3239)

Before /sync-gbrain's guidance runs gbrain autopilot --install, and before gstack-extension opens chrome://extensions, gstack prints one line naming the item, what it does, where it shows and how to remove it. A new test checks each path and fails when a future install step lacks the line.

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

trunk-io Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

… whole file

A new install step added to an exempt file now fails the scan, and an exemption whose line is gone fails too. Drops the devicectl.ts exemption, which matched no line.

Review-Finding: p1/specialist-batched#1 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 9093238 into main Nov 19, 2026
77 checks passed
@garrytan garrytan mentioned this pull request Nov 20, 2026
capy-ai Bot added a commit that referenced this pull request Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549)
- For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543)
- The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534)
- A green CI run still counts when the repository's artifact storage is full. (#4536)
- `/cso` now audits repositories that track symlinks. (#4567)
- A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555)
- The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554)
- Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542)
- A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544)
- When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553)
- The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539)
- Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568)
- /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552)
- /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565)
- The prompt-routing hook no longer acts on words inside backticks. (#4566)
- In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509)
- gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537)
- gstack now says what it's adding before it adds a background job or a browser extension. (#4538)
- For contributors: every flaky pass in Free Tests is now recorded. (#4572)
- For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570)
- Secret values written as `name=value` at the end of a path are now hidden. (#4571)

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