//! Crash reports: enough to reproduce a crash and fix it, without slowing the app down or //! filling the disk (docs/crash-reports.md). //! //! - **Panics** are caught by a hook. One inside a command becomes a report with the design as //! it was before the command and the command itself, so `solidcraft-cli run replay.json --in //! design.solidcraft` reproduces it. Panics the third-party kernel raises (and //! `solidcraft_kernel::guard` turns into errors) are reported the same way, marked recovered. //! - **Crashes no hook sees** (an abort, a stack overflow, a segfault, the process being killed) //! are found at the next start: every running app keeps a small, locked command journal; a //! journal nobody holds any more belongs to an app that died. Its report carries the design //! from the last autosave (or the saved file) and the commands run since, ending with the one //! in flight. //! - **Cost**: nothing until [`install`] is called (tests, the CLI and the web build never do); //! after that, two small unbuffered appends per top-level command of the app's own design, and //! work only when something panics. //! - **Bounded**: the same crash (its signature: place + message, digits ignored) is counted, not //! written again; at most [`MAX_NEW_PER_SESSION`] new reports per run, [`MAX_REPORTS`] //! reports, [`MAX_TOTAL_BYTES`] on disk, nothing older than [`MAX_AGE_DAYS`] days. //! //! - **Startup steps** ([`phase`]): the journal keeps the step the app is in while it gets its //! window and graphics device up, so a crash inside a graphics driver still says where it //! happened, and the renderer ([`set_environment`]) once it is known. //! - **Native crashes** (Windows): the app's exception filter writes what it caught (exception //! code, faulting module and offset) and a minidump next to the journal ([`native_paths`]); //! the next start puts both into the unclean exit's report. //! //! Reports are folders `crashes/