fix(synthesis): member claims join by source_url, not the orbit filter#191
Merged
Merged
Conversation
Case synthesis fed the map/reduce from deriveArticleRows' row.claims, which attach only orbit claims (about the case entity). Claims are authored about their subjects, so a 129-article case surfaced ~2 of ~1,900 claims — Phase 20.1 unioned ARTICLE membership (tag ∪ claim) but left claim-attachment on the orbit-only definition, so tag-member articles joined with empty claims. buildMemberUnits now joins each member's claims by normalized source_url against the full registry (data.claimsById), key-first/oldest-first. The deterministic dossier's deriveArticleRows attachment is untouched. synthesis-block derives the staleness hash from the actual member-claim ids sent (stored briefs re-hash once → correctly "stale"). - restores ~1,882 claims across 91 articles on the real corpus - URL join sidesteps the claim article_hash freeze (lags re-publish) - test: buildMemberUnits joins by URL, excludes non-member claims Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 18, 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.
The bug
A real corpus run over a 129-article case surfaced ~2 claims to the LLM. Root cause:
buildMemberUnitsfed the map/reduce fromderiveArticleRows'row.claims, and those rows attach only orbit claims —allClaims.filter(c => c.about.includes(caseEntityId)). Claims are authoredabouttheir subjects (SARS-CoV-2, EcoHealth, Fauci…), not the case container, so only the 2 claims someone tagged directly onto the case qualified.Phase 20.1 made article membership a union (tag ∪ claim-about-case) but left claim-attachment on the old orbit-only definition — so every tag-member article joined with
claims: []. Atomized claims were dropped before the model ever saw them.Confirmed against a live workspace: the case
"What is the origin of Covid?"has 2 of 1,882 claimsaboutit; the rest reference 378 subject entities.The fix (surgical, synthesis-only)
buildMemberUnitsnow joins each member's claims by normalizedsource_urlagainst the full registry (data.claimsById), key-first/oldest-first for determinism. Restores ~1,882 claims across 91 articles.deriveArticleRowsattachment is left untouched (governed separately byCASE_DOSSIER_DESIGN.md).synthesis-block.jsderives the corpus staleness hash from the actual member-claim ids sent, notdossier.orbit.claim_ids, so adding/removing a claim on a member invalidates the stored brief. Stored briefs re-hash once and show "stale" — correct, the corpus definition changed.article_hashfreeze (stamped at extraction, lags a re-publish): inclusion keys on URL and re-keys the unit to the member's current hash.Not in this PR (surfaced, deferred)
DIGEST_CLAIM_CAP = 150still bounds the reduce stage's cross-article claim index (the per-article map stage sees each article's full set).Verification
buildMemberUnitsjoins by URL and excludes non-member claims.npm test→ 1971 pass ·npm run buildclean ·npm run lint0 errors.🤖 Generated with Claude Code