A full disk
When a write fails with SQLITE_FULL or ENOSPC (matched by code/errno, or SQLite's own exact message on a SQLite error, never by searching free text), the forge enters one read-only state (src/kernel/full_disk.ts):
- every web write (anything
isReadinsrc/http/read_only.tsdoes not call a read, so pushes too) answers 503 with one public sentence: the disk is full, reading works, writing resumes by itself; - every terminal write is refused the same way: an SSH exec other than
git-upload-pack(push,tell,talk, an app's verbs) prints the sentence and exits 1, and a TUI action that hits a full disk toasts it; - the needs-you line on
/system(disk-full) adds the free figure and what frees it; the public sentence carries neither./healthzstays about liveness and does not carry it; - every two seconds the forge tries a 64 KiB write under its data directory; when it fits, the state ends by itself;
survivesFull(called first insrc/main.ts) turns an unhandled rejection or exception of that kind into the same state instead of an exit; any other still ends the process.
State is in process memory, per data directory; a restart reads the disk afresh.