docs(website): where the module state machine lives, and how boot treats it #125
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/module-state-machine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The documentation half of Phase 2, PR 1 of the module system — code is RunicGateway/website#128.
§2.4 named the five states and stopped there. This records the two things the implementation had to settle, and one thing worth stating explicitly because it is easy to assume the opposite.
MODULE_SYSTEM.md§2.4 — three additionsWhere the states live. One
installed_modulesrow per module, with the machine in a singlestatecolumn carrying all five values, rather than a policy flag beside a runtime one. Plus what else the row carries: the admin-screen metadata, the recorded failure stage and reason, and the install provenance (source/sha256, both null for a directory placed on the volume by hand, which stays supported).The row is a record, never the source of truth for what is mounted. The loader scans the filesystem at require time, before the database is reachable (API §4.1). What the row decides is whether a mounted module answers, not whether it is there — which is also why
routes.manifest.jsoncan be generated against a dead database.disabledis the only state a boot leaves alone. Every boot resets each non-disabled row toenabled, clearing any recorded failure, and the load that follows writes that boot's outcome. Three consequences, spelled out because each is a behaviour someone will otherwise be surprised by:startup_failedmodule is retried on every restart, so an operator who fixes the cause needs no admin-panel visit — at the cost of a deterministically broken module re-recording its failure each boot;statealone in both directions.BACKEND_DESIGN.md§3installed_modulesgains an entry alongside the other tables: the column list, the failure stages, and the two paragraphs above in short form.Also
§2.7 gains a progress marker for Phase 2 — PR 1 done, 2–9 to go.
🤖 Generated with Claude Code