Skip to content

fix(collector): reserve CPU for reference deadline - #78

Merged
proerror77 merged 1 commit into
mainfrom
codex/fix-polymarket-reference-cpu-quota
Jul 17, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/fix-polymarket-reference-cpu-quota

Conversation

@proerror77

@proerror77 proerror77 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Change contract

Raise the Polymarket reference collector and its shadow unit from 20% to 80% CPU quota so observed collection work can be scheduled within the existing 180-second fail-closed deadline.

Acceptance evidence

  • Live ECS diagnosis: repeated 124 exits after about 6m40s; no memory/OOM events; sustained CPU cgroup throttling.
  • Targeted resource-envelope regression test passes and CI selects that exact test.
  • cargo test -p hft-collector --features collector-binance --locked (107 passed, 1 network-dependent test ignored).
  • cargo clippy -p hft-collector --all-targets --features collector-binance --no-deps --locked -- -D warnings.
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh.

Out of scope

No change to the 180-second watchdog, data completeness rules, memory limits, collector request policy, upload behavior, or any execution/live-trading path.

Dependency or merge order

None. The production and shadow systemd units must be released together through the existing immutable collector control-bundle workflow.

Focused validation

The acceptance evidence above is the focused validation for this collector/control-plane change.

Rollout/rollback impact

After merge, build the approved Linux artifact/control bundle, run the candidate-specific reference shadow gate, then cut over only with its immutable passing evidence. Roll back through the prior immutable control bundle if the gate fails; do not relax the health policy or bypass the gate.

Summary by CodeRabbit

  • Updates
    • Increased the reference collector services’ CPU allocation to 80% for more reliable execution.
    • Clarified that the higher CPU allocation does not change existing time limits, completeness checks, or execution boundaries.
    • Updated release verification to confirm both CPU and memory resource limits remain correctly configured.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a095759-5dfd-432b-81c1-e5c9760e0458

📥 Commits

Reviewing files that changed from the base of the PR and between 4337503 and 32c3629.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • deployment/aliyun/README.md
  • deployment/aliyun/polymarket-reference-collector-shadow@.service
  • deployment/aliyun/polymarket-reference-collector.service
  • rust_hft/tools/collector/src/polymarket_raw.rs

📝 Walkthrough

Walkthrough

The reference collector services now reserve up to 80% CPU. Documentation records the unchanged 180-second deadline, and Rust CI verifies the pinned CPU quota alongside existing memory limits.

Changes

Collector resource envelope

Layer / File(s) Summary
Pin and verify resource limits
deployment/aliyun/*.service, deployment/aliyun/README.md, rust_hft/tools/collector/src/polymarket_raw.rs, .github/workflows/ci.yml
Both reference units use CPUQuota=80%; documentation preserves the existing deadline semantics; the resource-envelope test validates CPU and memory limits; CI runs the updated test.

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

Possibly related PRs

  • proerror77/monday#34: Related Polymarket raw collector resource-envelope verification work in the same Rust module.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: increasing CPU reservation for the collector deadline.
Description check ✅ Passed The description matches the template with all required sections and enough detail on change, validation, and rollout.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-polymarket-reference-cpu-quota

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 merged commit f91ac36 into main Jul 17, 2026
17 checks passed
@proerror77
proerror77 deleted the codex/fix-polymarket-reference-cpu-quota branch July 17, 2026 01:15
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