Skip to content

Installs leave gstack's test fixtures out of the user's home (GST-3402) - #4638

Closed
garrytan wants to merge 3 commits into
mainfrom
fix/install-leaves-out-test-fixtures
Closed

garrytan wants to merge 3 commits into
mainfrom
fix/install-leaves-out-test-fixtures

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

A fresh ./setup install, and the next update of an existing one, no longer puts test/fixtures/ (gstack's test and eval data) on disk.
Why: those files hold eval task material (real issues from other repos, held-out prompts) that every agent session and eval run in that home could read; nothing installed reads them.
Nothing to do: contributor clones (git config gstack.contributor true), CI and clones with the dev toolchain keep the full tree.

How it works
  • Every install path is a shallow git clone of the whole repository followed by ./setup: the README command, the Capy installer, /gstack-upgrade (fast-forward, reset or fresh clone) and the session auto-updater. Codex, Gemini and the other hosts get generated skill folders that link back into that checkout, so the checkout is the only place test/ lives.
  • setup now runs _trim_install_fixtures after the build succeeds. For a user install (the same signal that already picks production-only dependencies: unmarked, not CI, no dev toolchain) it sets a git sparse checkout of /* and !/test/fixtures/. Git applies it on every later pull, reset and gstack-ff-update, so new fixtures never reach disk.
  • It changes only the top of gstack's own checkout (a vendored copy inside a project is left alone), leaves sparse patterns someone else set, keeps a fixture the person edited, and never fails setup.
  • Marking a trimmed clone as a contributor's and running ./setup again brings the fixtures back.
  • Only test/fixtures/ is left out. The runtime imports 24 files under test/helpers/, and the browse cookie integrity check hashes files under browse/test/, so those stay.
What still carries the data

The working tree no longer has the files, but a shallow clone's git object store still holds them, compressed, for the checked-out commit: git show HEAD:test/fixtures/... inside the install would print them. Removing that needs the eval material out of this repository's tree.

Tests
  • test/setup-install-fixtures.test.ts (new; 7 of its 9 cases fail on main): a fresh shallow install has no test/fixtures/ and keeps test/helpers/; fixtures stay out across bin/gstack-ff-update and git pull --ff-only while other files move; an edited fixture is kept; contributor, CI, GSTACK_CONTRIBUTOR=1 and dev-toolchain clones keep the tree; marking a clone restores it; a vendored copy and foreign sparse patterns are untouched; setup calls it once, after the build; the static import closure of bin/, lib/, hosts/, the binaries' sources and the doc generator never reaches test/fixtures/, with a negative control.
  • By hand on a fresh shallow clone of this branch in an isolated home: ./setup --host claude left test/fixtures/ out with a clean git status; a forced rebuild on the trimmed tree passed; gstack-skill-start started ship, review, qa-only and browse; the Capy installer (install.sh --for ship) ended gstack: ok on the trimmed tree.
Agent notes

GSTA-759 for GST-3402 (from GEVA-568 via GEVA-2). The /ship receipt is added here when /ship finishes.

{"head":"793d137543b74908b15ffb2171c437bb101f164b","run":"ship-4638","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":0,"fixed":1,"scope":"frozen","rounds":1,"dispatches":{"specialist":3,"red-team":1}}}
{"head":"ba7b197004b7232a539447cda0ea9e8bd87ad130","run":"ship-4638b","mark":"stop","tree":"a9a370a4b2d7cb8f5f3f249e150fdc03562fc8a2"}

Open in Capy

A user install's ./setup now sets a git sparse checkout that leaves test/fixtures/ out of the working tree. The fixtures hold eval task material that every agent session and eval run in that home could read, and nothing an installed skill runs reads them. Contributor clones, CI and clones with the dev toolchain keep the full tree, and the next update trims existing installs.

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

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

garrytan and others added 2 commits November 21, 2026 22:52
setup hands the sparse patterns to git on stdin, so Git Bash on Windows cannot rewrite them, and reports the trim only when git stored exactly those patterns; otherwise it turns the sparse checkout off and warns.

Review-Finding: p1/specialist-batched#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…r cannot loop

The shim found the real git by dropping the first PATH entry; a wrapper that walks PATH found the shim again and they exec'd each other until the timeout. It now runs the git from git --exec-path. Granted by GStack Minder (GSTA-36) as #4638's first exception.

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

capy-ai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Closing this without merging. Leaving the test fixtures out of installs through a sparse checkout in setup turned out to be fragile install machinery, and it can't clear the files from git's object store anyway. A new pull request removes the real eval task material from the repository and replaces it with synthetic test prompts.

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