Skip to content

fix(deploy): allow shadow gate OSS readback - #306

Merged
proerror77 merged 1 commit into
mainfrom
codex/cex-gate-readback-permissions-224
Jul 24, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/cex-gate-readback-permissions-224

Conversation

@proerror77

@proerror77 proerror77 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Change contract

Create every shadow-gate OSS readback segment directory as hftcollector:hftcollector with mode 0750, so the service-user ossutil process can download immutable manifests, segments, and _SUCCESS markers during the production gate.

Out of scope

Collector behavior, market-tape schema, gate acceptance thresholds, production cutover, snapshot/cohort construction, and research logic.

Dependency or merge order

Follow-up to #296 and #301. Merge before rerunning issue #224 production shadow gate.

Focused validation

  • Red proof: bash deployment/aliyun/test-rust-lob-control-plane.sh failed before the ownership fix.
  • Green: bash deployment/aliyun/test-rust-lob-control-plane.sh
  • Green: shellcheck deployment/aliyun/host-rust-lob-shadow-gate.sh deployment/aliyun/test-rust-lob-control-plane.sh
  • Green: git diff --check
  • Runtime counterexample: invocation t-jpn6rtzvbbnwlj4 completed the one-hour collection and uploads, then failed closed with permission denied while downloading the first Spot manifest into a root-owned 0750 segment directory.

Rollout / rollback impact

Rollout: deploy the merged gate bundle with the same collector candidate and rerun the full one-hour shadow gate. Rollback: revert this PR; no production service or stored market data is changed by the patch.

Refs #224

Summary by CodeRabbit

  • Bug Fixes

    • Improved permissions and ownership for evidence directories created during verification.
    • Ensured generated directories use the expected secure access mode and service ownership.
  • Tests

    • Added validation to confirm the required directory permissions and ownership are enforced.

@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: 42 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: 8b969693-bb6c-4d2c-8d37-b85ca4fc9250

📥 Commits

Reviewing files that changed from the base of the PR and between 6b75c3b and ac01363.

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

Walkthrough

The deployment gate now creates per-segment evidence directories with explicit service ownership, and the control-plane test verifies the required install -d command contract.

Changes

LOB segment ownership enforcement

Layer / File(s) Summary
Directory creation and contract validation
deployment/aliyun/host-rust-lob-shadow-gate.sh, deployment/aliyun/test-rust-lob-control-plane.sh
The gate creates segment directories with mode 0750 and $SERVICE_USER as owner and group; the control-plane test asserts this command contract.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

  • proerror77/monday#29: Introduces the related Rust LOB control-plane contract test for the same gate script.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: fixing shadow-gate OSS readback permissions.
Description check ✅ Passed The description covers the change contract, out of scope, merge order, validation, and rollout/rollback impact.
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/cex-gate-readback-permissions-224

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.

@proerror77
proerror77 force-pushed the codex/cex-gate-readback-permissions-224 branch from 6b75c3b to ac01363 Compare July 24, 2026 00:41
@proerror77
proerror77 merged commit 9e1766f into main Jul 24, 2026
18 checks passed
@proerror77
proerror77 deleted the codex/cex-gate-readback-permissions-224 branch July 24, 2026 00:45
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