Skip to content

feat(eval): settle host usage and per-request pricing - #6849

Merged
M4n5ter merged 1 commit into
apache:rust-previewfrom
Colafornia:feat/eval-1-foundation
Nov 17, 2026
Merged

M4n5ter merged 1 commit into
apache:rust-previewfrom
Colafornia:feat/eval-1-foundation

Conversation

@Colafornia

@Colafornia Colafornia commented Nov 13, 2026 •

Copy link
Copy Markdown
Member
English

Summary

#6938 added single-task Harbor container execution (maka-eval run / guest-run) and collected whole-root Host usage, but only checked that successful model calls reported input and output tokens.

This PR settles Host usage and per-request pricing in maka-eval run and records metering (complete or lower_bound) and costUsd (or meteringError) in run-summary.json.

Multi-task ExperimentSpec parsing, attempt storage, and retry selection are left to the follow-up batch-runner PR so they land with the CLI command that uses them.

Refs #6667.

Changes

  • Settle once per run: maka-eval run settles guest-result.json once, writes metering and costUsd (or meteringError) to run-summary.json first, and reuses that result for exit validation while keeping guest infrastructure failures as the primary error.
  • Price from Host Quotes: Each model attempt is validated and priced through maka-agent-facts (Quote::validate and Quote::estimate) instead of a separate rate table in products/eval. Missing differential cache counts or uncounted failed/aborted calls set metering to lower_bound (costUsd: null) without discarding valid verifier rewards.
  • Fix eval_runner polling race after feat(agent): redesign AX prompts, universal maka:// Read, and human-symmetric Session* tools #6958: Pass onComplete: "none" when polling SessionRead synchronously inside exec so feat(agent): redesign AX prompts, universal maka:// Read, and human-symmetric Session* tools #6958's default notify_caller wakeup does not add an extra parent step, and retire test Hosts on a dedicated thread during Drop.

Verification

Tested on origin/rust-preview (e97e6fd7d):

  • Docker Harbor trial: ran maka-eval run on terminal-bench/log-summary-date-ranges (deepseek/deepseek-flash), finishing with reward: 1.0, 9/9 model calls (87,247 input, 74,496 cache-read, 2,952 output, 432 reasoning tokens), metering: "complete", and costUsd: 0.003907338 matching usage.models.cost.knownUsd.
  • Integration tests: cargo test --locked -p maka-eval and cargo test --locked --workspace --bin maka-eval --test eval_runner (4/4 passed, covering complete pricing, missing-cache downgrade to lower_bound, subagent + 429 retry, max-steps stop, meteringError persistence, and infraFailed reporting).
  • Checks: cargo fmt -p maka-eval -- --check, cargo clippy --locked -p maka-eval --all-targets --no-deps -- -D warnings, RUSTDOCFLAGS="-D warnings" cargo doc --locked -p maka-eval --no-deps, node scripts/asf-license-headers.mjs check, and node --test scripts/ci.test.mjs (18/18).

Did not run full-repo just check locally.

AI use

Select exactly one:

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

Tool(s) and scope: Google Antigravity implemented the usage settlement and integration test updates; OpenAI Codex assisted with review issue localization. The commit retains the Generated-by trailer.

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

概述

#6938 落地了单题 Harbor 容器执行(maka-eval run / guest-run)和 Host 整根目录的用量采集,但当时只检查了成功调用有没有报输入/输出 token,还没有算账单。

这个 PR 在 maka-eval run 里补上 Host 用量结算和逐请求计价,把 metering(complete 或 lower_bound)和 costUsd(账本异常时写 meteringError)写进 run-summary.json。

多题配置 ExperimentSpec、尝试存储和重试选样放到后面的批量运行 PR 里,跟实际调用它们的子命令一起提交。

关联 #6667。

