Skip to content

feat(eval): add Rust benchmark experiment runner - #6832

Closed
Colafornia wants to merge 3 commits into
apache:rust-previewfrom
Colafornia:feat/maka-eval
Closed

Colafornia wants to merge 3 commits into
apache:rust-previewfrom
Colafornia:feat/maka-eval

Conversation

@Colafornia

Copy link
Copy Markdown
Member
English

Summary

Add maka-eval, a standalone Rust evaluator for multi-arm benchmark experiments. It runs experiment specifications, persists execution evidence, and exports canonical results and cohort summaries on the Rust product line.

Refs #6667. This draft introduces the implementation; measurement compatibility and production readiness still require the validation listed below.

  • Add strict maka.eval.v1 contracts and native maka.eval.v2 records with separate lifecycle, execution, metering, and cleanup states.
  • Schedule task groups with bounded retries and phase-specific deadlines. Persist launch intent and attempt transitions in a single-writer journal for recovery and deterministic result selection.
  • Add Rust Maka Host and external CLI subject adapters, plus a version-pinned Harbor Python bridge, relay, and egress policy. Harbor retains ownership of native trial execution and verification.
  • Reconcile receipt and proxy usage without double-counting, preserve six token counters, recover authenticated checkpoints, and export standardized costs and differential reports.
  • Register products/eval in the Cargo workspace, add integration fixtures and bilingual documentation, and include network-policy in ASF header checks.

Verification

Passed after rebasing onto origin/rust-preview at 4d13347b7:

  • cargo check -p maka-eval --all-targets --locked
  • cargo fmt -p maka-eval -- --check
  • git diff --check origin/rust-preview...HEAD
  • git range-diff confirmed that the rebase preserved the implementation patch.

The original commit also passed node scripts/asf-license-headers.mjs check-staged. Test execution, Python/Harbor checks, and live benchmark cohorts were not run on the rebased commit. Compilation does not establish runtime or oracle compatibility.

Before ready for review

  • Run cargo nextest run -p maka-eval and validate the Python bridge and egress policy.
  • Exercise the real Rust Maka Host and Harbor path, including cancellation, settlement, cleanup, and recovery evidence.
  • Compare deterministic fixtures and a small paired cohort against the frozen legacy oracle required by feat(eval): rebuild the measurement and control plane in Rust #6667.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex prepared Cargo workspace integration and license-header coverage, rebased the branch, ran the checks listed above, and drafted this description. The commit carries Generated-by: Codex.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文

概述

新增独立的 Rust 评测程序 maka-eval,用于多臂基准评测实验。它在 Rust 产品线上执行实验规格、持久化执行证据,并导出规范结果和实验队列汇总。

关联 #6667。本草稿引入实现;测量兼容性和生产就绪状态仍需完成下列验证。

  • 新增严格的 maka.eval.v1 契约与原生 maka.eval.v2 记录,分别表达生命周期、执行结果、计量状态和清理状态。
  • 通过有界重试和分阶段截止时间调度任务组。使用单写者日志持久化启动意图和尝试状态变化,支持恢复及确定性的结果选择。
  • 新增 Rust Maka Host 和外部 CLI 被测系统适配器,以及锁定版本的 Harbor Python 桥接、中继和出站网络策略。Harbor 继续负责原生试验的执行与验证。
  • 对账回执与代理用量,避免重复计费;保留六项 Token 计数器,恢复经过鉴权的检查点,并导出标准化成本及差分报告。
  • 将 products/eval 注册到 Cargo 工作区,新增集成测试夹具与双语文档,并将 network-policy 纳入 ASF 文件头检查。

验证

变基到 origin/rust-preview 的 4d13347b7 后,以下检查通过:

  • cargo check -p maka-eval --all-targets --locked
  • cargo fmt -p maka-eval -- --check
  • git diff --check origin/rust-preview...HEAD
  • git range-diff 确认变基保留了实现补丁。

原始提交还通过了 node scripts/asf-license-headers.mjs check-staged。变基后尚未执行测试、Python/Harbor 检查或真实基准评测队列。编译通过不能证明运行行为或历史参考实现的兼容性。

转为正式评审前

  • 执行 cargo nextest run -p maka-eval,并验证 Python 桥接及出站网络策略。
  • 验证真实 Rust Maka Host 与 Harbor 执行路径,覆盖取消、结算、清理及恢复证据。
  • 按 feat(eval): rebuild the measurement and control plane in Rust #6667 的要求,将确定性夹具和小规模成对实验队列与冻结的历史参考实现进行比较。

AI 使用

  • 生成式工具未作出实质性贡献
  • 生成式工具作出了实质性贡献

工具及范围:OpenAI Codex 完成了 Cargo 工作区集成和许可证文件头检查覆盖,完成了变基及上述检查,并撰写本说明。提交包含 Generated-by: Codex。

检查清单

  • 测试覆盖改动,且在缺少改动时会失败
  • 格式、类型检查及受影响的测试套件均在本地通过

本 PR 是否改变行为?

  • 是 — 已在上方概述中说明
  • 否

- Execute Maka through its released host composition, public Settings/Session APIs, and composer draft/receipt client without benchmark-specific prompts, tool pruning, or synthetic model overrides.
- Keep the local metering gateway non-mutating and preserve unattended interaction/approval boundaries as explicit settlement outcomes alongside environment limitations.
- Add end-to-end product parity verification (`maka-eval parity`) and require passing parity reports for M3 acceptance and M5 production delivery gates.

Generated-by: Google Antigravity
… identity

- Resolve actual outbound model routes through Maka provider policy before attaching local metering gateway forwarding, and preserve untouched endpoint semantics on the parity reference path.

- Record executed Maka binary digests in settled runtime artifacts and require confirmed runtime binary identity in M3 and M5 milestone gates.

Generated-by: Google Antigravity
@Colafornia

Copy link
Copy Markdown
Member Author

Superseded by the 4-part review stack starting at #6849.

@Colafornia Colafornia closed this Nov 13, 2026
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