Skip to content

Release v0.22.2 - #148

Merged
mohanagy merged 2 commits into
mainfrom
release-0-22-2
May 12, 2026
Merged

mohanagy merged 2 commits into
mainfrom
release-0-22-2

Conversation

@mohanagy

@mohanagy mohanagy commented May 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add fixture-backed NestJS runtime-path regression coverage
  • fix slice-v1 exclusion filtering to use workspace-relative paths in checked-in fixtures
  • add route-isolation diagnostics for pipeline slices

Verification

  • npm run typecheck
  • npm run build
  • npm run test:run
  • npm pack --dry-run

Summary by CodeRabbit

  • New Features

    • Two new diagnostics to surface isolated route methods and missing provider-service cross-file edges
    • Improved detection of NestJS runtime path coverage
  • Bug Fixes

    • Source-file comparisons now use project-relative paths for more accurate retrieval and suppression
  • Tests

    • Added end-to-end and unit tests + fixtures validating NestJS runtime call paths and diagnostics
  • Chores

    • Bumped package version and updated changelog entry

Review Change Stack

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66f4c417-6a6f-4eb6-a437-8292b872771b

📥 Commits

Reviewing files that changed from the base of the PR and between 107ecd1 and 198624e.

📒 Files selected for processing (3)
  • src/runtime/context-pack-diagnostics.ts
  • tests/unit/context-pack-diagnostics.test.ts
  • tests/unit/spi-nest-di-runtime-calls.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/runtime/context-pack-diagnostics.ts
  • tests/unit/spi-nest-di-runtime-calls.test.ts

📝 Walkthrough

Walkthrough

Adds two route-isolation diagnostics (isolated_route_method, missing_provider_call_edges), implements detection logic and weights, relativizes source-file paths used in retrieval suppression, supplies a fixture NestJS app with DI call chain, and adds unit/integration tests; bumps package version and updates CHANGELOG.

Changes

Route Isolation Diagnostics and DI Runtime Path Coverage

