Skip to content

Commit c31899a

Browse files
committed
chore(changeset): restore the round-one note; the new note says it covers the state file that note left uncovered
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018t6a5rvqPRvEDMCVVW9kYT
1 parent fd25040 commit c31899a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎.changeset/23858-serve-state-file-directory.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ fix(cli): `os serve` no longer hangs after binding its port when its runtime sta
66

77
Clause-②: no
88

9+
This covers the runtime state file that the entry `fix(cli,runtime): a state, output or cache directory that can never be made is refused at once, naming the path and the operating system's code, instead of hanging` lists as `Not covered yet`.
10+
911
**What was wrong.** Once listening, `os serve` writes its runtime state file, `runtime.<environment>.<project>.json`, into `OS_HOME` before it prints the ready banner. It made that directory with Node's recursive `mkdir`, which never returns when a level answers `ENOENT` although its parent exists, as `/proc` and `/sys` answer for a name they do not have. Under such an `OS_HOME`, with the database outside it, the server bound its port and then looped in its own process, holding the event loop: no `Press Ctrl+C to stop`, no listening message to an `os dev` parent, and no request answered.
1012

1113
**What an operator sees now.** The directory is made with the same bounded walk as the other `OS_HOME` paths, so a directory that can never be made is refused at once. The state file has always been best-effort: the boot goes on without it and prints its banner, as it already did when the file could not be written for any other reason.

‎.changeset/23858-uncreatable-directory-refusal.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ Clause-②: no
2020
✗ Cannot create home directory at /proc/os-x: ENOENT: no such file or directory, mkdir '/proc/os-x'
2121
```
2222

23+
Not covered yet: the runtime state file `os serve` writes into `OS_HOME` once it is listening.
24+
2325
Nothing else changes. Every directory these paths made before is still made, every missing level of it; every path that was refused before is still refused, with the operating system's code. The one difference is the path that was never answered at all.

0 commit comments

Comments
 (0)