Exacly model

Requirement · active · spec/exacly/execution-maintenance.yaml

REQ-022 Diagnose and preserve execution ledgers without implicit recovery

Give operators bounded access to diagnosis, consistent backup and validated recovery or upgrade copies while preserving source ledger files.

Why it exists

  • REQ-022 Diagnose and preserve execution ledgers without implicit recovery Requirement main: verification passed
    • supports → PROC-002 Refresh state on main Process
      • uses_capability → CAP-002 Observe a model's reality Capability
        • contributes_to → OUT-001 Models that match reality Outcome

How it is realized

  • REQ-022 Diagnose and preserve execution ledgers without implicit recovery Requirement main: verification passed
    • implements ← APP-011 Execution ledger maintenance Application
      • depends_on → APP-010 Execution binding registry Application
        • depends_on → APP-007 Verification planner Application
          • depends_on → APP-003 Query Application
            • depends_on → APP-001 Validator Application
              • reads → INFO-001 Model config Information
                • stores ← INF-002 GitHub repository Infrastructure
              • reads → INFO-002 Model state Information
                • stores ← INF-002 GitHub repository Infrastructure (above)
            • reads → INFO-001 Model config Information (above)
            • reads → INFO-002 Model state Information (above)
          • depends_on → APP-006 Readiness policy evaluator Application
            • depends_on → APP-003 Query Application (above)
          • reads → INFO-001 Model config Information (above)
          • reads → INFO-002 Model state Information (above)
        • depends_on → APP-008 GitHub verification evidence admission Application
          • depends_on → APP-002 Refresh Application
            • depends_on → INF-001 GitHub Actions Infrastructure
            • depends_on → INF-002 GitHub repository Infrastructure (above)
            • reads → INFO-001 Model config Information (above)
            • writes → INFO-002 Model state Information (above)
          • depends_on → INF-001 GitHub Actions Infrastructure (above)
          • depends_on → INF-002 GitHub repository Infrastructure (above)
          • reads → INFO-001 Model config Information (above)
          • writes → INFO-002 Model state Information (above)
        • depends_on → INF-003 Private execution ledger Infrastructure
        • reads → INFO-001 Model config Information (above)
        • reads → INFO-002 Model state Information (above)
        • reads → INFO-003 Execution bindings Information
          • stores ← INF-003 Private execution ledger Infrastructure (above)
        • writes → INFO-003 Execution bindings Information (above)
      • depends_on → INF-003 Private execution ledger Infrastructure (above)
      • reads → INFO-003 Execution bindings Information (above)
      • reads → INFO-004 Completion intents and receipts Information
        • stores ← INF-003 Private execution ledger Infrastructure (above)
      • reads → INFO-006 Historical integrity baselines and semantic verdicts Information
        • stores ← INF-003 Private execution ledger Infrastructure (above)
      • writes → INFO-003 Execution bindings Information (above)
      • writes → INFO-004 Completion intents and receipts Information (above)
      • writes → INFO-006 Historical integrity baselines and semantic verdicts Information (above)

main config 94cbae926e86

AssessmentReasonEvidenceAt
verification passed
tests
All 292 selected test cases passed2026-11-22T17:48:12Z

Findings

None.

Config

owner
exacly-maintainers
lifecycle
active
last_reviewed_at
2026-10-29
statement
Given an explicitly selected private execution ledger, diagnose its condition without modifying it, back up a clean valid store, recover a supported interrupted transaction or explicitly upgrade a clean version-1 store into a new validated copy, preserving source files and requiring an explicit operator cutover.
acceptance_criteria
  • Inspection is read-only and does not open SQLite on residue or unknown formats that could cause recovery; clean supported stores exit 0, recovery-needed, unsupported or corrupt stores exit 1, and invalid inputs or operational errors exit 2.
  • Backup accepts only a clean valid ledger and writes a consistent SQLite backup with a manifest into a new destination, validating the copied schema, records, supersession chains and watermarks without changing source database contents.
  • Operational inspection, backup and recovery support exactly versions 1, 2 and 4 without changing their version; version 3 remains audit-only, version 2 retains fresh semantic history validation and version 4 checks complete byte baselines and freshly audits all semantics without terminal reuse.
  • Version-4 backup and copy-only recovery preserve required baselines, terminal verdicts and all retained proof coherently; integrity mismatches cannot be repaired by copying or resealing, and profile changes require separate explicit activation rather than an implicit maintenance upgrade.
  • Explicit upgrade accepts a clean validated version-1 source and publishes a new private bundle containing raw/ledger.sqlite3, upgraded/ledger.sqlite3 in schema version 2, and a manifest; it preserves binding identities and watermarks, leaves the source untouched and requires the operator to select one canonical ledger path.
  • Recovery preserves raw copies of the database and rollback journal, performs supported SQLite DELETE-journal recovery only on a working copy, and validates its complete schema, records, supersession chains and watermarks before reporting success.
  • Recovery leaves source database and journal files untouched; it never deletes source residue, repairs in place, replaces the active ledger or makes normal registration, show or bound previews recover implicitly.
  • Unknown schemas, WAL or SHM residue, super-journals and partial initialization are diagnosed without automatic recovery; recovery rejects them with no published output and preserves the source files.
  • A valid recovery bundle is published atomically with relative raw and recovered paths in its manifest; failed copied-store validation publishes no partial bundle and leaves the source intact.
  • Backup, recovery and upgrade require a new destination outside Git working trees, model folders and protected inputs, reject source overlap and overwrite, create POSIX 0700 directories and 0600 files, and exit 0 on success or 2 on error.
  • Maintenance accepts a finite nonnegative lock timeout defaulting to 30 seconds; one monotonic budget bounds directory and SQLite waits, zero permits an immediate attempt, and timeout reports an actionable nonmutating error without limiting whole-operation copying or computation.
  • Reports identify the source, diagnosis and copied content in a versioned format; manifests do not authenticate global freshness, alter binding identities or grant new approval or task-closure authority.
  • Version-1 and version-2 maintenance retain report schema 0.2.0; version-4 reports use 0.3.0 and disclose installed and retained profiles, integrity coverage and fresh semantic audit counts without silently refreshing the retained profile.
  • Operators explicitly select one canonical ledger after reviewing a recovered copy; old and recovered copies must not operate as parallel active authorities, and same-user candidate code remains outside the protection provided by directory permissions.
  • Maintenance changes only explicitly requested output copies and reports; it never modifies source model or state files, dispatches work, changes pending tasks or claims executor provenance or task closure.
verification_method
Maintenance, CLI, bounded-lock and real process termination and restart tests in CI.
observe
tests
cases
  • python/tests/test_execution_maintenance.py::*
  • python/tests/test_execution_maintenance_cli.py::*
  • python/tests/test_execution_store.py::*
  • python/tests/test_completion_store.py::*
  • python/tests/test_execution_maintenance_v4.py::*
  • python/tests/test_execution_history_reuse_crashes.py::*