Commit 36fc938
The dev watcher rebuilt dist/objectstack.json and printed "server will
auto-reload", but the running serve child only partially receives a rebuilt
artifact: MetadataPlugin's artifact watcher re-ingests the registry, syncs
DDL + seeds for NEW objects and broadcasts the SSE HMR event, while hook
bodies and already-registered view metadata from the compiled bundle are
applied at boot only. #5148 measured both staying stale — every dev
edit/verify loop could produce a false conclusion in either direction.
Boot-time load is the one path that applies the whole artifact, so dev now
supervises its serve child nodemon-style via ServeRestartCoordinator
(packages/cli/src/utils/dev-restart.ts):
- after each successful rebuild: SIGTERM the child (kernel shuts down
gracefully), spawn a replacement on exit; requests during teardown
coalesce; SIGKILL escalation after 8s; a failed respawn is loud and
exits dev; parent SIGINT/SIGTERM is forwarded and a process-exit hook
guarantees no orphaned server.
- --no-restart keeps the rebuild-only behavior but says on EVERY rebuild
that the running server keeps the build it booted with; the watch
banner states the active mode instead of implying hot reload.
- startup variant (#5148 comment 2026-08-05): when objectstack.config.ts
/ src/** are newer than the artifact at boot, warn loudly (newest
source + remedy) without gating the boot. The staleness walk shares
the watcher's ignore list so both judge the same source surface.
Seams unit-tested (22 cases): staleness assessment on real tmpdirs,
coordinator state machine with a fake child (restart sequencing,
coalescing, self-exit follow, shutdown-beats-respawn, force-kill,
spawn failure, orphan guard, late exit events).
Claude-Session: https://claude.ai/code/session_015a5qkLzpGXhLL2F5gvJ7dD
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4576a22 commit 36fc938
5 files changed
Lines changed: 907 additions & 80 deletions
File tree
- .changeset
- content/docs/getting-started
- packages/cli/src
- commands
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
0 commit comments