Skip to content

fix(extract): restore component enrichment coverage - #287

Merged
NTCoding merged 9 commits into
mainfrom
fix-bug-from-property
Apr 10, 2026
Merged

NTCoding merged 9 commits into
mainfrom
fix-bug-from-property

Conversation

@NTCoding

@NTCoding NTCoding commented Apr 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • restore fromProperty extraction for method-based components
  • add regression coverage for class and method-based component enrichment
  • extend Vitest timeouts/pool settings for extract packages

Verification

  • git commit ran the repo verification hook successfully

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation of extraction rules for class-based components; unsupported extraction rule types now properly return errors instead of attempting invalid operations.
  • Tests

    • Added test coverage for method-based component extraction.
    • Extended test timeout limits for increased reliability.

@coderabbitai

coderabbitai Bot commented Apr 10, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR extends Vitest test timeouts to 60 seconds across two packages, adds test coverage for method-based component extraction and unsupported extraction rule error handling, refactors extraction rule evaluation logic to handle fromProperty rules at the top level rather than within class-based evaluation, and updates build dependencies for the role-check Nx target.

Changes

Cohort / File(s) Summary
Test Configuration
packages/riviere-cli/vitest.config.mts, packages/riviere-extract-ts/vitest.config.mts
Extended per-test timeout from default/15,000ms to explicit 60,000ms across both packages.
Extraction Tests
packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/enrich-components-method-extraction.spec.ts, packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/enrich-components.spec.ts
Added new test cases: method-based component extraction with fromProperty enrichment of subscribedEvents metadata, and error handling validation for unsupported fromMethodSignature extraction on class-based components.
Extraction Logic
packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/enrich-components.ts
Refactored rule evaluation: evaluateClassRule now unconditionally throws error for unsupported rules; evaluateRule explicitly handles fromProperty rules before fromParameterType by resolving containing class and delegating appropriately.
Build Configuration
packages/riviere-extract-ts/project.json
Added @living-architecture/riviere-role-enforcement:build as execution dependency for role-check Nx target alongside existing ^build.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Poem

🐰 The rules now flow in clearer streams,
FromProperty finds its rightful place,
Tests bloom with sixty-second dreams,
While extraction quickens up its pace!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(extract): restore component enrichment coverage' directly aligns with the PR's primary objective: restoring fromProperty extraction for method-based components and adding regression coverage for component enrichment.

✏️ 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 fix-bug-from-property

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.

🔧 OpenGrep (1.17.0)
packages/riviere-extract-ts/project.json

┌──────────────┐
│ Opengrep CLI │
└──────────────┘

�[32m✔�[39m �[1mOpengrep OSS�[0m
�[32m✔�[39m Basic security coverage for first-party code vulnerabilities.

�[1m Loading rules from local config...�[0m


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.

❤️ Share

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 10, 2026 •

Copy link
Copy Markdown

Deploying living-architecture with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef5a56e
Status: ✅  Deploy successful!
Preview URL: https://209ea227.living-architecture.pages.dev
Branch Preview URL: https://fix-bug-from-property.living-architecture.pages.dev

View logs

@NTCoding
NTCoding marked this pull request as ready for review April 10, 2026 20:29

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.oxlintrc.role-enforcement.19177.1775724109108.json:
- Around line 17-373: The config object in the JSON lacks the required
roleDefinitionsDir property (required by config-reader.ts), causing schema
validation to fail; add a top-level "roleDefinitionsDir" string property to this
config (e.g., pointing to the directory that contains your role definition
files) so config-reader.ts can find role definitions and the Oxlint plugin can
validate successfully — update the object that contains
"configDir"/"configDisplayPath"/"layers"/"roles" to include roleDefinitionsDir.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: d626a616-bec8-4b75-afac-bda195f2bc74

📥 Commits

Reviewing files that changed from the base of the PR and between f726800 and c223c4e.

📒 Files selected for processing (6)
  • .oxlintrc.role-enforcement.19177.1775724109108.json
  • packages/riviere-cli/vitest.config.mts
  • packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/enrich-components-method-extraction.spec.ts
  • packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/enrich-components.spec.ts
  • packages/riviere-extract-ts/src/features/extraction/domain/value-extraction/enrich-components.ts
  • packages/riviere-extract-ts/vitest.config.mts

Comment thread .oxlintrc.role-enforcement.36616.1775854583699.json Outdated

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/riviere-extract-ts/project.json`:
- Line 6: The role-check target currently lists an invalid dependency
"@living-architecture/riviere-role-enforcement:build" in the dependsOn array;
remove that entry from the dependsOn list in
packages/riviere-extract-ts/project.json so the role-check target no longer
depends on a non-existent NX build target (the command still runs source with
"pnpm exec tsx packages/riviere-role-enforcement/src/shell/bin.ts" and does not
require a built artifact).
🪄 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: ASSERTIVE

Plan: Pro

Run ID: b9d5fa62-d229-4467-8bef-25ef83c18c50

📥 Commits

Reviewing files that changed from the base of the PR and between c223c4e and ef5a56e.

📒 Files selected for processing (2)
  • packages/riviere-extract-ts/project.json
  • packages/riviere-extract-ts/vitest.config.mts

Comment thread packages/riviere-extract-ts/project.json
@sonarqubecloud

Copy link
Copy Markdown

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