Skip to content

fix(collector): shorten test-only shadow health settle - #356

Merged
proerror77 merged 2 commits into
mainfrom
codex/short-shadow-gate-settle
Jul 24, 2026
Merged

fix(collector): shorten test-only shadow health settle#356
proerror77 merged 2 commits into
mainfrom
codex/short-shadow-gate-settle

Conversation

@proerror77

@proerror77 proerror77 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Change contract: allow an explicitly authorized test-only Rust LOB shadow gate to shorten only the health-settling window, while keeping the formal 3600-second observation and 2400-second settle unchanged.

Acceptance evidence:

  • bash deployment/aliyun/test-rust-lob-control-plane.sh passes.
  • bash -n deployment/aliyun/host-rust-lob-shadow-gate.sh passes.
  • Effective settle duration is used for the health deadline and OSS age filter, and recorded in run/gate evidence.
  • Code review: spec and standards axes both APPROVE.

Out of scope: no collector Rust logic, snapshot/research logic, production cutover, or historical data reconstruction.

Dependency / merge order: based on merged collector PR #346; merge this gate-only fix before installing the next ECS candidate release.

Rollout / rollback impact: deployment scripts are updated only after this PR is merged and a new candidate release is built. A test-only gate remains production_eligible=false; formal cutover requirements are unchanged. Revert this PR to restore the previous fixed settle behavior.

Summary by CodeRabbit

  • New Features

    • Added configurable health-settlement timing for test-only deployment gates.
    • Added validation to ensure shortened settling is restricted to approved test scenarios.
    • Included the configured settling duration in gate evidence records.
  • Tests

    • Expanded deployment checks to verify health-settlement configuration, deadlines, retention calculations, and recorded evidence.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cd4307cb-7ff5-48db-bac8-5dff76ef81ca

📥 Commits

Reviewing files that changed from the base of the PR and between 55cce42 and 998b562.

📒 Files selected for processing (2)
  • deployment/aliyun/host-rust-lob-shadow-gate.sh
  • deployment/aliyun/test-rust-lob-control-plane.sh
📝 Walkthrough

Walkthrough

The shadow gate now supports a validated test-only health-settle override, uses the selected duration for deadline and manifest-age calculations, records it in run and gate evidence, and expands control-plane contract checks.

Changes

Health settle configuration

Layer / File(s) Summary
Settle policy and runtime timing
deployment/aliyun/host-rust-lob-shadow-gate.sh
Documents MONDAY_TEST_HEALTH_SETTLE_SECONDS, validates test-only overrides, and applies the selected duration to health deadlines and OSS manifest retention.
Evidence fields and contract checks
deployment/aliyun/host-rust-lob-shadow-gate.sh, deployment/aliyun/test-rust-lob-control-plane.sh
Adds health_settle_seconds to run.json and gate.json, and verifies the configuration, derived expressions, and evidence field through contract greps.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • proerror77/monday#29: Both changes update the Rust LOB shadow-gate control-plane flow and its contract checks.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: shortening the test-only shadow health settle.
Description check ✅ Passed The description covers the main contract, out-of-scope work, dependency order, validation, and rollback, but omits the required scope-exception section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/short-shadow-gate-settle

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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/host-rust-lob-shadow-gate.sh`:
- Around line 30-31: Update the usage text near the
MONDAY_TEST_HEALTH_SETTLE_SECONDS entry to state that the override is authorized
only when MONDAY_ALLOW_SHORT_GATE_FOR_TESTS=1 is also set and the requested
settling duration is below the formal duration; clarify that otherwise the
policy check fails.
- Around line 120-124: Update the validation around
MONDAY_TEST_HEALTH_SETTLE_SECONDS to reject values exceeding Bash’s safe
arithmetic range before the numeric comparison with HEALTH_SETTLE_SECONDS.
Preserve the positive-integer requirement and ensure only values safely
representable for arithmetic reach the existing “shorter than formal settle
duration” check and health_settle_seconds assignment.

In `@deployment/aliyun/test-rust-lob-control-plane.sh`:
- Around line 48-56: Expand the test around the gate policy to execute it
hermetically and cover authorized short-settle success plus rejection for
test_only=false, missing authorization, invalid values, and values at or above
HEALTH_SETTLE_SECONDS. Replace unscoped evidence-field checks with assertions
that separately validate the effective health-settle duration in both run.json
and gate.json, ensuring the tests verify behavior rather than only source text.
🪄 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 Plus

Run ID: 6925daa3-b236-4dd6-ab74-62e956587858

📥 Commits

Reviewing files that changed from the base of the PR and between b867087 and 55cce42.

📒 Files selected for processing (2)
  • deployment/aliyun/host-rust-lob-shadow-gate.sh
  • deployment/aliyun/test-rust-lob-control-plane.sh

Comment thread deployment/aliyun/host-rust-lob-shadow-gate.sh Outdated
Comment thread deployment/aliyun/host-rust-lob-shadow-gate.sh Outdated
Comment thread deployment/aliyun/test-rust-lob-control-plane.sh Outdated
@proerror77
proerror77 merged commit 7610701 into main Jul 24, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/short-shadow-gate-settle branch July 24, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant