Skip to content

fix(polymarket): raise reference soft memory watermark - #85

Merged
proerror77 merged 3 commits into
mainfrom
codex/polymarket-shadow-memory-high
Jul 17, 2026
Merged

proerror77 merged 3 commits into
mainfrom
codex/polymarket-shadow-memory-high

Conversation

@proerror77

@proerror77 proerror77 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Change contract

Raise the Polymarket Rust reference shadow and production service soft memory watermark from 576M to 672M while keeping the 768M hard cap unchanged, so the formal gate stays fail-closed on real OOM/max events instead of failing on the newly observed startup working set.

Out of scope

  • Any binary or collector behavior change
  • Any change to MemoryMax=768M
  • Any cutover or production promotion itself

Dependency or merge order

  • Base: main
  • Merge order: merge this before regenerating the release artifact and rerunning the formal Polymarket shadow gate

Focused validation

  • CARGO_BUILD_JOBS=1 cargo test -p hft-collector systemd_reference_resource_envelope_is_pinned --locked
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
  • July 17 formal gates measured 586.1MiB, 605.8MiB, and 601.9MiB cold-start peaks under the former 576MiB watermark without reaching MemoryMax=768M or recording an OOM.

Rollout/rollback impact

  • Rollout: package the updated control bundle, rerun the full 4201-second Polymarket shadow gate, and only cut over if the new gate produces fresh PASSED.sha256 evidence.
  • Rollback: revert this PR to restore the 576M soft watermark if a subsequent formal gate shows the higher envelope is unsafe.

Constraint: Formal production gates on July 17, 2026 hit memory.events high at 586.1M and 605.8M while MemoryMax stayed untouched
Rejected: Keep 576M and retry gate | reproduced fail-closed twice with current host workload
Directive: Keep MemoryMax at 768M unless a future formal gate proves the hard limit itself is too low
Confidence: high
Scope-risk: narrow
Tested: CARGO_BUILD_JOBS=1 deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 14 seconds

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

Run ID: 9e7c08fb-c40c-4dbe-bc5c-57ab616d15f7

📥 Commits

Reviewing files that changed from the base of the PR and between eb3ec63 and c698ea1.

📒 Files selected for processing (6)
  • deployment/aliyun/README.md
  • deployment/aliyun/polymarket-reference-collector-shadow@.service
  • deployment/aliyun/polymarket-reference-collector.service
  • deployment/aliyun/test-polymarket-raw-ops-control-plane.sh
  • docs/reports/polymarket-shadow-memory-calibration-2026-07-16.md
  • rust_hft/tools/collector/src/polymarket_raw.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/polymarket-shadow-memory-high

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b744f145bf

ℹ️ 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".

UMask=0027
CPUQuota=80%
MemoryHigh=576M
MemoryHigh=672M

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the pinned resource-envelope test

With this unit now setting MemoryHigh=672M, the Rust test systemd_reference_resource_envelope_is_pinned still includes these service files and asserts high == 576 in rust_hft/tools/collector/src/polymarket_raw.rs:2323-2328. Any cargo test -p hft-collector ... run for the collector will fail as soon as it parses this changed line, so the documented control-plane validation cannot pass until the pinned test expectation is updated with the new envelope.

Useful? React with 👍 / 👎.

@proerror77
proerror77 merged commit 9fe640e into main Jul 17, 2026
17 checks passed
@proerror77
proerror77 deleted the codex/polymarket-shadow-memory-high branch July 17, 2026 08:53
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