perf(verify): cache the one phase that is 88% of the gate - #98
Merged
Conversation
`verify`'s test phase runs through `vp run --cache test` instead of a bare `vp test`. Measured: `vp check` 2.0s, `check:vue` 3.0s, `vp test` 61.2s, `preview:test` 3.1s - one phase is 88% of the gate, so it is the only one worth caching. Cold 64.9s -> warm 7.0s (the test phase itself, 62.0s -> 0.6s). The cache was established as content-keyed by trying to break it rather than by reading the flag's docs: | probe | result | | ---------------------------------- | ----------------------------- | | edit a source file | miss, re-ran (61.4s) | | plant a failing assertion | miss, **rc=1, still failed** | | `touch`, content unchanged | **hit** - hashes content | | revert to a previously-seen tree | miss - only the latest stored | So a hit cannot mask a regression, and the normal edit -> verify loop misses every time by design. It is also a no-op in CI, where every runner starts cold, so the required `verify` check is unaffected. Two alternatives were measured and rejected, and CLAUDE.md records them so they don't get retried: running the four phases in parallel is 60.6s against 69.3s serial (13%) but turns a 2s type error into a 61s one, and would need a new script since `dependsOn: ["check"]` pulls in `vp check --fix`; and `maxWorkers` is already optimal (4 -> 74.7s, 8 -> 61.7s, 11 -> 61.8s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LT6oy76sLRqoC1QzLocQ1h
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.
verify's test phase now runs throughvp run --cache testinstead of a barevp test.Why this phase and no other
vp checkcheck:vuevp testpreview:testOne phase is 88% of the gate, so it is the only one worth caching. Cold 64.9s -> warm 7.0s; the test phase itself goes 62.0s -> 0.6s, and the 7s remainder is the three phases that are not cached.
The cache was probed, not trusted
Established as content-keyed by trying to break it rather than by reading the flag's docs:
touchwith content unchangedA hit therefore cannot mask a regression, and the normal edit -> verify loop misses every time, by design.
Scope, stated plainly
verifycheck runs in full regardless. This PR does not make CI faster.deployand little else.deploy:apprunsverifyimmediately after you have probably just run one by hand.it.skipIf(!oracleAvailable()), so their skip status can change with no file changing). CLAUDE.md says to usevp cache cleanwhen chasing something environmental.Rejected alternatives, recorded so they aren't retried
vp checkno longer runs first. It would also need a new script, since adependsOn: ["check"]pulls in thecheckscript -vp check --fix- which must never run in a deploy path.Incidentally, the gate proved non-vacuous during this change: the first run failed with rc=1 on a formatting issue in the CLAUDE.md I had just written.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LT6oy76sLRqoC1QzLocQ1h