Skip to content

build: strip runner unit-test blocks from package#1128

Merged
thymikee merged 4 commits into
mainfrom
codex/strip-runner-unit-test-blocks
Jul 6, 2026
Merged

build: strip runner unit-test blocks from package#1128
thymikee merged 4 commits into
mainfrom
codex/strip-runner-unit-test-blocks

Conversation

@thymikee

@thymikee thymikee commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Strip AGENT_DEVICE_RUNNER_UNIT_TESTS Swift blocks from the npm-packaged Apple runner source by generating a sanitized dist/apple-runner copy during prepack.

Teach runner source resolution to prefer checkout source locally and fall back to the packaged source in installed packages, so local runner unit tests keep their gated helpers.

Validation

  • node scripts/package-apple-runner-source.mjs
  • npm pack --dry-run --ignore-scripts --json --cache .tmp/npm-cache
  • package manifest assertion for dist/apple-runner presence, top-level apple-runner absence, and no generated Swift AGENT_DEVICE_RUNNER_UNIT_TESTS guards
  • node ./node_modules/oxfmt/bin/oxfmt --check ...
  • ./node_modules/.bin/oxlint . --deny-warnings
  • ./node_modules/.bin/tsgo -p tsconfig.json
  • node --experimental-strip-types scripts/layering/check.ts
  • node scripts/sync-mcp-metadata.mjs --check
  • ./node_modules/.bin/tsdown
  • ./node_modules/.bin/vitest run src/__tests__/package-exports.test.ts src/__tests__/apple-runner-package-source.test.ts src/platforms/apple/core/__tests__/runner-source.test.ts src/platforms/apple/core/__tests__/runner-client.test.ts

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-06 10:52 UTC

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.5 MB 1.5 MB +180 B
JS gzip 491.8 kB 491.9 kB +91 B
npm tarball 597.4 kB 588.3 kB -9.0 kB
npm unpacked 2.1 MB 2.1 MB -45.6 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.7 ms 26.5 ms +0.8 ms
CLI --help 50.7 ms 49.6 ms -1.1 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/runner-client.js +135 B +61 B
dist/src/record-trace-recording.js +45 B +30 B

@thymikee

thymikee commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

Ready for human review.

Review pass on #1128:

  • GitHub CI is clean: 22/22 checks passing.
  • The original CI blockers were addressed: Bundle Size now handles base commits where the helper script does not exist, and Fallow is clean after the package script and recording resolver cleanup.
  • Local/worker validation covered the package-source tests, recording-script resolver test, package-source generation, Fallow, build, and size-report base/current comparison.
  • Independent Codex review found no actionable blockers. I attempted the required claude -p review for this codex/ branch, but the sandbox reviewer blocked it because it would send PR-specific repo context to an external Claude service; I did not route around that.

Residual risk: installed-package Apple runner behavior depends on prepack generating dist/apple-runner, which is wired and tested at the package-script level, but broader installed-package device smoke coverage is still the main remaining confidence gap.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 6, 2026
@thymikee thymikee merged commit 7475415 into main Jul 6, 2026
22 checks passed
@thymikee thymikee deleted the codex/strip-runner-unit-test-blocks branch July 6, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant