Skip to content

Accept risk-control body output against body and record contracts - #50

Closed
lanyue-llk wants to merge 2 commits into
mainfrom
codex/body-contract
Closed

lanyue-llk wants to merge 2 commits into
mainfrom
codex/body-contract

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Risk-control body extraction currently fails when registered navigation, login or footer text is missing, even when the independent body and record requirements are satisfied. The compiler now marks stable text as diagnostic for the 97 cases with body or composite contracts; the three anchor-only cases retain mandatory text.

The shared scorer supports an explicit stable_text_role on body-text contracts and rejects a diagnostic role without a body or composite gate. Anchor matches and misses remain inspectable. Record counts, same-record fields, real links, blocked pages, forbidden content and body sufficiency remain required. Existing contracts without the role retain their behavior, including historical heading requirements. English guidance follows the corrected scope. Historical profiles, certificates, calls and published scores remain unchanged.

Validation: 241 tests and 654 regression subtests pass. Positive and negative controls cover full body without page-shell text, incomplete body, complete and incomplete records, placeholder links, request failure, joint body/record requirements, identity, blocked pages, minimum length, anchor-only fallback and the compiler policy across all 100 frozen cases. The original main scorer reproduces the body/list false rejections before the fix.

Offline impact: all 2,782 retained response artifacts were hash-verified. For the matched-version comparison, the scorer at 4b91f6bc8ef9d27e8d7824d6ea0c66cb3ee292a1 matches the saved scoring-source hash exactly; baseline recalculation reproduces all saved risk-control verdicts. Only this policy changes in the after calculation. Other task families retain their saved metrics.

Retained method Risk-control passes before → after / 100 Total passes before → after / 430
Moli 28 → 28 228 → 228
Lightpanda 40 → 43 237 → 240
Obscura 14 → 14 188 → 188
Chromium 3 → 4 190 → 191
Kitesurf 10 → 11 171 → 172
Moli PR919 evidence 19 → 29 196 → 206

The separate Moli 1.1.16 retained subset changes from 73/202 to 99/202; its risk-control portion changes from 21/72 to 47/72. All 26 flips satisfy the independently recalculated body/record contracts and fail solely on stable anchors before the correction. These are subset results, not a new full-cohort score.

Current main has older extraction rules than the retained scorer. A separate main-based analysis yields nine six-method flips and one subset flip, with 28 and 17 pre-existing baseline verdict differences respectively. These differences are kept separate from the matched-version policy impact above.

Paired regression IDs, independent contract authorities, input/output hashes, exact changed attempts and reproducible policy patch are bound by research/risk-control-body-scope-revision.json; generated evidence stays outside Git. No browser implementation changes or provider calls.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Both fixes, the body-acceptance tests, and the revision binding are represented in #42 by the conflict-resolved aggregate commits 061bcce9 and c7a31e24. Keeping this PR open would leave a duplicate integration path, so #42 is the sole delivery PR.

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