047-managed-service-lifecycle
Manage application background services through the cell lifecycle
A Cell can declare routes and migrations, but it cannot give the chassis an application worker whose lifetime is tied to serve. Applications therefore either omit durable background work or detach tasks that Rahi cannot cancel, observe, or join before the application store shuts down. This spec adds a named managed-service declaration to Cell, starts each service once after successful composition, treats an unexpected return, error, or panic as a process failure, broadcasts cancellation for every stop cause, and joins or aborts every service before draining its final denials and shutting down the store. The service bound overlaps the existing HTTP drains so the published stop grace does not grow.
Read the full pinned specification ↗Relationships
Claimed units
- establishes
{ "kind": "file", "path": "crates/rahi-cli/src/service.rs" } - establishes
{ "kind": "file", "path": "crates/rahi-cli/tests/services.rs" } - extends
{ "nature": "additive", "spec": "030-operational-verbs", "unit": { "kind": "file", "path": "crates/rahi-cli/src/cell.rs" } } - extends
{ "nature": "additive", "spec": "030-operational-verbs", "unit": { "kind": "file", "path": "crates/rahi-cli/src/lib.rs" } } - extends
{ "nature": "amending", "spec": "030-operational-verbs", "unit": { "kind": "file", "path": "crates/rahi-cli/src/serve.rs" } } - extends
{ "nature": "additive", "spec": "043-patched-dependency-adoption", "unit": { "kind": "file", "path": "crates/rahi-ops/src/stop.rs" } } - extends
{ "nature": "amending", "spec": "043-patched-dependency-adoption", "unit": { "kind": "file", "path": "crates/rahi-cli/tests/stop_budget.rs" } }
Source headings
- 047: Managed service lifecycle
- 1. Purpose
- 2. Territory
- 3. Behavior
- 4. Functional requirements
- 5. Acceptance criteria
- 6. Out of scope
- 7. Resolved decisions
- Verification
Frozen anchors
No frozen anchors declared.