Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Test gaps found in the Oct 7 code review: fakes, snapshot-only e2e assertions and fixed sleeps

Open
#196 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
testing

Research direction

Start with the high-severity bug issues #159–#178 and the named test entry points: tests/e2e/chat.test.ts, tests/e2e/panels.test.ts, retry.test.ts, and session.test.ts. Compare the fakes and assertions with the real dependency contracts, then prioritize failure-path tests in the affected modules. Done means the listed gaps are covered, e2e checks verify rendered state, and fixed sleeps are replaced with condition waits.

Written by the indexing model from the issue text.

Description

priority: medium severity: low tests

The 2026-10-07 code review found several tests that pass without checking what they are meant to check. Bug-specific tests are listed in each bug's issue (#159–#178); this issue covers the patterns.

Problems

  • Fakes that behave better than the real dependency:
    • The fake sandbox helper exits after sending an error, which hid #162.
    • retry.test.ts only feeds hand-built error objects and never passes a real SDK stream error through runTurn, which hid #173.
    • The browser tests use fake timers.
  • E2E checks main-process state, not the screen: waitFor in tests/e2e/chat.test.ts:44-57 and similar polls chat:snapshot from the main process. Main/renderer desync such as #161 is invisible to the suite.
  • Fixed sleeps: tests/e2e/panels.test.ts:46 (waitForTimeout(1500)), documentation-visuals.test.ts:99,171,179,198, long_run.test.ts:100, and many 100–200 ms polls.
  • Failure paths with no tests:
    • session.test.ts only covers keep-alive: no stop/resume/resumable, stop during compaction, or editUndone and plan-mode notes.
    • No test where chat_manager.open() fails.
    • MCP: no server dying, stop() during a connect, connect timeout, or tool-name collisions.
    • Shell: no foreground timeout, output cap, or leftover-process test.
    • Code index: no failure mid-update and no concurrent callers.
    • No corrupt settings or project files.
    • Rust helper: no recovery with one failing record.
  • Renderer: app.ts, transcript.ts, panels.ts and dialogs.ts have no unit tests.

Fix

  • Make fakes match the real contract (the helper stays alive until stdin closes; a stream error comes wrapped as the SDK wraps it).
  • Add DOM-level assertions to e2e tests that cover state sync.
  • Replace fixed sleeps with condition waits.
  • Add the failure-path tests above, starting with the modules the high-severity bugs live in.
Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
5h 52m
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.