Repository navigation
claims: a draft joins a claim of its sentence by the claim's active quote (#211) - #214
Conversation
…ive derivations quote them, so an old wide quote joins no two claims (#211) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wbKzQZyG5Aq6poybwciHt
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideUpdates claim keying to match drafts against only the active quote for each existing claim, eliminating false UID reuse from obsolete wide quotes, and adds a regression test covering narrowing followed by a separate adjacent claim. Sequence diagram for active-quote claim keyingsequenceDiagram
participant Draft as Draft
participant Keyed as curate::keyed
participant DB as ClaimsAndDerivations
participant UID as ClaimUIDs
Draft->>Keyed: keyed
Keyed->>DB: SELECT active claim quote via claims JOIN derivations
DB-->>Keyed: active quote range
Keyed->>Keyed: match draft quote overlap
alt overlaps active quote
Keyed->>UID: reuse claim_at
else no overlap
Keyed->>UID: assign independent claim_at
end
Flow diagram for narrowed-quote UID preservationflowchart LR
Wide["Initial whole-sentence quote"] --> Narrow["Same claim narrowed to active quote"]
Narrow --> Recurate["Recuration with narrow claim and adjacent claim"]
Recurate --> Same["Narrow claim keeps its UID"]
Recurate --> Separate["Adjacent claim receives its own UID"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Up to standards ✅🟢 Issues
|



Closes #211. From the Codex review of #210 (round 2), moved to an issue under that PR's stop rule.
What
curate::keyedgives a draft theclaim_atof the claim its quote overlaps in the same sentence. It looked at every derivation of that kind in the sentence, active or not. A claim first quoted with its whole sentence and later narrowed kept its old wide quote in the lookup. A later draft anywhere in the sentence then overlapped it and took the same uid, so one of two current claims was hidden.The lookup now reads each uid's active derivation only (
claimsjoined toderivations). A draft joins a claim by the range the claim quotes now.Test
an_old_wide_quote_joins_no_claim_to_a_narrowed_one: a claim quoted with the whole sentence, then narrowed, then a recuration that gives the narrow claim and one apart from it. The narrow claim keeps its uid, and the other gets its own. Matching against every derivation turns it red.Review stop rule (declared before the first round)
A finding is fixed here only if a plain environment reaches it and it hides a current claim or changes the uid of a claim written before this change. Everything else goes to an issue. After two rounds in a row whose findings all go to issues, or a 👍, this PR is merged with no further commit once
checkand CodeQL are green.🤖 Generated with Claude Code
https://claude.ai/code/session_012wbKzQZyG5Aq6poybwciHt
Summary by Sourcery
Match draft claims against active quotes so narrowed claims no longer hide distinct claims in the same sentence.
Bug Fixes:
Tests: