Skip to content

fix(collector): bound Polymarket market-tape upload work - #698

Merged
proerror77 merged 1 commit into
mainfrom
codex/pm-market-tape-uploader-cpu-bound
Aug 5, 2026
Merged

fix(collector): bound Polymarket market-tape upload work#698
proerror77 merged 1 commit into
mainfrom
codex/pm-market-tape-uploader-cpu-bound

Conversation

@proerror77

@proerror77 proerror77 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Change contract

Bound only the Polymarket market-tape uploader's CPU burst: run zstd with one worker and upload one closed source at a time. Keep the existing rotation, OSS data/manifest/_SUCCESS protocol, and data-quality behavior unchanged.

Issue relationship

None

Out of scope

PM reference uploader and shared environment, collector/timer rotation, CPUQuota, NoSuchKey publication semantics, WebSocket/time-rollover data-quality work, CEX, and any execution runtime.

Dependencies and merge order

None

Focused validation

  • Red: the focused service contract was absent before the change.
  • Green: deployment/aliyun/test-polymarket-market-tape-upload-contract.sh pins the unit and canonical cutover argv.
  • bash -n and ShellCheck on both changed shell scripts.
  • Existing deployment/aliyun/test-polymarket-raw-ops-control-plane.sh passed with GNU coreutils date compatibility; CI is the clean Linux authority.
  • .github/scripts/test-select-rust-ci-scope.sh, YAML parsing, and git diff --check passed.
  • Two independent code reviews found no concrete issues.

Rollout and rollback

Controller: /root; target: i-6we6afeqsvv8uo1ixmyo, polymarket-market-tape-upload.service. After the merged SHA has green CI and its immutable collector release artifact is available, use Aliyun Cloud Assistant to replace only the verified ExecStart line, preserving the host's current CPUQuota, Nice, pinned environment file, and all other unit bytes. Do not restart an active upload; let the five-minute timer adopt it naturally.

Stop and restore the prior unit (current SHA-256 8174c2666d3f1c969e9fd381b7718205045cdfcbde62f25a3c4ac7a9284e0e16) if the baseline identity changes before mutation, systemd's effective argv differs after reload, the uploader fails, or a completed upload lacks any data/manifest/_SUCCESS member. Rollback restores that exact prior file and reloads systemd without interrupting an active upload.

Scope exception

None

Summary by CodeRabbit

  • Bug Fixes

    • Improved market-tape upload reliability by limiting compression to a single thread and processing uploads sequentially.
    • Standardized upload behavior across supported deployment paths.
  • Tests

    • Added automated validation to ensure market-tape uploads consistently use the required performance and concurrency settings.
    • Included the upload contract check in continuous integration verification.

@coderabbitai

coderabbitai Bot commented Aug 5, 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 Plus

Run ID: e289914d-ffc3-495c-85cb-c1076f590243

📥 Commits

Reviewing files that changed from the base of the PR and between 5500f3e and 0e93122.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • deployment/aliyun/polymarket-market-tape-upload.service
  • deployment/aliyun/polymarket-raw-ops-cutover.sh
  • deployment/aliyun/test-polymarket-market-tape-upload-contract.sh

📝 Walkthrough

Walkthrough

The upload service and cutover script now use single-threaded compression and serialized uploads. A Bash contract test validates both commands, and the Rust CI control-plane verification step runs that test.

Changes

Market-tape upload control

Layer / File(s) Summary
Upload command configuration
deployment/aliyun/polymarket-market-tape-upload.service, deployment/aliyun/polymarket-raw-ops-cutover.sh
The service and cutover command set ZSTD_THREADS=1 and --upload-concurrency 1 while retaining the existing uploader options.
Upload contract verification
deployment/aliyun/test-polymarket-market-tape-upload-contract.sh, .github/workflows/ci.yml
A fail-fast Bash test checks the service and cutover command strings. CI runs the test during control-plane verification.

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

Possibly related issues

Possibly related PRs

  • proerror77/monday#34: Introduces the Rust uploader commands that this PR refines in the service and cutover script.
  • proerror77/monday#44: Adds related Polymarket raw-ops control-plane scripts and CI contract testing.
  • proerror77/monday#656: Configures Polymarket tape uploads with ZSTD_THREADS and upload concurrency.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: limiting Polymarket market-tape upload work.
Description check ✅ Passed The description includes every required template section and provides clear behavior, validation, rollout, rollback, and scope details.
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/pm-market-tape-uploader-cpu-bound

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

Copy link
Copy Markdown
Owner Author

Operator authorization recorded 2026-08-05 CST: merge exception approved only for the known RUSTSEC-2026-0235 Cargo-audit finding on the unchanged baseline rkyv 0.7.46 lockfile entry. This exception covers the derived Security Summary Report only; all other checks remain required and are green. No dependency/security remediation is included in this market-tape uploader rollout.

@proerror77
proerror77 merged commit acab1d0 into main Aug 5, 2026
45 of 47 checks passed
@proerror77
proerror77 deleted the codex/pm-market-tape-uploader-cpu-bound branch August 5, 2026 01:43
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