Repository navigation
bench: preserve complete serving evidence and offline summaries - #131
Conversation
Retain planned, attempted, failed and incomplete requests and recompute saved rounds without inference. Changed lines: 886 authored code/test lines and 100 documentation lines (986 total additions + deletions). No third-party source copied.
hsliuustc0106
left a comment
There was a problem hiding this comment.
Independent review: PR #131 "bench: preserve complete serving evidence and offline summaries"
- Base:
origin/main@4a79980d8a75fd063cb3f8247e06215e288b18ac(merge-base equals base; PR is current with main, no drift) - Head:
refs/remotes/remote-pr/131@4b9cccbde841272ff5ace6aee3cf51610fe1324f, branchcodex/decision-latency-evidence, authorlinear3735, OPEN/DRAFT. Remote head rechecked viagit ls-remoteimmediately before this report: unchanged at4b9cccbd. - Review provenance: skill
.agents/skills/system1-omni-review/SKILL.mdread from the local repo working tree (HEADca5f69b5c104ff2ed0c64ed2f195b49bec92e32c, which is ahead oforigin/main); SHA-256 of bytes actually read =58be3bc60806c4c5af7038a0c6a80fadb94f3360d714556a3e965c8903dde108, matching the pinned value formain@4a79980. References read and verified byte-identical (SHA-256) betweenmain@4a79980and the working tree:docs/architecture.md,CONTRIBUTING.md,.agents/skills/system1-omni-review/references/repository-contracts.md,.agents/skills/self-review/SKILL.md(committed-artifact-hygiene section). This is a first review of the complete PR. Per the skill, the PR's edit-free status of review instructions is noted; the PR does not touch.agents/.
Verdict
No P0/P1/P2 findings. 2 P3 findings and 4 notes. The PR is tooling + docs + tests only; it adds no committed run output or generated artifacts (the headline "preserve complete serving evidence" is implemented as run-time persistence in the output directory with checksums, not as repo commits — the correct direction per the artifact-hygiene contract).
Findings
P3-1 — Hard-kill window leaves a fully-flushed record unrecoverable by summarize_saved
- File:
benchmarks/bench.py:315-327(worker), validated atbenchmarks/bench.py:545("completed IDs do not match saved responses"). - Trigger: the process is killed between
responses.write(line)+ hash update +state["responses_sha256"]update (line 320-323) and the subsequentstate["completed_ids"].append(...)+save_state()(line 324-327). The response record for that request is flushed and its checksum is persisted, butcompleted_idsdoes not contain the ID. - Consequence: a later
bench.py summary <dir>(and the in-run()recomputation of any resumed flow) rejects the entire run withValueError("completed IDs do not match saved responses")even though the raw evidence for that request is internally consistent and complete. The conservative direction is correct (no invented evidence; rawresponses.jsonlremains for manual offline scoring, as the README states), but the README's recovery promise ("After a hard kill, a valid start snapshot can distinguish unattempted IDs from attempted IDs without completed records") does not cover this mirror case: a completed record not yet claimed incompleted_ids. - Evidence: code path read at head (worker sequence above;
summarize_savedbuildscompleted_idsfrom records and requires set equality withids["completed_ids"]); verified by inspection, not by a kill-injection test. Suggested fix: accept records whose ID is attempted-but-not-claimed as additional completed evidence (they carry their own checksum), or document the rejection explicitly.
P3-2 — warmup.json readiness evidence is not covered by any persisted checksum
- File:
benchmarks/bench.py:424-445(warmup loop and writes),benchmarks/bench.py:270-284(measurement_state). - Trigger: post-hoc edit of
warmup.jsonin a saved run directory. - Consequence:
summarize_savedpinsrequests.jsonl,config.json,warmup-requests.jsonlandresponses.jsonlvia SHA-256 incompletion.json, but never validateswarmup.json. Readiness/first-inference evidence — the artifact that establishes "warmup failure stops the run" and the cold/warm boundary story — can be rewritten without detection, while every measured artifact is tamper-evident. Practical risk is low (warmup is excluded from load timing and the tool's hashes are explicitly "not authenticity"), but the PR's stated purpose is preserving serving evidence; the one saved file holding the warm boundary is the one not pinned. - Evidence:
measurement_statefields enumerated at head lines 270-284;summarize_saved(lines 465-560) readscompletion.json,config.json,requests.jsonl,warmup-requests.jsonl,responses.jsonlonly — nowarmup.jsonreference. Suggested fix: record awarmup_sha256(when warmup ran) incompletion.json.
Notes (not findings)
bench.py summaryon pre-PR saved runs fails withKeyError: 'latency_basis'surfaced aserror: 'latency_basis'— terse but conservative, andbenchmarks/README.mddocuments that older runs "remain usable bycompare" only. No action required.- An interrupted run's
summary.jsonstill carries non-nullrequests_per_second/decisions_per_second(computed over the partial measured wall). Not silent:stop_reasonandevidence_complete: falsesit in the same object and the README states interrupted runs "provide partial observations with explicit coverage, not complete traversals". Consumers must quote those flags. - PR-description provenance discrepancy: "Default Ruff reports nine diagnostics" does not reproduce —
ruff check(0.15.2, default rules, no repo config) reports zero on both changed Python files at head. The pinned selective check (--select E4,E7,E9,F) does pass, as claimed. - The strict
typeecho requirement on every answer (benchmarks/bench.py:105-108) is a client-side wire-contract tightening. Verified it matches the actual serving stack: Cua-S1 native emits"type": "choice"(src/models/cua_s1/native/src/contract.rs:181), Open-Jev native emits"type": "noul"/"score"(src/models/open_jev/native/src/contract.rs:244,277), Laya native emits"type": question.kind(src/models/laya/src/decision.rs:111). External endpoints (e.g. vllm-jev) that omit the field will now count every request asinvalid_response— visible, not winner-producing, and documented inbenchmarks/README.md:73-82.
Evidence-completeness review (focus areas)
- Raw vs summarized / denominators / errors: preserved and strengthened.
responses.jsonlkeeps the original response text, its SHA-256, HTTP status, validation result and latency per request;summary.jsonadds planned/attempted/unattempted/incomplete/failed counts for both requests and decisions with the invariantsplanned = attempted + unattemptedandattempted = successful + failed + incomplete(benchmarks/bench.py:171-219), plus separate failed-latency p50/p95. Failures are excluded from success quality with denominators retained (quality(), count fields); an empty-error transport failure is still counted (regression test included). The priorzip(cases, records)mis-pairing risk inquality()is fixed by ID join. - No silent aggregation / winner production:
comparenow accepts different completion orders but still requires exact unique manifest coverage from both sides andfailed == 0to pass; tolerances remain caller-supplied required arguments, unchanged — nothing relaxed. Interrupted runs cannot be compared (coverage rejection) and cannot exit 0 (run()returns 1 unlessevidence_complete). The warmup-failure path saves evidence that all measured requests are unattempted (verified by test). - Measurement-scope honesty:
latency_basis=post_to_body_json_and_schema_validationis stamped into config and summary; a regression test proves body decode and validation are inside the clock. Warmup is saved separately and excluded; README states client warmup "is not a measurement of server process startup, model loading or service-internal warmup" and that client cancellation "does not prove the server stopped processing"; throughput denominators and the reorder/save exclusion from measured wall are documented. - Determinism/reproducibility of offline summaries:
summarize_savedrecomputes from saved inputs only, rejects checksum disagreement, duplicate/unknown/unattempted IDs, raw-vs-normalized disagreement, and invented timing (wall_secondsnull without a terminal boundary). Decoded-text contract (BOM rejected, U+FFFD accepted iff the saved text is valid JSON) is implemented identically online and offline and covered by a regression test. I reproduced equivalence on a hand-built 302-record (see commands). - Numerical claim hygiene: no tolerance or budget changes;
WIRE_DECIMALS/sum_allowanceuntouched; PR body labels its H800 table "different-deployment observations, not same-model speedup" and reports correctness per round. Author-reported measurements are unverified here (no GPU on this host); no benchmark outputs were committed in this PR, consistent with "raw artifacts not attached pending redistribution permission" in the PR description.
Changed-file inventory
| File | +/− | Classification |
|---|---|---|
benchmarks/README.md |
+92/−8 | documentation (not in mkdocs nav; site links unaffected) |
benchmarks/bench.py |
+349/−33 | authored code |
tests/benchmarks/test_bench.py |
+502/−2 | authored tests |
- Total diff: 943 additions + 43 deletions = 986 lines. Authored code count per
CONTRIBUTING.md(source + tests, excluding docs): 886 — below the 3,000-line threshold; extra large-change requirements not triggered. - No binary files, no generated run output, no fixture dumps added. Pre-existing committed artifacts under
benchmarks/gdn/artifacts/20261003/are untouched by this PR (out of scope, but relevant context for any future hygiene sweep).
Commands run and results
Personally run (this reviewer, on a git archive export of head 4b9cccbd under /tmp/pr-review-2026-10-10/head-checkout; no repo modification, no Rust toolchain invoked, no GPU):
python -m unittest discover -s tests/benchmarks -p 'test_*.py' -v(miniconda Python 3.x + httpx 0.28.1): 22/22 tests OK (17 new/extended in this PR: persistence/recompute, cancel, warmup-failure, independent warmup, latency-clock, type-validation cases).python benchmarks/bench.py validate benchmarks/smoke.jsonl: "Validated 4 requests; SHA256 43228534...b2691" — manifest unchanged by the PR and still valid.python -m mkdocs build --strictat head: success (only a pre-existing INFO fordocs/benchmarks/cua-s1-cuda-graphs/README.mdnot in nav; that page exists identically atorigin/main). This closes the author's "MkDocs was unavailable" gap for the changed tree.ruff check --isolated --no-cache --select E4,E7,E9,F benchmarks/bench.py tests/benchmarks/test_bench.py: pass (matches author claim). Default-rule run: pass, 0 diagnostics (does not match the author's "nine diagnostics" note).- Ad-hoc 302-redirect probe through
request_one+summarize_saved: onlineerror_kind=http_302(httpx 0.28.1raise_for_statusraises on 3xx) and offline recompute agrees — no online/offline asymmetry in the saved-record validation. git diff <merge-base> head | shasum -a 256=5c426eea5b4e4b55aac4bee8106b7e84601fae7f84e1ac29aa0e81007861bf70— matches the frozen diff SHA-256 declared in the PR body.
Author-reported (not independently verifiable here): six saved H800 rounds (Open-Jev-9B/27B × 3 traversals, 231/231 successful each, p50/p95 table), "six saved-round summaries exited 0", JevBench input provenance, Codex/Kimi static-review PASSes.
Observed CI: see below — none.
CI observed
gh pr checks 131 --repo ThinkFlowLab/system1-omni→ "no checks reported on the 'codex/decision-latency-evidence' branch" (exit 1; retried after one transient network failure on a subsequent call).gh api .../commits/4b9cccbd.../check-runs→total_count: 0;gh run list --commit 4b9cccbd...→ empty.- Repo-wide
gh run list: recent CI/Docs runs on other branches are stuck inqueuedfor 10+ hours (workflow_dispatch), so the runner fleet appears unavailable;pull_requestworkflows for this head never started. - Both workflows at head (
ci.yml,docs.yml) do trigger onpull_requesttomain, so the absence is environmental, not a config error. CI result for this head: no checks reported — an evidence gap, not a pass. The Rust job is irrelevant to this diff (no Rust files changed), and I re-ran its applicable non-Rust equivalents locally above.
Material unverified checks
- Any GPU/H800 serving evidence (all author-reported; not re-runnable here): throughput/latency table, 231/231 success claims, quality 179/231 and 198/231.
- Raw saved-round artifacts from the six measured traversals — intentionally not attached (redistribution permission pending); only the PR's summary numbers exist as evidence.
- The six "saved-round summaries exited 0" invocations of the new
summarycommand — command and result author-reported. - CI on the head SHA — never executed (0 check-runs; runners queued repo-wide).
Cargofmt/clippy/test/build — not applicable to this diff (no Rust changes) and prohibited on this host regardless; not run.- Kill-injection durability of the new persistence path beyond what unit tests simulate (my P3-1 window is code-inspected, not fault-injected).
No approval or completed validation is implied. The PR remains draft with the contributor self-review checkboxes unchecked, which matches its current evidence state.
Document rejection of torn snapshots and add the latency leaderboard. Preserve historical runs for replay with their original collector. Changed lines (additions plus deletions): 16 source, 72 tests, 95 documentation.
hsliuustc0106
left a comment
There was a problem hiding this comment.
Incremental re-review at new head 7ac2b11b57: one new commit since my review at 4b9cccbde8 — "bench: verify warmup evidence and keep invalid responses isolated" (4 files, +171/−12).
Both findings from my review are addressed, verified in the diff:
- Warmup evidence checksum (my P3-2) — fixed:
measurement_statenow recordswarmup_sha256(safe: it only runs afterwarmup.jsonis written — checked both the replay and warmup-failure paths), andsummarize_savedrejects a missing checksum (with an explicit "use the collector that produced this run" error for pre-change runs) or a mismatched file. Tests cover missing-key, deleted-file, and tamper inclusion ofwarmup.json. - Hard-kill mirror case (my P3-1) — addressed: a new test pins that the crash-window outcome (checksum-consistent
responses.jsonlbut shortercompleted_ids) is rejected loudly ("completed IDs") with raw evidence retained — the conservative behavior the README should now be read as promising. - New hardening beyond my findings:
number()now catchesOverflowError, so a huge integer probability (10**400is valid JSON) becomes aninvalid_responsefailure with the raw response and its SHA-256 preserved instead of crashing the collector; test-pinned. The newlatency-leaderboard.mdfollows the measurement-scope rules: pinned revisions/dataset SHA-256, clock boundaries stated, denominators preserved.
Personally run at this head: python -m unittest discover -s tests/benchmarks → 25 tests OK (weight-free). No CI has reported on this head. Verdict: COMMENTED (draft; zero actionable findings at this head).
|
Independent re-review at
|
hsliuustc0106
left a comment
There was a problem hiding this comment.
Incremental re-check at new head 0a55fce06: one new commit since my review at 7ac2b11b57 — "docs: clarify pooled latency and dataset hash provenance" (2 files, docs-only); both reviewed commits are patch-identical (git range-diff, named refs, cat-file verified). The commit is reviewed and clean: it documents the pooled-percentile methodology exactly per the repo's measurement-honesty rules (per-round validation first, pool only like-configured rounds, concatenate completed samples, nearest-rank p50/p95 formulas, never average round percentiles, per-round and pooled counts reported) and disambiguates two different dataset hashes (issue #130's exported-manifest input hash for the two-model run vs this campaign's canonical JevBench dataset_hash) that could otherwise be mistaken for interchangeable checksums. mkdocs build --strict passes on the full tree at this head; fork CI (rust/build/benchmarks/cuda-contract) is green at this exact head. Zero actionable findings; the PR is no longer a draft and the self-review checklist is complete (all four items checked).
One remaining readiness item before this can be approved: main's PR template (post-#138) also requires the four human contributor answers, the PR-necessity decision, and linked failure evidence for bug fixes, and says PRs stay draft until that work is complete. This body predates the template and does not contain the human answers section — that part of the gate cannot be self-attested. Verdict: COMMENTED (readiness gap only).
|
Thanks for the re-review — both documentation points are addressed in docs-only commit
At current head |
hsliuustc0106
left a comment
There was a problem hiding this comment.
Incremental re-check at new head 36c244b6bc: one new commit since my review at 0a55fce06 — "bench: fix two response boundary cases" (2 files + tests, +86 test lines); prior commits patch-identical (range-diff, named refs, cat-file verified). Reviewed: both fixes are sound — RecursionError joins the invalid-response catch (a deeply-nested JSON body previously escaped as an uncaught exception instead of being recorded as invalid_response; test-pinned with a 10,000-deep array), and saved-run status validation accepts non-standard HTTP statuses ≤999 as failed requests instead of invalidating the whole saved evidence file (evidence preservation over rejection, matching this tool's design). Locally run at this head: full benchmarks suite passes. Fork CI rust/build/benchmarks/cuda-contract green at the exact head. Zero actionable findings.
Two items keep this at COMMENTED: (1) the four human contributor answers and PR-necessity decision are still absent from the body (the self-review checklist is complete — that part is done); (2) the carried unverified checks (GPU runs author-reported; Rust side CI-covered).
|
Integration note: bind offline validation to the saved precision and protocol When integrating #93/#141, save and validate the collector’s precision, wire protocol and validation version, and use the same adapter for online collection and offline recomputation. JEV-VL normalization must preserve the requested answer Weekly aggregation must consume CPU coverage should include both protocols, supported precisions, interrupted/torn snapshots, raw-response hashes and CLI recomputation consistency. The deep-JSON and 600/999 status handling already present in this head should remain covered. Reviewed head: |
There was a problem hiding this comment.
Incremental re-check at new head 82c108ede9: one new commit since my review at 8e42b4b298 — "bench: reject adapter-incompatible manifests before creating the archive" (bench.py + tests, +71/−10); the reviewed commits are patch-identical (git range-diff, named refs, cat-file verified).
The commit fixes the P3 from my pass-53b review exactly: with --protocol jev-vl, run() now pre-flights wire_request over the manifest and warmup cases before args.output.mkdir, raising a startup error naming the offending case — so an adapter-incompatible manifest can no longer produce a saved archive that summarize_saved rejects afterwards. The new tests in test_saved_protocols.py pin the rejection. Locally run at this head: PYTHONPATH=. pytest tests/benchmarks → 45 passed. Fork CI at this exact head: benchmarks/build/cuda-contract/rust green.
Remaining before approval: the post-#138 template's four human contributor answers and PR-necessity decision are still absent from the body (the self-review checklist is complete). The P3 status=None save is fixed; no code findings remain. Verdict: COMMENTED (readiness item only).
|
Read-only diff review by bot ( What checks out:
Findings:
CI quoted from |
With --protocol jev-vl, wire_request raises before any HTTP exchange for a
manifest the adapter cannot express (multi-question or non-choice cases).
request_one recorded that failure as status=None with error_kind
invalid_response, and summarize_saved then rejected the record ("response
without status must be a client failure"), leaving a saved archive the tool
itself could never summarize again. run() now pre-flights wire_request over
the manifest and warmup cases and raises a startup error naming the case
before the output directory exists, so every saved archive stays summarizable.
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Reply to the P3-1 finding in the 2026-10-20 re-review at Chosen approach: the first of the two suggested fixes — pre-flight Tests: two new regression tests in Local verification (2026-10-21): Python 3.14.6 with Exact-head CI: CI run 39622915902 — rust, benchmarks, cuda-contract SUCCESS; Docs run 39622915336 — build SUCCESS, deploy skipped. Process disclosure: this commit was implemented by an agent under the contributor's explicit fix-and-push instruction and has not yet received a fresh independent review; no GPU/model measurements are involved (benchmark-client only). The PR body's head/SHA/test-result sections are updated to match. |
Use typed Score responses, a complete run request and genuine JSONL input. Preserve all seven ScoreWire tests and assertions, with no production validator change. Align fixture corrections with linear3735 PR InferMatrixLab#131 (82c108e); keep the collector integration separate.
|
@linear3735 #93 has now merged into main as Reviewed head: For the conflict resolution:
After updating, rerun the full benchmark suite from the updated tree (including main's existing tests), smoke validation and CI, and refresh the PR description's head/base and mergeability statements. The contributor-intent answers and PR-necessity decision identified in the previous review also remain outstanding in the current description. This is a code/test review and integration handoff, not a formal approval of the future combined head. No source branch was modified, and no GPU/model/performance or historical benchmark-evidence revalidation was performed. |
hsliuustc0106
left a comment
There was a problem hiding this comment.
Re-review posted at the head SHA 82c108ede9 to repair the review trail. My 2026-10-20 review verified this exact content (the commit 82c108ed "bench: reject adapter-incompatible manifests before creating the archive") but was recorded by GitHub against the prior head 8e42b4b298, so the trail showed no review at this head. Nothing new has landed since 82c108ede — this post re-establishes the record; the verification summary below restates the 2026-10-20 findings, re-confirmed today.
Status at this head (unchanged from the 2026-10-20 review)
- The commit fixes the P3 from the pass-53b review exactly: with
--protocol jev-vl,run()pre-flightswire_requestover the manifest and warmup cases beforeargs.output.mkdir, raising a startup error naming the offending case — an adapter-incompatible manifest can no longer produce a saved archive thatsummarize_savedrejects afterwards. The tests intests/benchmarks/test_saved_protocols.py(+61) pin the rejection. - Locally run at this head on 2026-10-20:
PYTHONPATH=. pytest tests/benchmarks→ 45 passed. - CI at the exact head
82c108ede(re-observed today): benchmarks / build / cuda-contract / rust all pass (fork runs 39622915902, 39622915336). - Zero code findings. The earlier P3 (status=None save) and both pass-1 P3s (warmup checksum, hard-kill recovery) remain fixed.
Remaining before approval — unchanged
The post-#138 template's four human contributor answers and the PR-necessity decision are still absent from the body (re-checked today; the self-review checklist is complete). Per the standing gate, this keeps the verdict at COMMENTED despite zero findings.
Unverified
- No Rust toolchain on this host: the PR touches Python benchmarks only; CI-corroborated compile status for the workspace at this head is observed green.
- GPU benchmark collection is out of scope for this PR's offline tooling contract and untested here (no GPU).
Verdict
COMMENTED (trail-repair restatement; readiness item only — template answers).
|
[P2] Strict JSON validation is bypassed by replacement decoding, and the saved evidence loses the invalid bytes. At benchmarks/bench.py:390–394, the collector saves b'{"answers":{"q":{"type":"choice","choice":"A","probabilities":{"A":1},"note":"\xff"}}}'
Please validate the original bytes with strict JSON/encoding rules, preserve those bytes in the evidence format, and use the same validation in online collection and offline replay. Add an invalid-UTF-8 online → saved → offline regression; changing only the online parser leaves the saved evidence lossy. Personally run on the reviewed head: 45 benchmark tests passed ( The existing #93 integration handoff still applies: GitHub currently reports conflicts. The results here cover this PR's own head, not a future conflict resolution with main or #141. Review scope and provenance
|
Levius-Fubuki
left a comment
There was a problem hiding this comment.
Independent full review at latest head ef13e0ccd144409304f256d91db7bf509bc31f7c: no actionable findings. APPROVED.
This review covers the current six-file increment, including the latest UTF-8 repair and integration with main. Earlier comments against 82c108ed do not describe this head's state: the human contributor answers and PR-necessity decision are now present, the branch contains main, and byte preservation/strict UTF-8 validation is implemented online and offline.
I traced collection through HTTPX content-decoded bytes, base64/hash persistence, display-only replacement text, UTF-8 decoding, wire adaptation, typed/numerical validation, completion snapshots, denominator reconstruction and offline/CLI replay. The byte-format selector is separate from the numeric-validation version; old saved-text archives retain their declared semantics. Unknown selectors, byte/display/hash mismatches and inconsistent completion evidence are rejected. The #93 Score bounds, independent rounding allowance, math.fsum, zero relative tolerance and complete isolated-zero-fit metadata remain in the current validation path.
Personally run on a clean archive of this exact head, Python 3.11.15 / HTTPX 0.28.1 / Ruff 0.15.2:
python -m unittest discover -s tests/benchmarks -p 'test_*.py' -v: 103 passed, no failures/skips.python -m unittest discover -s tests/decider -p 'test_*.py' -v: 16 passed, no failures/skips.python benchmarks/bench.py validate benchmarks/smoke.jsonl: four requests validated.- Isolated Ruff checks on the four changed Python files: passed; formatting of production
bench.pyand the new byte-evidence test file: passed. Existing whole-file formatting oftest_bench.pywas not treated as newly required cleanup. python -m mkdocs build --strictand full PR diff whitespace check: passed.- Additional end-to-end CPU probes using both System One and JEV-VL: valid responses succeed, invalid UTF-8 in an unused field is retained losslessly and counts as
invalid_responseboth online and on saved replay.
A carried parser boundary, not a new finding: unused fields containing Python JSON extensions NaN/Infinity/-Infinity are still accepted. I tested the same System One bodies against actual target main and observed the same acceptance. This was not introduced by the UTF-8 repair; the changed README promises strict UTF-8 before JSON/schema validation, not rejection of every parser extension. The probes and baseline results are retained locally rather than misreported as a new regression.
Observed hosted checks are separate: exact-head CI 39910338895 and Docs 39910338894 succeeded; deploy was skipped. No unresolved inline threads were present.
Main and full-PR merge-base are f5ae5acf65e2d68150aef944aae00f4dffc0da27. Read-only merge preview is conflict-free and equals the candidate tree eb17ba391ff142e4eb72cfc11689ba47473edf6d. Complete scope: 1,966 changed source/test lines and 259 documentation lines, 2,225 total across six files (+2,148/-77). New test inputs are maintained CPU regressions; this PR commits no raw benchmark archive. All four self-review declarations and required contributor answers are present.
Material limits: no model/GPU/Slurm execution, real throughput/quality measurement or historical response-archive recomputation was performed. I read the immutable five-model report linked by the leaderboard and checked the transcribed values/scope, but the raw historical traces are not publicly available. Those measurements remain author-reported historical evidence, with the two campaigns' clocks and p95 methods kept distinct. This code/tooling approval does not authenticate those measurements or close #141's separate weekly-consumer issues. Rust/native sources are unchanged in this PR; workspace execution is observed through hosted CI, not claimed as locally rerun here.
Review provenance: repository ID 1386454853; trusted main@f5ae5acf .agents/skills/system1-omni-review/SKILL.md, SHA-256 ae2dfac116376ae2ec41f65122cc1bf5aea10751b8b907198a56154e5d67230e. Actually read its repository-contract reference, architecture, CONTRIBUTING, self-review artifact/demo rules and CI/Docs workflows. Independently serialized full-index diff SHA-256: 34ee7c22c4507effe0a5c2680ba612d8e1f1417efd367709833d4f98fd908e68 (git diff --no-ext-diff --no-textconv --no-color --full-index <merge-base> <head>). The remote head is rechecked before submission. No merge performed.
hsliuustc0106
left a comment
There was a problem hiding this comment.
PR #131 delta review — pass 87 (2026-10-23)
Scope: incremental delta on #131 from previously reviewed head 82c108ede to new live head ef13e0ccd144409304f256d91db7bf509bc31f7c. Review only; nothing posted.
Verdict: APPROVE (non-draft, zero findings, template answers now present). Prior open item (post-#138 human contributor answers + PR-necessity decision) is RESOLVED. Prior code findings: zero, unchanged.
Re-pinned state (source inspected)
git rev-parse origin/pr/131→ef13e0ccd144409304f256d91db7bf509bc31f7c;gh pr view 131→ headRefOid identical,isDraft: false,state: OPEN, title "bench: preserve complete serving evidence and offline summaries".cat-file -everified for82c108ede,a250a7d6,ef13e0cc,5ba6a3ba.git fetch origin main→ main tip is nowf5ae5acf"Merge pull request #100 from xiaoyu-xyz/laya-target" (moved past the pinned guess5ba6a3ba/#98; the merge absorbed up to #100).- First-parent delta:
ef13e0cc(authored) ←a250a7d6(merge) ←82c108ede. Confirmed viagit log --first-parentandgit rev-list --parents -n 1 a250a7d6.
1. Own-series integrity — PASS
git rev-parse a250a7d6^1 → 82c108ede95c495ec5b57eba52fbdd044fc59116, byte-identical to the previously reviewed head. The own first-parent series is untouched (no rebase; the only additions are the merge and one authored commit), so the range-diff gate is trivially satisfied (all-= by construction; p1 equality makes any re-diff vacuous).
2. Merge hygiene for a250a7d6 — PASS, resolution read in full
- Parents: p1 =
82c108ede(PR side), p2 =f5ae5acf(main tip, #100). git merge-tree --write-tree 82c108ede f5ae5acf→ exit 1, one conflict:benchmarks/bench.py(auto-merge treedad123f7).- Actual merge tree
b6037914differs from the auto-merge tree in exactly one file,benchmarks/bench.py, 62 deletions. Read every resolution hunk:- All six conflict regions take the PR-side (
ours) version — the evolved collector withvalidation_protocol,wire_request, legacy-protocolread_answersbranch,measurement_state/summarize_savedsaved-replay path — and drop main's strictly simpler variants of the same regions. - Two dedup fixes: removed stale duplicate dict keys (
"validation_protocol": "probabilities-4dp-model-score-v1"and"score_decimals": getattr(args, "score_decimals", 4)shadowed by the later correct"validation_protocol": version/"score_decimals": score_decimals) and one duplicate identical--score-decimalsargparse registration. Both are behavior-preserving (Python dict literals and argparse both let the later definition win; definitions were identical).
- All six conflict regions take the PR-side (
- No lost main-side content:
git diff 82c108ede a250a7d6 -- benchmarks/bench.pyis a mode-only change (100644→100755, main's9168935c). Main's only bench.py commits in the range (de34df45,a33b43cd,9168935c) contribute substance the PR side already contained (verified:score_allowancepresent ata250a7d6:benchmarks/bench.py:115); the 64 "+" lines ofgit diff 82c108ede f5ae5acf -- benchmarks/bench.pyare all main's older/simpler variants already seen in the conflict hunks. git grep '<<<<<<<\|>>>>>>>' a250a7d6 -- benchmarks/→ no leftover conflict markers.- Forward mergeability (body claim):
git merge-tree --write-tree f5ae5acf ef13e0ccd→ exit 0, treeeb17ba391…= head tree. Verified.
3. Entering content attribution — RESOLVED
- Main-side commits entering:
git rev-list 82c108ede..f5ae5acf --no-merges(≈27 commits: #98 GEMM handle, #100 laya TileLang target, d3 reference worker, cua-s1 docs/fixes, bench precision/exec-bit fixes, PR-template answers requirement, etc.). - Bulk identity:
git diff origin/main a250a7d6 --statcollapses to 5 files, +1846/−75, all underbenchmarks/andtests/benchmarks/— i.e., the entire +47775/−1244 delta vs the old head is absorbed main; the branch's own footprint vs main is the benchmark collector surface only. - Valen tests are main-side content, not branch-authored:
tests/valen/*blobs on the PR head are byte-identical (same blob SHAs) toorigin/main, and absent at82c108ede. They enter via the merge and need no separate review. No branch-authored pytest outsidetests/benchmarks/.
4. Authored commit ef13e0cc reviewed in full — zero findings
"bench: preserve response bytes and reject invalid UTF-8" — 5 files: benchmarks/bench.py (+58/−…), benchmarks/README.md, tests/benchmarks/test_bench.py, new tests/benchmarks/test_response_bytes.py (237 lines, 8 tests), tests/benchmarks/test_saved_protocols.py.
Contract checks (review contracts: raw evidence preserved; rejection paths must not corrupt archives):
- Raw bytes preserved:
request_onestoresresponse.contentasresponse_bytes_base64(lossless), keepsresponsetext as a display copy decoded witherrors="replace", and hashes the raw bytes (hashlib.sha256(body)), not the decoded text. The checksum covers exactly what is persisted;response_body()on replay closes the round trip (base64 decode → byte sha256 → text/bytes consistency via the same replace-decode). - Invalid UTF-8 rejected, not replaced:
response_payload()does strictdecode("utf-8");UnicodeDecodeError⊂ValueError, so online it lands in the existingexcept (ValueError, KeyError, TypeError, AttributeError, RecursionError)handler →error_kind="invalid_response"(record still carries status/bytes/text/hash — no archive corruption); offline insummarize_savedthe same strict decode is wrapped in the identical catch and cross-checked against the live classification ("raw response and saved validation result disagree"). Error records (non-2xx, timeout, transport) never hit the strict decode. - Archive-format versioning: new
response_format=httpx-content-base64-utf8-v1is written into the checksummed run config;saved_response_formatrejects unknown values; absent key orhttpx-text-v1keeps legacy saved-text/hash semantics (back-compat;response_digestretains its pre-existing None guard and type check, so legacy timeout records pass cleanly). - Corrupt-archive rejection: base64 validated with
b64decode(..., validate=True)plus type check; "saved response text does not match its bytes"; "HTTP response is missing its saved bytes" (body None with status set); byte-sha mismatch. Persistence path writes records (including the base64 field) atomically with incremental sha256, unchanged in structure. - Tests are not vacuous: the rewritten
test_bench.pycase flips the old contract (invalid UTF-8 was previously pinned as ACCEPTED,error_kind=None) to rejection and adds byte round-trip + raw-byte hash assertions. The newtest_response_bytes.pycovers both protocols, conflicting HTTP charset ignored, empty body vs missing body distinctness, BOM, HTTP 600/999, tamper detection after re-signing the outerresponses_sha256(proves the inner byte-evidence checks are load-bearing), unknown formats (includingNoneand non-string), legacy archive back-compat with byte-for-byte no-rewrite verification, and failed-warmup byte retention; CLIsummarysubprocess agreement asserted throughout. README documents the new contract accurately, including the integrity warning against retro-fitting byte fields onto old archives.
5. PR body — standing blocker RESOLVED; all pinned claims verified
- Template answers (the only open item from the 2026-10-22 trail-repair review): NOW PRESENT. The body opens with "## Required human contributor answers" — all four post-#138 questions answered substantively, plus the explicit PR-necessity decision ("Yes", with rationale), scope references (#130, maintainer handoff comment), and observed-failure evidence (psv666's UTF-8 reproduction comment, linked). Dated 2026-10-23.
- Evidence/Test-Plan re-pinned to
ef13e0ccd(head + treeeb17ba391…, merge-base/mergef5ae5acf/a250a7d6); older sections are explicitly dated/labeled historical (pass-84 lesson respected — not stale pins). - Claim verification (commands run):
- Tree:
git rev-parse ef13e0ccd^{tree}=eb17ba391ff142e4eb72cfc11689ba47473edf6d✓ - merge-tree exit 0 → same tree ✓
- Full-PR diff SHA-256
60d3e7a2…✓ reproduced withgit -c core.abbrev=7 diff --no-ext-diff --no-textconv --no-color f5ae5acf...ef13e0ccd | shasum -a 256 - Increment stat +320/−20, 5 files ✓; patch SHA-256
14ec0681…✓ reproduced withcore.abbrev=7 - Note (informational only): the quoted commands omit the abbreviation-length dependence; the hashes verify under
core.abbrev=7(my default auto-abbrev renders differently). Not a miscription — the values are correct for a pinned abbreviation width.
- Tree:
6. CI at the exact head — PASS (both repos)
gh pr checks 131: rust PASS (2m13s), benchmarks PASS (33s), cuda-contract PASS (9s), build PASS (13s), deploy SKIPPED.- Actions API, InferMatrixLab: runs
39910338895(CI) and39910338894(Docs) —head_shaexactlyef13e0ccd144409304f256d91db7bf509bc31f7c, conclusion success, pull_request event oncodex/decision-latency-evidence. Matches the body's claims. - Actions API, ThinkFlowLab: same run IDs mirrored, same head_sha, success. Newer runs at
4d39e717e87abelong to a different branch (runtime-bounded-admission), not this PR; PR head re-checked unchanged after.
7. Local checks — PASS (source inspected, commands run)
- Worktree of
origin/pr/131atef13e0cc;PYTHONPATH=. /Users/hsliu/miniconda3/bin/python -m pytest tests/benchmarks -q→ 103 passed in 23.69s (matches the body's 103/103 claim; zero skips). tests/decider: 16 passed (matches the body's 16/16 Decider helper claim).- Valen tests not run: main-side content, byte-identical to main, outside this pass's branch-authored scope. Worktree removed afterward.
Findings
- Code findings: zero.
- Evidence/body findings: zero (patch hashes verified; see informational note in §5).
Prior-finding status
- Template answers + PR-necessity decision (only open item after 2026-10-22): RESOLVED — present, dated, substantive.
- Manifest pre-flight P3 (fixed at
82c108e), warmup-checksum and hard-kill P3s (fixed earlier): remain fixed —a250a7d6^1is byte-identical, so those fixes are untouched. - Code findings at previous heads: zero; remain zero at
ef13e0ccd.
Verdict
APPROVE — non-draft, zero findings at the new head, template answers present, CI green at the exact head in both repos, all body evidence claims independently reproduced, local suites pass.
Required human contributor answers
The contributor explicitly confirmed the following four answers and the PR-necessity decision on 2026-10-23.
What outcome are you trying to achieve?
Answer: Make System1-Omni serving benchmark results traceable and reproducible offline, accounting for planned, attempted, successful, failed and unattempted requests, interruption state, and the boundaries between startup, warmup and measured requests.
What is the highest-leverage variable for that outcome?
Answer: The completeness of request-level evidence and consistency between online collection and offline validation.
How will this work move that variable rather than create busywork?
Answer: Extend the existing benchmark runner to preserve response body bytes, validate UTF-8/JSON strictly, bind protocol and validation versions, verify hashes and completion state, retain failed-request denominators, and add regressions for observed misclassification. The new byte evidence is HTTPX's body after HTTP content decoding, not compressed wire bytes or HTTP framing.
Who is the customer or user, and what do they actually need?
Answer: System1-Omni benchmark operators, maintainers and result reviewers. They need to verify complete request counts, failure reasons and measurement-clock boundaries, and recompute results from saved evidence without invoking the model again.
After answering the four questions: is a PR needed at all to achieve this outcome?
Human decision and rationale: Yes. This outcome depends on the repository's shared collector, archive format and offline validator; an upstream PR lets contributors and reviewers use one evidence contract. The scope is benchmark tooling, tests and documentation, with no claim of new inference speedups or GPU quality qualification.
Scope and need references: #130 and the maintainer's integration handoff.
For a bug fix: link actual observed failure evidence.
Evidence: psv666's observed UTF-8 reproduction shows that the old collector accepted a response containing an invalid UTF-8 byte (
0xff) as a successful answer and lost that byte through replacement decoding. The currentef13e0crepair preserves body bytes and applies the same strict parser online and offline; the before/after regression results are recorded below. No private raw GPU archives are published by this change.Purpose
Closes #130. Preserve all planned requests, raw responses and interruption state in the HTTP benchmark, recompute summaries offline, and document the latency leaderboard. Accuracy is maintained in System1-Agents.
The collector now retains HTTPX body bytes losslessly and rejects invalid UTF-8 before JSON/schema validation. Previously,
response.textcould replace invalid bytes with U+FFFD, accept an otherwise valid answer, and lose the original bytes. Online collection and offline replay now share the strict parser and wire adapter:New runs bind
response_format=httpx-content-base64-utf8-v1in the checksummed config; theresponsetext is display-only. Supported old archives without this field, or withhttpx-text-v1, keep their saved-text/hash semantics and are never rewritten or silently reclassified. The new bytes are HTTPX's body after HTTP content decoding, not compressed wire bytes or HTTP framing.This branch merges main
f5ae5acand preserves the now-merged #93 Score contract (2/3/4dp, independent rounding bounds, fsum, zero relative tolerance, exact level bounds and strict zero-fit metadata), together with #131's versioned validation/legacy semantics, typed JEV adapter, input preflight, completion/interruption denominators and checksums. Main's executable bit and Decider two-decimal guidance are retained; the duplicated CLI precision option introduced by auto-merge was removed. The measurement-clock boundaries and model/serving implementation are unchanged.The separately owned #141 weekly completeness guard remains handed off there, not copied into this PR. #141's other resource/preflight/portability/numerical findings remain separate; its older composition result below is historical, not a claim that this PR closes every #141 issue.
Test Plan
System1-Omni Version / Commit: head
ef13e0ccd144409304f256d91db7bf509bc31f7c, treeeb17ba391ff142e4eb72cfc11689ba47473edf6d. Current target main and full-PR merge-base:f5ae5acf65e2d68150aef944aae00f4dffc0da27; local integration mergea250a7d653b3f1660daa02bdd5b81d7340d61c58. Full-PR diff SHA-256:60d3e7a200cd0352383cbff9bf14ff21b0ab2c4fdb5ed25ea60dd68e9898728d, recomputed withgit diff --no-ext-diff --no-textconv --no-color f5ae5acf65e2d68150aef944aae00f4dffc0da27...ef13e0ccd144409304f256d91db7bf509bc31f7c | shasum -a 256.The UTF-8 increment
a250a7d..ef13e0cchanges 5 files (+320/-20); patch SHA-25614ec06816d6dcf4a7def9e6da9fdf5358e4acc1056a1e7cc9d34bab291ad190b.git merge-tree --write-tree f5ae5acf65e2d68150aef944aae00f4dffc0da27 ef13e0ccd144409304f256d91db7bf509bc31f7cexits 0 and produces exactly the candidate tree. The code/patch hashes stayed unchanged throughout both fresh reviews and the contributor's subsequent approval.Test Result
Current head
ef13e0c— UTF-8 repair and main integrationa250a7d, with the new regression tests copied in, accepts invalid UTF-8 in an unused field as success under both protocols; three unknown response-format values are not rejected. The duplicate CLI option was already fixed in that baseline, so it does not confound these failures.test_bench.pywas not expanded into unrelated cleanup; inherited main EOF whitespace notices are distinct from the clean final PR diff.Exact-head GitHub Actions
Both CI run 39910338895 and Docs run 39910338894 completed successfully. The API
head_shaof each is exactlyef13e0ccd144409304f256d91db7bf509bc31f7c. Current checks: rust, benchmarks, cuda-contract and build SUCCESS; deploy SKIPPED. These are new-head results, separate from the old green runs below; skipped checks do not establish GPU/runtime qualification.Historical validation through 82c108e (older source / composition identities)
Preflight-fix validation at
82c108e(2026-10-21)run()now applies the wire adapter to every case — main manifest and warmup manifest — before creating the output directory. An adapter-incompatible case is rejected up front with aValueError, so no archive directory is created for a run that cannot execute any HTTP exchange, and a never-created archive can no longer be summarized as zero results.benchmarks/requirements.txtinstalled: 44/45 tests passed. The single failure is the pre-existing deep-JSON environment difference intest_run_saves_deep_json_and_nonstandard_http_failures(Python 3.14's JSON parser no longer recurses, so the probe no longer raisesRecursionError); it is unrelated to this patch. The two new preflight regression tests pass. The same suite passed 43/43 on the reviewer's Python 3.12.8 before these two tests were added.Historical integration-contract validation at
8e42b4b2aggregate, all four invalid completeness flags (missing, false, stringtrue, numeric1) produced the expected failing assertions. The final source was not reverted.test_saved_protocols.py,test_score_wire.pyand the companiontest_weekly.py.bench.pypasses whole-file formatting. The existingtest_bench.pywhole-file formatting/default-lint diagnostics and six existing weekly default Ruff diagnostics were not expanded into unrelated cleanup; the weekly diagnostics match exact test: add weekly local GPU accuracy and latency checks #141 baseline. This is not a claim of whole-repository lint cleanliness.8e42b4b298caeaadea6519bd7bb123c08993ece6: rust, benchmarks, cuda-contract and build passed; deploy was skipped. Both Actions runhead_shavalues were verified via the API. Previous green runs below belong to older commits.Historical validation (not substitutes for the current-head checks)
Previously at
7ac2b11b, Python 3.12.13 gave 25 passing branch tests and 40 passing benchmark tests in the local merge with then-main. Smoke validation, Ruff 0.15.2 default rules and the strict MkDocs build passed. Default Ruff reports zero diagnostics in 0.15.2 and nine in 0.16.8/0.16.10; the nine diagnostics are on unchanged lines. The earlier report of nine diagnostics was correct for those newer versions.The hard-kill regression constructs an inconsistent saved snapshot; it is not a real SIGKILL durability test. No new GPU measurements or Rust validation were run for this client-only repair. These checks are local; GitHub Actions for this revision are reported separately in the PR checks.
Independent Codex source review passed. Kimi accepted both P3 resolutions and
the numeric-overflow fix, reran 25 tests, and independently recomputed all six
historical rounds. Its remaining request was the collector-version disclosure
now included above. Those reviews cover the pre-boundary-fix code; reviews of the new patch are recorded separately below.
Docs-only commit
0a55fce06("docs: clarify pooled latency and dataset hash provenance", 2026-10-12) addresses the two pooled-percentile/dataset-hash documentation questions raised in review. At0a55fce06, source and tests were unchanged since7ac2b11b; those 25-test results are historical, not validation of the new boundary fix. The earlier 40-test integration result used main7cbce19f117f23214c8acd8d874c2ab5f10c683e; separately, on 2026-10-13, all 40 benchmark tests passed on an export of the clean merge tree of head0a55fce06and main3e9cc33a61ddf110d97512fb6f296cf540377c61, using Python 3.14.6 and HTTPX 0.28.1. GitHub Actions workflow runs CI and Docs both ran at0a55fce06and completed successfully. No GPU measurements were added.Boundary-fix validation at
36c244b60a55fce06: three expected errors—RecursionErrorfor deep JSON, andValueError: invalid HTTP statusfor 600/999. On this commit all cases pass; bool/string/99/1000 archived statuses remain rejected. Regression tests.36c244b6bc8715af8a1958f5d55a6acd35c98eddand then-main3e9cc33a61ddf110d97512fb6f296cf540377c61produced tree91bd568d5a9f6903002fa923812d971bd6db4fbd. It was equivalent to the previously exported13c9decftree plus the two-file boundary-fix patch, whose bytes matched. On that historical tree, Python 3.12.13 / HTTPX 0.28.1: 42 tests passed, zero skipped.git diff --checkpassed. An unchanged local archive from the real loopback HTTP 600 reproduction now recomputes as one completed failure without rewriting its evidence.016fcdc9bacbd3fb193e59b359721bf00d2efe4e51a724e5f87f7c90a3d356e2, with tools disabled. Its first attempt timed out; r2 completed successfully. It did not run tests.The historical boundary-fix commit
36c244b6changed two files (+89/-3), including three source-line replacements and 86 test lines. No new GPU/model runs or performance measurements were added; Rust validation was left to GitHub CI. Historical repeated-run data and the original collector requirement above remain unchanged. GitHub Actions for this exact head completed successfully: CI and Docs. The deploy job was skipped. These workflow results are separate from the local checks.Historical archive reproduction
The six historical rounds were independently recomputed with the original
collector at
4b9cccbde841272ff5ace6aee3cf51610fe1324f: all exited 0 and matchedthe reported p50/p95 values. To reproduce those summaries from an Omni checkout:
The revised
python benchmarks/bench.py summary <saved-round-directory>appliesonly to supported checksummed archives, using the saved contract or the documented legacy defaults. It
rejects these six historical rounds because they lack
warmup_sha256; no checksumswere added to their saved evidence.
For pooled figures, validate the three rounds with the original collector, then
combine their successful measured
latency_mssamples without deduplicating tasks.Use
statistics.median(x)for p50 and sortedx[math.ceil(0.95 * len(x)) - 1]for nearest-rank p95; exclude warmups and failures, and report counts separately.
Do not average per-round percentiles. Pool only matching deployment, manifest and
timing/collection settings; an empty pool has null percentiles.
Demo / evidence
The maintained
benchmarks/latency-leaderboard.mdrecords the five-model campaign 415076 and its comparison rules. Its body-receipt clock and interpolated p95 remain separate from campaign 416135 below, whose clock includes body decoding and JSON/schema validation.These are historical single-H800 observations at concurrency 1: 231 unique tasks, three rounds and five client warmups per round, with no measured failures. They are not same-model speedup or parity results. Image/VL, cache sequences and higher concurrency were not measured here.
00d1f10c…hash in [Benchmark] Preserve complete serving latency evidence and offline summaries #130 covers exported public231 JSONL manifest bytes for campaign 416135. The leaderboard'sdc3995d8…covers sorted canonical task records (dataset_hash) for campaign 415076. Both reference JevBench7ce310c7; these hashes identify different representations and are not interchangeable file checksums.The full PR at
ef13e0cchanges 653 production Python, 1,313 test and 259 documentation lines (additions plus deletions): 1,966 authored-code lines, 2,225 total across 6 files (+2,148/-77). The inherited main changes are not new authored Rust/CUDA implementation in this PR. Video: N/A for this HTTP accounting/validation change.Self-review
The contributor approved the exact frozen
ef13e0cdiff after supplying a separate independent recheck. Fresh Codex/Kimi reviews cover the current merged tree and UTF-8 change. The checked items record assisted review and evidence checks; they do not establish maintainer approval. The contributor explicitly confirmed all four human contributor-intent answers and the PR-necessity decision on 2026-10-23; those answers are recorded above. Raw archive publication still requires separate authorization.Merge Danger
Door: two-way. Reverting the benchmark client/reader does not rewrite saved historical evidence. Do not add byte fields or rewrite old configs/hashes to claim a different collection contract.
Blast Radius: benchmarks. New response storage is explicitly versioned; the numeric validation version and legacy behavior remain separate. The human contributor-intent answers and PR-necessity decision are confirmed above. Applicable public-evidence requirements and maintainer approval remain separate readiness items.