feat(stores): run-scoped knowledge stores with lineage-chain reads, and the claim-evidence contract - #115
Merged
Merged
Conversation
…nd the claim-evidence contract Grown in a discovery campaign that learned each rule by paying for it, recorded in that lab's docs/15-adoption-decisions.md as debt owed here. run-scoped.ts: one store per run, isolated by construction, inheriting only by ancestry declared at init. When every run writes one shared store, a false 'measured' claim from one arm becomes the next arm's settled provenance — the motivating campaign shipped two such claims into live agent instructions before anyone re-derived them. Chain reads label every page here / inherited:<runId> / shared, because those are three different provenance claims a reader must weigh differently. Lineage cycles fail loud; absent ancestry ends the chain. claim-evidence.ts: evidence rungs as a first-class type, a record-time refusal of rung>=4 claims that carry no re-executable check (a self-grade nobody can dispute), and the calibrated verdict lattice — verified / silent-check / contradicted / unrunnable / uncheckable. The lattice's distinctions each exist because collapsing them blamed the wrong party on first contact with real claims: a silent assert graded three TRUE results as refuted, and a missing input file was indistinguishable from a failed assertion. 13 tests: isolation, origin labeling, sibling non-inheritance, shared-store reads, absent-lineage termination, cycle refusal, and the four calibration cases that were graded wrong before the lattice existed.
tangletools
approved these changes
Aug 6, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 45669a41
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-08-06T09:43:34Z
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.
What
Two additive modules, no changes to existing surfaces:
run-scoped.ts— one knowledge store per run, isolated by construction, inheriting only through ancestry declared atinit. Chain reads return every visible page labeledhere/inherited:<runId>/shared, because "this run established it", "an earlier attempt believed it", and "the lab curates it" are three different provenance claims a reader must weigh differently. Lineage cycles fail loud; absent ancestry ends the chain quietly.claim-evidence.ts— evidence rungs (1–5) as a first-class type; a record-time refusal of rung ≥4 claims that carry no re-executable check; and the calibrated verdict latticeverified / silent-check / contradicted / unrunnable / uncheckableas a pure function, so every grader shares one semantics while execution stays with the caller.Why here
Grown in the discovery-lab campaign and recorded there (
docs/15-adoption-decisions.md) as debt owed to this package — the lab's standing rule is that a capability its tools grow must migrate upstream rather than live as a local fork.Each rule was paid for before it was written:
assertGradeableEvidencerefuses the shape at record time.Verification
pnpm lintclean,pnpm typecheckclean,pnpm buildclean🤖 Generated with Claude Code