ci: run the agent build cache tests in CI (#19598)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Agents work in many fresh worktrees. PR #19555 added
`scripts/agent-preflight.mjs` and a shared content-keyed build cache
(`scripts/agent-build-cache.mjs`).
> - That PR also added 6 tests in
`scripts/__tests__/agent-build-cache.test.mjs`.
> - CI runs script tests only from the explicit file list in the root
`test:release-registry` script. The new test file is not in that list,
so CI does not run it.
> - A regression in the cache (for example, a scrub that keeps a
workspace crate, or a partial entry that reads back as complete) can
then merge without a failing check.
> - This pull request adds the test file to that list.
> - The benefit is that every PR now runs the build cache tests in the
required `pr-trusted` typecheck job.

## Linked Issues or Issue Description

Refs #19555

**What is the problem?**
The 6 build cache tests from #19555 do not run in CI. The
`test:release-registry` script lists script test files one by one, and
the new file is not listed.

**What is the expected behavior?**
CI runs the build cache tests on every PR, and a failure blocks the
merge.

**Why does it matter?**
The build cache decides which build output a fresh worktree reuses. An
untested regression can give agents stale or partial builds.

## What Changed

- Add `scripts/__tests__/agent-build-cache.test.mjs` to the
`test:release-registry` script in the root `package.json`. CI runs this
script in the "Verify release registry test coverage" step of
`.github/workflows/pr-trusted.yml`.
- No test changes. The tests are portable to Linux. Only `cloneInto`
touches copy-on-write. On macOS it tries `cp -cRp` (APFS clone) and then
`cp -Rp`. On Linux it tries `cp -a --reflink=auto` and then `cp -a`. The
clone test checks the copied content and that no temporary sibling is
left. It does not check block sharing, so it gives the same proof on a
filesystem without reflink. No test needs a skip.

**This PR changes `package.json`, so it needs CODEOWNER review.**

## Verification

- `pnpm run test:release-registry` on macOS (APFS), Node 24: 267 tests,
267 pass, 0 skipped. All 6 build cache tests are in the output.
- `node --test scripts/__tests__/agent-build-cache.test.mjs` in a
`node:24` Linux container (GNU coreutils `cp` 9.1, overlayfs with no
reflink support): 6 tests, 6 pass, 0 skipped.
- In CI: look for the 6 test names in the "Verify release registry test
coverage" step log of the `pr-trusted` typecheck job.

## Risks

- Low risk. The change adds about 0.2 s to one CI step.
- If a future CI runner has no GNU `cp` with `--reflink`, `cloneInto`
falls back to `cp -a`. The test still runs on that runner.

## Model Used

- Claude Opus 5.5 (`claude-opus-5-5`), Anthropic, via Claude Code with
tool use (shell, file edit, Docker).

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 authored and GitHub committed 2026-11-06 15:37:43 -06:00
1 parent c09fb60ca6
commit 8d525dba7d
1 file changed
+1 -1
+1 -1
View File
@@ -61,7 +61,7 @@
"smoke:notion-generic-live": "node scripts/smoke/notion-generic-live.mjs", "smoke:notion-generic-live": "node scripts/smoke/notion-generic-live.mjs",
"smoke:posthog-live": "node scripts/smoke/posthog-live.mjs", "smoke:posthog-live": "node scripts/smoke/posthog-live.mjs",
"smoke:terminal-bench-loop-skill": "node scripts/smoke/terminal-bench-loop-skill-smoke.mjs", "smoke:terminal-bench-loop-skill": "node scripts/smoke/terminal-bench-loop-skill-smoke.mjs",
"test:release-registry": "node scripts/ci-profile/node-test.mjs scripts/ci-profile/reporters.test.mjs scripts/__tests__/canary-startup-playwright.test.mjs scripts/__tests__/cursor-public-install-sandbox.test.mjs scripts/__tests__/grok-public-install-sandbox.test.mjs scripts/__tests__/public-install-closure.test.mjs scripts/__tests__/public-install-registry.test.mjs scripts/__tests__/prefetch-child.test.mjs scripts/__tests__/stage-bundled-packages.test.mjs scripts/__tests__/pack-staged-packages.test.mjs scripts/__tests__/retain-runner-qualification-packages.test.mjs scripts/__tests__/runner-release-crate-cache.test.mjs scripts/__tests__/runner-debug-crate-cache.test.mjs scripts/__tests__/vitest-worker-isolation.test.mjs scripts/verify-release-registry-state.test.mjs scripts/release-package-map.test.mjs scripts/check-release-package-bootstrap.test.mjs scripts/check-no-git-push.test.mjs scripts/release-lib.test.mjs scripts/release-registry-versions.test.mjs scripts/link-plugin-dev-sdk.test.js scripts/acpx-patch-packaging.test.mjs scripts/service-onboard-smoke.test.mjs scripts/docker-onboard-smoke.test.mjs scripts/preview-artifacts.test.mjs scripts/cloud-migrator-artifacts.test.mjs scripts/typecheck-test-programs.test.mjs scripts/__tests__/local-verify.test.mjs scripts/test-sandbox-providers.test.mjs", "test:release-registry": "node scripts/ci-profile/node-test.mjs scripts/ci-profile/reporters.test.mjs scripts/__tests__/canary-startup-playwright.test.mjs scripts/__tests__/cursor-public-install-sandbox.test.mjs scripts/__tests__/grok-public-install-sandbox.test.mjs scripts/__tests__/public-install-closure.test.mjs scripts/__tests__/public-install-registry.test.mjs scripts/__tests__/prefetch-child.test.mjs scripts/__tests__/stage-bundled-packages.test.mjs scripts/__tests__/pack-staged-packages.test.mjs scripts/__tests__/retain-runner-qualification-packages.test.mjs scripts/__tests__/runner-release-crate-cache.test.mjs scripts/__tests__/runner-debug-crate-cache.test.mjs scripts/__tests__/agent-build-cache.test.mjs scripts/__tests__/vitest-worker-isolation.test.mjs scripts/verify-release-registry-state.test.mjs scripts/release-package-map.test.mjs scripts/check-release-package-bootstrap.test.mjs scripts/check-no-git-push.test.mjs scripts/release-lib.test.mjs scripts/release-registry-versions.test.mjs scripts/link-plugin-dev-sdk.test.js scripts/acpx-patch-packaging.test.mjs scripts/service-onboard-smoke.test.mjs scripts/docker-onboard-smoke.test.mjs scripts/preview-artifacts.test.mjs scripts/cloud-migrator-artifacts.test.mjs scripts/typecheck-test-programs.test.mjs scripts/__tests__/local-verify.test.mjs scripts/test-sandbox-providers.test.mjs",
"storybook-visual:baseline": "node scripts/storybook-visual-baseline.mjs", "storybook-visual:baseline": "node scripts/storybook-visual-baseline.mjs",
"test:storybook-visual": "node scripts/storybook-visual-baseline.mjs download && node scripts/storybook-visual-baseline.mjs verify && pnpm build-storybook && npx playwright test --config tests/storybook-visual/playwright.config.ts", "test:storybook-visual": "node scripts/storybook-visual-baseline.mjs download && node scripts/storybook-visual-baseline.mjs verify && pnpm build-storybook && npx playwright test --config tests/storybook-visual/playwright.config.ts",
"test:storybook-visual:update": "node scripts/storybook-visual-baseline.mjs download && pnpm build-storybook && npx playwright test --config tests/storybook-visual/playwright.config.ts --update-snapshots && node scripts/storybook-visual-baseline.mjs pack", "test:storybook-visual:update": "node scripts/storybook-visual-baseline.mjs download && pnpm build-storybook && npx playwright test --config tests/storybook-visual/playwright.config.ts --update-snapshots && node scripts/storybook-visual-baseline.mjs pack",