Repository navigation
fix(web-fetch): rescore saved evidence that carries retired forbidden-text metrics - #251
Merged
Merged
Conversation
lanyue-llk
force-pushed
the
fix/rescoring-legacy-metrics
branch
from
November 5, 2026 06:53
19df4f3 to
016a5ce
Compare
lanyue-llk
added a commit
that referenced
this pull request
Nov 5, 2026
lanyue-llk
added a commit
that referenced
this pull request
Nov 5, 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.
Question
Can
content-rescore,scoring-revisionandreference-revisionrun on saved Web Fetch evidence? All 2,580 rows in the stored 430-task evidence carryforbidden_hits.Cause
_rescore_onereads the old verdict throughtask_passedbefore it rescores.task_passedrefuses retired fields (forbidden_hits,acceptance_policy_version,blocked_pagewithout current fields), so the tool that is meant to migrate those rows crashes on them. Reproduced on a clone of the stored evidence:metrics.py:734viarescoring.py:46.Fix
_stored_verdictinrescoring.pyapplies the rule from before the fields were retired (5400a0c): a hit fails only under policy 1, otherwise it is diagnostic. All other fields go through the current predicate, as they already do for current rows.metrics.pyis unchanged, so the scorer source hash is unchanged.Evidence
Reproduced on an APFS clone of the stored evidence (2,580 rows, all with
forbidden_hits). The originals were not modified; theresults.jsonlhash is stillc99eddea.rescoreraised on the first row. The new tests fail onmaincode (3 failed) and pass with the fix._stored_verdictmatched the recordedmachine_verdicton 2,580 of 2,580 rows offinal-six-current-430-v4(1,630 pass, 950 fail), using that directory's ownresult-review.json. No row hasacceptance_policy_version, so the policy-1 branch is covered only by a test fixture.content-rescoreran serially for 2h41m on the clone, printed no error and wrote no output, then was stopped. It therefore proves no end-to-end result on real evidence._rescore_onedirectly, which is a private helper rather than the CLI. Of 144 rows reached, 139 completed with no crash and no retired fields left, and 5 hit the 20 s limit. The median row took 0.05 s.{"links"}image answers and catalog preface lines (see fix(web-fetch): score declared image links and heading-price catalog cards #250).page_identity_statusis not a cause. Do not apply a rescore to real evidence until these are fixed.maincode when rerun by name. The complete suite was not run onmain.Audit hash (no change)
The stamp omits
messages.jsonand report assets, but this does not let a wrong input pass.messages.jsononly suppliesfailure_categoryanddiagnosistext, which verdicts do not read, andrescoring.py,failure_diagnosis.pyandreport.pydo not referencereport-assets. Scoring inputs are bound elsewhere: dataset and results by their own hashes, outputs and artifacts by per-record checks. A search found no code that comparesscoring.source_sha256. One limit remains: changingmessages.jsoncan change the stored label text under the same stamp.What this does not do
reference-revisionor rule-changingscoring-revisionon rows still carrying retired metrics still fails closed, with no evidence changed.summarizereads the unselected rows. Run a scorer-onlyscoring-revisionfirst. A test covers this order.scoring-revisionorreference-revisionon real evidence. Those paths are covered by fixtures only.