tocLessonRank sets an empty stem for any non-.md basename, misclassifying it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
Start in src/engine/toc-chain.ts around line 850, in tocLessonRank, where the stem is derived from the basename, and compare it with the parseNumericPrefix call near line 853. Compute one stem by stripping a trailing .md or falling back to the lowercased basename, and pass that same value to both the README/phase/assignment checks and parseNumericPrefix. Done means a non-.md candidate is ranked as intended, and any existing tests for tocLessonRank still pass.
Written by the indexing model from the issue text.
Description
Location: src/engine/toc-chain.ts:850
stem becomes '' for any basename not ending in .md, so README/phase/assignment checks fail and the note falls to rank 3, while the numeric check on :853 uses the full basename. Extension handling is split between two inputs, giving a subtly wrong chain order for edge-case candidates.
Fix: Compute stem by stripping a trailing .md if present else the whole lowercased basename, and feed that same stem to parseNumericPrefix.
From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 167
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kuldeep2822k/cli
-
core priority: medium tests
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Kuldeep2822k/cli#484 ·
Maintainers usually reply within 1 day
-
bug core priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Kuldeep2822k/cli#342 · 1 comment ·
Maintainers usually reply within 1 day
-
build dependencies documentation refactor
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Kuldeep2822k/cli#531 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Kuldeep2822k/cli#522 ·
Maintainers usually reply within 1 day
-
bug tests
Difficulty 5/5 Over a week Newbie friendliness 25/100
Kuldeep2822k/cli#504 ·
Maintainers usually reply within 1 day
All issues in Kuldeep2822k/cli
Similar issues
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --displayPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
pingdotgg/t3code#24900 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
inu-appcenter/UNIDorm-web#411 ·
Maintainers usually reply within 1 day
-
🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ranxianglei/billion-context#4720 ·
Maintainers usually reply within 1 day
-
area:arcade game p3-medium ready-for-agent type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
fderuiter/deruiter.dev#2840 ·
Maintainers usually reply within 1 day