Skip to content

Keep Polymarket upload stdout machine-readable - #393

Merged
proerror77 merged 1 commit into
mainfrom
codex/polymarket-upload-json-392
Jul 26, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/polymarket-upload-json-392

Conversation

@proerror77

@proerror77 proerror77 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Change contract

Suppress child ossutil stdout in the shared Polymarket OSS runner so polymarket-raw-ops upload emits exactly one machine-readable JSON document while preserving stderr and fail-closed exit handling.

Why no PRD

This is a small, already-specified behavior repair from #392 with one public boundary and one regression seam; it was implemented directly with a red-green TDD cycle.

Out of scope

Dependency / merge order

Focused validation

  • Red before fix: cargo test -p hft-collector oss_runner_keeps_machine_readable_stdout_clean -- --nocapture failed with left: ossutil progress, right: [].
  • Green after fix: the same test passes.
  • rustfmt --edition 2021 --check tools/collector/src/polymarket_upload.rs
  • cargo test -p hft-collector (all package tests pass; only pre-existing ignored network/subprocess targets remain ignored).
  • cargo clippy -p hft-collector --all-targets -- -D warnings
  • Two-axis review: Standards 0 findings; Spec 0 findings.
  • Workspace-wide cargo fmt --all -- --check remains blocked by unrelated pre-existing formatting drift outside this PR; this PR does not touch those files.

Rollout / rollback impact

After merge, build a new exact-main candidate and run a fresh 3600s + 601s Shadow Gate. Production stays on Python until immutable Gate evidence passes. Rollback is a one-commit revert; error stderr, non-zero exits, timeouts, and upload/readback integrity checks are unchanged.

Closes #392

Summary by CodeRabbit

  • Bug Fixes
    • Prevented background upload and download progress messages from appearing in machine-readable command output.
    • Added validation to ensure automated output remains clean and reliable.

@coderabbitai

coderabbitai Bot commented Jul 26, 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: 6be8b00e-2860-4a2b-b6cf-67ab57688b85

📥 Commits

Reviewing files that changed from the base of the PR and between 3813393 and 26c3289.

📒 Files selected for processing (1)
  • rust_hft/tools/collector/src/polymarket_upload.rs

📝 Walkthrough

Walkthrough

The OSS command runner now discards child stdout, preserving the uploader’s machine-readable output. A regression test confirms progress text is not written to a configured output target.

Changes

Polymarket uploader output

Layer / File(s) Summary
Suppress OSS child stdout and validate the contract
rust_hft/tools/collector/src/polymarket_upload.rs
run_checked redirects child stdout to null, and a regression test confirms simulated OSS progress output does not reach the captured file.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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: keeping Polymarket upload stdout machine-readable.
Description check ✅ Passed The description covers the required contract, scope, dependency, validation, and rollback details, but it omits the explicit Scope exception section.
Linked Issues check ✅ Passed The PR implements #392 by suppressing child stdout, preserving stderr and fail-closed behavior, and adding the focused regression test.
Out of Scope Changes check ✅ Passed The changes stay focused on the OSS runner stdout fix and regression test, with no clear unrelated code changes.
✨ 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/polymarket-upload-json-392

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 076d584 into main Jul 26, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/polymarket-upload-json-392 branch July 26, 2026 21:52
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.

Keep Polymarket uploader stdout machine-readable

1 participant