Repository navigation
Release v0.22.5 - #151
Release v0.22.5#151
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR extends the retrieval gate with generation intent and target domain hint signals to distinguish runtime report generation from frontend display rendering. Retrieval scoring and slice anchor selection use these signals to adjust relevance and demote frontend-only anchors for backend-generation prompts. Tests and fixtures validate end-to-end routing and a package/version release entry was added. ChangesIntent-Aware Report Retrieval Routing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 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)
Comment |
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 `@src/runtime/retrieval-gate.ts`:
- Around line 207-213: The current routing requires both generationShaped and
explanationShaped to mark runtime generation, which misclassifies broad
generation prompts; change the logic in the function that returns
'runtime_generation' so that a true generationShaped alone (without requiring
explanationShaped) returns 'runtime_generation' (i.e., check generationShaped
first and return 'runtime_generation'), keep the displayShaped check afterwards
to return 'display_rendering', and fall back to 'unknown' otherwise; update
references to generationShaped, explanationShaped, and displayShaped
accordingly.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e1a62b9a-947a-4743-a9bf-cab35b4139fc
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (10)
CHANGELOG.mdpackage.jsonsrc/contracts/retrieval-gate.tssrc/runtime/retrieval-gate.tssrc/runtime/retrieve.tssrc/runtime/retrieve/slicing.tstests/fixtures/spi/nest-di-runtime-calls-realistic/platform/src/features/idea-detail/components/ReportFooter.tsxtests/fixtures/spi/nest-di-runtime-calls-realistic/tsconfig.jsontests/unit/retrieval-gate.test.tstests/unit/spi-nest-di-runtime-calls-realistic.test.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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/unit/spi-nest-di-runtime-calls-realistic.test.ts`:
- Around line 316-317: The test's frontend-noise exclusion uses frontendLabels =
['ReportFooter', 'pickGeneratedAt', 'pickPipelineLabel'] while the assertions
elsewhere compare labels with parentheses (e.g. 'ReportFooter()'), causing false
negatives; fix by making the formats consistent: either update frontendLabels to
include the parentheses (e.g. 'ReportFooter()', 'pickGeneratedAt()',
'pickPipelineLabel()') or normalize both sides during comparison (strip trailing
"()" from asserted labels before matching) so the checks around the frontend
helper exclusions (the assertions that currently compare with "()") correctly
detect helper nodes.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d742e30-f601-49c1-b51c-839688a3f4c9
📒 Files selected for processing (1)
tests/unit/spi-nest-di-runtime-calls-realistic.test.ts
| const frontendLabels = ['ReportFooter', 'pickGeneratedAt', 'pickPipelineLabel'] | ||
|
|
There was a problem hiding this comment.
Frontend-noise exclusion checks use mismatched label format and can miss regressions.
Line 316 defines bare names, but labels in this file are asserted with () (see Line 350). Because of this, Line 327 and Line 334 can pass even if frontend helper nodes are present.
Suggested fix
- const frontendLabels = ['ReportFooter', 'pickGeneratedAt', 'pickPipelineLabel']
+ const frontendLabels = new Set(['ReportFooter', 'pickGeneratedAt', 'pickPipelineLabel'])
+ const normalizeLabel = (label: string) => label.replace(/\(\)$/, '')
@@
- expect(labels.filter((label) => frontendLabels.includes(label))).toHaveLength(0)
+ expect(labels.filter((label) => frontendLabels.has(normalizeLabel(label)))).toHaveLength(0)
@@
- expect(result.slice?.anchors.some((anchor) => frontendLabels.includes(anchor.label))).toBe(false)
+ expect(
+ result.slice?.anchors.some((anchor) => frontendLabels.has(normalizeLabel(anchor.label))),
+ ).toBe(false)Also applies to: 327-327, 334-334
🤖 Prompt for 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.
In `@tests/unit/spi-nest-di-runtime-calls-realistic.test.ts` around lines 316 -
317, The test's frontend-noise exclusion uses frontendLabels = ['ReportFooter',
'pickGeneratedAt', 'pickPipelineLabel'] while the assertions elsewhere compare
labels with parentheses (e.g. 'ReportFooter()'), causing false negatives; fix by
making the formats consistent: either update frontendLabels to include the
parentheses (e.g. 'ReportFooter()', 'pickGeneratedAt()', 'pickPipelineLabel()')
or normalize both sides during comparison (strip trailing "()" from asserted
labels before matching) so the checks around the frontend helper exclusions (the
assertions that currently compare with "()") correctly detect helper nodes.
Summary
Verification
Release
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
Tests
Chores
Documentation