Repository navigation
G-28: clear unused-var lint debt and fix exposed defects - #122
Merged
Merged
Conversation
Remove all 106 @typescript-eslint/no-unused-vars warnings: 96 were dead bindings/imports/catch clauses and an unreachable success overlay; ten exposed real defects fixed at source with failing-first tests. - prerequisites: add the missing cycle guard in paths() - runtimeGovernor + knowledgeGraphEngine: fail closed on query errors - analytics: keep the queued event's own user_id on delayed flush - consent: validate age in recordAgeVerification, store only the flag - adaptiveCurriculumEngine: derive confidence from observed mastery - QuizEngine: seed difficulty from stored topic mastery, not a pinned 50 - archive unreferenced duplicate ProfileSwitcher; drop callerless prefetch stubs - strengthen dependency graph (tsPreCompilationDeps); orphans 13 -> 6 documented Gates: lint 0/0, typecheck 0, 138 files / 759 tests, boundary 0, QA pass, web export pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
G-28 — clear unused-var lint debt and fix the defects it exposed
Stacked on #121 (G-27). Merge #121 first; this branch then collapses to the G-28 diff. Opened against
mainbecause the CI workflow only triggers when the PR base ismain/master.Result
lint:cycles: 0 errors;no-orphans13 → 6 (graph strengthened withtsPreCompilationDeps).What the 106 warnings actually were
96 were dead code (unused imports, unused catch bindings, unused locals/destructures, and an unreachable success overlay). Ten exposed real defects, each fixed at source with a test that fails without the fix:
src/domain/learning/prerequisites.ts—paths()ignored itscurrentset; cyclic edges recursed unbounded. Added a cycle guard.src/runtime/runtimeGovernor.ts— ownership query error was ignored (could read as a pass). Now fails closed.lib/analytics.ts— queued eventuser_idwas discarded; delayed flushes were attributed to the wrong user. Now keeps the event owner.lib/knowledgeGraphEngine.ts— active-path query error ignored. Now returnsnull.lib/privacy/consent.ts—recordAgeVerification(age)discarded/unvalidatedage. Now validates and stores only the flag.lib/adaptiveCurriculumEngine.ts—estimateTimeToGoalreturned a fixedconfidence: 0.85and ignoredlearnerId. Now derives confidence from observed mastery.components/QuizEngine.tsx—setMasteryLevelwas never called, pinning difficulty at "medium" for every learner. Now seeds from stored topic mastery.Removed rather than silenced
components/ProfileSwitcher.tsx(git mvtoarchive/).prefetch()no-op stubs that claimed a capability the code did not provide.Remaining orphan warnings (documented, not deleted)
6 modules have no production importer (test-only or unwired):
socratic.ts,diagnostic.ts,adaptive-progression.ts,curriculum/types.ts,payments/paymentProvider.ts,lib/network.ts. Recorded in the evidence file, not deleted, so the gap stays visible.Evidence:
docs/evidence/sprint104-g28-lint-debt.md.