Skip to content

feat(alpha): model explicit execution costs and capacity - #84

Merged
proerror77 merged 2 commits into
mainfrom
codex/alpha-explicit-execution-costs
Jul 17, 2026
Merged

proerror77 merged 2 commits into
mainfrom
codex/alpha-explicit-execution-costs

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Change contract

Bind explicit taker execution costs and top-N book-capacity assumptions into alpha-harness evaluation protocols and evidence, deduct them consistently across formula and ONNX evaluation, and fail closed when required spread/depth evidence is missing or capacity is exceeded.

Out of scope

  • Live execution activation or order routing.
  • Collector, market-data ingestion, or production cutover changes.
  • Strategy-search behavior beyond applying the bound evaluation contract.
  • The K8s change is example-only parameter wiring; it does not deploy or mutate a running workload.

Dependency or merge order

None. This PR is based directly on main and can merge independently.

Focused validation

  • cargo fmt --manifest-path rust_hft/Cargo.toml --package alpha-domain --package alpha-engine --package alpha-onnx-evaluator --package alpha-store --package alpha-harness -- --check
  • CARGO_BUILD_JOBS=1 cargo test --manifest-path rust_hft/Cargo.toml -p alpha-domain -p alpha-engine -p alpha-onnx-evaluator -p alpha-store -p alpha-harness (214 passed; 1 credential-gated live LLM test ignored)
  • CARGO_BUILD_JOBS=1 cargo clippy --manifest-path rust_hft/Cargo.toml -p alpha-domain -p alpha-engine -p alpha-onnx-evaluator -p alpha-store -p alpha-harness --all-targets -- -D warnings
  • Targeted counterexamples cover missing/negative spread, missing/non-positive depth, capacity breach, protocol/hash tampering, and legacy zero/default compatibility.
  • Review scope: 13 files, 589 additions, 11 deletions; below the 25-file / 750-line split threshold.

Rollout / rollback impact

New fields default to zero/false and are omitted from canonical serialization at defaults, preserving legacy protocol hashes and behavior. Research missions opt in through explicit CLI flags; invalid partial capacity configuration is rejected. Roll back by reverting this PR; no data migration or live-execution state is involved.

@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: 17 minutes

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: e69ba72b-9cfc-4db8-b5c6-07147d733ba1

📥 Commits

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

📒 Files selected for processing (13)
  • deployment/aliyun/research/k8s/alpha-mission-job.example.yaml
  • rust_hft/alpha-harness/app/src/cli.rs
  • rust_hft/alpha-harness/app/src/governance.rs
  • rust_hft/alpha-harness/app/src/loop_control.rs
  • rust_hft/alpha-harness/app/src/mission.rs
  • rust_hft/alpha-harness/app/src/mission_runner.rs
  • rust_hft/alpha-harness/domain/src/lib.rs
  • rust_hft/alpha-harness/engine/src/engines/mod.rs
  • rust_hft/alpha-harness/engine/src/evaluation.rs
  • rust_hft/alpha-harness/engine/src/formula_evaluator.rs
  • rust_hft/alpha-harness/engine/src/lib.rs
  • rust_hft/alpha-harness/onnx-evaluator/src/lib.rs
  • rust_hft/alpha-harness/store/src/lib.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/alpha-explicit-execution-costs

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 e936881 into main Jul 17, 2026
30 checks passed
@proerror77
proerror77 deleted the codex/alpha-explicit-execution-costs branch July 17, 2026 08:56
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