Add demo composer scripts and stree outputs - #20
Conversation
📝 WalkthroughWalkthroughMultiple demo projects upgrade PHPUnit from v10 to v12 in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@demos/medical-triage/composer.json`:
- Around line 22-27: The composer scripts "stree" and "stree:full" fail silently
when no var/log/*.json exists and are non-portable; update those scripts to
compute the most-recent log in a portable way (e.g., call a short PHP one‑liner
or a tiny PHP helper that checks glob('var/log/*.json'), returns the latest path
or exits with a clear error) and pass that path to vendor/bin/stree so the
script errors explicitly instead of invoking stree with an empty arg; for the
"profile" script, avoid the hardcoded platform-specific suffix by either
removing the ".so" suffix (use -d extension=xhprof) or document the xhprof
prerequisite in the composer "scripts-descriptions" entry for "profile" so users
know xhprof must be installed/available on their platform.
- Around line 19-21: Run the demo-level PHPUnit suites to verify PHPUnit ^12
compatibility by executing composer install && composer test inside each demo
directory that contains composer.json (the demos referencing "phpunit/phpunit":
"^12"); if tests fail, update the failing test(s) or adjust composer constraints
and regenerate composer.lock (run composer update phpunit/phpunit) until
composer test passes, then commit the updated lockfile or test fixes before
merging.
In `@demos/order-processing/stree-full.txt`:
- Line 4: The demo semantic trace contains a full PAN in the cardNumber field
(seen in OrderInput / PaymentCompleted payloads and the Been/close payload);
update the producer and payload generation to never emit full PANs by either
masking or tokenizing cardNumber (e.g., replace all but last 4 digits with
asterisks) and regenerate the stree artifacts; specifically, modify the upstream
source class that sets payment.cardNumber and the OrderInput/PaymentCompleted
serialization so cardNumber is replaced with a masked value (or removed) before
it is added to Been/close and then re-run the artifact generation to commit the
sanitized trace.
🪄 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
Run ID: 54a9fbc1-5bba-463c-938a-1740fe6b3ca3
📒 Files selected for processing (16)
demos/blog-publishing/composer.jsondemos/contact-form/composer.jsondemos/hello-world/composer.jsondemos/hello-world/stree-full.txtdemos/hello-world/stree.txtdemos/insurance-claim/composer.jsondemos/loan-application/composer.jsondemos/medical-triage/composer.jsondemos/medical-triage/stree-full.txtdemos/medical-triage/stree.txtdemos/order-processing/composer.jsondemos/order-processing/stree-full.txtdemos/order-processing/stree.txtdemos/user-registration/composer.jsondemos/user-registration/stree-full.txtdemos/user-registration/stree.txt
Review — rendering verificationRan
All four JSON logs are valid JSON, and Strengths
Suggestions (non-blocking)
VerdictRendering is correct and deterministic modulo timestamps/randomness. Ship-ready; the polish items above are optional. |
Summary
Validation
Summary by CodeRabbit
Chores
Documentation