Repository navigation
feat(webfetch): compose separate runs into a saved-matrix spec by command - #343
Merged
Merged
Conversation
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
Comment on lines
+61
to
+62
| suite_id = first["suite_id"] if first["suite_id"] not in used_ids else first["suite_id"] + "-" + digest[:8] | ||
| used_ids.add(suite_id) |
There was a problem hiding this comment.
The digest-suffixed fallback is not checked against used_ids. With --by-suite, valid datasets encountered with IDs foo, foo-12345678, and foo (the last hash starting with 12345678) produce duplicate suite IDs. _load_saved_matrix then raises Duplicate or empty matrix registry and the specification is deleted. Generate candidates until an unused ID is found, and add a regression test covering a natural dataset ID that matches the generated fallback.
…mand Add `webstone compose RUN_DIR... --output SPEC` that derives providers, suites, sources, case ids and every SHA-256 from run directories and validates the result with the saved-matrix loader. Accept the hash-bound public call log as transport evidence for ordinary runs. Expose offline revision as `webstone revise SOURCE --config CONFIG`. Closes #329
lanyue-llk
force-pushed
the
refactor/compose
branch
from
November 24, 2026 06:36
0dfd89c to
867f19e
Compare
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Methods run separately on the same frozen dataset (as documented in #310) could only be combined through
--saved-matrixwith a hand-written spec holding computed SHA-256 values and enumerated case ids. Offline revision had no command. This adds both entry points (spec rules 5 and 9).Changes
webstone compose RUN_DIR [RUN_DIR ...] --output SPEC [--title T] [--by-suite](src/harness/web_fetch/saved_matrix_compose.py). Reads each run'smanifest.json,dataset.jsonandresults.jsonl. It requires one frozen dataset hash;--by-suiteturns each distinct dataset into its own suite. It also requires the same selected cases and one result per method and case, and no method repeated within a suite. It writesschema_version,title,providers,suitesandsourceswith hashes and spec-relative paths. Optional keys (missing,ranking,result_review,pricing, revisions, completions and so on) stay unset. The written spec is validated with the existing loader and removed if it fails.report_saved_matrix._called: records from an ordinarywebstone runcarry nonative_route_receipt, so the build rejected them with "Saved result lacks explicit transport evidence". When no receipt exists, the loader now accepts a verified public call log as transport evidence; every such log opens withcall_started.unsupported_taskrecords still count as not called. Records with receipts keep the current behaviour. This is the one behaviour change. Without it, compose output cannot be built.webstone revise SOURCE --config CONFIG.jsoncallsrevise_local_snapshotunchanged.--helplists the configuration keys.configs/report-templates.jsongainssaved_matrix_compose.Usage
Verification
tests/test_saved_matrix_compose.py: two fixture-provider runs, then compose, thenbuild_report.py --saved-matrix, checking both methods inmatrix.jsonwith the expected pass/fail. Negative tests: different datasets without--by-suite, and a missingresults.jsonl.webstone reviseruns on a local-revision fixture.pytest tests/test_saved_matrix_*.py tests/test_local_revision.pyplus the CLI, report-template and owner-command tests: 872 passed.make lint-checkpasses.--check-saved-matrix NEW_REPORT --source-spec SPECon the composed fixture report returnsvalid: true.Follow-up
scripts/build_report.py:71). The comparison works, but no English edition can be built yet.Closes #329