Repository navigation
fix(riviere-extract-ts): skip bare function calls in traceCallExpression - #308
Conversation
traceCallExpression lacked the property-access guard that processCallExpression has. When deep-tracing through non-component code, bare function calls (e.g. global fetch()) had no receiver, causing ConnectionDetectionError to be thrown in strict mode (the default). Adds the same early return guard as processCallExpression and two regression tests: one confirming no throw in strict mode, one covering the any-typed- receiver path. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Deploying living-architecture with
|
| Latest commit: |
a50836c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ac36b569.living-architecture.pages.dev |
| Branch Preview URL: | https://fix-trace-call-expression-ba.living-architecture.pages.dev |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 44 minutes and 51 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes add coverage tests for call graph tracing behavior and introduce an early guard in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
The dependsOn referenced '@living-architecture/riviere-role-enforcement:build' (npm package name) but NX resolves project references by NX project name. NX silently ignores unresolvable references, so riviere-role-enforcement:build never ran in CI, leaving dist/index.js absent when role-check executed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|



Summary
traceCallExpressionlacked the property-access guard thatprocessCallExpressionhasfetch(url)) have no receiver object, causingConnectionDetectionErrorto be thrown in strict mode (the default whenallowIncompleteis not set)!Node.isPropertyAccessExpression(...)early return thatprocessCallExpressionalready usesRoot cause
processCallExpression(direct component method scanner) guards against bare calls:traceCallExpression(deep-trace path through non-component code) was missing this guard. When it encounteredfetch(url),getReceiverExpressionreturnedundefined, and withstrict: truethe code threw instead of skipping.Test plan
fetch()in a non-component class body does not throw in strict mode and the component connection is still detectedany-typed receiver call in traced non-component body is skipped cleanly🤖 Generated with Claude Code
Summary by CodeRabbit