Skip to content

/cso never looks through a symlinked folder, and Capy release and triage steps stop writing to GitHub as the owner (GST-3344) - #4592

Merged
capy-ai[bot] merged 2 commits into
mainfrom
fix-cso-symlink-ancestor-review-wording-capy-gh
Nov 21, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
fix-cso-symlink-ancestor-review-wording-capy-gh

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

/cso now checks every folder above a source file before it looks at the file, and on Capy the release PR and /ship's triage issue no longer go through gh as the owner.
Why: /cso could stat a path through a symlinked folder before failing closed, and on Capy gh signs in as the owner's own GitHub account.
Nothing to do; whoever opens release PRs on Capy publishes the HOST_PUBLISH: files with the PR tool, as other /ship steps already do.

What changed
  • /cso capture. A tracked file such as d/f whose folder d was replaced by a symlink used to be stat-ed through the link (lstat repo/d/f follows d) before a later read failed closed, and if the link's target lacked f the file was quietly recorded as deleted. Capture now walks the folders above each path from the root down first: a symlinked or non-folder ancestor fails with UNSAFE_PATH before any lstat of the path, and a missing ancestor still means the file is absent. The source-cap message's size count skips such paths the same way instead of measuring through the link.
  • Release PR on Capy. With GSTACK_CAPY=1, the command that opens release PRs still writes the new version and pushes release/<version>, then prints a HOST_PUBLISH: pr-create line (repo, base, head, title and body files) instead of running gh pr create. An already open release PR is still reused. Off Capy nothing changes.
  • Test-failure triage on Capy. The "Blame + assign GitHub issue" block in /ship keeps its title and body files and prints where they are, instead of running gh issue create.
  • REVIEW_DIFF_TOO_LARGE. A file or folder name holding a newline or another control character is quoted in top= and in the fix text, so the line stays one line. Names with spaces print as before.
  • Wording. docs/ship-policy.md says 11.3 MB (11,320,357 bytes) for harness-evals#494's 25 transcripts, and lib/review-secret-excerpt.ts and its test comment say 12.26 MB was main's whole reader diff.
Tests
  • test/cso-snapshot-state.test.ts: a tracked file under a folder swapped for a symlink (target holds a folder of that name, or nothing) fails with UNSAFE_PATH and no lstat touches a path under the link; the source-cap error measures nothing through it. Both fail on main.
  • The release command's test: on Capy, it calls only gh pr list and gh repo view, pushes the branch, and the hand-off files hold the title and release notes. Fails on main.
  • test/gen-skill-docs.test.ts: the generated triage block, run with GSTACK_CAPY=1 and a recording gh, exits 0, keeps its files and never calls gh. Fails on main.
  • test/review-gate-excerpt.test.ts: a newline in a file and folder name is quoted and the line has no newline. Fails on main.
  • Not run locally: the /cso tests that launch the compiled helper (test/cso-audit-paths.test.ts, test/cso-ordinary-repos.test.ts) fail the same 11 cases on clean main on this machine because the native helper isn't built here; CI runs them. Three release-command cases need more than the 5 s default here and pass with --timeout 30000.
Blast radius

/cso: only repositories whose working tree has a tracked path under a symlinked or non-folder ancestor change, from a raw error or a silent "deleted" to UNSAFE_PATH. Release PR and triage: only sessions with GSTACK_CAPY=1. No network, secrets, workflow, install script or dependency changes.

Documentation

