Repository navigation
fix(web-extract): verify report authorities and comparison contracts - #259
Conversation
There was a problem hiding this comment.
This review found 9 issue(s), including 9 blocking issue(s).
There was a problem hiding this comment.
This review found 7 issue(s), including 7 blocking issue(s).
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 3 issue(s), including 3 blocking issue(s).
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.
✅ Re-review complete · 9ad53ee
No findings in this incremental review.
There was a problem hiding this comment.
✅ Re-review complete · 54c92c5
No findings in this incremental review.
There was a problem hiding this comment.
✅ Re-review complete · 7e1884c
No findings in this incremental review.
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.
✅ Re-review complete · e5a41d2
No findings in this incremental review.
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
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 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 2 issue(s), including 2 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 2 issue(s), including 2 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
There was a problem hiding this comment.
✅ Re-review complete · aea09f2
No findings in this incremental review.
There was a problem hiding this comment.
✅ Re-review complete · fec26ab
No findings in this incremental review.
lanyue-llk
left a comment
There was a problem hiding this comment.
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
-
Registered release commands no longer work.
check --releaseandpackagenow need--home, andpackagealso needs--profile.check --releasewithout--profilefails at the end ofcheck(), becauseverify_completion_auditrequires a profile.configs/report-templates.jsonstill listsrelease_check,packageandpublish(lines 86-90) without these arguments.scripts/report_template.pyis the discovery owner that AGENTS.md tells authors to follow, so the documented release path fails. Please update the registry entries, and makecheck --releaserequire--profileat argument parsing rather than after the visual-receipt check. -
The new columns highlight tied values (inline).
record_comparisonmarks every value equal to the extreme, and these tables setdata-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
-
The full audit verification runs about six times per publish (inline). One
publishcallsverify_completion_auditdirectly. Thenpackage()calls it,check()calls it at its start (profile given) and again at its end (release), the first upload guard calls it, andbindcalls it. Each run callsvalidate_datasetand 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. -
Product field names are hard-coded in
completion_bundle(("price", "sku", "availability")) and incompletion_metrics.valid()(price/availability).pipeline.FIELDSand 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.
There was a problem hiding this comment.
✅ Re-review complete · 3b2a6c7
No findings in this incremental review.
There was a problem hiding this comment.
ℹ️ Review skipped · e8e42dc
No reviewable content was selected for this run.
5c77acf to
18e6370
Compare
|
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. |
|
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. |
There was a problem hiding this comment.
This review found 1 issue(s), including 1 blocking issue(s).
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: