fix(#1264): harden unattended identity bootstrap
ci/woodpecker/pr/ci Pipeline failed

This commit is contained in:
goals
2026-08-16 18:33:39 -05:00
parent 43fa047787
commit 9dc90be7e1
14 changed files with 448 additions and 288 deletions
@@ -27,9 +27,11 @@ The fleet path never falls back to an interactive wizard. It exits nonzero befor
when:
- `MOSAIC_AGENT_NAME` is not an exact roster member;
- an ambient `MOSAIC_AGENT_CLASS` disagrees with that member's canonical class;
- a missing destination has no safe regular default source;
- a source or existing destination is a symlink, directory, unavailable, or over the bounded size;
- the fleet communications helper/roster cannot be validated.
- a source or existing destination is a symlink (including dangling), directory, unavailable, or over the bounded size;
- the fleet communications helper/roster cannot be validated; or
- `USER.md` cannot be securely re-read at the point where its content is composed.
Diagnostics begin with:
@@ -45,14 +47,17 @@ not delete or replace an existing personalized `SOUL.md`/`USER.md` merely to cle
The source gate is:
```bash
pnpm --filter @mosaicstack/mosaic exec vitest run \
src/commands/launch-first-start.spec.ts
pnpm --filter @mosaicstack/mosaic... build && \
pnpm --filter @mosaicstack/mosaic exec vitest run \
src/commands/launch-first-start.spec.ts
```
It runs the real built CLI in subprocesses with piped stdin, temporary homes, a canonical fixture
roster, fake runtime/broker executables, and no provider call. It covers no-TTY launch, exact identity,
private modes, no-clobber, missing/symlink defaults, unknown members, standalone wizard preservation,
and concurrent first start.
The build leg is load-bearing: `dist/` is ignored, so a direct Vitest invocation could otherwise run
absent or stale CLI output. The gate runs the exact-source built CLI in subprocesses with piped stdin,
temporary homes, a canonical fixture roster, fake runtime/broker executables, and no provider call. It
covers no-TTY launch, exact identity,
private modes, no-clobber, missing/symlink defaults, unknown members, class mismatch,
standalone wizard preservation, and concurrent first start.
Do not use this fixture as proof that a real provider credential is present or that a package has
been deployed. Those require separate environment-specific evidence.