048-store-clean-shutdown

Make every exit of a program that opened the app node pass through its shutdown

Lifecycle approvedImplementation completeVerification unknownQualification unknown

hiqlite creates an unclean-stop marker, state_machine/lock, when a node starts and removes it only in a graceful shutdown; without the auto-heal feature the next start refuses until someone repairs the directory by hand. The travel-memory service hit this with a ? between Store::open and Store::shutdown and a Ctrl-C-only handler. This spec gives rahi-store one scope for the node's lifetime, Store::run, which arms SIGTERM and SIGINT before the node starts and shuts it down on every way out of the body; it closes the three paths in rahi's own verbs that returned with the node open and the signal window in serve's boot; it documents the single-voter recovery and verifies it; and it records why auto-heal stays off after a probe showed its rebuild complete.

Read the full pinned specification ↗

Relationships

Claimed units

  • establishes
    {
      "kind": "file",
      "path": "crates/rahi-store/src/lifecycle.rs"
    }
  • establishes
    {
      "kind": "file",
      "path": "crates/rahi-store/tests/lifecycle.rs"
    }
  • establishes
    {
      "kind": "file",
      "path": "crates/rahi-cli/tests/clean_shutdown.rs"
    }
  • extends
    {
      "nature": "amending",
      "spec": "011-store-hiqlite",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-store/src/store.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "011-store-hiqlite",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-store/src/lib.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "011-store-hiqlite",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-store/Cargo.toml"
      }
    }
  • extends
    {
      "nature": "amending",
      "spec": "030-operational-verbs",
      "unit": {
        "kind": "file",
        "path": "crates/rahi-cli/src/serve.rs"
      }
    }
  • extends
    {
      "nature": "amending",
      "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-ops/src/preflight.rs"
      }
    }
  • extends
    {
      "nature": "additive",
      "spec": "039-release-and-out-of-tree-packaging",
      "unit": {
        "kind": "file",
        "path": "CHANGELOG.md"
      }
    }

Source headings

  1. 048: Clean shutdown of the app node
  2. 1. Purpose
  3. 2. Territory
  4. 3. Behavior
  5. 4. Functional requirements
  6. 5. Acceptance criteria
  7. 6. Out of scope
  8. 7. Resolved decisions
  9. Verification

Frozen anchors

No frozen anchors declared.