Scope: the branch diff against main (ebc8674..44bf94e) plus two uncommitted doc edits. The diff changes lib/release-stamp.ts (on Capy, gstack-release-stamp open pushes the branch and leaves the PR to the host's PR tool), /ship's test-failure triage (on Capy it sends no issue), CSO snapshot and review-wording code, and tests.

Result: the docs are current. docs/ship-policy.md says that with GSTACK_CAPY=1 the release command pushes release/<version> and prints a HOST_PUBLISH: pr-create line instead of opening the PR. That matches lib/release-stamp.ts:157-178 and hostPublishes(). docs/troubleshooting.md#host-publish lists the release command's pr-create hand-off and says /ship's triage prints no HOST_PUBLISH: line, keeps its title and body files, prints their paths and runs no gh issue create. That matches ship/sections/tests.md and scripts/resolvers/preamble/generate-test-failure-triage.ts. This audit made no further edits.

Debt: none found.

Review notes

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

  • INFORMATIONAL lib/cso/snapshot.ts:793 Check-then-use window between the ancestor walk and the file lstat; the later directoryIdentities re-check stops any read, so at most a size leaks
  • INFORMATIONAL ship/sections/tests.md:377 Capy triage guard also skips the GitLab branch and its message names only gh
  • INFORMATIONAL lib/release-stamp.ts:175 handOff() throwing after the push escapes openRelease as a stack trace instead of RELEASE_STAMP_INVALID
  • INFORMATIONAL lib/review-exclude.ts:627 named() quotes ASCII control characters only; U+0085, U+2028 and U+2029 pass raw
Checks
  • Pre-Landing Review: No issues found. Second-model review (gpt-6.1-sol) clean; the adversarial pass left the 4 notes above, all below the blocking floor.
  • Gate edits: none detected (6 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none).
  • Coverage: 8 of 10 changed code paths tested (80%). Gaps: the release command's Capy path when gh repo view fails, and a tracked file under a folder that was deleted outright (checked by hand: recorded as deleted).
  • Exploratory QA: 3 of 3 smoke probes passed (Capy triage block exits 0 without calling gh; deleted folder recorded as deleted; folder replaced by a file fails with UNSAFE_PATH).
  • Scope Check: CLEAN. Intent: GST-3344 batch C items 4, 5 and 7 plus two figure corrections. Delivered: the same.
  • Tests: the changed test files pass here (616 tests); the full free suite passed in CI run 44879545106 (1722 files).
  • Evals: not run. The selector fell back to 115 behavioral probes, over this PR's $10 paid budget.
Agent notes

GST-3344 batch C, PR 2 of 2 (items 4, 5 and 7). The release command is gstack-release-stamp open (lib/release-stamp.ts openRelease). Item 7 covers the two writes named in the GSTA-643 list; gstack-ship-queue land --repair's gh pr create and land's gh pr merge remain. Ship size ledger +225 bytes recorded for the triage line. Release-command test file: test/release-stamp.test.ts.

{
  "schema_version": 1,
  "pr": 4592,
  "head": "696390e550b52dadfb51d3228489c493e68981fa",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 616,
      "fail": 0,
      "skip": 0
    },
    "tests": {
      "pass": 1722,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "tests",
      "run": 44879545106,
      "attempt": 1,
      "tree": "76df0cc35a3242f9010fab03706dd6c7f420c1ea"
    }
  ],
  "calls": 35,
  "session_kind": "unattended",
  "run": "ship-4592",
  "head_tree": "76df0cc35a3242f9010fab03706dd6c7f420c1ea",
  "product_patch_id": "e0d2a8aa2b3df83c12db6b5c82d7b3ec9af13935",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 47,
    "rules": "85b3923b1a978e41",
    "base": "0adfab9dd9c7ee7141d43f5445de052ac34aa01f",
    "registry": "0adfab9dd9c7ee7141d43f5445de052ac34aa01f",
    "gate_scan": {
      "tagged": 0,
      "head": "696390e550b52dadfb51d3228489c493e68981fa"
    },
    "reasons": [
      "gate-class",
      "risk:security",
      "runtime=47"
    ],
    "risk": [
      "security"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @76df0cc35a32 (8 checks, current for 696390e550b5)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44879545106/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44879097582/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=76df0cc35a32 tests=38621 skipped=104 runs=44879545106/1 profiles=ci-reuse/free-tests heads=696390e550b5 verified=2026-11-21T07:26:39.461Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md and CONTRIBUTING.md against the branch diff; ship-policy.md and troubleshooting.md#host-publish aligned with the Capy release and triage hand-offs"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 4,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

…age steps stop writing to GitHub as the owner (GST-3344)

/cso capture checks every folder above a source path before any lstat, so a
symlinked ancestor fails closed without being stat-ed through. On Capy the
release command hands its PR to the host's PR tool and /ship's triage keeps the
issue text in files instead of calling gh. REVIEW_DIFF_TOO_LARGE quotes names
holding a newline, and two harness-evals#494 size figures are corrected.

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

trunk-io Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

…Hub writes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 6cac5ab into main Nov 21, 2026
96 of 97 checks passed
@garrytan garrytan mentioned this pull request Nov 21, 2026
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

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