Faster, cheaper CI (velocity sweep) - #69
Merged
Merged
Conversation
- Run the 12 historical-recovery package tests with test.concurrent behind an in-file semaphore of 4 (they were ~190 s of a ~290 s check, serial). - npm-publish.yml takes a `mode` input. A canonical tag run skips the duplicate `bun run check` after proving the release manifest names this run and the source is the pushed tag commit; mirror retries still rerun it. - Registry verification polls `npm view --prefer-online` for up to 5 min before `npm pack`, instead of failing on npm propagation lag. - CI concurrency is per commit on main and cancels only superseded PR runs. - The todo preview honors DIRECT_EXAMPLE_PORT (0 picks a free port). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…es out Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the Hraness CI velocity sweep.
hraness/directis public, so Actions minutes are free; this targets wall-clock and release reliability.What changed
current tools prepare and smoke exact vX source without tagged helperstests inscripts/npm-publish-workflow.test.tsnow usetest.concurrent, capped by an in-file semaphore of 4 (a 4 vCPU runner). Each test already works in its ownmkdtemptree. The per-test timeout rises from 180 s to 600 s because it now includes queue wait.test:npm-releaseand the CI coverage contract are unchanged.bun run check.npm-publish.ymltakes amodeinput (canonicalormirror, defaultmirror), andrelease.ymlpassesneeds.authorize.outputs.mode. In canonical mode the identity step first checks two things: the event is the tag push, andGITHUB_SHAequals the source SHA. It then checks that the mirroredrelease-manifest.jsonrunIdequals this run. After that the verify job skipsbun run check, which this run's Verify job already ran on the same commit. Frozen install, generated-tree cleanliness, mirror-verify, and exact-archive package smoke all still run. Current-main mirror retries (mirrormode) still run the full check. AGENTS.md anddocs/publishing.mdare updated to match.npm view "$package_spec" version --prefer-onlineevery 15 s for up to 5 min beforenpm pack.npm packandnpm view ... distalso use--prefer-online, so npm's packument cache cannot serve a stale document. If the poll times out, it prints the lastnpm viewerror. This is a bounded local retry; the planned shared npm-visible action should replace it once that exists.group: ci-${{ github.event_name == 'pull_request' && github.ref || github.sha }}withcancel-in-progress: ${{ github.event_name == 'pull_request' }}. Each main commit gets its own run and a later push never cancels it. PR runs still cancel superseded heads. The prior-bytes hash contract inci-source-coverage.test.tsnow reverses this change explicitly.examples/todos/preview.tsacceptsDIRECT_EXAMPLE_PORT(0 to 65535, where 0 picks a free port). It keepsstrictPortand prints the address it actually bound. The default stays 5173, so the documented scenario URLs are unchanged.if:, and the poll order: after mirror-verify and beforenpm pack.Evidence (before)
pull_requestruns (36484179688 … 36018627277): median wall 314 s. Last 12 greenpushruns (36484904699 … 35955149084): median 292 s. Billed minutes: 0 (public repo).bun run checkphase log (job 109136904889, run 36484179688):test:npm-release196.6 s of about 283 s. The 12 historical tests took 14.4 to 16.8 s each and ran serially (about 190 s in total).bun run checkfor 257 s. npmVerify exact packagethen ran it again on the same source SHA for 272 s. Tag to npm publish took 13.5 min.Verify registry mirrorattempt 1 failed withnpm error notarget No matching version found for @hraness/direct@0.7.23, 58 s after publish. Attempt 2 passed after a manual re-run.Expected after
bun run check(the historical block drops from about 190 s to about 60 s). That covers the PR, the main push, and release Verify.Observed after (this PR)
checkjob 180 s.test:npm-releasefile set ran 51 tests in 95.7 s (before: 196.6 s). The release-side savings (canonical npm verify skipping the secondbun run check, about 4.5 min, and the registry poll) show up on the next tag release.Checks run locally
actionlintonnpm-publish.ymlandrelease.ymlis clean. Onci.ymlit reports only an SC2066 in the untouchedRequiredjob. That finding predates this change, and the job's bytes are pinned by the prior-bytes contract.bun test ./scripts/ci-source-coverage.test.ts ./scripts/github-release.test.tspasses.bun test ./scripts/npm-publish-workflow.test.ts -t "npm release workflows"passes, including the new test. The existingrechecks the immutable release tagtest runs close to its 5 s default timeout on a heavily loaded host; it also does so onmain.bun run check.🤖 Generated with Claude Code