Skip to content

fix(collector): satisfy clippy conditional lint - #167

Merged
proerror77 merged 1 commit into
mainfrom
codex/collector-clippy-obfuscated-if
Jul 20, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/collector-clippy-obfuscated-if

Conversation

@proerror77

@proerror77 proerror77 commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Change contract: replace the test-only conditional Option chain flagged by current Clippy with equivalent explicit if is_reference { ... } else { ... } logic.

Acceptance evidence: Linux Monorepo CI completes the existing hft-collector check/clippy/test lane.

Out of scope: collector runtime behavior, collection state, evidence schema, deployment, PR #166 allowlist, and research E2E.

Dependency or merge order: PR #166 follows this PR because current main’s collector Clippy baseline blocks #166 CI.

Focused validation: existing Linux cargo clippy -p hft-collector --all-targets --features collector-binance --no-deps --locked -- -D warnings lane.

Rollout/rollback impact: None; test fixture expression only. Rollback is reverting this one-file commit.

Summary by CodeRabbit

  • Tests
    • Refined test fixture setup for trade completion data.
    • Preserved existing behavior for reference and non-reference datasets.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d633e5a-f6dc-40ef-8636-3c3184e70ff0

📥 Commits

Reviewing files that changed from the base of the PR and between c0f4659 and a2d0583.

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

📝 Walkthrough

Walkthrough

The test segment fixture now uses an explicit conditional to construct trade_completions, preserving the existing reference and non-reference map contents.

Changes

Trade completion fixture

Layer / File(s) Summary
Explicit trade completion map initialization
rust_hft/tools/collector/src/polymarket_evidence_artifact.rs
The fixture creates the "market-1" completion entry for reference segments and an empty BTreeMap otherwise.

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

Possibly related PRs

  • proerror77/monday#152: Wires trade_completions and TradeCompletionIdentity into the same reference and non-reference segment fixture.
✨ 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/collector-clippy-obfuscated-if

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 marked this pull request as ready for review July 20, 2026 02:05
@proerror77
proerror77 merged commit 0de5c6f into main Jul 20, 2026
16 of 17 checks passed
@proerror77
proerror77 deleted the codex/collector-clippy-obfuscated-if branch July 20, 2026 02:06
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