[Chore] Cache extension coverage by ownership - #1631
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (4)Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.⚙️ CodeRabbit configuration file Files:
Require full commit SHA pins, least-privilege permissions, safe expression and shell interpolation, and trusted metadata handling.⚙️ CodeRabbit configuration file Files:
Verify extension/webview contracts, cancellation and error propagation, VS Code lifecycle correctness, and behavior under retries and partial failure.⚙️ CodeRabbit configuration file Files:
Act as an adversarial second-opinion reviewer.⚙️ CodeRabbit configuration file Files:
🔇 Additional comments (9)
📝 SummarySummary by CodeRabbit
WalkthroughThe pull request replaces monolithic unit coverage with five area-specific lanes: API, core, services, miscellaneous, and tree-sitter. It adds dedicated Vitest and Turbo configurations, validates lane partitioning and aggregate coverage, and updates CI report publication. ChangesCoverage slicing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Turbo
participant Vitest
participant Codecov
GitHubActions->>Turbo: Run five coverage tasks
Turbo->>Vitest: Start area-specific test configuration
Vitest->>GitHubActions: Write five LCOV reports
GitHubActions->>Codecov: Upload per-lane LCOV reports
Merge Risk: ⚪ Minimal · up to This change splits the extension's unit-test coverage collection into five independently cached lanes (API, core, services, misc, tree-sitter) with matching CI publication and validation logic. The lane definitions, build dependencies, and coverage outputs were checked for consistency and no functional gaps were found, so this is safe to merge as a build/tooling change with no expected impact on production behavior. Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (6 passed)
Full details: Linked Issues checkExplanation Issue Resolution Set Full details: Lifecycle Resource CleanupExplanation The new coverage verifier can leave child tasks running after the verification path fails. Resolution Track the spawned child processes and cancel all pending collection commands when any collection fails or the verifier receives termination. Await
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review statusThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging. Current step: Required CI passed. Waiting for automated review of the latest commit. If automated review does not start, a maintainer must restart it. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What changed
Why this change was made
The prior tree-sitter/general split left 414 general test files coupled to one cache key. Profiling found stable ownership boundaries of API, core, services, and misc tests, while production import cones overlap heavily. The implementation therefore isolates test-only invalidation but conservatively reruns all ownership lanes for shared production changes rather than risking false cache hits.
Impact
The five lane configs resolve to exactly the monolithic unit population: 478 discovered files, 8,411 tests, 469 LCOV source records, and 30,229 instrumented lines.
Measured isolated local cold times are API 16.2s, core 48.0s, services 36.6s, and misc 31.5s. The complete five-lane graph with tree-sitter completes in 1m56 cold and 310ms warm. An API-test-only change completes in 17.7s with five of six Turbo tasks restored; an API production change conservatively invalidates all four ownership lanes while retaining the tree-sitter cache.
Hosted Windows run 34793268975 completed successfully in 7m06s total. Its cold extension coverage step took 4m40s, down from 6m55s and 8m58s on the earlier two-lane cold runs (32% and 48% faster). The exhaustive coverage contract took 12s. A hosted partial-cache run was not manufactured with a no-op test edit; the deterministic local partial run is the measured evidence for that path.
Closes #115