Skip to content

fix(web-extract): verify report authorities and comparison contracts - #259

Merged
lanyue-llk merged 39 commits into
mainfrom
codex/scrapegraph-human-eval
Nov 10, 2026
Merged

lanyue-llk merged 39 commits into
mainfrom
codex/scrapegraph-human-eval

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Web Extract checks now verify published evidence against an explicitly selected frozen profile and benchmark home. Revalidate certification plans, pre-call receipts, source executions, assessments, repairs and reference revisions through the existing input owners. Compare every public response, scored field and population with those originals, including cohorts without an audit. Review judgments require a frozen audit, and JSON comparisons preserve value types.

Keep build-time presentation checks internal. Package and upload each verify their own frozen inputs, then use shared snapshot guards to detect changes without repeating full verification for every request. This includes external execution-preflight assessments and runs, plus reference-coverage proofs, original annotation archives and their selection cards. Record verification reuses the same assembly and source receipts as report construction, including extended and segmented receipts. Compatibility reports retain their per-execution files and method filters.

Completion metrics validate the three requested product fields before normalization can discard malformed native values. Upstream scores remain separate and unchanged. Report checks reconstruct authored intros from frozen content, validate the generated language editions, and require cohort homes to place the core comparison first. Comparison tables opt into pinned method columns explicitly, including model, resource and execution-setting tables added on main.

Validation:

  • 1,403 Web Extract tests pass; 9 environment-dependent tests are skipped.
  • 173 shared template, language, encoding and publication tests pass, with 59 subtests.
  • Report UI contracts, Ruff and diff checks pass.
  • Real Chrome checks pass across 48 states: supported languages, desktop and phone widths, light and dark themes, intro navigation, evidence dialogs, Escape and focus restoration.
  • No provider calls or report publications were added.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · beee6a1

This review found 9 issue(s), including 9 blocking issue(s).

Comment thread src/harness/web_extract/human_eval.py Resolved
Comment thread src/harness/web_extract/human_eval.py Resolved
Comment thread src/harness/web_extract/pipeline.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
Comment thread src/harness/web_extract/review.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · b453d06

This review found 7 issue(s), including 7 blocking issue(s).

Comment thread src/harness/web_extract/human_eval.py Resolved
Comment thread src/harness/web_extract/human_eval.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
Comment thread src/harness/web_extract/review.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 9e89965

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/human_eval.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
Comment thread src/harness/web_extract/review.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · b3d50ee

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/review_runner.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/review.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 976fa5d

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/review.py Resolved
@lanyue-llk lanyue-llk changed the title feat(web-extract): add audited human-eval extraction reports fix(web-extract): validate certified report cohort identity Nov 6, 2026

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · 9ad53ee

No findings in this incremental review.

@lanyue-llk lanyue-llk changed the title fix(web-extract): validate certified report cohort identity fix(web-extract): verify cohorts and identify SWDE-800 inputs Nov 6, 2026

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · 54c92c5

No findings in this incremental review.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · 7e1884c

No findings in this incremental review.

@lanyue-llk lanyue-llk changed the title fix(web-extract): verify cohorts and identify SWDE-800 inputs feat(web-extract): add completion and empty-field metrics Nov 6, 2026

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 9681e5e

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/analysis.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · e5a41d2

No findings in this incremental review.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 1efab74

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · a118cdf

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · cb1485c

This review found 3 issue(s), including 3 blocking issue(s).

Comment thread src/harness/web_extract/publication.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · 8c2e0dd

No findings in this review.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 73ba28c

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · ec22a49

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 8a3f700

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 3a9d488

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 9223e21

This review found 2 issue(s), including 2 blocking issue(s).

Comment thread src/harness/web_extract/publication.py Resolved
Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · f24c60f

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Re-review complete · 733f06d

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · aea09f2

No findings in this incremental review.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · fec26ab

No findings in this incremental review.

@lanyue-llk lanyue-llk left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head fec26ab9 against current main (d4fb973d).

The metric design is sound. Whole-page and empty-field accuracy are recomputed from retained final responses. Failed calls stay in the empty-field denominator, uncovered references are unavailable rather than zero, and native types are checked before normalization. The release check rebuilds the bundle from public evidence and compares rendered cells in both routes and languages. The account-endpoint redaction refactor and the stricter certificate method/dataset checks are good. The precall/cert keys these checks need are already written by main, so existing cohorts still rebuild.

