Service Layer π‘ BETA
Use this runbook when a mounted service fails to start or you need to confirm which in-process modules the binary wired at boot.

When to use
- A route, monitor or background loop is missing after startup.
- You are changing a feature flag and need to know which host module mounts it.
- Do not use it as a crate catalog; see Module Structure.
Before you start
| Authority |
What it declares |
botserver/src/main_module/mod.rs |
Process wiring: init, server/, routes/, drive_monitors/, git_bot_monitor/, state_builder.rs, health.rs, shutdown.rs. |
botserver/src/core/mod.rs |
Runtime state: state.rs, config.rs, secrets/, session/, bot/, directory/, oauth/. |
botserver/src/basic/ |
The Rhai script host and local keyword registrations. |
botserver/src/apps/registry/ |
The single app catalog (all_apps()). |
botserver/src/security/ |
SafeCommand, log_and_sanitize, SQL guards and rate limits. |
A crate is never a module of the binary; it is enabled by a Cargo feature and mounted by one of these hosts.
Steps
- Confirm the feature bundle you built with; see Building from Source.
- Start the process and watch
botserver.log for bootstrap and [drive_monitor] lines.
- If a capability is absent, grep the host module for the route or feature before changing configuration.
- Make the smallest change in the owning module, then restart only after the change is saved.
Verify
| Check |
Expected result |
| API health |
GET /health returns 200. |
| Routes |
The generated REST reference lists the route you expected. |
| Monitors |
[drive_monitor] lines show bot discovery without repeated failures. |
| App catalog |
GET /api/apps/catalog returns the entries from all_apps(). |
| Error handling |
No raw error string or panic appears in the response or the log. |
Roll back
- Restore the previous module source or feature bundle, not just the configuration value.
- Restart the process and re-run the Verify table.
- If Drive content was touched, restore it from a
/tmp copy; do not leave a git-owned .gbdialog or .gbot edited only in Drive.
Limits
| Claim |
Status |
| A crate is a module |
False; crates are reached through features and mounted by a host module. |
botserver as a library |
No [lib] target; other crates cannot use botserver::.... |
| Service inventory |
Only modules declared in main_module/mod.rs and core/mod.rs count. |