ci(runner): align Daytona cache exclusions

This commit is contained in:
Dotta 2026-09-03 18:50:28 -05:00
parent d8637d467c
commit 97f771e2ec
3 changed files with 51 additions and 6 deletions

View File

@ -10,3 +10,22 @@ tmp
*.log
packages/paperclip-runner/dist
packages/paperclip-runner/runner/target
packages/paperclip-runner/devtools
packages/paperclip-runner/docs
packages/paperclip-runner/examples
packages/paperclip-runner/test
packages/paperclip-runner/test-fixtures
packages/paperclip-runner/test-support
packages/paperclip-runner/**/*.md
packages/paperclip-runner/**/*.spec.ts
packages/paperclip-runner/**/*.spec.tsx
packages/paperclip-runner/**/*.test.cjs
packages/paperclip-runner/**/*.test.cts
packages/paperclip-runner/**/*.test.js
packages/paperclip-runner/**/*.test.jsx
packages/paperclip-runner/**/*.test.mjs
packages/paperclip-runner/**/*.test.mts
packages/paperclip-runner/**/*.test.ts
packages/paperclip-runner/**/*.test.tsx
packages/paperclip-runner/runner/crates/*/tests
packages/paperclip-runner/scripts/*-smoke.mjs

View File

@ -32,11 +32,11 @@ const ignoredGeneratedDirectoryPaths = new Set([
"packages/paperclip-runner/runner/target",
]);
// These paths may be copied into Docker's provider-build context, but they do
// not contribute to the release runnerd binary or the executable/digested
// provider-pack runtime payload. Keep the exclusions narrow and package-scoped:
// unknown non-documentation files remain hashed by default, so a newly
// introduced runtime input fails safe by invalidating the image key.
// These paths do not contribute to the release runnerd binary or the
// executable/digested provider-pack runtime payload. They are also excluded
// from the real Docker build context by .dockerignore. Keep the two lists in
// lockstep: if a future build starts consuming one of these inputs, Docker must
// fail instead of publishing bytes that the content identity did not hash.
const ignoredRunnerDevelopmentDirectoryPaths = new Set([
"packages/paperclip-runner/devtools",
"packages/paperclip-runner/docs",
@ -50,6 +50,8 @@ const runnerDocumentationFilePattern = /\.md$/;
const runnerTestFilePattern = /\.(?:spec|test)\.(?:[cm]?[jt]sx?)$/;
const runnerRustIntegrationTestPathPattern =
/^packages\/paperclip-runner\/runner\/crates\/[^/]+\/tests(?:\/|$)/;
const runnerSmokeScriptPattern =
/^packages\/paperclip-runner\/scripts\/[^/]+-smoke\.mjs$/;
export interface DaytonaImageContentOptions {
repositoryRoot?: string;
@ -78,7 +80,8 @@ function shouldIgnoreRunnerDevelopmentInput(relativePath: string): boolean {
return (
runnerDocumentationFilePattern.test(relativePath) ||
runnerTestFilePattern.test(relativePath) ||
runnerRustIntegrationTestPathPattern.test(relativePath)
runnerRustIntegrationTestPathPattern.test(relativePath) ||
runnerSmokeScriptPattern.test(relativePath)
);
}

View File

@ -59,6 +59,20 @@ describe("runner E2E Daytona image contract", () => {
expect(dockerignore).toContain("**/node_modules");
expect(dockerignore).toContain("packages/paperclip-runner/dist");
expect(dockerignore).toContain("packages/paperclip-runner/runner/target");
for (const developmentOnlyInput of [
"packages/paperclip-runner/devtools",
"packages/paperclip-runner/docs",
"packages/paperclip-runner/examples",
"packages/paperclip-runner/test",
"packages/paperclip-runner/test-fixtures",
"packages/paperclip-runner/test-support",
"packages/paperclip-runner/**/*.md",
"packages/paperclip-runner/**/*.test.ts",
"packages/paperclip-runner/runner/crates/*/tests",
"packages/paperclip-runner/scripts/*-smoke.mjs",
]) {
expect(dockerignore).toContain(developmentOnlyInput);
}
expect(workflow).toContain("--platform linux/amd64");
expect(workflow).toContain(
"Compute Daytona image content ID with pinned bases",
@ -192,6 +206,7 @@ describe("runner E2E Daytona image contract", () => {
await mkdir(path.join(runnerRoot, "src/live"), { recursive: true });
await mkdir(path.join(runnerRoot, "docs"), { recursive: true });
await mkdir(path.join(runnerRoot, "spec"), { recursive: true });
await mkdir(path.join(runnerRoot, "scripts"), { recursive: true });
await mkdir(path.join(runnerRoot, "test-fixtures"), { recursive: true });
await mkdir(path.join(runnerRoot, "runner/crates/runner-core/src"), {
recursive: true,
@ -224,6 +239,10 @@ describe("runner E2E Daytona image contract", () => {
path.join(runnerRoot, "test-fixtures/provider.json"),
'{"fixture":"one"}\n',
);
await writeFile(
path.join(runnerRoot, "scripts/capability-clean-room-smoke.mjs"),
"first smoke probe\n",
);
await writeFile(
path.join(runnerRoot, "runner/crates/runner-core/tests/recovery.rs"),
"// first Rust integration test\n",
@ -247,6 +266,10 @@ describe("runner E2E Daytona image contract", () => {
path.join(runnerRoot, "test-fixtures/provider.json"),
'{"fixture":"two"}\n',
);
await writeFile(
path.join(runnerRoot, "scripts/capability-clean-room-smoke.mjs"),
"second smoke probe\n",
);
await writeFile(
path.join(runnerRoot, "runner/crates/runner-core/tests/recovery.rs"),
"// second Rust integration test\n",