主要改动

  • 单次结算共用结果:maka-eval run 只对 guest-result.json 结算一次,先把 metering 和 costUsd(或 meteringError)写进 run-summary.json,退出校验直接复用同一份结果;容器基础设施报错时仍优先报底层根因。
  • 直接用 Host Quote 计价:不在 products/eval 里另起费率表或重复统计 token,直接调 maka-agent-facts 的 Quote::validate 和 Quote::estimate 按单次请求算钱求和。遇到缺差异化缓存计数、429 报错或半途打断等算不出完整总价的情况,只标为 lower_bound(costUsd: null),保留有效的判分结果。
  • 修复 feat(agent): redesign AX prompts, universal maka:// Read, and human-symmetric Session* tools #6958 后的测试轮询竞态:eval_runner 在 exec 里同步轮询 SessionRead 时显式传 onComplete: "none",避免 feat(agent): redesign AX prompts, universal maka:// Read, and human-symmetric Session* tools #6958 默认开启的 notify_caller 自动唤醒多跑一步;同时把 IsolatedEnv::drop 里的 Host 停机放到独立线程执行。

验证

基于 origin/rust-preview(e97e6fd7d)验证通过:

  • Docker Harbor 单题实跑:用 deepseek/deepseek-flash 跑通 terminal-bench/log-summary-date-ranges,reward: 1.0,9/9 次模型调用(输入 87,247 / 缓存命中 74,496 / 输出 2,952 / 推理 432 tokens),结算为 metering: "complete",costUsd: 0.003907338,与 Host knownUsd 完全一致。
  • 集成测试:cargo test --locked -p maka-eval 与 cargo test --locked --workspace --bin maka-eval --test eval_runner(4/4 通过,覆盖完整计价、缺缓存降级 lower_bound、子会话 + 429 重试、max-steps 停止、缺 token 落盘 meteringError 及 infraFailed 报错)。
  • 静态检查:cargo fmt -p maka-eval -- --check、cargo clippy --locked -p maka-eval --all-targets --no-deps -- -D warnings、RUSTDOCFLAGS="-D warnings" cargo doc --locked -p maka-eval --no-deps、node scripts/asf-license-headers.mjs check、node --test scripts/ci.test.mjs(18/18)。

未在本地跑全仓 just check。

AI 使用

请只勾选一项:

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

工具及范围:Google Antigravity 完成了用量结算实现与集成测试更新;OpenAI Codex 协助定位了评审问题。提交保留 Generated-by 标记。

检查清单

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

本 PR 是否改变行为?

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

@github-actions github-actions Bot added the effort/XXL Over 2500 readable lines label Nov 13, 2026
@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch 3 times, most recently from 6af4c42 to 1cfa874 Compare November 13, 2026 09:34
@Colafornia Colafornia changed the title feat(eval): add experiment contracts, metering gateway, and attempt store feat(eval): add experiment contracts and usage pricing semantics Nov 13, 2026
@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch from 44441d2 to c5577bc Compare November 13, 2026 13:41
@Colafornia
Colafornia marked this pull request as ready for review November 13, 2026 15:07
@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch from 8f9b9db to b00e363 Compare November 14, 2026 06:32
@M4n5ter

M4n5ter commented Nov 14, 2026

Copy link
Copy Markdown
Member
English

Reviewed commit: b00e3631df02232850eeb01210a292e1b946b1f2.

The pure-library boundary is sound: immutable attempt facts, appended recovery evidence, shared adjudication for selection/admission/projection, and centralized token pricing are useful foundations for #6667. Before building the store and runner on this contract, I would address the incorrect retry below, explicitly settle the resampling policy, and simplify the duplicated spec parser.

1. Correctness: a verifier-confirmed subject failure can become retryable infrastructure failure. Please fix before merging.

Location: adjudicate, lines 1190–1224, with the resulting retry admission at can_admit_v2_attempt, lines 1425–1434.

The lower-bound metering gate checks only SubjectOutcome::Completed and returns RetryableInfra before considering VerifierOutcome::SubjectFailed. A normally terminating subject can still be judged a subject failure by the verifier; its execution outcome does not override that measurement.

I reproduced this through serde_json::from_value::<V2AttemptRecord> followed by V2CellAttempt::new. Both records have confirmed cleanup, no required egress audit, present critical artifacts, and the same verifier outcome:

{"kind":"subject_failed","score":0.0,"reason":"subject budget exhausted"}

Both have LowerBound usage with inputTokens=100, outputTokens=20, cacheReadTokens=0, cacheWriteTokens=0, reasoningTokens=0, and totalTokens=120. With an infrastructure retry limit of 3, the observed results are:

