Merge origin/main into the Oct 8 triage wave

# Conflicts:
#	extension/sidepanel-terminal.js
#	test/gstack-doctor.test.ts
This commit is contained in:
garrytan committed 2026-10-08 15:57:20 +00:00
commit f10032f174
40 files changed
+1511 -80

No files matched your search

+27 -3
View File
@@ -177,8 +177,14 @@ previous report.
<a id="init-mismatch"></a>
### `init_mismatch`
The snapshot init result or its artifacts (restore point, active plan header)
do not match this invocation.
Snapshot init returned paths that do not match the canonical form of its own
command arguments, or its artifacts (restore point, active plan header) do not
match this invocation. The guard canonicalizes the `<active>` and `<restore>`
arguments the way `init` does (see
[Symlinked plan directories](#symlinked-plan-directories)) before comparing, so
a retargeted or forged init result is denied here. Zero results or duplicate
results for one init use also deny as `init_mismatch`. Do not re-run the same
call: run init with the paths the guard expects.
<a id="snapshot"></a>
### `snapshot`
@@ -241,7 +247,10 @@ A new `/autoplan` turn needs its own init (it may answer `reused: true`).
<a id="init-failed"></a>
### `init_failed`
The init step failed. Complete it first.
The most recent snapshot init call failed; re-run the same init command with
the same three paths. An errored init is skipped, so a later successful init
still binds. This denial applies when no init ever succeeded, or when an
errored init follows a good one.
<a id="init-unbindable"></a>
### `init_unbindable`
@@ -365,3 +374,18 @@ write it never changes a decision.
Claude Code and Git Bash can spell one path as `C:\x`, `c:\x`, `C:/x` or `/c/x`.
The guard treats these as the same path. It does not resolve `.` or `..`, so a
path containing them is still rejected.
<a id="symlinked-plan-directories"></a>
## Symlinked plan directories (macOS /tmp, /var)
The guard compares plan paths canonically, not by argv spelling. On macOS
`/tmp` and `/var` are symlinks to `/private/tmp` and `/private/var`, so a plan
under `/tmp` or `/var/folders` is expected to appear as `/private/...` in the
init JSON. That is by design: `init` reports canonical paths (the deepest
existing ancestor is resolved with `realpath` and the missing segments are
re-joined, `canonicalDestination` in `bin/gstack-autoplan-snapshot.ts`), and
the guard canonicalizes the init command's `<active>` and `<restore>` the same
way. Writes and Edits to the active plan are matched by canonical path too, so
editing the plan through an alias spelling is recognized. Symlinked plan
directories are allowed; only a result that differs from the canonical form of
its own arguments is denied (`init_mismatch`).
+71 -2
View File
@@ -26,8 +26,9 @@ section has a stable link anchor; the reason codes and anchors come from
Run `~/.claude/skills/gstack/bin/gstack-doctor` (other hosts: `./setup --status`
in your gstack checkout prints the doctor's absolute path). It prints one row
each for the install, state root, Bun, hooks, Codex, the cached Codex model
check, artifacts sync, the browse bundle, Claude Code, the largest session
journal and recent /autoplan guard codes. Each row is `ok`, `warn`,
check, artifacts sync, the browse bundle, the other compiled binaries, the
/cso native helper, Claude Code, the largest session journal and recent
/autoplan guard codes. Each row is `ok`, `warn`,
`not configured` or `fail` with its fix; only `fail` exits non-zero. It makes
no paid call: the Codex rows report the cached model check and its age, and
`--live` runs that check once. Paste its output into bug reports.
@@ -771,6 +772,35 @@ Visual Studio".
**Fix.** Fix the printed compiler error, then re-run `./setup`.
<a id="cso-build-or-publish-failed"></a>
### `CSO unavailable: the native helper's <stage> step failed (...)` / `CSO publish step failed (...) for <revision>; previous CSO kept: <revision>`
**Meaning.** The /cso native helper is optional. Its build prerequisites were
present, but the `build` step (compiling the helper) or the `publish` step
(swapping the new helper into `bin/` under a lock) failed. setup used to stop
here (#3071); now it finishes everything else and says which step failed. When
an earlier helper was installed and the failed publish restored it, setup
prints `previous CSO kept` and /cso keeps using that helper; otherwise /cso
reports `not assessed`. `interrupted` means the step was killed before it could
record a result. The outcome is in `bin/.gstack-cso-build-result`, and
`gstack-doctor`'s `cso` row reads the same record. The build output is in
`bin/.gstack-cso-build.log`.
**Fix.** Read the log, fix what it reports, then retry from your gstack checkout:
```bash
bun run build:cso && ./setup
```
On Windows, setup and the build use PowerShell 7 (`pwsh`) when it is installed
and fall back to Windows PowerShell 5.1. The root cause of the staged files
vanishing during publish in #3071 is still unknown; attach the log there if you
hit it. CI sets `GSTACK_STRICT_BUILD=1`, which makes these failures fatal so
build regressions cannot hide.
**Expected result.** setup prints no CSO line, and the doctor's `cso` row is
`ok`.
<a id="cso-windows-docker"></a>
### `Docker found at <path>, but native Windows Docker transport is not supported yet; static assessment only.` / `docker.exe at <path> is outside the trusted install locations (...)`
@@ -936,6 +966,45 @@ killed.
---
## Windows
<a id="windows-smart-app-control"></a>
### `Windows blocked compiled gstack binaries at launch (Smart App Control or another application-control policy, #2595)` / `bash: .../browse.exe: Permission denied`
**Meaning.** Known issue (#2595, #2124). gstack compiles five binaries on your
machine with Bun: `browse`, `find-browse`, `design`, `pdf` and
`gstack-global-discover`. They are unsigned, and a binary built on one machine
never earns the reputation Smart App Control accepts instead of a signature, so
Windows 11 with Smart App Control on refuses to start them. Git Bash reports
that as `Permission denied`, which looks like a file-permission problem but is
code integrity (PowerShell says `An Application Control policy has blocked this
file`). setup now runs each binary's `--version` and names the blocked ones and
the skills that need them: the gstack browser fallback (`/browse`, `/qa`,
`/qa-only`, `/design-review`, `/canary`, `/benchmark`, `/pair-agent`,
`/scrape`, `/make-pdf`), the design binary (`/design-consultation`,
`/design-shotgun`, `/design-html`, `/plan-design-review`) and `/retro global`.
Every other skill works. `gstack-doctor` shows the same state in its
`browse bundle` and `binaries` rows. The exact Windows error text has not been
verified on a Smart App Control machine; setup prints the raw first line beside
its classification.
**Fix.** There is no per-file allowlist for Smart App Control. Today's options:
- Run gstack inside WSL (`wsl --install`, then install gstack in the Linux
distro). WSL runs gstack's Linux build, which Smart App Control does not check.
- Or turn Smart App Control off in Windows Security > App & browser control >
Smart App Control settings. On Windows 11 with the April 2026 update you can
turn it back on later without reinstalling Windows; on older builds turning it
off is permanent. gstack's binaries stay blocked whenever it is on.
Signed release binaries are the real fix and are tracked in `TODOS.md`. After
Windows allows the binaries, re-run `./setup`; the message goes away.
**Expected result.** setup prints no "Windows blocked" line, and
`gstack-doctor` shows `ok` for `browse bundle` and `binaries`.
---
## Memory and gbrain
Every message below is also in [docs/gbrain-sync-errors.md](gbrain-sync-errors.md)