You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli,runtime): a NAMED artifact that is missing is a broken instruction, not an empty boot (#4110 follow-up)
#4110 made an absent artifact non-fatal all the way down — right for the
conventional `<cwd>/dist/objectstack.json`, which is simply "not compiled yet".
But `OS_ARTIFACT_PATH` / `{ artifactPath }` skip the existence check by design
(the loader was to validate lazily), so that tolerance reached them too:
OS_ARTIFACT_PATH=/nope os serve
→ No objectstack.config.ts found — booting from artifact (default host)...
→ ✓ Server is ready
with the missing path named NOWHERE in the output — serve's boot-quiet window
drops the loader's calm ENOENT line, which #4110 had moved from `warn` (buffered
and replayed by #4084) to `log` (discarded). Before #4110 this died loudly.
The distinction that matters is NAMED vs CONVENTIONAL, not the errno.
`createDefaultHostConfig` — the boot with no config, where the artifact IS the
deployment — now rejects a named local artifact that does not exist, naming the
path and which source named it. The loader keeps its tolerance, so the
config-boot path #4085 fixed is untouched, and `createStandaloneStack` is not
touched at all.
Two more corrections in the same spirit:
- `serve`'s "config not found" refusal never said WHERE it looked. The two things
that actually happen are a typo'd filename and the wrong working directory, and
the second is the common one. It now names the config path, the artifact path,
and that OS_ARTIFACT_PATH is unset — and still refuses rather than inventing a
zero-object platform, pointing at `objectstack start` for a boot that is
app-less on purpose.
- That refusal was being TRUNCATED. `this.exit(1)` unwinds to oclif's
`process.exit`, which does not drain a piped stdout, so a diagnostic split
across several `console.log` calls loses its tail: measured, only the first two
lines survived — i.e. exactly the "where to look" part went missing. Both of
serve's pre-flight refusals emit one write now. The e2e added here caught it;
review had not.
Also fixes a test that pinned the wrong thing: `the DefaultDatasourcePlugin
precedes ObjectQLPlugin (schema sync needs the driver)` asserted an ARRAY INDEX
with a rationale the kernel does not implement — the connect happens in `init()`,
and the dependency graph hoists ObjectQLPlugin ahead of the datasource plugin
(measured: 6 slots earlier). It now pins the declared dependency that actually
orders the two inits, which deleting the array position cannot break and
deleting the declaration does.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ve9HidCGRGtS2UjNPUGHSV
0 commit comments