Re-verify CI claim exemptions against each declared source label - #15
Merged
Conversation
A joined evidence corpus let a deck-page claim whitelist text that only appeared on the site, or on another page. Each claim is now checked only against its labeled section. Co-authored-by: Cursor <cursoragent@cursor.com>
|
| Filename | Overview |
|---|---|
| scripts/check_language.py | Replaces joined-corpus claim verification with exact source-label reconstruction and fail-closed per-section matching. |
| tests/test_language.py | Adds focused regression tests for incorrect page/site matches, absent sources, and requested-versus-final URL handling. |
| src/coldscreen/language.py | Updates the language-control documentation to reflect declared-source re-verification. |
| DECISIONS.md | Records the rationale, label reconstruction contract, unchanged safeguards, and remaining CI scan limitation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Stored claim text and source] --> B{Source is a non-empty string?}
B -- No --> F[No exemption]
B -- Yes --> C[Reconstruct labeled evidence sections]
C --> D{Exact source label exists?}
D -- No --> F
D -- Yes --> E{Claim has substance and normalized text occurs in that section?}
E -- No --> F
E -- Yes --> G[Allow span-level memo exemption]
Reviews (1): Last reviewed commit: "Re-verify CI claim exemptions against ea..." | Re-trigger Greptile
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.
Summary
claim_exemptionsnow checks each claim against its declared source section, not a joined evidence corpus.deck p.{key}. Site records map assite {path}from the requested URL. Missing source, unknown label, or a hit only in another section buys no exemption.Test plan
deck p.2text only on page 1: no exemptiondeck p.2text only on the site: no exemptionsite /abouttext only onsite /: no exemptionsourcefails closedfinal_url