review(cli): pose --library list — reject non-array poses field#605
Conversation
Codex P2 on PR #604 (merged). The CLI's `--library list` path checked the `schema` string but then did `root.value("poses").toArray()` unconditionally — same silent-empty-on-bad-type bug class as loadPoseLibrary had on PR #602 (fixed in #603), just in the duplicated parse-in-the-CLI path. A schema-matching `.poselib` file with `poses` missing or non-array would report "No poses in library" with exit 0 instead of surfacing the corruption. CI/audit workflows relying on non-zero exit for invalid libraries would miss the failure. Fix: explicit `isArray()` check after the schema match, emit "malformed 'poses' field in <path>" to stderr and return 1. Manual verification: a `{"schema":"qtmesheditor.poselib.v1","poses":"oops"}` file now exits 1 with the expected message instead of 0 with a vacuous result. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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. ✨ 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 |
|



Codex P2 on PR #604 (merged). The CLI's
--library listpath checked theschemastring but then didroot.value("poses").toArray()unconditionally — same silent-empty-on-bad-type bug class asloadPoseLibraryhad on PR #602 (fixed in #603), just in the duplicated parse path insidecmdPose.A schema-matching
.poselibfile withposesmissing or non-array reported "No poses in library" with exit 0 instead of surfacing the corruption. CI/audit workflows relying on non-zero exit would miss the failure.Fix
Explicit
isArray()check after the schema match. EmitError: malformed 'poses' field in <path>to stderr and return 1.Manual verification
A
{"schema": "qtmesheditor.poselib.v1", "poses": "oops"}file now exits 1 with the expected message.🤖 Generated with Claude Code