Skip to content

feat(eval): add Harbor trial environment, experiment runner, and canonical reporting - #6850

Closed
Colafornia wants to merge 2 commits into
apache:rust-previewfrom
Colafornia:feat/eval-2-harbor-runner
Closed

Colafornia wants to merge 2 commits into
apache:rust-previewfrom
Colafornia:feat/eval-2-harbor-runner

Conversation

@Colafornia

@Colafornia Colafornia commented Nov 13, 2026 •

Copy link
Copy Markdown
Member
English

Summary

Multi-arm evaluation must isolate trial execution inside Harbor while keeping task-group scheduling, deadline enforcement, crash recovery, and result projection under maka-eval authority. This PR adds the Harbor trial environment bridge, egress proxy policy, external CLI subject adapter, experiment runner, and canonical reporting modules.

Refs #6667. Builds on #6849 (until it merges, review commit 9d32e6037 for this layer alone).

# Layer Links
1 Contracts, metering gateway, and attempt store #6849
2 Harbor trial environment, runner, and reporting #6850 (this PR) · diff
3 Native Maka Host subject and CLI entrypoint #6852 · diff
4 Product parity and binary identity gates #6853 · diff
  • environment & harbor: Bridge per-attempt trials to a version-pinned Harbor Python runner via an authenticated loopback TCP relay, serialize shared preparation locks, propagate cancellation, and enforce DNS/IP egress filtering.
  • subject::external_cli: Run external CLI harnesses with explicit credential mappings and decode exit-code or protocol-v1 (MAKA-EVAL-RESULT-V1) frames while rejecting duplicate or ambiguous frames.
  • runner: Enforce maxConcurrentTaskGroups, bounded infra_failed retries, and pre-dispatch crash recovery that blocks automatic re-runs when prior cleanup remains unconfirmed.
  • report & license check: Project committed journals deterministically to v1/v2, compute paired cohort summaries, evaluate the 3-verdict differential oracle, and register network-policy in scripts/asf-license-headers.mjs.

Verification

Validated at 9d32e6037:

  • cargo test --locked -p maka-eval — 15 passed (2 unit tests and 13 integration tests, adding coverage for all 5 semantic difference scenarios and the 3-verdict oracle, crash and post-hoc recovery, preparation cache locking, result-frame ambiguity rejection, Harbor loopback handshake, unconfirmed cleanup blocking, and cancellation).
  • cargo clippy --locked -p maka-eval --all-targets -- -D warnings — passed.
  • RUSTDOCFLAGS="-D warnings" cargo doc --locked -p maka-eval --no-deps — passed.
  • node scripts/asf-license-headers.mjs check and git diff --check — passed.

Live Docker container trials, egress proxy container builds, frozen legacy oracle cohorts, and full just check were not run.

AI use

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

Tool(s) and scope: OpenAI Codex authored the Harbor bridge, egress filter, runner, external CLI adapter, and reporting modules. Google Antigravity split the review stack and ran the verification checks above. Both Generated-by trailers are preserved.

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
中文

概述

多臂评测需要把单次试验隔离在 Harbor 中运行,同时由 maka-eval 统一掌握任务组调度、截止时间、崩溃恢复与结果投影权威。本 PR 新增 Harbor 试验环境桥接、出站代理策略、外部 CLI 被测适配器、实验编排器与规范报告模块。

关联 #6667。基于 #6849(合入前可直接查看提交 9d32e6037 以仅审阅本层改动)。

# 分层职责 链接
1 实验契约、计量网关与尝试存储 #6849
2 Harbor 试验环境、编排器与规范报告 #6850(本 PR) · 增量对比
3 原生 Maka Host 适配器与 CLI 入口 #6852 · 增量对比
4 产品等价性校验与二进制身份门禁 #6853 · 增量对比
  • environment 与 harbor:通过鉴权的回环 TCP 中继桥接锁定版本的 Harbor Python 执行器,串行化共享预备锁,传递取消信号并实施 DNS/IP 出站过滤。
  • subject::external_cli:按显式凭据映射运行外部 CLI,解析 exit-code 或 protocol-v1(MAKA-EVAL-RESULT-V1)结果帧并拒绝重复歧义帧。
  • runner:实施 maxConcurrentTaskGroups 并发准入、有界 infra_failed 重试及派发前崩溃恢复,在历史清理未确认时跨运行阻断重跑。
  • report 与许可证检查:从已提交日志确定性导出 v1/v2 结果与成对队列汇总,实现三项裁决差分比对,并将 network-policy 纳入 scripts/asf-license-headers.mjs。

验证

在提交 9d32e6037 上验证:

  • cargo test --locked -p maka-eval — 15 项通过(2 项单测与 13 项集成测试,新增五类语义差异与差分裁决、日志崩溃与事后恢复、预备缓存锁、结果帧歧义拒绝、Harbor 回环握手、未确认清理阻断及取消信号测试)。
  • cargo clippy --locked -p maka-eval --all-targets -- -D warnings — 通过。
  • RUSTDOCFLAGS="-D warnings" cargo doc --locked -p maka-eval --no-deps — 通过。
  • node scripts/asf-license-headers.mjs check 与 git diff --check — 通过。

未运行真实 Docker 容器试验、出站代理镜像构建、历史参考实现队列比对及完整 just check。

AI 使用

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

工具及范围:OpenAI Codex 编写 Harbor 桥接、出站过滤、编排器、外部 CLI 适配器与报告模块;Google Antigravity 切分评审栈并执行上述验证。提交保留两个工具的 Generated-by 标记。

检查清单

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

本 PR 是否改变行为?

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

…tore

Add the maka-eval foundation modules:
- strict maka.eval.v1 projection and native maka.eval.v2 orthogonal attempt contracts, condition-only RunFingerprint, and semantic difference registry
- exact 6-counter token accounting, non-mutating local metering gateway, admission cutoffs, HMAC-authenticated checkpoints, and receipt-vs-proxy reconciliation
- single-writer append-only attempt journal, SQLite runtime artifact capture, critical artifact verification, and deterministic state reconstruction

Generated-by: Codex
Generated-by: Google Antigravity
…nical reporting

Add execution orchestration, Harbor isolation, and deterministic projections:
- version-pinned Harbor / Pier trial environment bridge, loopback TCP + HMAC relay agent, and DNS/IP egress filtering proxy
- task-group admission concurrency, shared preparation cache lock, phase-scoped deadlines, bounded retries, and crash recovery
- external CLI subject adapter (exit-code and protocol-v1 result frames) and canonical v1/v2 journal projections with 3-verdict differential oracle evaluation

Generated-by: Codex
Generated-by: Google Antigravity
@Colafornia

Copy link
Copy Markdown
Member Author

Parked until the preceding layer merges into rust-preview so each PR shows a single-layer diff; will reopen sequentially.

@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