Skip to content

fix(cli): keep runner output, tree-kill, nf_debug and the start port error robust - #365

Merged
Exeloo merged 4 commits into
mainfrom
fix/process-robustness
Nov 23, 2026
Merged

Exeloo merged 4 commits into
mainfrom
fix/process-robustness

Conversation

@Exeloo

@Exeloo Exeloo commented Nov 23, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Closes #331
Closes #330
Closes #327
Closes #326

  • runner: stdout and stderr use setEncoding("utf8"), so a character split across chunks stays whole.
  • tree-kill: kill errors such as EPERM are skipped, and the ps/pgrep spawn gets an error listener.
  • errors: NF_DEBUG set to "", 0 or false (any case) means off.
  • port.input: a bad config port raises InvalidConfigValueError, which names nanoforge.config. A bad --port keeps the argument error.

How do you test this PR?

  • Before: the new specs fail. The runner prints '��' instead of 'é'; tree-kill times out after 30 s on an uncaught EPERM or ENOENT; NF_DEBUG=0 still prints the stack; the port error says "Invalid argument 'port'".
    After: all pass.
  • Commands run: test:unit (355), lint and build, all pass.

Merge danger

Door: two-way.
Blast radius: low. CLI-internal modules only.

Quality gate

Check Result Notes
Docs Updated commands/overview.mdx, commands/start.mdx
Correctness Pass Minor: the mock leak was fixed (squashed). Minor: the project is not named in the error, filed as #345
Performance Pass
Accessibility Pass
Security Pass
Style Pass lint: pass

Follow-up issues

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 23, 2026
@Exeloo
Exeloo merged commit a79ee90 into main Nov 23, 2026
9 checks passed
@Exeloo
Exeloo deleted the fix/process-robustness branch November 23, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

1 participant