fix(ops): gate collector health on mount and disk runway - #804
Conversation
|
Warning Review limit reached
Next review available in: 29 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 (3)
📝 WalkthroughWalkthroughThe collector health contract now has six hard gates. The monitor validates ChangesCollector health mount and runway
Sequence Diagram(s)sequenceDiagram
participant CollectorHealthScript
participant DataMount
participant Df
participant StateFile
participant JsonOutput
CollectorHealthScript->>DataMount: Check /data mount
CollectorHealthScript->>Df: Read disk capacity and free space
CollectorHealthScript->>StateFile: Persist disk sample
StateFile-->>CollectorHealthScript: Return prior sample
CollectorHealthScript->>CollectorHealthScript: Calculate consumption and runway
CollectorHealthScript->>JsonOutput: Emit disk status and gate result
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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 `@deployment/aliyun/monday-collector-health.sh`:
- Around line 266-312: In deployment/aliyun/monday-collector-health.sh lines
266-312, update check_disk to track parse validity for both disk_total_kib and
disk_avail_kib, and use the existing unavailable-measurement breach whenever
either field is invalid before calculating free-space metrics or persisting a
baseline. In deployment/aliyun/test-monday-collector-health.sh lines 645-652,
add coverage for numeric total with invalid or missing available-space data and
assert the unavailable-measurement breach without a critical-free-space breach.
🪄 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: cc29e6fd-cb62-41b0-bfa7-af4e9b6ee870
📒 Files selected for processing (4)
agent-worktree.ymldeployment/aliyun/README.mddeployment/aliyun/monday-collector-health.shdeployment/aliyun/test-monday-collector-health.sh
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f2b689335
ℹ️ 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".
a3eca37 to
0c2a4ff
Compare
0c2a4ff to
2900c8b
Compare
Change contract
Promote the existing /data mount check and disk exhaustion thresholds into hard collector-host health gates, with a minimum two-sample runway calculation below 25% free space.
Issue relationship
None
Out of scope
Collector release/install/cutover, Fee credentials, raw-ops Gate cleanup, CI cache shaping, and trading Live.
Dependencies and merge order
Depends only on main@2fb07d94, which contains PR #800 hard gates 1-4.
Focused validation
Rollout and rollback
Code only. After merge, install the exact merged health script as a separate runtime unit after Fee and raw-ops prerequisites are healthy. Roll back by restoring the prior script identity; no collector service or data format changes are included.
Scope exception
None.
Summary by CodeRabbit
New Features
/datamount is available and has measurable free space.Bug Fixes