Skip to content

fix(cli): run nf dev with the running cli and fail start, editor and dev when a child fails - #366

Merged
Exeloo merged 5 commits into
mainfrom
fix/run-commands
Nov 23, 2026
Merged

Exeloo merged 5 commits into
mainfrom
fix/run-commands

Conversation

@Exeloo

@Exeloo Exeloo commented Nov 23, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Closes #287
Closes #277
Closes #282
Closes #100 (its open --directory question moved to #359)

  • nf dev starts build --watch and start --watch with process.execPath and the running nf script, in the project folder, instead of <pm> exec nf. PackageManager.runDev is removed.
  • AbstractAction.waitForChildren: the first child that fails stops the others, and the command exits 1 with its failure message. Ctrl+C is left to the signal handler.
  • nf editor prints its URL only once /healthz answers { ok: true }. Each probe has a 1 s timeout. After 30 s it warns with the URL and keeps running. It refuses a port where a NanoForge editor already answers.
  • nf start resolves --cert and --key from the cwd and tls.* from the client app's folder, and checks that both files exist.

How do you test this PR?

  • Before:
    • the specs fail: dev 3/3, start handle times out, editor 2/2, TLS 4/8;
    • nf editor on a busy port exits 0 and prints "Editor running!";
    • nf start with the client port taken exits 0.
      After:
    • all specs pass;
    • those runs exit 1;
    • a silent socket on the port makes nf editor exit 1 after 2 s, with no hang;
    • Ctrl+C prints no failure line.
  • Commands run: test:unit (360), lint, build and test:e2e (101), all pass.

Merge danger

Door: two-way.
Blast radius: nf dev, start and editor. A failed start now exits 1 where it used to exit 0, which is the fix.

Quality gate

Check Result Notes
Docs Updated commands/dev.mdx, editor.mdx, start.mdx, configuration/configuration-file.mdx (5d74a65, not re-reviewed)
Correctness Pass (2 rounds) Minor ×3 fixed in dd87433
Performance Pass (2 rounds) Important (no /healthz timeout) fixed in dd87433
Accessibility Pass
Security Pass
Style Pass lint: pass

Follow-up issues

@github-actions github-actions Bot added documentation Improvements or additions to documentation command:start Related to start command command:dev Related to dev command command:editor Related to editor command labels Nov 23, 2026
@Exeloo
Exeloo merged commit 2122590 into main Nov 23, 2026
8 of 9 checks passed
@Exeloo
Exeloo deleted the fix/run-commands 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

command:dev Related to dev command command:editor Related to editor command command:start Related to start command documentation Improvements or additions to documentation

Projects

None yet

1 participant