feat(recall): entire recall β checkpoint history as trust-ranked associative memory - #2289
Open
voxmastery wants to merge 1 commit into
Open
feat(recall): entire recall β checkpoint history as trust-ranked associative memory#2289voxmastery wants to merge 1 commit into
entire recall β checkpoint history as trust-ranked associative memory#2289voxmastery wants to merge 1 commit into
Conversation
β¦sociative memory
Adds an experimental `entire recall` command that turns a branch's checkpoint
history into associative, provenance-weighted memory. A developer or a fresh
agent session asks "what did we decide and why" and gets ranked hits, each
carrying a tier (LEDGER commit record / INTENT user prompt / chat assistant
claim), a verdict of the claim against the commit it sits on, and the backing
commit β instead of a transcript dump.
Layout
- cmd/entire/cli/recall_cmd.go, recall_collect.go: a thin Go shim. `recall
ingest` walks trailered commits, reads each checkpoint's transcript and diff
through the persistent store, and pipes JSON to the `recall` binary;
`recall <question>` renders the binary's ranked hits. No ranking logic.
- recall/: Rust crate on FluctlightDB (embedded, local). ingest maps prompts,
assistant turns, commit records and touched files to engrams; activate
reranks by provenance and by `agreement()`, six ordered checks of a claim
against its commit (graph-reach scope, file, polarity, identifier anchor,
lexical, 4-gram). Score = activation Γ confidence multiplier; never raw
activation.
- Entire Graph supplies the reach used by the scope check (`entire graph
symbols` once, `impact` per touched file, capped at 40 queries).
Privacy boundary (sensitive repositories)
- A checkpoint whose transcript cannot be read is never dropped: the commit
record is ingested with the missing fields declared in `unavailable`.
- Fourth verdict `unverifiable`, distinct from `neutral`: a check whose input
was redacted or unavailable says so instead of judging emptiness.
Unavailability is declared by the shim, never inferred, so complete
checkpoints take the identical path.
- Every answer opens with a coverage line; `--json` returns
`{"coverage", "hits"}`. `complete` is printed only when nothing was missing.
Hits from partial context carry `partial: [...]` and are capped at 0.50.
- `ingest --no-transcripts` never opens a transcript.
- recall/scripts/verify-offline.sh proves 0 network syscalls under strace.
Evaluation: `cargo run --release --example bench` over 840 labelled
claim/commit pairs generated from this repository's own history β
P 0.869 / R 0.270 / Spec 0.927, ~145 Β΅s per verdict. Precision-biased by
design; recall is the documented limitation.
Wiring: registered via experimental.Register (hidden in stable builds),
classified in agentHelpClassification as task-driven, listed in `entire labs`.
Tests: 27 in recall/tests/port.rs, 19 Go tests in recall_cmd_test.go.
Docs: recall/README.md, docs/recall/architecture.md, CLAUDE.md paragraph.
Entire-Checkpoint: 01M1V9FZQVA240M67CZZA3GSN1
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
Adds an experimental
entire recallcommand: checkpoint history as trust-ranked associative memory. A developer, or a fresh agent session whose context window has closed, asks "what did we decide and why" and gets ranked hits, each carrying a tier (LEDGER commit record / INTENT user prompt / chat assistant claim), a verdict of the claim against the commit it sits on, and the backing commit β instead of a transcript dump.Git records what changed; checkpoints preserve why. But preserved context is an archive, not a memory: search returns transcripts, and a statement like "this change is isolated to one package" sits there looking as authoritative as everything else even when the diff reaches three others.
recallranks checkpoint context by how much it can be trusted, not by keyword match.Built on Track 1 of the BTW Buildathon 2026 (Bengaluru) with Entire's own checkpoints, trailers and Graph as the input corpus. This PR is the feature only; the event write-up, benchmark provenance and demo live on the fork's
main.What is in the PR
Go shim β
cmd/entire/cli/recall_cmd.go,recall_collect.go(+ tests).entire recall ingestwalks trailered commits on the current branch, reads each checkpoint's transcript and diff through the persistent store, and pipes JSON to therecallbinary.entire recall <question>renders the ranked hits (--jsonfor machines). No ranking logic lives in Go.Rust crate β
recall/on FluctlightDB (embedded, local, MIT/Apache-2.0).ingestmaps prompts (UserExplicit), assistant turns (ChatAssertion), commit records (LedgerVerified) and touched files to engrams.activatenever sorts on raw activation: provenance βSourceKind;agreement()runs six ordered checks of a claim against its commit β graph-reach scope, named file, action polarity, identifier anchor, lexical, 4-gram cosine β and the result adds or removes evidence before a noisy-OR confidence sets the score.Entire Graph supplies the reach the scope check uses: one
entire graph symbolsstream, thenimpacton the first two code symbols each touched file defines, capped at 40 queries per ingest. No graph β no edges; nothing is fabricated.Wiring follows the existing conventions:
experimental.Register(hidden in stable builds, shown in developer/nightly), anagentHelpClassificationentry (recallandrecall ingestare task-driven, unlisted βingestrebuilds derived state under.entire/recall, so the group cannot claim read-only), a row inentire labs, and a CLAUDE.md paragraph. The binary is located via$ENTIRE_RECALL_BIN, thenrecallon$PATH, thenrecall/target/{release,debug}/recall; the Go side builds and tests without Rust installed.Privacy boundary: sensitive repositories
.entire/recall/(gitignored). The only network on the ingest path is git fetching the repo's own checkpoint refs.recall/scripts/verify-offline.shruns ingest and activate understrace -f -e trace=networkand fails on a single socket call β measured, not asserted, because FluctlightDB's dependency tree does includehyper/tokio(behind an unused feature and an uncalled server module).unavailable. On this repository that is the difference between 3 and 125 checkpoints, because most checkpoint refs live on an upstream remote a fork cannot read.unverifiable, distinct fromneutral. Neutral means "checked, found nothing". Unverifiable means "could not check: the field this check needed was redacted or unavailable". Unavailability is declared by the shim, never inferred from an empty field, so complete checkpoints take a byte-identical path.--jsonreturns{"coverage": ..., "hits": [...]}.completeis printed only when every checkpoint was indexed whole, the commit walk was not cut short, and the graph was consulted. Hits from partial context carrypartial: [...]and their confidence is capped at 0.50, below any corroborated hit.entire recall ingest --no-transcriptsnever opens a transcript.Evaluation
cargo run --release --example benchrunsagreement()over 840 labelled claim/commit pairs generated from this repository's own public history under four of the CodeFuse-CommitEval mutation rules (operation type, file path, function name, component):Precision-biased on purpose: when it flags a claim as contradicted it is right 87% of the time, and it stays silent otherwise. Recall is the documented limitation. The thresholded checks are calibrated to this repo's commit style; the structural identifier-anchor check is the part that transfers.
Note on
recall/bench/bench_840.json(3.7 MB): it contains real diffs from this repository's history, including the AWS Access Key ID fixture your secret-redaction tests use. GitHub secret scanning flags it on the fork; it is your own test fixture, already present across many upstream commits, not a live credential. Happy to move the file to Git LFS or an external download if you would rather not carry it in-tree.Test plan
go test ./cmd/entire/cli/...β all packages pass exceptTestPathIsVersioned_ReftableRepo, which needs git β₯ 2.45 and fails identically onmainhere (git 2.43)gofmt -s,go vet,golangci-lint run ./cmd/entire/cli/...β no new issues (one pre-existing gosec finding inutils.go, untouched)go mod tidyβ no changes; dupl at threshold 75 β no hits in the new filescargo fmt --check,cargo clippy --all-targets(0 warnings),cargo test(27 passed)cargo run --release --example benchβ P 0.869 / R 0.270 / Spec 0.927recall/scripts/verify-offline.shβ 0 network syscallsentire recall ingeston this repo β 125 checkpoints, coverage linePARTIAL Β· 5 of 125 checkpoints complete Β· 120 without transcript Β· β¦; queries return the expected commits as LEDGER hits withβ partial context: transcript unavailablewhere the transcript was unreadablemise run checkend to end (mise is not installed on this machine; the individual steps above were run directly)listed/audience forrecallinagentHelpClassificationβ I took the safe default (unlisted, task-driven) per CLAUDE.mdKnown limitations / follow-ups
semantic_vectorwith a local embedder is the highest-value next step.definition/search,owner/repo) can still trip the file check on long pasted prompts; per-sentence claims rather than per-turn is the fix.entire graph indexbefore ingest avoids a ~90 s re-index.π§ Built with WOZCODE