Skip to content

Report Stage startup progress and readiness in cratis run - #57

Merged
einari merged 7 commits into
mainfrom
feat/run-startup-progress
Jul 30, 2026
Merged

Report Stage startup progress and readiness in cratis run#57
einari merged 7 commits into
mainfrom
feat/run-startup-progress

Conversation

@einari

@einari einari commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Added

  • cratis run reports startup progress while the Stage container boots and prints Ready once the sandbox can actually accept requests.
  • cratis run --verbose streams the container's output, as the command previously always did.
  • cratis run with -o json or -o json-compact emits the resolved endpoints, event model, and event store when the session becomes ready.
  • Markdown linting and link verification now run on pull requests that touch the documentation.

Changed

  • cratis run hides the Stage container's output while it starts, and shows the reported error plus the captured output if it stops before becoming ready.
  • cratis run names the container it starts, so a running sandbox is recognizable in docker ps.
  • Ctrl+C on cratis run stops the sandbox and waits for Docker to remove it before exiting, instead of terminating the command while the container is still running.

Fixed

  • cratis run no longer leaves the container running when the command is interrupted without Docker being signalled too.
  • Documentation link verification checked nothing — skipping localhost also skipped the local server linkinator crawls through, so every run passed after scanning zero links.

einari and others added 7 commits July 30, 2026 16:09
Spectre.Console.Cli does not hook Console.CancelKeyPress, so the token handed
to a command never cancels and Ctrl+C terminates the process outright. Commands
that own a child process need to shut it down first.

A second Ctrl+C is left alone, so the process can always be killed the usual
way if that shutdown does not finish.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Stage container's own log was streamed straight to the console, burying the
one thing the user needs - whether the sandbox is up yet - under Chronicle and
ASP.NET startup noise.

- Capture the container's output and interpret it into startup phases, shown as
  a progress line while it boots.
- Hold "Ready" until the Stage API answers and the container reports its read
  models registered. The API starts listening several seconds before that, so
  waiting for the registration is what makes "Ready" mean the session is usable.
  Unrecognized output only costs progress detail, and a grace period keeps a
  change to what the container prints from stalling readiness altogether.
- Show the reported error and the captured output when the container stops
  before it gets there - it would otherwise be lost with the output hidden.
- Add --verbose to stream the container's output as before.
- Name the container so a sandbox is recognizable in docker ps, and stop it by
  name on interrupt. A Ctrl+C from a terminal reaches the Docker client too, but
  a signal sent to the command alone does not, which used to orphan the sandbox.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The full startup sequence spec replays the lines the container actually writes,
so a change to what it prints shows up as a failing spec rather than as a
progress line that silently stops moving.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Without a configuration, markdownlint ran with its defaults and reported 732
errors across the documentation - almost all of them MD013 line-length, which
the docs deliberately do not follow. A gate that noisy cannot be enforced.

Adopt the same configuration Chronicle uses, which leaves the rules that catch
real defects on, and tag the fenced code blocks that were missing a language.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
linkinator serves the local documentation over localhost while it crawls, so
skipping localhost URLs skipped the crawl itself - every run reported success
after scanning zero links.

Skip only the site-absolute links, which point at the aggregated documentation
site and are verified by its own build, and fix the one broken relative link
that the check now finds. Drop `set -e` too, so both steps run and the summary
reports everything that failed rather than only the first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mirrors the workflow Chronicle runs, so a documentation change that breaks
linting or a link fails the pull request rather than the site build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@einari einari added the patch label Jul 30, 2026
@einari
einari merged commit 12cb49f into main Jul 30, 2026
3 checks passed
@einari
einari deleted the feat/run-startup-progress branch July 30, 2026 14:13
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