Four TOC complexity guards assert wall-clock time and are inherently flaky
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 65/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- testing
Research direction
The four timing guards are at test/engine-toc-chain.test.ts lines 93, 116, 151 and 188, each asserting elapsed time under 2000ms with performance.now(). Start by reading those four blocks and the TOC engine code they exercise to see what work could be counted instead of timed. Done means the wall-clock bounds are removed, either replaced by an operation-count bound or dropped, and the output assertions still pass. Pick one approach and confirm with the maintainer in the single existing comment thread before writing the change.
Written by the indexing model from the issue text.
Description
Location: test/engine-toc-chain.test.ts:93,116,151,188
Guards assert elapsed < 2000ms via performance.now(). Commit 46b94a5 widened the bound 250->2000ms after a loaded CI runner went red; a loaded runner can still exceed 2000ms on correct linear code, and a quadratic regression on small input could pass. Correctness is already pinned by the output assertions, not the clock.
Fix: Replace wall-clock bounds with an operation-count probe (visited < k * input.length), or drop the timing assertions.
From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 23h 35m
- Merged PRs (30d)
- 159
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 70/100
Kuldeep2822k/cli#343 · 1 comment ·
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
-
bug core priority: medium tests
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Kuldeep2822k/cli#304 · 1 comment ·
Maintainers usually reply within 1 day
-
bug core tests
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Kuldeep2822k/cli#514 ·
Maintainers usually reply within 1 day
All issues in Kuldeep2822k/cli
Similar issues
-
[BUG] rag: sentence content can cross the reported sentence boundariesPossibly taken @LJK-ikun claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
platformatic/mcp#361 ·
Maintainers usually reply within 1 day
-
frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nadaOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melgarafael/DeskcommCRM#3164 ·
Maintainers usually reply within 1 day