Skip to content

ci: drop duplicate unit-test run, cache Size base dist, typecheck with tsgo#1094

Merged
thymikee merged 1 commit into
mainfrom
claude/ci-devloop-speedups
Jul 4, 2026
Merged

ci: drop duplicate unit-test run, cache Size base dist, typecheck with tsgo#1094
thymikee merged 1 commit into
mainfrom
claude/ci-devloop-speedups

Conversation

@thymikee

@thymikee thymikee commented Jul 4, 2026

Copy link
Copy Markdown
Member

Summary

Three measured speed cuts to the dev loop and CI, none of which remove signal. Follow-up to the tsdown migration (#1087), where the investigation happened.

  • pnpm typecheck now runs tsgo (the native-preview compiler this repo already trusts for declaration emit in the tsdown build): 21.7s → 5.3s locally, taking check:tooling from ~85s pre-migration to ~18s end to end. tsc remains available as typecheck:tsc, and the CI Typecheck job gets the same speedup since it calls pnpm typecheck.
  • Removed the Unit Tests CI job. Coverage runs the exact same unit + provider-integration suites under coverage thresholds on every PR, so the job duplicated ~64s of tests per PR with no extra signal. Integration Tests still runs provider-integration as its own gate.
  • Size workflow: now skips docs-only changes (same paths-ignore list as CI) and caches the base commit's dist keyed on base SHA — dist is fully determined by that commit, so re-running a PR against the same base skips the base rebuild. Startup medians are still measured fresh per run, keeping the base/PR startup comparison same-machine. The cache saves immediately after the base measurement so the PR-side build can never poison the base key.

Not included, checked and rejected during investigation: vitest --no-isolate (breaks ~30 tests relying on fresh module state, and slower) and --pool=threads (27 errors) — the unit suite legitimately needs forks+isolation; Android AVD snapshot caching (whole smoke run is only ~3m22s on KVM runners, marginal payoff for the maintenance cost).

⚠️ If branch protection lists Unit Tests as a required status check, that entry needs to be removed/replaced (e.g. with Coverage) or PRs will block on a check that no longer exists.

Validation

Ran pnpm check:tooling green in 18.5s with tsgo in the loop, and verified tsgo is actually checking: an injected type error fails with TS2322 plus a noUnusedLocals TS6133, and the clean tree passes. Parsed both edited workflows with a YAML loader and confirmed the resulting job lists. The Size cache flow was desk-checked for the two orders: on miss, save runs right after the base measurement (before the PR build overwrites dist); on hit, the base build is skipped and the gitignored dist survives the base checkout.

Touched files: 3 (package.json, .github/workflows/ci.yml, .github/workflows/size.yml).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FqeW8sA2ZnvnftdvpCqFMS


Generated by Claude Code

…h tsgo

Three measured dev-loop/CI cuts, no signal loss:

- typecheck now runs tsgo (already trusted for declaration emit by the
  tsdown build): 21.7s -> 5.3s locally, and check:tooling drops to ~18s
  total. tsc stays available as typecheck:tsc; verified tsgo fails on
  type errors and respects noUnusedLocals.
- remove the Unit Tests CI job: Coverage runs the same unit +
  provider-integration suites under coverage thresholds, so the job
  reran ~64s of tests every PR for no extra signal.
- Size workflow: skip docs-only paths (same paths-ignore as CI) and
  cache the base commit's dist keyed on base SHA, since dist is fully
  determined by that commit. Startup medians are still measured fresh
  on the same runner so the base/PR startup comparison stays
  same-machine; the cache is saved immediately after the base
  measurement so the PR build never poisons it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FqeW8sA2ZnvnftdvpCqFMS
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-04 14:40 UTC

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.5 MB 1.5 MB -208 B
JS gzip 489.2 kB 489.2 kB -50 B
npm tarball 588.4 kB 588.3 kB -58 B
npm unpacked 2.1 MB 2.1 MB -162 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.5 ms 27.6 ms +0.1 ms
CLI --help 51.6 ms 51.8 ms +0.2 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/logcat.js -208 B -50 B

@thymikee

thymikee commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Review status: no actionable code blockers found.

I checked the workflow/package changes directly: Unit Tests is removed while Coverage remains the unit + provider-integration gate with thresholds; Size now ignores docs-only changes and saves the base dist cache before the PR build can overwrite dist; pnpm typecheck points at tsgo while typecheck:tsc keeps the legacy compiler available. Local validation passed for both pnpm typecheck and pnpm typecheck:tsc, and GitHub checks are green (21/21), so the edited workflows are syntactically accepted and running.

Operational caveat: as the PR body notes, if branch protection still requires the old Unit Tests status, that repository setting must be updated outside this PR. Added ready-for-human.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 4, 2026
@thymikee thymikee merged commit d167eaf into main Jul 4, 2026
21 checks passed
@thymikee thymikee deleted the claude/ci-devloop-speedups branch July 4, 2026 14:40
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.

2 participants