Skip to content

Re-verify CI claim exemptions against each declared source label - #15

Merged
samrusani merged 1 commit into
mainfrom
label-aware-claim-reverify
Aug 20, 2026
Merged

Re-verify CI claim exemptions against each declared source label#15
samrusani merged 1 commit into
mainfrom
label-aware-claim-reverify

Conversation

@samrusani

@samrusani samrusani commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • CI claim_exemptions now checks each claim against its declared source section, not a joined evidence corpus.
  • Deck pages map as deck p.{key}. Site records map as site {path} from the requested URL. Missing source, unknown label, or a hit only in another section buys no exemption.
  • The in-process backstop, quotation verification, and the two-token bar are unchanged. The CI memo scan is still line-by-line.

Test plan

  • deck p.2 text only on page 1: no exemption
  • deck p.2 text only on the site: no exemption
  • site /about text only on site /: no exemption
  • Missing source fails closed
  • Requested URL wins over final_url
  • Golden and green still pass the language check
  • Five gates: 786 tests, ruff, format, mypy, language check

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>
@samrusani
samrusani merged commit 5060df5 into main Aug 20, 2026
5 checks passed
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

The PR strengthens CI claim-exemption verification by checking quotations against their exact declared evidence labels instead of a combined corpus.

  • Reconstructs deck labels as deck p.{key} and site labels from requested URL paths.
  • Fails closed for missing, blank, or unknown source labels.
  • Adds regression coverage for cross-page, cross-source, missing-source, and redirect cases.
  • Updates architecture, decision, roadmap, and handoff documentation to describe the stricter control.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The implementation consistently reconstructs labels from the same page numbers and requested URLs used by claim generation, fails closed on malformed evidence, and covers the relevant mismatch cases with regression tests.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "Re-verify CI claim exemptions against ea..." | Re-trigger Greptile

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