subject={"kind":"completed"}; verdict=RetryableInfra { failure_reason: "incomplete lower-bound metering on completed subject" }; retry=true
subject={"kind":"failed","reason":"subject budget exhausted"}; verdict=Selected { status: SubjectFailed, score: Some(0.0), failure_reason: Some("subject budget exhausted") }; retry=false

The first path also projects to v1 infra_failed with score: null. It therefore discards a measured subject failure and permits another sample solely because the subject process completed normally. This conflicts with #6667's rule that measured subject failures retain valid verifier rewards and are not resampled for a better outcome.

Please base metering eligibility on the combined subject/verifier classification, so a verifier-confirmed subject failure receives the same failure policy as the corresponding subject-reported failure. A focused behavior test should retain the failure and its reward and reject retry. The current suite does not exercise VerifierOutcome::SubjectFailed.

2. Measurement policy: a post-hoc billing conflict reopens sampling for an already selected result. This consequence needs an explicit decision.

Locations: MeteringAccumulator::observe, lines 937–978, followed by the lower-bound gate and retry admission.

Starting from a completed, verified zero-score attempt with Complete metering for deepseek-v4-flash, I appended a PostHocRecovery containing Complete metering with exactly the same six counters but model: "other-model". Cleanup remains confirmed and the execution/verifier facts are unchanged. The observed results are:

before conflicting model: Selected { status: Completed, score: Some(0.0), failure_reason: None }; retry=false
after conflicting model: RetryableInfra { failure_reason: "incomplete lower-bound metering on completed subject" }; retry=true

Downgrading conflicting billing evidence to LowerBound and withholding full cost is reasonable. The additional consequence is that the previously selected result loses eligibility, its v1 projected score becomes null, and a new physical execution is permitted. A comment currently describes Gate 3 as “permanent selection, never resampled,” which does not describe this transition.

#6667 allows derived eligibility to change under explicitly versioned rules, so I am flagging a policy gap here rather than claiming that every eligibility change is forbidden. Please decide and document whether a billing conflict only invalidates full cost, or also invalidates the capability result and authorizes resampling. If the latter is intended, record that semantic decision and add a behavior fixture covering selection, v1 score, and retry admission before and after recovery. The existing conflict assertions cover usage/cost but do not pin down these experiment-level consequences. A concise documented rule and fixture are sufficient; this does not require a runtime registry or another state machine.

3. Simplification: the experiment schema's field structure is maintained twice.

Locations: the spec types and serde declarations, lines 71–133, and parse_experiment_spec, lines 183–317.

The typed declarations already describe the nested fields, enum variants, and serde rules. The manual parser separately maintains required/optional field lists, enum strings, value extraction, and reconstruction of the same structures. Adding a field requires keeping both representations aligned.

Please converge on one authority for field shape: let serde handle structural/type/required/unknown-field checks, and keep custom logic for the actual semantic constraints—identifiers, uniqueness, supported schema versions, and numeric compatibility. In particular, preserve the intentional acceptance of integer-valued JSON floats such as 1.0 in the relevant numeric decoder; deriving NonZeroU32 deserialization alone would not preserve that behavior. The simplification is deleting the second handwritten schema representation while retaining the existing contract, without adding a validation framework.

Validation: cargo test --locked -p maka-eval passed all 5 tests. A separate temporary probe reproduced the outputs above against the reviewed commit. The existing tests do not provide direct differential evidence against the frozen TS oracle, so the current green suite should not be treated as complete compatibility proof.

Review prepared and posted by OpenAI Codex at M4n5ter's request.

简体中文

审查提交:b00e3631df02232850eeb01210a292e1b946b1f2。

这个纯库的边界是合理的:原始 attempt 不可变、recovery 追加、选择/准入/投影共用判定入口、Token 计价集中管理,都能作为 #6667 的基础。在 store 和 runner 继续依赖这份契约之前,建议先修复下面的错误重试,明确重新采样的规则,并收掉配置解析里的重复维护。

1. 正确性:verifier 已确认的 subject failure 会被改判成可重试的 infrastructure failure,建议合并前修复。

