Repository navigation
feat(insights): keep words out of the chain - #49
Merged
Merged
Conversation
Issue #6's criteria are met on main (M19a/b/c, PRs #26-#46), so PLAN says so. §20.4 ticks the live run (M20: 68 calls, 79 records, 70 with words, 3 glossaries) and the docs box (docs/vocabulary.md, #45). The Definition of Done is restated for what was tested: M19a/b on Broadleaf, M19c on Spring PetClinic in Broadleaf's place, with the side-car (prompt "2", 139 records) importing and exporting cmp-equal, and the v1 migration. The §22 rows for M19a/b/c give the merge dates of #26-#30 and #46. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyytH9LKzUTsUaKxeH
A dependent hashed its dependencies' whole fingerprints, words included, though no caller's prompt shows a callee's words. A correction to the word lists therefore re-explained everything above the units it touched: 53 calls on Spring PetClinic for 9 units whose words moved. Each unit now has two hashes. The fingerprint is stored on its records as before. The chain (chainOf) is every input but the words, over the dependencies' chains, and is never stored. A dependent hashes a dependency's chain, except a module, which reconciles its types' word entries into its glossary and so hashes their whole fingerprints (readsWordsOf). Source, comments, signatures, facts, model, depth and missing dependencies are all in the chain and still cascade. No store is re-explained for the switch: a record whose stamp matches the fold from before (stampedBeforeSplit) is reused. That stamp is compared, never written. A match means every transitive input is unchanged, words included. Measured on a copy of the PetClinic store: the old fold reproduces all 106 stamps (0 calls); today's words cost 53 calls as stamped and 10 on a store stamped under the split (~$0.08 against ~$0.02). An existing store still pays the 53 once. 9 new tests; six mutants of the rule are each killed. docs/insights.md IN-5, docs/vocabulary.md, the website's explanation and cost pages and PLAN §20.3/§23 follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyytH9LKzUTsUaKxeH
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
codegraph | 5263bf9 | Commit Preview URL Branch Preview URL |
Nov 18 2026, 10:24 AM |
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.
Two commits. Refs #6.
1.
docs(plan): close M19 on PetClinicIssue #6's acceptance criteria are all met on
main(M19a/b/c, #26–#46), so PLAN now says so:cmp-equal, plus the v1 migration). A "Met" paragraph is added.2.
feat(insights): keep words out of the chainThe problem. Each unit's fingerprint folded in its dependencies' whole fingerprints, including the words the prompt asks the model to define. But no caller's prompt ever shows a callee's words (
DependencySummaryis a summary and a concept). So a correction to the word lists re-explained everything above the units it touched. On PetClinic, #42 made 9 units stale through their own words and 44 more through this cascade alone.The rule.
chainOf), which is every input except the words, folded over the dependencies' chains. It is never stored.readsWordsOf).No store is re-explained for the switch. A record whose stamp matches the formula from before the split (
stampedBeforeSplit) is reused. That stamp is only ever compared, never written. A match means every transitive input is unchanged, words included, so the new rule would reuse the record too.Measured on a copy of the paid PetClinic store:
A store stamped before this change still pays its 53 calls once. An old stamp mixes words and source into one hash, so it can't tell which of the two changed. Records get the new stamp as they are re-explained; nothing is rewritten on reuse.
Tests. 9 new tests:
Six mutants of the rule are each killed: no module exception, the old formula, old stamps refused, words in the chain, whole fingerprints in the chain, and the run stamping the chain.
Docs.
docs/insights.mdIN-5,docs/vocabulary.md(the open question is closed), the website's Explaining bottom-up and Explain cost pages, a PLAN §20.3 "As built" paragraph and a §23 decision row.Verification
pnpm -r --filter '!@codegraph/website' typecheckpnpm -r --no-bail test: 3 335 tests./test.sh --ts --skip-install: all checks passed🤖 Generated with Claude Code
https://claude.ai/code/session_01PKCVgyytH9LKzUTsUaKxeH