test: focus existing tests on observable behavior - #311
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (17)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe changes improve test isolation and cleanup, add a shared configuration helper, convert local runtime scenarios to named tests, refine UI coverage, and update test guidance. ChangesTest hygiene and support
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The test hygiene changes preserve existing behavior while improving cleanup and scenario isolation; no current merge-blocking risk remains. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 14 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Greptile SummaryThis PR focuses existing tests on observable contracts and improves failure-safe cleanup.
Confidence Score: 5/5The PR appears safe to merge; the test refactors preserve coverage while making assertions and cleanup more robust. No actionable failures remain: renamed helper imports resolve from source during tests, production builds do not require the helper, removed incidental assertions retain focused coverage elsewhere, and the new lifecycle cleanup follows the underlying APIs’ contracts.
|
| Filename | Overview |
|---|---|
| src/local-agent-runtime.test.ts | Names and isolates runtime lifecycle scenarios, strengthens recovery assertions, and registers idempotent cleanup. |
| src/apply-patch.test.ts | Places temporary patch fixtures under one root and removes that root in a finally block. |
| src/process-sessions.test.ts | Widens process-manager cleanup to cover failures from every session scenario. |
| src/test-support/config.ts | Renames a test-only configuration helper so test discovery no longer treats it as a passing test. |
| tsconfig.build.json | Excludes test-support sources from production compilation without affecting tsx-based test resolution. |
| src/ui/card-types.test.ts | Covers both empty and populated review-card expansion behavior. |
| AGENTS.md | Adds guidance emphasizing observable contracts, plausible failures, fresh state, and prompt cleanup. |
Reviews (1): Last reviewed commit: "test: clean up owned resources even when..." | Re-trigger Greptile
Several tests passed without proving the behavior they described: review expansion had no empty case, runtime recovery only counted another attempt, and a configuration helper was collected as a passing test. The suite now distinguishes those outcomes, exposes runtime lifecycle scenarios by name, and drops assertions tied only to fixture configuration or an opaque ID format.
Patch fixtures and process sessions are cleaned up when assertions fail, and the repository guidance asks new tests to identify the observable contract and plausible failure they protect. This is the first PR in a two-part stack; packaged MCP workflow coverage follows in #312, which targets this branch. Merge this cleanup first.