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

CRAP: newly scored platform-apple simulator boot retry and macOS helper file listing

Closed
#3,451 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start with packages/platform-apple/src/core/simulator.ts and its simulator boot entry point; add coverage for shouldRetry and classifyReason through that public path. Then inspect packages/platform-apple/src/os/macos/helper.ts and test listMacOsHelperSourceFiles through its owning module. Run pnpm check:coverage-crap --all on a branch containing #3448 and finish with pnpm check:affected --run; #3323 also edits the helper file.

Written by the indexing model from the issue text.

Description

Purpose

These findings were exposed by #3448, which patches the coverage tooling (part of #3425) so the six files that used to be unscored now get scores. Re-scoring them (full pnpm test:coverage on #3448's head, then pnpm check:coverage-crap --all) adds three functions at or above CRAP 30.

Findings (head 18d22c745 of #3448)

Function CRAP CC Coverage
packages/platform-apple/src/core/simulator.ts:142 shouldRetry (boot retry policy) 72 8 0%
packages/platform-apple/src/core/simulator.ts:156 classifyReason (boot deadline classifier) 56 7 0%
packages/platform-apple/src/os/macos/helper.ts:190 files (listMacOsHelperSourceFiles entry mapper) 42 6 0%

Owned files

  • packages/platform-apple/src/core/simulator.ts
  • packages/platform-apple/src/os/macos/helper.ts

Notes

  • shouldRetry, classifyReason and the catch block each rebuild the same classifyBootFailure input from bootStatusResult?.stdout ?? bootResult?.stdout. One local classifier closure would remove most of that branching, so covering the retry and deadline paths through the simulator boot entry point may need only a small production change.
  • Open #3323 also edits os/macos/helper.ts. Add tests only for that file, or rebase onto #3323 first.
  • These scores depend on #3448's patches. Without them, the two files stay unscored on main, so measure on a branch that includes #3448 (or after it merges).

Completion

  • None of the three functions is listed by pnpm check:coverage-crap --all on the PR head (with #3448's patches).
  • Tests go through the owning module's public entry point. No new production exports for tests and no test-only DI.
  • pnpm check:affected --run passes on the pushed head.

Part of #3414.

Dominant language
TypeScript
Stars
5k
Forks
334
Avg merge
11h 48m
Merged PRs (30d)
605

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 callstack/agent-device

All issues in callstack/agent-device

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.