Layer / File(s) Summary
Diagnostic contract and implementation
src/contracts/context-pack-diagnostics.ts, src/runtime/context-pack-diagnostics.ts, tests/unit/context-pack-diagnostics.test.ts
Adds isolated_route_method and missing_provider_call_edges to ContextPackDiagnosticKind; updates imports and RULE_WEIGHTS; implements anchored route analysis, outgoing-call target resolution, and predicates that emit the new warnings; adds unit tests covering both cases.
Slicing path relativization
src/runtime/retrieve/slicing.ts
shouldSuppressNode now relativizes node.sourceFile against options.rootPath and lowercases the comparison when applying excluded-term suppression checks.
NestJS fixture application and helpers
tests/fixtures/spi/nest-di-runtime-calls/src/*, tests/fixtures/spi/nest-di-runtime-calls/fixtures/*, tests/fixtures/spi/nest-di-runtime-calls/benchmark/*
Adds IdeaGenerationController, GenerateFromProblemDto, IdeasService, TitleGenerationService, PipelineTriggerService, OrchestratorWorker, ResearchAgentService, MetricsScoringService, ReportRepository, plus fixture constants, controller spec, and an htmlReporter to build a testable DI call graph.
Integration tests for DI-aware runtime paths
tests/unit/spi-nest-di-runtime-calls.test.ts
Adds a Vitest suite that builds fixture SPI and graph, asserts DI-aware calls edges from routes into providers/workers, validates outgoing-call labels survive projection, and verifies retrieval with slice anchors, matched labels, noise exclusion, and diagnostics.
Release v0.22.2
CHANGELOG.md, package.json
Bump version to 0.22.2 and add CHANGELOG entry documenting fixture-backed NestJS runtime path coverage and route-isolation diagnostics.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • mohanagy/graphify-ts#146: Modifies context-pack diagnostics and retrieval/slicing logic touching the same modules and behaviors.
  • mohanagy/graphify-ts#144: Related slicing/retrieval changes that interact with source-file relativization and suppression behavior.
  • mohanagy/graphify-ts#25: Earlier work on source-file relativization and retrieval path handling that this PR builds upon.

Poem

🐰 I hopped through anchors, calls, and nodes,
Traced routes from controllers down the roads,
I added warnings for lonely route ways,
And fixtures that dance in test-time arrays,
Tests cheer — the graph now shows its sprawling codes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.26% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Release v0.22.2' is specific and matches the version bump in package.json and CHANGELOG.md entries, clearly communicating the primary purpose of the PR.
Description check ✅ Passed The PR description covers the main changes (fixture coverage, path filtering fixes, diagnostics) and lists verification commands, but lacks the structured template format with explicit Testing checklist items.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-0-22-2

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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/context-pack-diagnostics.ts`:
- Around line 413-418: The filter currently matches calls edges using
relationship.from_id OR relationship.from which can incorrectly pull edges from
different nodes with the same label; update the predicate in the filter used by
relationship.relation === 'calls' so that when node.node_id is a string you only
match via relationship.from_id === node.node_id, and only when node.node_id is
missing/undefined fall back to relationship.from === node.label; adjust the
logic around node.node_id, relationship.from_id and relationship.from to enforce
this priority so isolated_route_method and missing_provider_call_edges use
ID-only matching when available.

In `@tests/fixtures/spi/nest-di-runtime-calls/src/idea-generation.controller.ts`:
- Line 1: The controller's route handler accepts a parameter named dto without a
Nest parameter decorator so the request body isn't bound; import Body from
'@nestjs/common' and annotate the handler parameter with `@Body`() (e.g., change
the handler signature in the controller method that reads dto/problem to use
`@Body`() dto: YourDtoType) to ensure dto.problem is populated at runtime; keep
the DTO type as-is and update imports to include Body.
🪄 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: 3af8ba03-76ed-4198-9e1c-cd67a26101ee

📥 Commits

Reviewing files that changed from the base of the PR and between 63a0bef and 107ecd1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • CHANGELOG.md
  • package.json
  • src/contracts/context-pack-diagnostics.ts
  • src/runtime/context-pack-diagnostics.ts
  • src/runtime/retrieve/slicing.ts
  • tests/fixtures/spi/nest-di-runtime-calls/benchmark/html-reporter.ts
  • tests/fixtures/spi/nest-di-runtime-calls/fixtures/idea-report.fixture.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/__tests__/idea-generation.controller.spec.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/generate-from-problem.dto.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/idea-generation.controller.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/ideas.service.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/metrics-scoring.service.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/orchestrator.worker.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/pipeline-trigger.service.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/report.repository.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/research-agent.service.ts
  • tests/fixtures/spi/nest-di-runtime-calls/src/title-generation.service.ts
  • tests/unit/context-pack-diagnostics.test.ts
  • tests/unit/spi-nest-di-runtime-calls.test.ts

Comment thread src/runtime/context-pack-diagnostics.ts Resolved
@@ -0,0 +1,47 @@
import { Controller, Post } from '@nestjs/common'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "idea-generation.controller.ts" | head -20

Repository: mohanagy/graphify-ts

Length of output: 141


🏁 Script executed:

# Read the controller file
cat -n tests/fixtures/spi/nest-di-runtime-calls/src/idea-generation.controller.ts

Repository: mohanagy/graphify-ts

Length of output: 1748


Add @Body() to bind request payload in the route handler.

Line 17 takes dto without a Nest parameter decorator, so body binding fails and dto.problem is undefined at runtime (lines 18, 21, 28).

Suggested fix
-import { Controller, Post } from '@nestjs/common'
+import { Body, Controller, Post } from '@nestjs/common'
@@
-  async generateFromProblem(dto: GenerateFromProblemDto) {
+  async generateFromProblem(`@Body`() dto: GenerateFromProblemDto) {
🤖 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/fixtures/spi/nest-di-runtime-calls/src/idea-generation.controller.ts`
at line 1, The controller's route handler accepts a parameter named dto without
a Nest parameter decorator so the request body isn't bound; import Body from
'@nestjs/common' and annotate the handler parameter with `@Body`() (e.g., change
the handler signature in the controller method that reads dto/problem to use
`@Body`() dto: YourDtoType) to ensure dto.problem is populated at runtime; keep
the DTO type as-is and update imports to include Body.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mohanagy
mohanagy merged commit a805278 into main May 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant