Skip to content

[Chore] Make test bundle dependencies cache-aware - #1611

Merged
edelauna merged 1 commit into
mainfrom
chore/explicit-test-bundle-dependency-00opp3wmssf19
Sep 12, 2026
Merged

[Chore] Make test bundle dependencies cache-aware#1611
edelauna merged 1 commit into
mainfrom
chore/explicit-test-bundle-dependency-00opp3wmssf19

Conversation

@zoomote

@zoomote zoomote Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

  • Model bundle as an explicit dependency of the zoo-code test and coverage tasks.
  • Preserve the inherited @roo-code/types#build dependency and coverage outputs with $TURBO_EXTENDS$.
  • Remove the hidden pretest and pretest:coverage lifecycle hooks so Turbo owns the complete task graph.

Why this change was made

The bundle prerequisite previously ran through a nested Turbo invocation inside pnpm lifecycle hooks. Making the edge visible lets Turbo schedule, hash, and cache the bundle independently while retaining the root task configuration required by other packages.

Impact

There is no product or user-facing behavior change. The immediate gain is limited to removing nested orchestration and allowing unchanged bundle work to be restored as a first-class Turbo dependency; the larger benefit is that this creates the correct prerequisite graph for follow-up coverage slicing. In the latest successful main run, non-core coverage took about 3m04s on Ubuntu and 9m41s on Windows, so preserving reusable prerequisites and enabling later slice-level cache hits targets the current CI bottleneck without weakening test coverage.

Validation

  • Turbo dry runs for test and test:coverage resolve both @roo-code/types#build and zoo-code#bundle.
  • Focused zoo-code coverage passed with all five graph tasks successful.
  • Full pnpm test passed with 8,277 tests across 472 passing test files.
  • Commit and push hooks passed repository-wide lint and type checking.

Closes #114.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 67f67d49-596e-4cb4-9720-7c499eb81ab0

📥 Commits

Reviewing files that changed from the base of the PR and between ebcd1a0 and 1f25ca2.

📒 Files selected for processing (2)
  • src/package.json
  • src/turbo.json
💤 Files with no reviewable changes (1)
  • src/package.json

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (2)
Verify extension/webview contracts, cancellation and error propagation, VS Code lifecycle correctness, and behavior under retries and partial failure.

⚙️ CodeRabbit configuration file

Files:

  • src/turbo.json
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • src/turbo.json
🔇 Additional comments (1)
src/turbo.json (1)

5-10: LGTM!


📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated test workflows to ensure the application bundle is completed before standard and coverage tests run.
    • Simplified test command execution by removing the separate pre-test bundle step from package-level scripts.
    • Test and coverage commands now follow the shared build configuration consistently.

Walkthrough

The change removes npm pretest bundling hooks and declares bundle as a dependency of the test and test:coverage Turbo tasks.

Changes

Turbo test dependency wiring

Layer / File(s) Summary
Explicit bundle dependency
src/turbo.json, src/package.json
test and test:coverage now depend on bundle through Turbo. The npm pretest and pretest:coverage hooks are removed.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor · Severity of issue fixed: Medium

Suggested reviewers: taltas

Merge Risk: ⚪ Minimal · up to 1f25c

The change correctly moves bundle ordering into Turbo without altering test commands or coverage behavior.

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #114 requires explicit bundle dependencies for zoo-code test and test:coverage tasks and removal of the npm lifecycle hooks. src/turbo.json declares bundle for both tasks and retains…
Out of Scope Changes check ✅ Passed The reviewed changes are limited to src/turbo.json and src/package.json. They directly implement issue #114 by changing Turbo task dependencies and removing the npm lifecycle hooks. No unrelated p…
Regression Evidence ✅ Passed PASS. The pull request changes only src/package.json and src/turbo.json. It removes npm lifecycle hooks and declares bundle as a Turbo dependency for test and test:coverage, while `$TURBO_EX…
Security Boundaries ✅ Passed No changed path meets a stated security failure condition. The PR changes only src/package.json and src/turbo.json: it removes two test lifecycle commands and adds static Turbo dependsOn entries…
Persistence Integrity ✅ Passed PASS. The pull request changes only src/package.json scripts and src/turbo.json task dependencies. It removes lifecycle hooks and adds bundle as a Turbo prerequisite. It does not change a persis…
Lifecycle Resource Cleanup ✅ Passed PASS. The review-scoped diff changes only JSON configuration. It removes the two nested turbo run bundle --cwd .. lifecycle hooks and adds declarative dependsOn entries for test and `test:covera…
Title check ✅ Passed The title clearly identifies the main change: making test bundle dependencies cache-aware. It is concise, specific, and aligned with the pull request changes.
Description check ✅ Passed The description explains the implementation, motivation, impact, linked issue, and validation results. It does not reproduce the full checklist or every template heading, but it contains the required …
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/explicit-test-bundle-dependency-00opp3wmssf19

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review status

This PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging.

Current step: The required review sequence passed. Remaining merge requirements apply.

Review-state labels are managed by this workflow; do not edit them manually.

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna

Copy link
Copy Markdown
Contributor

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@edelauna
edelauna marked this pull request as ready for review September 12, 2026 02:16
@edelauna
edelauna enabled auto-merge September 12, 2026 02:16
@edelauna
edelauna added this pull request to the merge queue Sep 12, 2026
Merged via the queue into main with commit a6c4864 Sep 12, 2026
31 checks passed
@edelauna
edelauna deleted the chore/explicit-test-bundle-dependency-00opp3wmssf19 branch September 12, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Wire bundle as explicit Turbo dep; remove npm pretest* hooks

2 participants