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

Deleting the human view of `daemon status` leaves the whole suite green

Closed Beginner friendly
#429 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli, testing-qa

Research direction

The untested branch is the human output in src/cli/index.ts around lines 1667-1668, where daemon status writes formatStatus(...) unless --json is set. Read the existing daemon start and status assertions in src/cli/index.test.ts to match their style, then add a unit test that runs daemon status without --json and expects Daemon: running (worker). Done when that test passes on the current code and fails when the human branch is replaced with the unconditional writeResult. Check #422 for the corrected it it proposes, since that work may overlap.

Written by the indexing model from the issue text.

Description

bug:new

Testing rule 3: a code path that can be deleted with a green suite is untested.

I deleted the human branch of simlock daemon status in src/cli/index.ts:1667-1668 — turning

if (values.json) writeResult(environment, status);
else environment.stdout.write(`${formatStatus(status, environment.clock.now())}\n`);

into an unconditional writeResult(environment, status) — and every check stayed green:

  • pnpm exec vitest run --project unit src/cli/index.test.ts: 219 passed. That suite asserts Daemon: running (worker) for simlock status and Daemon running for simlock daemon start, so only daemon status's own human view has no unit assertion.
  • pnpm test:e2e e2e/daemon-lifecycle.test.ts: 3 passed, 1 expected fail. The one test that names daemon status's default view is an it.fails, which passes whether the view exists or not.
  • pnpm test:changed: green apart from the repro test from #422.

So the CLI publishes a human view of daemon status that no test can see. The corrected it proposed in #422 (asserting Daemon: running (worker) on daemon status with no --json) does cover it: run against this same deletion it fails with expected '{"devices":[]…' to contain 'Daemon: running (worker)'.

Found while triaging #422.

Written by an agent.

Dominant language
TypeScript
Stars
15
Forks
1
Avg merge
9h 56m
Merged PRs (30d)
134

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 callstackincubator/simlock

All issues in callstackincubator/simlock

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.