位置:adjudicate 第 1190–1224 行,以及消费该结果的 can_admit_v2_attempt 第 1425–1434 行。

LowerBound 计量检查只看 SubjectOutcome::Completed,在考虑 VerifierOutcome::SubjectFailed 之前就返回了 RetryableInfra。subject 正常结束,仍然可能被 verifier 明确判为 subject failure;执行状态不能覆盖这个测量结论。

复现走的是 serde_json::from_value::<V2AttemptRecord> 再到 V2CellAttempt::new。两条记录都已确认 cleanup、不要求 egress audit、关键产物齐全,verifier 结果完全相同:

{"kind":"subject_failed","score":0.0,"reason":"subject budget exhausted"}

两者都是 LowerBound 计量,六个 counter 分别为 inputTokens=100、outputTokens=20、cacheReadTokens=0、cacheWriteTokens=0、reasoningTokens=0、totalTokens=120。基础设施重试上限设为 3,实际结果为:

subject={"kind":"completed"}; verdict=RetryableInfra { failure_reason: "incomplete lower-bound metering on completed subject" }; retry=true
subject={"kind":"failed","reason":"subject budget exhausted"}; verdict=Selected { status: SubjectFailed, score: Some(0.0), failure_reason: Some("subject budget exhausted") }; retry=false

第一条路径还会投影成 v1 infra_failed,把 score 清成 null。也就是说,同一个已测得的 subject failure,仅因 subject 进程正常结束,就会丢掉失败结果并开放下一次采样。这与 #6667 对 subject failure 保留有效 verifier reward、不能为了更好结果重采样的要求冲突。

建议根据 subject 和 verifier 的联合分类应用计量 eligibility,让 verifier 确认的 subject failure 与对应的 subject 自报失败遵守同一套规则。补一个验证“保留失败及 reward、禁止重试”的行为用例即可。现有测试没有覆盖 VerifierOutcome::SubjectFailed 分支。

2. 测量策略:事后计量冲突会重新开放已选中结果的采样,这个后果需要明确裁决。

位置:MeteringAccumulator::observe 第 937–978 行,之后进入 LowerBound 判定及重试准入。

从一条已完成、已验证、得分为 0、计量为 Complete 且 model 为 deepseek-v4-flash 的 attempt 开始,追加一条 PostHocRecovery:六个 counter 完全不变,计量仍声称 Complete,只把 model 改成 "other-model"。cleanup 仍已确认,执行与 verifier 事实都没有改变。实际结果为:

before conflicting model: Selected { status: Completed, score: Some(0.0), failure_reason: None }; retry=false
after conflicting model: RetryableInfra { failure_reason: "incomplete lower-bound metering on completed subject" }; retry=true

冲突计量降级为 LowerBound、不再给出可信的完整账单,这个处理合理。但额外的后果是:原先选中的结果失去资格、v1 投影中的分数变成 null,并允许再执行一次实验。当前 Gate 3 的注释写着 “permanent selection, never resampled”,没有反映这条转换。

#6667 允许通过明确版本化的规则改变 derived eligibility,因此这里指出的是策略缺口。请明确:计量冲突只使完整 cost 失效,还是连能力结果一起作废并允许重新采样?如果选择后者,应记录这个语义决策,并用行为 fixture 固定 recovery 前后的结果选择、v1 分数和重试准入。现有冲突断言覆盖了 usage/cost,还没有固定这些实验层面的后果。简短的规则说明和 fixture 就足够,无需增加运行时 registry 或另一套状态机。

3. 简化:实验配置的字段结构维护了两份。

位置:配置类型及 serde 声明,第 71–133 行,以及 parse_experiment_spec 第 183–317 行。

类型声明已经描述了嵌套字段、枚举和 serde 规则,手写 parser 又分别维护 required/optional 字段名单、枚举字符串、值提取和相同结构的拼装。以后新增字段,需要同时维护这两份表示。