Must fix

  1. Registered release commands no longer work. check --release and package now need --home, and package also needs --profile. check --release without --profile fails at the end of check(), because verify_completion_audit requires a profile. configs/report-templates.json still lists release_check, package and publish (lines 86-90) without these arguments. scripts/report_template.py is the discovery owner that AGENTS.md tells authors to follow, so the documented release path fails. Please update the registry entries, and make check --release require --profile at argument parsing rather than after the visual-receipt check.

  2. The new columns highlight tied values (inline). record_comparison marks every value equal to the extreme, and these tables set data-highlight-ties="all". Empty-field accuracy will often tie at 100% or 0% across engines, so several winners get marked. AGENTS.md: "Highlight the unique column maximum/minimum from raw values; tied or unavailable values stay neutral." Please highlight only a unique extreme for the completion columns, and add a negative control with a tie.

Should fix

  1. The full audit verification runs about six times per publish (inline). One publish calls verify_completion_audit directly. Then package() calls it, check() calls it at its start (profile given) and again at its end (release), the first upload guard calls it, and bind calls it. Each run calls validate_dataset and reloads and reprojects every selected evidence run (9,820 rows here). The PR text says this now runs once before upload and once at binding, but the code runs it at every boundary. It also works against #257's latency goal. Pass a verified token or digest down instead, or verify once per boundary: package, first upload, bind.

  2. Product field names are hard-coded in completion_bundle (("price", "sku", "availability")) and in completion_metrics.valid() (price / availability). pipeline.FIELDS and the scorer already own these. Reuse them, or move the per-field type predicate next to the field definitions, so a new product field doesn't silently drop out of the metric.

Coordination with #258

#258 already contains this PR's analysis.py and reporting/publish.py blobs byte for byte, plus rewritten copies of publication.py and test_completion_metrics.py. Merging the two heads produces 5 conflicts. Please pick one owner: merge this PR first and rebase #258 onto it with the duplicate commits dropped, or close this PR in favour of #258. Otherwise both versions will have to be reconciled by hand.

Checked and sound: pre-call/certificate key availability on main, the SWDE-800 repository rename (only used for live HF lookups, not frozen identities), inline_limit_bytes validation and journal transport persistence, the en/zh parity of the new message keys, and the report.js metric-guide fragment opening.

Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/report.py Resolved
Comment thread src/harness/web_extract/publication.py Resolved
Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Re-review complete · 3b2a6c7

No findings in this incremental review.

@lanyue-llk lanyue-llk changed the title feat(web-extract): add completion and empty-field metrics feat(web-extract): add completion metrics and compact comparisons Nov 6, 2026

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Review skipped · e8e42dc

No reviewable content was selected for this run.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · 5c77acf

No findings in this review.

@lanyue-llk
lanyue-llk force-pushed the codex/scrapegraph-human-eval branch from 5c77acf to 18e6370 Compare November 10, 2026 06:40

Copy link
Copy Markdown
Contributor Author

Coordinated fix for the cross-PR source-shape finding on #260: 5c77acf updates private record authority verification to reuse record_cohort_inputs() and its complete source bindings, with untouched native_rows retained for execution verification. This supports both extended single-source metadata and the segmented sources introduced by #260. Tests cover both shapes plus rehashed public metadata tampering (61 record-report tests passed; 19 product-authority tests passed).

#258 merged during this work. #260 now includes that main revision plus the segment-aware latency/settings/cost consumers in 62f410f. A private integration probe ran this verifier's actual function against #260's real two-segment certified report; both cases and both contracts were retained. Preserve the shared assembly and native_rows return when resolving #259's existing conflicts with current main. No provider calls were repeated.

@lanyue-llk lanyue-llk changed the title feat(web-extract): add completion metrics and compact comparisons fix(web-extract): verify report authorities and comparison contracts Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up to the #260 integration finding: 2afed0c preserves the latest main-rebased updates and fixes the complete private-check path for adapter-declared reference policies. The verifier now compares the report policy with the adapter's declared policy, and uses that policy for original field diagnostics. Assembly uses the same declaration. Default SWDE behavior remains unchanged; changing the public policy to an undeclared rule is rejected.

Validation: 78 record-report scenarios passed. A separate integration probe ran this branch's actual complete verify_completion_audit against #260's real two-segment certified report and original profile; both source cases and native executions passed. The #260 regression now supplies its frozen profile/content to the public check entry. Both updates used normal fast-forward pushes.

@lexmount-ocr lexmount-ocr Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Review complete · 3b00d8e

This review found 1 issue(s), including 1 blocking issue(s).

Comment thread src/harness/web_extract/report.py Resolved

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · b7e4b6a

No findings in this review.

@lexmount-ocr lexmount-ocr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete · ea56ee1

No findings in this review.

@lanyue-llk
lanyue-llk merged commit b3431a4 into main Nov 10, 2026
8 checks passed
@lanyue-llk
lanyue-llk deleted the codex/scrapegraph-human-eval branch November 10, 2026 08:35
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