fix(monitor): parse multiline health output - #769
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe monitor checks now decode complete multiline health JSON, validate its structure, and distinguish unhealthy results from invocation failures. The workflow uses strict ChangesHealth output validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 @.github/workflows/monitor-collector-host.yml:
- Line 136: Update the health_json assignment in
.github/workflows/monitor-collector-host.yml at lines 136-136 to fail on any
Base64 decode or JSON parse error and accept only exactly one complete top-level
JSON object; remove the unconditional success fallback. In
.github/scripts/test-monitor-collector-host.sh lines 63-104, keep the test
helper aligned with this strict parsing behavior and add fixtures covering
concatenated objects, trailing garbage, and invalid Base64 suffixes.
🪄 Autofix
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: d0e13257-44d9-4487-b3a2-8ab36b5e3630
📒 Files selected for processing (2)
.github/scripts/test-monitor-collector-host.sh.github/workflows/monitor-collector-host.yml
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ee45b5213
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Issue relationship
Refs #738
Summary
Root cause
The old first-matching-line filter returned only the opening brace of a pretty-printed object. The later boolean check therefore received an incomplete object and misclassified a valid ok:false breach as a monitor invocation failure.
Validation
Runtime boundary
Repository code and contract tests only. This PR does not modify Aliyun or GitHub configuration, does not rerun the monitor, and does not perform Gate, shadow, cutover, restart, or reload operations.
Summary by CodeRabbit
Bug Fixes
Tests