建议把字段结构收敛到一个 authority:由 serde 处理结构、类型、必填及未知字段检查;手写逻辑保留 identifier、去重、支持的 schema version 和数值兼容等语义约束。特别要保留当前有意支持的 1.0 这类整数值 JSON 浮点数,将兼容留在对应的数值 decoder;直接使用 NonZeroU32 默认反序列化会改变这个行为。这次简化的目标是删除第二份手写 schema 表示、保留现有契约,无需引入验证框架。

验证:cargo test --locked -p maka-eval 的 5 个测试全部通过;另用独立临时 probe 在该提交上复现了上述输出。现有测试还没有提供与冻结 TS oracle 的直接差分证据,因此当前全绿不能视为完整的兼容性证明。

本评论由 OpenAI Codex 按 M4n5ter 的要求整理并发布。

@Colafornia
Colafornia marked this pull request as draft November 15, 2026 10:46
@Colafornia

Copy link
Copy Markdown
Member Author

Quick status update: I'm keeping this PR in draft for now while #6938 lands the single-trial Harbor container + native Rust Host execution and metering loop first.

Once #6938 merges, I'll rebase this branch onto products/eval, finalize the fixes for the three review items above (verifier-confirmed subject failure retry, post-hoc billing conflict policy, and single-authority spec parsing) along with direct TS-oracle differential checks, and ping for re-review.


简短同步一下状态:当前先推进 #6938 落地单题 Harbor 容器执行与原生 Rust Host 计量闭环,本 PR 暂保持 Draft。等 #6938 合入后,我会基于 products/eval 完成 rebase,把上面指出的三项问题连同冻结 TS oracle 的直接差分验证一并收口后再请求复审。

Posted via Google Antigravity on behalf of @Colafornia.

@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch from 571caa5 to 2c30dd6 Compare November 16, 2026 14:13
@Colafornia Colafornia changed the title feat(eval): add experiment contracts and usage pricing semantics feat(eval): add experiment contracts, trial adjudication, and usage pricing Nov 16, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one P2 in the new fixture at 2c30dd6c1b27bcd8653e06d2239744acf53feb5c: it fails the repository's JSON formatting gate.

The original tooling job 133414387588 checked merge commit bc2b2c6c6aa981bf2da4888f91cd3a779c37c327. biome format . reports exactly one file, products/eval/tests/fixtures/ts_oracle_85a1031c.json, and exits 1. I verified that this new file is absent from the current target and byte-identical between the PR head and the tested merge. This establishes the cause of this formatting failure; it does not attribute the other failing CI jobs to this PR.

