Repository navigation
feat(web-extract): add versioned field extraction benchmarks and reports - #233
Conversation
|
The remaining correctness findings are addressed in
Upload-only planning no longer requires The demonstrated common report gaps now have shared owners: metric explanations and their semantic release checks in Validation includes 689 affected tests and 59 subtests, 164 SWDE controls for historical projection reproduction, the final 130 report/reader tests, JavaScript behavior controls, and static/documentation checks. Both complete report trees are being released through the existing targets with desktop/narrow and light/dark reader coverage. No provider calls or snapshot deployments were added. Final release and current-head CI receipts will be reflected in the PR description. |
There was a problem hiding this comment.
This review found 8 issue(s), including 8 blocking issue(s).
Review at
|
| # | Finding | Status | Notes |
|---|---|---|---|
| 4 | Prompt delivery differs by adapter | Fixed for new runs, with a gap | Instructions now go into the schema. See 3 and 4 below. The SWDE schema template does already say "copied exactly" and "empty array"; it does not say to exclude navigation and other records |
| 5 | Snapshot pages not byte-checked | Mostly fixed | External hosts are page-checked at first binding and the generated text now separates the two cases. See 5 below |
| 6 | Any 403 or word match blocks the cohort | Partly fixed, and a new regression | See 1 below |
| 7 | Repair can silently change input route | Fixed for options | Repairs inherit parent options. Instructions are not inherited; see 3 below |
| 8 | Inconsistent run paths | Fixed | Executed: x and runs/x both resolve to <home>/runs/x |
| 10 | citation_fragments TypeError |
Fixed | Executed: {["a"]: 1} no longer raises |
New findings
Should block merge
1. Account denials can bypass the stop for paid calls. access_blocker returns None as soon as the message looks like a target failure, before it looks at the status or any account wording. Executed results:
| Input | Result | Expected |
|---|---|---|
402, Failed to fetch: insufficient credits |
None |
Quota stop |
401, Could not fetch: invalid API key |
None |
Authentication stop |
Success false, Fetch failed: monthly quota exceeded |
None |
Quota stop |
429, Your credit balance is too low |
None |
Quota stop (the narrowed regex no longer matches this wording) |
403, Forbidden |
permission |
Unclear: this can still be a single page's 403 |
The first three keep dispatching across the rest of the matrix after the account has been denied, which is the outcome the PR says it prevents. The last row means the original #6 is only fixed when the message happens to contain target wording. Check explicit account signals first, treat 401 and 402 as account-level regardless of text, and only then apply the target exception. Deciding a bare 403 probably needs evidence across more than one page.
2. One non-string value aborts the report build. displayed_values calls esc(item) on raw values, where the previous json.dumps accepted any type. Executed: normalize keeps {"title": [1, 2]} unchanged, record_result_fields correctly scores a [12] as status invalid, and record_field_rows then raises AttributeError: 'int' object has no attribute 'replace'. The invalid-type scoring path can't be rendered, so one provider returning a number stops the whole build. The current reports pass, so this affects future runs rather than the published data. Render non-strings with json.dumps and add a control that uses a non-string value.
Should fix
3. Repairs do not inherit instructions. The repair contract has no extraction_instructions, so collect_calls falls back to the current constant and ignores the parent's value. This is the same class of bug as #7. Repairing a historical parent also merges calls using the new delivery into a cohort that used the old one. Copy the value from the parent contract, as native options now do, and have verify_repair compare them.
4. The receipt does not show the ScrapeGraph prompt. ScrapeGraph still gets a standalone prompt, but the receipt only records the schema location. The record therefore doesn't show everything that method received.
5. External hosts with a manifest get weaker collection checks than those without. Collection only rechecks the manifest when one is bound, while a manifest-less external host has every case checked before and after the run. So a page swapped after first binding on a host that declares a manifest goes unnoticed, even though the README now calls that manifest "a claim by that host". Bind external hosts to the page check at collection too, or state this limit next to "A mismatch stops collection".
6. Chinese was added to code paths that build English pages, and the docs misstate English support.
原标注下的字段判定is hard-coded inside the per-language loop of the productbuild(), so a reviewed result on an English route shows Chinese. The synthetic example has no reviewed rows: an English build shows no stray Chinese, so the example and its check can't catch this.retry_summary,本次调用为什么失败,displayed_values,dataset_controls, thepage()navigation label and the"、"separator also bypass the catalog that the resolution says is in use.docs/report-hosting.mdsays this builder rejects expliciten. That holds for the record mode, but executing thefull-cohort-progressexample with--language enproduced 19 English pages.
7. Optional --snapshots allows new cohorts to change input route. create_plan now only forces URL input when snapshots are supplied, and nothing checks the case where they are omitted. URL-only methods fail later at run, but upload-capable methods such as cloudflare-json would plan with uploaded HTML. Require snapshots unless every selected method is upload-only, which is the case the resolution describes. Confirmed by reading only.
Minor
- Network errors on Cloudflare reuse: the broader
exceptmeans a timeout on an existing deployment's manifest now leads to a proposal for a new deployment. It still needs approval, but it reads as if the version were missing. The fallback is right for external hosts; here the network error should surface. - Failure stage on record details: the summary dropped the stage, and the record example's failed case page now shows only
调用失败 · 3.000 秒, with no stage anywhere in that detail. The shared rule expects the stage in the failure diagnosis and treats the full result page as canonical, so at least confirm the dialog still shows it. - Exact-match differences can be invisible:
<li>rendering collapses whitespace, so"A"and" A "look identical on a page where literal matching marks them different.white-space: pre-wrapon.field-valueswould fix this. - Zyte description limit: by the schema template, a field description is 276 characters plus the field and domain name lengths, against a limit of 300. It fits today, but a longer name fails at call time instead of plan time. The instructions also repeat what the template already says.
- Small cleanup:
create_record's guard sits above its docstring, so it is no longer a docstring.check_record_cohortcallscheck_method_examplestwice. Theusage_pricedcatalog key looks unused now.
Design and legacy items
- Two report flows: the PR's position is that the scoring models really differ and a rewrite just for module size isn't justified. That is reasonable for scoring. The checks are another matter: this round copied the metric-guide, method-example and pricing checks into both
checkandcheck_record_cohort, and Add reproducible Chromium and Moli browser evaluation harness #2, Move Web Fetch core into harness/web_fetch and add Moli #3, Add autonomous WebArena-Verified browser evaluation #8 and Add isolated public WebArena fixed-trajectory replay #12 all came from the two flows drifting apart. A shared check for what both flows have in common would be enough. - Method-name branches in
provider_callgrew (zyte-custom,scrapegraph-extract). The 300-character limit and the standalone prompt both belong in theMETHODSregistry. legacy_names: four of the five schema aliases still have no production reader.extructis now plannable from the CLI, but the PR still calls it retired. Decide which is true.
Before merging
- Fix 1 and 2, each with paired controls.
- Fix 3–7.
- Confirm
ocr-reviewfinishes on the final head and that the published reports match it, since renderer changes require a rebuild.
|
The top-level review and follow-up OCR findings are addressed through
The read-only historical-name catalog remains provenance for archived formats; it is not a set of current command aliases. The distinct scalar-product and multivalue-record scoring models remain separate. Validation: 866 affected Python tests and 63 subtests, generated-client sorting/heading/evidence controls, static checks and 23 documentation checks pass. Current-head CI passes: 20,759 tests and 5,826 subtests passed, with 157 skips. Installation/packaging, rendered-report checks and Python 3.11 pass. OCR completed with zero findings; all 78 review threads are resolved. Both complete reports passed their release gates, 104 viewport/theme observations and 40 reader interactions. Actual hosted success and failure details also load their native evidence, close with Escape and return through hosted navigation. The final hosted revisions are verified at their existing URLs: Zyte and SWDE, with access unchanged. All 6,060 native results, field verdicts, scores and timings remain unchanged; no provider calls were repeated. Current-head CI passes: 20,759 tests and 5,826 subtests passed, with 157 skips. Installation/packaging, rendered-report checks and Python 3.11 pass. OCR completed with zero findings; all 78 review threads are resolved. |
There was a problem hiding this comment.
This review found 3 issue(s), including 3 blocking issue(s).
There was a problem hiding this comment.
This review found 6 issue(s), including 6 blocking issue(s).
There was a problem hiding this comment.
This review found 5 issue(s), including 5 blocking issue(s).
There was a problem hiding this comment.
✅ Re-review complete · 20b10ef
No findings in this incremental review.
Review at
|
| Finding | Status | Evidence |
|---|---|---|
| 401/402 and account wording bypass the stop | Fixed | Executed: 402 Failed to fetch stops, and 401 stops regardless of wording |
| Bare 403 treated as an account block | Fixed, but creates finding 1 | Executed: Forbidden returns None |
| Non-string value aborts the build | Fixed | Executed: [12, "a"] and {"x": 1} both render |
| Repairs don't inherit instructions | Fixed for plans made by this code | Read; see 3 |
| ScrapeGraph prompt missing from receipt | Fixed | Read, with a test on standalone_prompt |
| External hosts with a manifest get weaker checks | Fixed | Read: collection and repair both add page checks |
| Chinese on English paths | Fixed for readers | Executed: all 19 English pages contain only the 中文 language link. The synthetic example has no reviewed rows, so that path was read only |
Optional --snapshots |
Fixed | Read; see 4 |
| Cloudflare network errors, failure stage, whitespace, Zyte limit, misplaced docstring | Fixed | Read |
Should fix before merge
1. A 403 account denial still depends on the exact wording, and nothing else stops the run. access_blocker now pauses on a 403 only if the text matches a short list. Executed results for a 403 response:
| Message | Result | Expected |
|---|---|---|
API access is not enabled for this account |
None |
Stop |
Your plan does not include this endpoint |
None |
Stop |
Permission denied: your key cannot fetch this resource |
None |
Stop; the word fetch cancels the match |
Forbidden, or an empty body |
None |
Unclear for one page |
access denied by target firewall |
permission |
Continue; this is about one target page |
Access denied |
permission |
Unclear, and treated differently from Forbidden even though a target's block page can say either |
Treating one bare 403 as page-level is reasonable. But I found no consecutive-failure check in the dispatch loop, so a key that loses access partway through keeps calling every remaining page for that method. The method then reports hundreds of failures that look like extraction results, and the prior rows stay in place on resume because they no longer count as blocked. In the other direction, one target's block page can still stop the whole cohort.
Wording can't settle this. I suggest pausing a method after a small number of consecutive 403s on different sites, and recording that in access-blocked.json for a person to judge. This is my inference from reading the loop; I did not run a full collection.
Should fix
2. Verifying a retry reruns the current classifier against old rows. The retry check rejects a retried call unless access_blocker flags it today. A bare 403 followed by a retry was valid under 83dfc968, but this head would raise Retry is outside the declared access-repair policy. The rebuilt reports pass, so current evidence appears unaffected. But each change to the classifier can invalidate retained evidence, which AGENTS.md says to preserve. Verify against the reason recorded when the retry happened. Confirmed by reading and by the executed classifier result.
3. The instruction checks only apply when the plan has the new fields. The delivery check runs only in create_plan. collect and the later comparisons skip when the field is absent, and the plan schema is still archived-extraction-repair/1. A plan written before this change can therefore run against a historical parent, use the current constant, and mix delivery formats without any error. Allowing a missing field makes sense for reading old evidence, but collect should reject it for new record repairs. Confirmed by reading.
4. The repair and plan commands don't match what the docs now describe.
repair-plan --fixture-baseis still required (executed). The new code that inherits the origin when none is given can't be reached from the CLI, and upload-only repairs must pass a URL they don't use. Make the flag optional.- The
--snapshotsrequirement and the upload-only rejection together meanfirecrawl-parse-jsoncan't share a plan with any other current method. If that is intended, say so in the README, because "only upload-only interfaces may omit it" reads as if they can join a cohort. Confirmed by reading; my attempt to run it stopped earlier, at dataset validation. run --fixture-basecan now matter only for plans frozen earlier. If those no longer need it, remove it.
Minor
- Repair gate order: the historical-delivery check runs before the method selection, so one historical parent blocks a repair limited to a different, current method.
- Product repairs record unused instructions: the default writes
RECORD_INSTRUCTIONSinto product repair contracts, although those calls use no record schema. The evidence then describes instructions that were never sent. Add the field only when the dataset has task bindings. - Dead code: the
target_failureblock has no effect, since both of its outcomes returnNone. Delete it. - Duplicates:
checkruns the samepublic_riskcheck twice, andruncallsvalidate_fixture_basetwice. - Misplaced check:
check_method_examplesnow also validates the comparison controls. Call that fromcheck_reader_contractinstead. - Text outside the catalog:
page,displayed_valuesanddataset_controlsstill choose their language with inline branches. The output is correct, but the text bypassesmessages.jsonand its checks.
Accepted
- Non-list values as false positives:
null,""and0now count as attempted predictions. This is stricter than before, but it matches the array schema and has paired tests. - Separate scoring models: the shared
check_reader_contractnow covers the overlap I raised last time.
Before merging
- Fix 1, with a control for a run of 403s across sites and another for a single target's 403.
- Fix 2–4; the minor items can follow.
- Rebuild and re-verify the reports if
report.pyor its assets change, since the release check now binds those hashes.
|
Addressed the review at
The dead target-error branch, duplicate report privacy check and duplicate origin validation are removed. Comparison-control validation belongs to the shared reader gate. Navigation, missing-value and dataset-search labels now use the catalog. Regression coverage includes cross-site 403 stops, isolated/same-site/reset sequences, immutable receipt validation, old 403 retry history, missing instruction fields before dispatch, mixed native routes, ignored historical parents and the historical CLI path. The latest OCR finding is fixed: target-fetch errors mentioning API no longer count as account denials. All 187 execution-boundary tests and Ruff pass locally. Full CI on Both reports are updated at their existing URLs with access unchanged; authenticated success and failure details, evidence loading, Escape and hosted return navigation have been verified. All 6,060 native responses, field verdicts, scores and timings remain byte/metric-verified; no provider calls, model reviews or snapshot deployments were added. An unauthenticated fetch of these private report links returns the Yours viewer shell; it does not expose their report HTML. |
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
What changes
Adds reproducible Web Extract evaluation for Zyte's Product extraction benchmark (140 frozen product pages) and a predeclared SWDE subset (800 pages, eight categories and 80 sites). The datasets retain their original names, sources, licenses, annotations and scorer identities.
The maintained pipeline pins the input version, collects native extraction responses, scores the requested fields, binds evidence reviews and publishes checked reports. It does not run another extractor over provider answers or consult references when projecting native fields.
Project-owned names use Web Extract. Official product names, API identifiers, source URLs, quotations and hash-bound historical identities retain their original wording. Reusable code and compact bindings live in Git; measured evidence, authored reports and illustrations stay outside it.
Results and reports
The model-assisted evidence audit covers all 6,060 results, with zero unresolved findings and no unreviewed results accepted. Reviewers could see machine outputs; this is not human blind evaluation. Source-qualified reference corrections are applied consistently across methods, while original annotations and scores remain available. Six wholly unannotated SWDE site-field groups are excluded from qualified scoring.
The reports separate overview, results, dataset, methodology, interpretation and supporting resources. They retain Chinese as the primary edition and an English not-generated notice. Prices distinguish plan conversions, workload estimates and actual charges. The SWDE interpretation page also includes the ImageGen illustration and recommendations for a future extraction product and benchmark.
Validation
786a8b16apasses: 20,857 tests and 5,860 subtests, with 157 skips; installation/packaging, rendered-report checks and Python 3.11 pass. OCR is awaiting backend dispatch.