Skip to content

/ship's review no longer stops when Capy's drive sync database grows past 100 MB (GST-3359) - #4606

Merged
capy-ai[bot] merged 2 commits into
mainfrom
review-sweep-skips-capy-drive-engine
Nov 21, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
review-sweep-skips-capy-drive-engine

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

The review's download sweep now ignores Capy's own drive sync database (state.db and its SQLite side files under ~/.capy/drive-engine).
Why: that database grew past 100 MB during a review stage on a Capy machine, the sweep took it for a reader's download, and the pass blocked every later stage while the file existed.
Nothing to do: any other download of 100 MB or more, under ~/.capy/drive-engine or ~/.capy/work included, still counts.

What changed and how it was tested
  • lib/review-sweep.ts: the inventory skips only files named state.db, state.db-wal, state.db-shm or state.db-journal below ~/.capy/drive-engine. That folder is still walked, so any other big file or repository there still counts; the old check is otherwise untouched.
  • Why a path exemption and not "only files missing from the start snapshot": the snapshot option would let a stage overwrite an existing small file with a large download, and that must stay a violation. Nothing but Capy's sync engine writes its database files.
  • test/review-sweep.test.ts: two tests through the real gstack-review-dispatch sweep command with HOME set as on Capy. The first (written first, failed on main with FETCH_VIOLATION … drive-engine/loc/state.db) grows a state.db present at stage start past the line and expects a clean sweep. The second is the deny control: a new large file under ~/.capy/work or ~/.capy/drive-engine, and an existing file written past the line, are all still violations.
  • Docs: docs/review-policy.md#what-readers-may-fetch and docs/troubleshooting.md#fetch-violation name both skipped folders.
Documentation

Scope: the diff from 7fe1900 to HEAD on review-sweep-skips-capy-drive-engine, which changes lib/review-sweep.ts and its test, docs/review-policy.md, docs/troubleshooting.md and one changelog.d fragment. The working tree has no staged, unstaged or untracked changes.

Result: current. The review-policy and troubleshooting docs already describe the new behavior. The per-stage fetch sweep ignores only the Capy drive sync database files under ~/.capy/drive-engine (state.db and its -wal, -shm and -journal files). Every other file there, and anything under ~/.capy/work, still counts as a violation when it is 100 MB or more. That matches the code, and no other doc needed an update.

Debt: none found.

Deferred findings

Blocking findings in code this PR did not change (review scope: frozen). They stay on this PR and are not filed as issues.

  • Deferred: CRITICAL lib/review-sweep.ts:117 skip entries are not realpath'd while walked dirs are; pre-existing for ~/.capy/drive
Review notes

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

  • INFORMATIONAL sf-224dd2c0375b security finding, details recorded privately
  • INFORMATIONAL sf-c227ccd0a1f4 security finding, details recorded privately
  • INFORMATIONAL test/review-sweep.test.ts:262 -wal/-shm/-journal suffixes and near-miss names like state.db.bak are not pinned by a test
  • INFORMATIONAL lib/review-sweep.ts:121 drive blob cache (/cache/blobs) of a >=100 MB drive file synced mid-stage counts as a download (fails closed; costs one planned rerun; not on main)
  • INFORMATIONAL lib/review-sweep.ts:142 state.db* exemption applies at any depth under drive-engine; could anchor to //
  • INFORMATIONAL lib/review-sweep.ts:142 a state.db directly in ~/.capy/drive-engine/ is not exempt (fails closed)
  • INFORMATIONAL lib/review-sweep.ts:121 engine exemption ignores inventory()'s skip parameter (test seam only)
  • INFORMATIONAL docs/review-policy.md:807 one edited docs line runs past the file's wrap width
Agent notes

Plan: exempt: bug fix (GST-3359); bug fixes skip plan review

Reported in GEVA-558 on gstack-evals#393 at gstack 1.102.1.0, relayed by GEVA-2. Only ~/.capy/drive-engine is exempted because it is the only platform folder with evidence; other ~/.capy folders stay walked.

Open in Capy

{
  "schema_version": 1,
  "pr": 4606,
  "head": "743df9e58e6585815b75f0473456c4f04b5f62ef",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "review-sweep": {
      "pass": 13,
      "fail": 0,
      "skip": 0
    },
    "free": {
      "pass": 1729,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44893146327,
      "attempt": 1,
      "tree": "307c50a7e73a9a91eee280d8c775d60c6deed612"
    }
  ],
  "calls": 19,
  "session_kind": "unattended",
  "run": "ship-4606",
  "head_tree": "307c50a7e73a9a91eee280d8c775d60c6deed612",
  "product_patch_id": "075748d3227ba7f5866b05f662ef740eeb1209a1",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 11,
    "rules": "85b3923b1a978e41",
    "base": "baef51fe0ec9b0f4e7103c874d94eb2c304d7100",
    "registry": "baef51fe0ec9b0f4e7103c874d94eb2c304d7100",
    "gate_scan": {
      "tagged": 0,
      "head": "743df9e58e6585815b75f0473456c4f04b5f62ef"
    },
    "reasons": [
      "runtime=11"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "warn @307c50a7e73a (8 checks, current for 743df9e58e65)",
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and changelog.d/ against merge base 7fe1900f (review-policy, troubleshooting, changelog fragment)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 1,
    "noted": 8,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 3,
    "dispatches": {
      "specialist": 2
    }
  },
  "gate_dispositions": []
}

…past 100 MB (GST-3359)

The download sweep skips ~/.capy/drive-engine beside ~/.capy/drive; a real large download elsewhere, ~/.capy/work included, still counts.

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.

…s, not the whole folder (GST-3359)

Pre-landing review fix: ~/.capy/drive-engine is walked again; only state.db and its -wal, -shm and -journal files are exempt, so a new download or repository there still counts.

Review-Finding: p1/adversarial-native#1 reader=adversarial-native
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit cc08965 into main Nov 21, 2026
86 of 87 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