This is a scoped CI follow-up. I have not completed the 11-file contract review or run the Rust differential tests, Docker benchmarks or formatter locally.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@@ -0,0 +1,117 @@
{
"oracleCommit": "85a1031c10d104456127f35aac1523b9ffb1a384",
"sourceSha256": {"packages/core/src/canonical-json.ts":"5673a6591307487542d403c912e2d8013a29c414affa92c64573d51177420dfd","packages/core/src/tool-args-identity.ts":"466b1c114f0127c40273882e2c60cf1f6238161cad062ebdc62b26017a4b2313","packages/eval/src/spec.ts":"4550765b909ca74932dfcb5ceb0bc330ada665ef33bb48feb63a010e4a71022e","packages/eval/src/experiment.ts":"0d458ae56688feda440bf31d53e772be36d797aecb1c94410217a0d0c91d05e0","packages/eval/src/result.ts":"c0f0ef26221282b80e936c5e24a95e8e16e6dfc11589f8da3b1e09f0edfe9400","packages/eval/src/attempt-store.ts":"f03aae0e6f2a109af02945f2b7df885c94a10cbb6cada7988113aa4708c51ccd","packages/eval/src/provider-metering.ts":"724e4abee7d5552eec7c43cb741e93983d711a595fc03dfa16241b288f36a4b5","packages/eval/src/runner.ts":"ef6a29d7141d1e0d1fe3f2dbc968b7a953f837ae2622f674ac9b3820086bd687","packages/eval/src/egress-audit.ts":"ec0b815955ec76b082862100f2ef086524d89231264ee93c6f6bb2e3afeb1bac"},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Make the frozen oracle fixture pass the formatting gate

The compact JSON here is rejected by the repository's biome format . check: tooling job 133414387588 reports this file as its only formatting error and exits 1. The tested merge contains exactly these bytes. Please make the checked-in representation compatible with the formatting policy while preserving the oracle values and source hashes; otherwise the PR's tooling check remains red.

@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch from 2c30dd6 to 8f8d570 Compare November 17, 2026 02:04
@Colafornia Colafornia changed the title feat(eval): add experiment contracts, trial adjudication, and usage pricing feat(eval): settle host usage and per-request pricing Nov 17, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My previous formatting finding no longer applies at 8f8d570e31e23835efb454d8c01b27e61419907c. I fetched this head and verified that products/eval/tests/fixtures/ts_oracle_85a1031c.json, the compact JSON fixture that caused the earlier Biome failure, has been removed along with the old contract-oracle implementation. I withdraw that specific P2 finding for this head. This is not a claim that the new CI has completed successfully.

The PR has been substantially rewritten and now changes eight files for Host usage settlement, per-request pricing, and GuestRunResult decoding. I checked the removal and the decoding change, but have not completed a review of the new accounting implementation or run its Rust and live Harbor tests. In particular, the newly described arbitrary_precision fix still needs execution evidence; the failures previously observed on other heads do not establish whether this version fixes them.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch from 8f8d570 to f099ecb Compare November 17, 2026 03:36
@github-actions github-actions Bot added effort/M Under 500 readable lines and removed effort/XXL Over 2500 readable lines labels Nov 17, 2026
@Colafornia
Colafornia force-pushed the feat/eval-1-foundation branch from f099ecb to 617b3ff Compare November 17, 2026 06:21
@Colafornia
Colafornia marked this pull request as ready for review November 17, 2026 06:54
@Colafornia

Colafornia commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

@M4n5ter Ready for another look (617b3ffa3).

Since #6938 already landed single-task container execution and Host usage collection, we stripped out all the un-wired batch schemas and duplicate rate tables, keeping this PR focused on maka-eval run itself (5 files):

  • maka-eval run now settles Host usage and per-request Quote pricing once and writes metering (complete / lower_bound) and costUsd into run-summary.json.
  • On your earlier point 2: incomplete usage (such as missing cache splits or uncounted failed/aborted calls) now only drops costUsd to null (lower_bound) and keeps the verifier reward intact.
  • On points 1 and 3: ExperimentSpec parsing and cell selection / retry rules were removed from here; we'll bring them back in the batch-runner PR together with the CLI command and store that actually call them.

@M4n5ter 这边改完了(617b3ffa3),麻烦再看下。

#6938 把单题容器执行和 Host 用量采集跑通之后,我们把之前这版里还没接上入口的批量配置 schema 和重复费率表全删了,只留 maka-eval run 当前真正在跑的部分(共 5 个文件):

  • maka-eval run 现在直接用 Host 记录里的 Quote 做一次用量结算,把 metering(complete / lower_bound)和 costUsd 写进 run-summary.json。
  • 对应之前提的第 2 点:像缺缓存拆分、429 报错或中途打断这种算不出完整账单的情况,现在只把 costUsd 置为 null(标为 lower_bound),保留有效的判分结果。
  • 之前提的第 1、3 点(ExperimentSpec 单一 serde 解析、SubjectFailed 保留分数且不重试):这次先从本 PR 拿掉了,等下个 PR 做批量子命令和尝试存储时连着真实调用方一起交,免得先合一堆没人调的空结构。

Posted via Google Antigravity on behalf of @Colafornia.

@Colafornia
Colafornia requested a review from M4n5ter November 17, 2026 07:18
Settle whole-root Host usage once per `maka-eval run` via upstream
`Quote::validate` and `Quote::estimate`, model `UsageSettlement` as
`Complete { cost_usd } | LowerBound`, downgrade missing differential
cache splits or uncounted calls to `lower_bound` (`costUsd: null`)
without discarding valid trial rewards, and persist `metering` /
`costUsd` (or `meteringError`) in `run-summary.json`. Also pass
`onComplete: "none"` when polling `SessionRead` synchronously in
`eval_runner` and exercise missing cache splits through the mock SSE
stream rather than mutating settled artifacts.

Refs apache#6667.

Generated-by: Maka (Antigravity / Gemini)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants