Repository navigation
refactor(knowledge)!: remove unused KB policy optimization, relation graph, and invalidation helpers - #243
Merged
Conversation
…graph, and invalidation helpers No consumer imports optimizeKnowledgeBasePolicy, improveSelectedKnowledgeCandidate, buildKnowledgeRelationGraph, knowledgeCitationAuditFindings, planInvalidationPropagation, calibrateRagAnswerJudge, or createRagAnswerQualityHook. improveKnowledgeBase, the page graph, citation resolution, lint, and RAG answer scoring stay. BREAKING CHANGE: those root exports and the relation-graph types and schemas are removed.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
tangletools
approved these changes
Oct 6, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved PR — 32a53741
Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-06T07:17:46Z
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.
Problem
Eight root APIs have no consumer, together with their modules and tests (1,826 source lines and 735 test lines):
optimizeKnowledgeBasePolicyandimproveSelectedKnowledgeCandidate(kb-improvement/optimization.ts,kb-improvement/selected-candidate.ts);buildKnowledgeRelationGraphwithneighbors,walk,isReachable, and the relation-graph types and schemas (feat(graph): add a labeled relation graph with a query surface #161, built for a Discovery Lab provenance adapter that was never adopted);knowledgeCitationAuditFindings(citation-lint.ts);planInvalidationPropagationandformatKnowledgeInvalidationProposal;calibrateRagAnswerJudgeandcreateRagAnswerQualityHook(rag-eval/calibration.ts).Change
state-scope,graph, andrag-evaltests that exercised them.KnowledgeRelationNode,KnowledgeRelationGraph, and their schemas.KnowledgeRelationandKnowledgeRelationSchemastay, because page relations and the index graph use them.cites-invalidatedwarning andexcludeInvalidatedsearch), and drop the removed rows and sentences. Drop the relation-graph bullet fromdocs/architecture.md.verify-package.mjsno longer requiresoptimizeKnowledgeBasePolicy.Consumer evidence
The same import scan as #240-#242 found no import of any removed name. It covered the Mac checkouts,
~/codeon beelink1 and drew-gtr-pro, and fresh clones of every dependent repository. The scanner did flagwalk, but the only file was Tax Agent'stangle-peer-floors.test.ts. It names the package only as a string in a peer-floor table, and "walk" appears in its comments. Discovery docs mentionplanInvalidationPropagationas a one-time migration in its deletion ledger; no current code calls it.Why this is the right long-term shape
The public surface becomes the APIs products actually call. Each removed helper either had no adopter or was a one-time migration tool.
Cost
24 files, 6 insertions, 2,615 deletions. This rides the unpublished 20.0.0 major. Rollback: revert, or stay on 19.x.
Verification (beelink1, merged with origin/main)
pnpm install --frozen-lockfile,pnpm lint(only the existingproposals.tswarning),pnpm typecheck,pnpm build, andpnpm run api:surface(642 exports) all pass.pnpm test: 61 files, 668 passed, 2 skipped, 0 failed. After the final import cleanup I reranstate-scope.test.ts: 4/4 passed.node scripts/check-version-bump.mjspasses: 34 export changes are paid for by 19.1.5 -> 20.0.0.git merge-tree --write-tree origin/main HEADis clean.