Skip to content

fix(hub): keep the live app running through a failed check or bad line - #166

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-12101-keep-a-projects-live-app-running-through-one-failed-check-or
Nov 4, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-12101-keep-a-projects-live-app-running-through-one-failed-check-or

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Closes CL-12101

What changed

  • apps/hub/src/live-app/host.ts: the once-a-second state check is now currentState(), run through reportState(). When a check throws, the host logs the error code to stderr and reports a failed state. It no longer exits on an unhandled rejection.
  • apps/hub/src/live-app/runner.ts: the runner reads the host's stdout through hostReports(). A line that isn't JSON or a HostReport is logged and skipped, and later lines still update the state. Only a failure of the stream itself ends the read.
  • apps/hub/src/live-app/host-report.ts: holds reportState() and hostReports(), so both can be tested without spawning a host.
  • apps/hub/src/config/live-app.ts: adds checkFailed wording.

How it was verified

  • On Bun 1.4.4, I reproduced both problems on main three times each before changing anything. An error thrown inside setInterval(async …) exited with code 1. One bad line stopped the read loop.
  • host-report.test.ts: a throwing check reports failed and the next check still reports. A bad line between two good ones is skipped, and the state ends on the second good one.
  • bun run lint, format:check, typecheck, test, pins:verify and vendor:verify all passed.

@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

CL-12101

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review November 4, 2026 20:28
@corbits-triage

corbits-triage Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Comment thread apps/hub/src/live-app/runner.ts Resolved

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No defects reported.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit db5be5a Nov 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant