Repository navigation
Improve runtime spine branch selection - #381
Conversation
Closes #377 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughDetects failure-handling intent in prompts, classifies failure-related execution steps, adjusts execution-slice scoring to prefer or penalize those steps, adds a fixture quality-gate + failure-storage flow wired into the orchestrator, and updates tests to assert primary-path changes for normal vs failure-focused prompts. ChangesFailure-handling intent-driven execution-slice prioritization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@src/runtime/retrieve.ts`:
- Around line 2308-2314: In failureHandlingLikeExecutionStep, the first regex
omits the bare "fail"/"fails" variants; update the pattern used in that function
(the regex built from
node.label/node.source_file/node.node_kind/node.framework_role) to include the
"s" option like promptWantsFailureHandling (e.g., change
fail(?:ed|ure|ures|ing)? to fail(?:s|ed|ure|ures|ing)? or equivalent) so that
"fail" and "fails" are matched consistently with promptWantsFailureHandling;
ensure you keep the surrounding word-boundary logic and the rest of the function
(including the second regex) intact.
In
`@tests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/reports/quality-gate.service.ts`:
- Around line 3-7: The function validateIdeaReportQuality currently always sets
reason to "empty report" even when passed is true; update
validateIdeaReportQuality to compute passed as report.content.length > 0 and
only populate the reason when passed is false (e.g., an empty string or
undefined when passed is true, and "empty report" when false) so callers only
receive a failure reason on failing checks.
In `@tests/unit/pack-quality-fixtures.test.ts`:
- Around line 131-136: The negative assertion currently checks both forbidden
labels together so it only fails if both are present; update the test that
inspects payload.pack?.execution_slice?.primary_path?.steps?.map((entry) =>
entry.label) to assert each forbidden label separately (e.g. assert the labels
array does not contain 'handleQualityGateFailure()' and separately does not
contain 'writeRawFailureReport()') so a regression adding either label will
fail; locate the expectation using not.toEqual(expect.arrayContaining([...]))
and replace it with two per-label negative checks against the mapped labels
array.
🪄 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 Plus
Run ID: e8e61378-b94c-4b97-97d6-828e174a0dcd
📒 Files selected for processing (6)
src/runtime/retrieve.tstests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/failure-storage.service.tstests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/pipeline/workers/orchestrator.worker.tstests/fixtures/pack-quality/runtime-generation-explain-report-flow/workspace/src/modules/reports/quality-gate.service.tstests/unit/helpers/pack-quality.tstests/unit/pack-quality-fixtures.test.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Actionable comments posted: 0 |
Summary
Closes #377
Verification
Summary by CodeRabbit
New Features
Tests