test: add deep coverage for orchestration modules - #689
Conversation
Extends gate-evaluator.test.js with 45 new tests covering: - _loadConfig() filesystem loading with YAML parsing and fallback - _getGateKey() and _getDefaultChecks() for all epic transitions - _determineVerdict() edge cases (allowMinorIssues, severity levels) - Config-based checks (min_score, require_tests, min_coverage) - Check-specific edge cases (artifacts, codeChanges, testResults) - Error handling, logging, and score calculation Extends bob-orchestrator.test.js with 30 new tests covering: - _resolveStoryPath() path resolution (active dir, root, normalization) - handleBrownfieldDecision() delegation - handleBrownfieldPhaseFailure() delegation - handlePostDiscoveryChoice() delegation - handleGreenfieldSurfaceDecision() delegation - handleGreenfieldPhaseFailure() delegation - _routeByState() unknown state handling - _checkExistingSession() elapsed time formatting edge cases - Constructor initialization of all Story 12.x dependencies Refs #52
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds 942 lines of new tests expanding GateEvaluator and BobOrchestrator coverage: config loading, verdict logic, check evaluation, error/logging handling, scoring summaries, story path resolution, handler delegation, routing, session edge cases, and constructor initialization. ChangesGateEvaluator Test Coverage
BobOrchestrator Test Coverage
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/core/orchestration/bob-orchestrator.test.js`:
- Around line 1291-1316: The test for singular "1 hour" uses a 90-minute fixture
(oneHourAgo) which is ambiguous; change the fixture so oneHourAgo is exactly 60
minutes (or exactly one hour) in the past (e.g., subtract 1 hour from now
instead of 90 minutes) so that orchestrator._checkExistingSession's
elapsedString is clearly testing the 1-hour singular boundary; update the setup
that sets oneHourAgo (the oneHourAgo variable in this test) to an unambiguous
one-hour offset and keep the rest of the mocks (sessionState.exists,
loadSessionState, detectCrash, getResumeSummary) unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1bd85152-ef62-4767-b4ee-71d1ce7f373e
📒 Files selected for processing (2)
tests/core/gate-evaluator.test.jstests/core/orchestration/bob-orchestrator.test.js
Validated replacement for legacy PR SynkraAI#468. Adds current-main coverage for GateEvaluator and BobOrchestrator, fixes stale .aios-core fixture paths, and clarifies the 1-hour elapsed-time fixture after review.\n\nValidation:\n- npm test -- tests/core/gate-evaluator.test.js tests/core/orchestration/bob-orchestrator.test.js --runInBand --forceExit\n- npm run lint\n- npm run typecheck\n- git diff --check origin/main...HEAD && git diff --check\n- npm test -- --runInBand --forceExit\n- GitHub checks rerun green on PR SynkraAI#689
Summary
maininSynkraAI/aiox-core..aios-coretemp fixture paths with.aiox-core.Validation
npm test -- tests/core/gate-evaluator.test.js tests/core/orchestration/bob-orchestrator.test.js --runInBand --forceExitnpm run lint(passes with the existing 114 warnings, 0 errors)npm run typecheckgit diff --check origin/main...HEAD && git diff --checkSupersedes #468.
Summary by CodeRabbit