Repository navigation
build(webfetch): prepare the v3 dataset pin - #278
lanyue-llk wants to merge 32 commits into
Conversation
|
Review of head What holds up:
Blocking:
Non-blocking (tidiness only):
Follow-ups for the 0.7.0 release, outside this PR:
Taking this over per the owner: I'll rebase, re-pin from main, add the population assertion and update the body, then merge after CI passes. 0.7.0 follows in a separate release PR. |
There was a problem hiding this comment.
This review found 4 issue(s), including 4 blocking issue(s).
| if diagnostic: | ||
| if footprint_by_path: | ||
| raise ValueError('Diagnostic publication has unexpected result-stream projections') | ||
| rows = diagnostic_scored_views(source) |
There was a problem hiding this comment.
P2 — Bind the published diagnostic model to the validated source. This branch reads scored bindings only from the local report.json, but never checks the reconstructed archive's report.json against that source (or its permitted privacy projection). The checks above compare source_sha256 metadata, and the final scan checks bytes against archive-provided hashes; neither proves that the published model matches the source. An archive with changed diagnostic verdicts/summary values and recomputed manifest hashes can therefore pass while publishing different results. The standard branch explicitly prevents this for results.jsonl. Add the corresponding byte/projection comparison for diagnostic report.json before accepting the bundle.
| descriptor = json.loads(raw) | ||
| attachment = response.headers.get('content-disposition', '').lower().startswith('attachment') |
There was a problem hiding this comment.
P2 — Check attachment disposition before parsing JSON. A staged original served as application/json with Content-Disposition: attachment may contain malformed/truncated JSON (or non-JSON bytes saved with a .json filename). Here json.loads(raw) raises before the attachment check, so download_export aborts rather than preserving the original bytes, even when they match the manifest size. Export reconstruction should not require artifact contents to be valid JSON. Stream attachments unchanged and parse only potential download descriptors; add a malformed-JSON attachment case alongside the existing valid-JSON attachment test.
| 'task_content_scopes': {case['id']: case.get('content_scope') for case in saved_dataset['cases']}, | ||
| 'max_failure_retries': manifest.get('parameters', {}).get('max_failure_retries', 0), | ||
| }) | ||
| if dataset_meta.get('scoring_scope') in {'main', 'full', 'both'}: |
There was a problem hiding this comment.
P2: Scope switching still fails for runs with live-reference bindings. This branch accepts the alternate scope, but the subsequent check_case_reference_binding(case, binding, ...) compares that newly selected case against the acquisition scope's frozen prompt, acceptance rules and reference text. Thus a valid rescore --score-scope main on a full-content live_exact run raises ReferenceLifecycleError whenever the profiles differ. Validate the original acquisition case against its capture binding separately from the alternate scoring profile, preserving the existing integrity checks, and add a bound-reference scope-switch test (the current fixture tests have no reference bindings).
| }) | ||
| if dataset_meta.get('scoring_scope') in {'main', 'full', 'both'}: | ||
| from lexbench_webfetch.content_scopes import REQUIREMENT_DEFAULTS | ||
| acceptance = set(REQUIREMENT_DEFAULTS) | {'content_scope', 'content_scopes', 'scoring_scope'} |
There was a problem hiding this comment.
P2: Excluding all of REQUIREMENT_DEFAULTS also excludes the entire source_benchmark object from the retrieval-identity comparison. That object contains retrieval inputs such as input_media_kind, which native_route_cell uses to identify native execution routes. A rescore dataset can change this field in the base task and both profiles and pass both select_content_scope and this comparison, then overwrite the saved task definition without another call. Compare the non-acceptance portion of source_benchmark against the saved case; only the explicitly scope-dependent components should be exempt.
Summary
Prepare the separate v3.0.0 Web Fetch data selection requested in #276. Select Hugging Face commit
def0249d88e849ab22d6108c0e0341fd54c7d38fthroughmake pin-dataset, refresh the import binding, and register the 530-task annotation export. Keep the previousa71b0b0fsnapshot used by diagnostic reports and the released v2.2.0 selection in history.Release prerequisite
This PR stays draft until the upstream owner publishes
v3.0.0. No tag is created here. At conversion to ready, resolve that tag and re-runmake pin-datasetif its commit differs from the prepared selection. UpstreamVERSIONING.mdrequires tag-based release selection; a merged content commit alone does not complete that release.The current edition contains 530 distinct examples. The frozen 550-task definitions remain available for historical reproduction. Export suites overlap; their counts are not a total of distinct examples. Compare v3.0.0 separately from v2.x. No Webstone package version, benchmark catalog, provider call or saved score is changed.
Most changed lines are immutable hash bindings for the selected and historical snapshots. Dataset bodies and measured outputs are not copied into Git.
Validation
Base: #276. This PR contains only the dataset selection, import binding, export documentation and dataset registry assertion.