Cleanup: dead code, doc drift, duplicated rules, and inconsistent helpers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
- Ambito
- cli, developer-experience, tooling
Direzione di ricerca
Start with the listed acceptance criteria and the referenced files across src/engine, src/storage, src/cli, src/validation, and src/application; the issue spans many subsystems and several independent changes. Check the existing tests for each area before changing behavior. Done means the accepted cleanup items are addressed consistently and the relevant tests pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
LOW-severity cleanup: dead code, doc drift, duplicated rules
This is a cleanup umbrella issue for the batch of LOW-severity findings from
the deep audit. None of these are bugs that affect users today, but they're
inconsistencies and dead code that make the codebase harder to maintain.
Findings covered
| ID | Description | Where |
|---|---|---|
| A2 | detectCycles/validateDependencyGraph still enumerate cycles unbounded after #79 migration; 2 stale docblocks |
src/engine/dependency.ts:317,520-523,989; src/validation/rules/no-dependency-cycle.ts:6-7 |
| A3 | src/engine/index.ts:4-7 calls it "DAG analysis" but it detects/quarantines cycles; dependency.ts:4-6 says "depth-first cycle detection" contradicting the real algorithm |
src/engine/index.ts, src/engine/dependency.ts:4-6 |
| A7 | occConflict helper used at 1 site; 9 others hand-roll identical error; OCC block duplicated as post-write re-check (#479) |
src/storage/atomic-write.ts:233,375,389-391,400-403,409-411,446-450,461-463,503-537 |
| A8 | CONTAINMENT_ERROR_CODE exported, zero consumers; isContainmentError re-exported from 2 modules |
src/storage/containment.ts:185; src/storage/atomic-write.ts:580 |
| A9 | WHY-comments point to wrong locations (toc-chain.ts cited for isWithinVault which is in wikilink.ts; rotted line refs) |
src/storage/containment.ts:6; src/storage/lock.ts:50,360 |
| A10 | Windows retry policy hand-duplicated between lock.ts and atomic-write.ts (+ 3rd copy in test) | src/storage/lock.ts:52-56 vs src/storage/atomic-write.ts:29-33; test/storage-lock.test.ts:526 |
| A13 | adopt --undo skips the #311 vault echo (only mutating command that doesn't name its vault) |
src/cli/adopt-undo.ts:585 |
| A15 | y/N prompt accepts y or yes in adopt/adopt-undo but only y in roadmap; EOF exits 0 silently in 3 of 4 sites |
src/cli/adopt.ts:69-82; src/cli/adopt-undo.ts:152-165; src/cli/roadmap.ts:1055-1058 |
| A16 | assess --force help says "re-hides dependents without printing the warning" — that warning path never fires on TOC-adopted vaults |
src/cli/assess.ts |
| A17 | Mastery threshold "Mastered (≥70%)" hardcoded in plan/progress/dashboard but derived from constant in assess | src/cli/plan.ts:257; src/cli/progress.ts:251; src/cli/dashboard.ts:176 |
| A18/A41 | NextTopic.difficulty declared + populated but no reader exists |
src/application/get-next-topics.ts:27,172 |
| A20 | Empty --topic "" handled 3 ways: progress treats as flag-absent, review/assess pass through (matches all), session guards it |
src/cli/progress.ts:98; src/cli/topic-query.ts:63-67; src/cli/review.ts:52; src/cli/assess.ts:188; src/cli/session.ts:99 |
| A21 | Lesson-ranking/keyword rules hand-synced across 3 engine files; diverge on non-.md basenames | src/engine/toc-chain.ts:964-980; src/engine/auto-chain.ts:620-645 |
| A22 | tocChainable's paleeId parameter has no caller |
src/engine/toc-chain.ts:1157 |
| A25 | patternHitsFile's basename branch (line 333) is shadowed by matchPathGlob's fast path (227-230) |
src/storage/pattern-matcher.ts:333 |
| A26 | wikilink.ts:284,303: existsSync + statSync unguarded → raw ENOENT instead of UnresolvedWikilinkError |
src/storage/wikilink.ts:284,303 |
| A27 | Hedge sentence "i is in bounds, so this exists..." copy-pasted ~15 sites across 4 files |
src/storage/pattern-matcher.ts:47,159,243,279 + others |
| A32 | scanner.ts has a default export nobody imports (only default export in storage layer) |
src/storage/scanner.ts:326-327 |
| A33 | 3 diagnostic sites bypass displayValue() → YAML .nan reported as literal null |
src/validation/rules/valid-palee-schema.ts:57,61,72; src/validation/rules/valid-topic-id-format.ts:62; src/validation/rules/valid-topic-status.ts:49 |
| A34 | Sorting split between localeCompare and code-unit < across validation rules |
src/validation/rules/valid-topic-mastery.ts:175-179 vs others |
| A35 | 3 cross-reference rules resolve readIncomplete in opposite ways |
src/validation/rules/valid-hot-memory.ts:112; no-session-unknown-topic.ts:27-31; valid-session-index.ts:47-86 |
| A36 | FrontmatterResult.doc produced by parseFrontmatter, read by zero callers |
src/types.ts:451; src/storage/frontmatter.ts:88 |
| A37 | valid-topic-mastery.ts:89-107: 13-line jurisdiction guard with unreachable inner branch + comment misdescribes behavior |
src/validation/rules/valid-topic-mastery.ts:92-107 |
| A38 | OpenAICompatibleProvider.forConfig (provider.ts:512-517) has zero callers |
src/ai/provider.ts:512-517 |
| A39 | Credential-redaction expression written twice (provider.ts:189 inline + provider.ts:746 maskSecret) | src/ai/provider.ts:189,746 |
| A40 | readScoreRange builds identical error string in 2 branches; {value?; error?} shape forces caller cast |
src/application/record-assessment.ts:26-29,33-37 |
| A43 | y/N prompt implemented 3 ways (config.ts, adopt.ts, adopt-undo.ts, roadmap.ts) with divergent EOF/SIGINT | src/cli/config.ts:424-449; src/cli/adopt.ts:69-82; src/cli/adopt-undo.ts:152-165; src/cli/roadmap.ts:1055-1058 |
| A45 | palee plan runs quarantineCyclicTopics twice over the same topic map |
src/cli/plan.ts:87,129 |
| A46 | Four-pillar key tuple redeclared 5× across 4 layers under 4 names | src/cli/validate.ts:101; src/engine/mastery.ts:74; src/application/record-assessment.ts:13; src/validation/rules/valid-assessment-fields.ts:19,valid-topic-mastery.ts:34 |
| L9 | Docsify nav chrome + teacher/repo-meta notes adopted as topics in both plain and chained scans | live: webdev |
| L13 | review prints vault echo before a failed topic lookup, naming a vault it never touched |
live: webdev |
Acceptance criteria
- A2: Remove or bound
detectCycles/validateDependencyGraph, or update
the docblocks. DeletedetectCycle(zero callers). - A7: Route all 10 OCC error sites through
occConflict. Factor the
exists→read→fingerprint→compare block into one helper shared by the
pre-write and post-write checks. - A8: Make
CONTAINMENT_ERROR_CODEmodule-private. Drop the
isContainmentErrorre-export fromatomic-write.ts. Redirect the one test
import. - A10: Hoist the Windows retry constants + backoff formula into one shared
module. Both files import it. Test imports the constant instead of copying. - A13:
adopt --undocallsresolveVaultTarget(config, { json: false })
like siblingadopt.ts:206. - A15 + A43: One shared
promptConfirmationhelper insrc/cli/with
EOF/SIGINT handling, used by all 4 sites. - A17: Render the mastery-threshold label from
MASTERY_THRESHOLD
everywhere, likeassess.tsdoes. - A21: Hoist
compareLessonOrderTier0and keyword matching into
tier0-hygiene.ts. DeletetocLessonRankandtier0LessonRank. - A34: One shared code-unit comparator for all validation rules.
- A35: Pick one policy for
readIncompleteand apply it in all 3 rules. - A38: Delete
OpenAICompatibleProvider.forConfigor use it at the one
call site. - A39:
describeForeignTextcallsmaskSecret(secret, text). - A43 + A15: (Same fix, same helper.)
- A45:
findPrerequisiteBlockedaccepts an already-quarantined subgraph;
plan.tsderives both blocked + ready from one decomposition. - A46: Import
PILLAR_KEYSfrom the engine. Delete the 4 local tuples. - Tests for each fix where reasonable.
I did not use AI to generate this issue report.
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 0
- Merge medio
- 15h 5m
- PR unite (30g)
- 163
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Kuldeep2822k/cli
-
feat: comprehensive observability layer (diagnostics + metrics)Forse già presa @Kuldeep2822k l’ha presa 2 giorni fa. Apertacli core enhancement storage tests
Kuldeep2822k/cli#591 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Task: Full-repository improvement audit at 24947bc — verified P1/P2/P3 remediation checklistForse già presa @Kuldeep2822k l’ha presa 8 giorni fa. Apertachore ci cli core dependencies P1 security storage tests working
Kuldeep2822k/cli#565 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Kuldeep2822k/cli#522 ·
I maintainer di solito rispondono entro 1 giorno
-
bug tests
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Kuldeep2822k/cli#504 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Dependency DashboardApertaci dependencies security
Difficoltà 4/5 3-5 giorni Idoneità per principianti 8/100
Kuldeep2822k/cli#463 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Kuldeep2822k/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
earendil-works/pi-claude-code#36 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Resources: New work of jabodetabekForse già presa @rmt-svc l’ha presa oggi. Apertaresources
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
railmapgen/rmp-gallery#4167 ·
I maintainer di solito rispondono entro 2 giorni
-
documentation p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
microsoft/monaco-editor#5577 ·
I maintainer di solito rispondono entro 1 giorno