feat(runtime): guard root switches and isolate test global state#182
Conversation
Codify one-root-per-process: initCodemap/configureResolver throw on mid-process root changes except audit worktree reindex (runtime-swap bracket). Validate user config at loadUserConfig; roll beforeEach/afterEach teardown across initCodemap suites.
|
Warning Review limit reached
More reviews will be available in 34 minutes and 58 seconds. Learn how PR review limits work. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (42)
✨ 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 |
Pair exitRuntimeSwap in outer finally; reset swap depth in test teardown. Add createCodemap/configureResolver/makeWorktreeReindex coverage; consumer-clean docs/changeset; delete plan and repoint orchestrator + roadmap.
🦋 Changeset detectedLatest commit: ea7e477 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary
initCodemapandconfigureResolverthrow when switching roots mid-process; audit--baseworktree reindex is exempt viaruntime-swap.tsbracket inmakeWorktreeReindex.resetRuntimeForTest,installCodemapTestTeardown) withbeforeEach/afterEachreset rolled out acrossinitCodemapsuites.loadUserConfigtime (JSON + imported configs) and document the breaking tighten inapi.ts/architecture.md.Test plan
bun test src/runtime.test.ts src/config.test.tsbun run checkCloses PR 3 of the security-hardening orchestrator program.