Cleanup: dead code, doc drift, duplicated rules, and inconsistent helpers
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
- Área
- cli, developer-experience, tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 15 h 5 min
- PR fusionados (30 d)
- 163
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Kuldeep2822k/cli
-
feat: comprehensive observability layer (diagnostics + metrics)Posiblemente ocupada @Kuldeep2822k la tomó hace 2 días. Abiertocli core enhancement storage tests
Kuldeep2822k/cli#591 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Task: Full-repository improvement audit at 24947bc — verified P1/P2/P3 remediation checklistPosiblemente ocupada @Kuldeep2822k la tomó hace 8 días. Abiertochore ci cli core dependencies P1 security storage tests working
Kuldeep2822k/cli#565 · 2 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Kuldeep2822k/cli#522 ·
Los mantenedores suelen responder en 1 día
-
bug tests
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Kuldeep2822k/cli#504 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dependency DashboardAbiertoci dependencies security
Dificultad 4/5 3-5 días Aptitud para principiantes 8/100
Kuldeep2822k/cli#463 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de Kuldeep2822k/cli
Issues similares
-
documentation good first issue roadmap
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
resend/react-email#3876 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
siyuan-note/siyuan#21324 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
dmno-dev/varlock#1279 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
himynameisdave/bsky-profanity-counter#59 ·
Los mantenedores suelen responder en 1 día