Skip to content

measurement schema 增 run_kind / decode-determinism provenance 欄位(follow-up from #109 verify) - #119

Merged
kiki830621 merged 1 commit into
mainfrom
idd/111-measurement-schema-run-kind-decode-deter
Jul 30, 2026
Merged

measurement schema 增 run_kind / decode-determinism provenance 欄位(follow-up from #109 verify)#119
kiki830621 merged 1 commit into
mainfrom
idd/111-measurement-schema-run-kind-decode-deter

Conversation

@kiki830621

Copy link
Copy Markdown
Member

Refs #111

Summary

Add two optional provenance fields to the measurement schema (MeasurementRow + SubmissionRow), mirroring the existing hf_revision precedent (optional, nil-default, snake_case CodingKeys, synthesized-Codable free backward-compat):

  • run_kind (String?, release-sweep|adhoc|nil) — distinguishes release-sweep full-matrix snapshot rows from ad-hoc submissions so per-version snapshot census completeness is mechanically checkable. New bestasr benchmark --run-kind flag; release-sweep.sh passes release-sweep.
  • decode_deterministic (Bool?) — HONEST tri-state: true/false only for backends that consume --decode-deterministic (WhisperKit/whisper.cpp, gated via ModelGrid.backendWhisperKit/WhisperCpp); nil for mlx-audio (silent no-op) and legacy rows. Never claims a value for a backend that ignored the flag.

Re-scoped from Spectra → Plan per user decision (#111 Re-scope comment). The determinism representation upgrade (Bool?+nil vs per-backend enum) is deferred to #118.

bestASR-bench synced separately (direct-commit to bench main, commit e728f1a): validator gains optional-when-present checks (fields kept OUT of REQUIRED so existing 156 rows pass); SUBMISSION_FORMAT.md documents both.

Verification

  • swift build clean; 5 new backward-compat tests (legacy decode→nil, round-trip, nil-encodes-absent, packager threads provenance) + full suite 389 green, none skipped.
  • bench validator TDD: crafted invalid run_kind/decode_deterministic rejected; 156 legacy rows still OK; valid new-fields rows pass.

Checklist


Generated by /idd-implement on PR path. Do NOT add a GitHub close trailer — IDD discipline requires manual /idd-close after merge.

#111)

Add two optional provenance fields to MeasurementRow + SubmissionRow, mirroring
the hf_revision precedent (optional, nil-default, snake_case CodingKeys,
synthesized-Codable free backward-compat — legacy rows decode to nil):

- run_kind (String?, release-sweep|adhoc|nil): distinguishes release-sweep's
  full-matrix snapshot rows from ad-hoc submissions so per-version snapshot
  census completeness is mechanically checkable. Threaded via a new
  'bestasr benchmark --run-kind' flag; release-sweep.sh passes release-sweep.
- decode_deterministic (Bool?): HONEST tri-state — true/false only for backends
  that consume --decode-deterministic (WhisperKit / whisper.cpp, gated via
  ModelGrid.backendWhisperKit/WhisperCpp); nil for mlx-audio (silent no-op) and
  legacy rows. Never claims a value for a backend that ignored the flag. The
  representation-upgrade decision (Bool?+nil vs per-backend enum) is #118.

The legacy flat-cache migration path (BenchmarkStore) has no run-kind/decode
info in scope and passes nil/nil (legacy-safe). 5 new backward-compat tests;
full suite (389) green.

Refs #111
@kiki830621

Copy link
Copy Markdown
Member Author

Verify Report — PR #119 (#111)

Engine

manual fan-out (4 lens Agents + sequenced DA, model: opus, file-based output) + Codex (gpt-5.x) — Codex leg incomplete(HTTP 429 usage_limit_reached,同 #112 verify 的 ChatGPT Pro plan limit,reset ~5.4 天)。跨模型盲驗本輪缺席,fail-closed INFO,不當 PASS 計。5 個 Claude reviewer(4 lens + DA)完整。

Aggregate

PASS — 0 blocking, 1 follow-up filed (#120)。

#111(re-scoped Spectra→Plan)verifiably complete。4 lens 全 PASS/APPROVE,DA 認真攻擊後無法推翻核心 PASS,並以 standalone swift snippet 實證兩個最高風險主張。

要求覆蓋率

5 / 5 requirements addressed — FULLY(+ 跨 repo contract exact match)。

Findings(合併後)

# Severity Finding Source Action
1 PASS run_kind (String?) + decode_deterministic (Bool?) 加至 MeasurementRow + SubmissionRow,snake_case CodingKeys、threaded 建構點 + denormalization、--run-kind CLI + release-sweep.sh(dry-run + real 兩處 literal) agents:requirements
2 PASS backward-compat:synthesized Codable decodeIfPresent(自訂 init 不抑制 init(from:) 合成)→ legacy row decode 成 nil;bench 156 rows 無新欄位仍過(不在 REQUIRED)。DA 以 standalone swift snippet 實證 agents:logic+regression+devils-advocate
3 PASS nil-encodes-as-ABSENT 非 null(跨 repo load-bearing):encodeIfPresent 省略 nil key,bench validator 永不會收到 run_kind: null(若收到會拒,因 null ∉ enum)。DA snippet 實證 {"model_id":"m"} 無 key 無 null agents:logic+devils-advocate
4 PASS honest decode_deterministic gate 邏輯正確:DA 窮舉 grep 確認 deterministicDecode 恰被 WhisperKitEngine + WhisperCppEngine 讀取(其餘 3 engine 零引用),gate whitelist [backendWhisperKit, backendWhisperCpp] 與 BackendID rawValue byte-identical;mlx-audio 記 nil 不說謊。type-correct(record.backend 為 String) agents:requirements+logic+security+devils-advocate
5 PASS 無 scope creep:commit 521ce54 恰 7 檔(欄位 + 3 threading + CLI + release-sweep + 1 test);無 determinism enum(→#118);IDD tooling state(.gitignore/tree-lock/state)刻意未 commit、亦不入 PR(uncommitted) agents:regression
6 PASS security:run_kind/decode_deterministic 未 render 進 leaderboard markdown;CLI 任意字串經 JSONEncoder escape 無法偽造 JSONL row;release-sweep.sh 用 hardcoded literal 非 interpolation;dedupeKey 正確排除 provenance 欄位 agents:security
7 MEDIUM honest gate 未被單元測試(inline 在 benchmark loop、不跑真 backend 測不到)——「never lie」不變式定義 #111,值得抽 pure helper + 測 4 backend case。gate 邏輯已證正確,缺的是防未來 regression 的護欄 agents:regression Follow-up → #120
8 LOW CLI --run-kind 無 client 端驗證(任意字串 verbatim 進 local store,只 bench CI enum gate 擋)——--run-kind typo 產生 submit 時才被拒的 row。5 方收斂 agents:requirements+security+logic+regression+devils-advocate Follow-up → #120
9 LOW DA-1:validator 拒 run_kind: null 但收 decode_deterministic: null——run_kind backward-compat 完全靠 encoder 省略 nil(零容忍),對未來 encoder 變更/手寫 row 脆。fix:validator 容忍 run_kind: null 視同 absent agents:devils-advocate Follow-up → #120
10 LOW logic O1:docstring 提 adhoc 但無 code 寫該字面(ad-hoc 走 nil = 同 legacy 不可區分)。doc nuance,census 只在意 release-sweep presence,不影響功能 agents:logic Noted
11 INFO cross-model(gpt-5.x)盲驗本輪缺席(Codex 429)——ensemble 降為 5-AI 單模型家族 codex Process Gap

Scope Check

無超出 #111(re-scoped Plan)範圍。determinism 表示法 enum 正確拆至 #118;hardening 護欄拆至 #120

Process Gaps

Follow-up Findings Filed (v2.72.0+ #148)

紀律聲明

#111 通過驗證,可 merge PR #119/idd-close #111。bench 端已 direct-commit push(e728f1a)。#118(determinism 表示法)、#120(provenance 護欄)為非阻擋 follow-up。

@kiki830621
kiki830621 merged commit 6dc3efa into main Jul 30, 2026
1 check passed
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