Skip to content

fix(start,#980-bug3): don't lie about seed success after seed failure#989

Merged
joelteply merged 1 commit into
canaryfrom
fix/980-bug3-seed-lies-v2
May 1, 2026
Merged

fix(start,#980-bug3): don't lie about seed success after seed failure#989
joelteply merged 1 commit into
canaryfrom
fix/980-bug3-seed-lies-v2

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

What

`parallel-start.sh` Phase 5.5 used to print `✅ Seed complete` + `🎉 System is UP!` even when `npm run data:seed` failed, because the pipe to `sed` discarded the seed script's exit code. Capture the exit via `${PIPESTATUS[0]}` (same pattern as line 278's TS build) and tell the truth.

Repro from #980 Bug 3

[Seed] ⏳ Waiting for JTAG system to be ready...
[Seed]    TS server ready but Rust worker not responding...   (× 15+)
[Seed] ❌ JTAG system did not become ready after 480 seconds
[Seed] ❌ SEEDING FAILED: ❌ JTAG system not ready - commands not registered yet
✅ Seed complete                ← LIES
🎉 System is UP! Total startup time: 549s   ← ALSO LIES

Carl saw the success banner, opened the UI, typed "hello", got nothing back — because no personas existed.

Fix

Phase Pre-fix Post-fix
Seed succeeded `✅ Seed complete` `✅ Seed complete` (unchanged)
Seed FAILED `✅ Seed complete` (lie) `❌ Seeding failed (exit N) — first chat will likely have no AI responder.` + log paths + retry hint
Final banner `🎉 System is UP!` (always) `🎉 System is UP!` (success) OR `⚠️ System started in DEGRADED mode — seed failed, chat will not have personas.` (failure)

System still starts on seed failure (intentional — partial usability + retry possible via `npm run data:seed`). The change is purely about not lying when seed failed.

Test

  • `bash -n`: clean
  • Repro on this M5 with intentional seed-fail TBD; the fix is mechanical (PIPESTATUS pattern already proven elsewhere in this script).

Series context

#980 follow-up series, alongside #987 (Bug 1 cmake) + #988 (other-mac, Bug 5 isConfigured). Joel: "continue getting our carl case up to speed."

🤖 Generated with Claude Code

M1 Carl-validator pass (issue #980, Bug 3) caught a silent-success-is-
failure violation in `parallel-start.sh` Phase 5.5:

  [Seed] ⏳ Waiting for JTAG system to be ready...
  [Seed]    TS server ready but Rust worker not responding...   (× 15+)
  [Seed] ❌ JTAG system did not become ready after 480 seconds
  [Seed] ❌ SEEDING FAILED: ❌ JTAG system not ready - commands not registered yet
  ✅ Seed complete                ← LIES
  🎉 System is UP! Total startup time: 549s   ← ALSO LIES

Carl saw the success banner, opened the UI, typed "hello", got nothing
back — because no personas existed. The script announced success after
explicit failure.

Root cause: the pipe `npm run data:seed | sed` discards the seed
script's exit code (sed always succeeds → pipeline returns 0). Same
shape Joel's been correcting elsewhere. Already a fix pattern in this
file — TS build at line 278 uses `${PIPESTATUS[0]}`.

Fix: capture `${PIPESTATUS[0]}` post-pipe; on non-zero, print the
actual failure with diagnostic log paths, set SEED_OK=false. The final
"System is UP" banner now branches on SEED_OK and prints "⚠️ DEGRADED
mode" when seed failed, telling the truth.

System still starts (intentional — partial usability + retry possible
via re-running `npm run data:seed`). The change is purely about not
lying when the seed failed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joelteply joelteply merged commit 5fec35e into canary May 1, 2026
3 checks passed
@joelteply joelteply deleted the fix/980-bug3-seed-lies-v2 branch May 1, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant