Exacly model

Requirement · active · spec/exacly/ledger-history.yaml

REQ-028 Reuse terminal semantics while checking all retained history bytes

Reduce repeated interpretation of unchanged terminal proof through a fully bound index without weakening byte-integrity checks or granting cached completion authority.

Why it exists

  • REQ-028 Reuse terminal semantics while checking all retained history bytes 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-028 Reuse terminal semantics while checking all retained history bytes Requirement main: verification passed
    • implements ← APP-015 Ledger history validation 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 → APP-011 Execution ledger maintenance Application
        • depends_on → APP-010 Execution binding registry Application (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)
      • depends_on → APP-012 Verification completion reconciler Application
        • depends_on → APP-002 Refresh Application (above)
        • depends_on → APP-006 Readiness policy evaluator Application (above)
        • depends_on → APP-008 GitHub verification evidence admission Application (above)
        • depends_on → APP-009 Verification reconciliation preview Application
          • depends_on → APP-006 Readiness policy evaluator Application (above)
          • depends_on → APP-007 Verification planner Application (above)
          • depends_on → APP-008 GitHub verification evidence admission Application (above)
          • depends_on → APP-010 Execution binding registry Application (above)
          • reads → INFO-001 Model config Information (above)
          • reads → INFO-002 Model state Information (above)
          • reads → INFO-003 Execution bindings Information (above)
        • depends_on → APP-010 Execution binding registry Application (above)
        • depends_on → INF-003 Private execution ledger Infrastructure (above)
        • reads → INFO-001 Model config Information (above)
        • reads → INFO-002 Model state Information (above)
        • reads → INFO-003 Execution bindings Information (above)
        • reads → INFO-004 Completion intents and receipts Information (above)
        • writes → INFO-002 Model state Information (above)
        • writes → INFO-004 Completion intents and receipts 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 (above)
      • reads → INFO-006 Historical integrity baselines and semantic verdicts Information (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 125 selected test cases passed2026-11-22T17:48:12Z

Findings

None.

Config

owner
exacly-maintainers
lifecycle
active
evidence
  • locator
    docs/ledger-history-scaling.md
    kind
    decision
    claim
    The history-scaling decision selects an opt-in semantic-validation index before archival because measured semantic re-derivation dominates byte hashing and SQLite integrity checks.
    observed_at
    2026-10-28
    applies_to
    Operational indexed history in schema version 4; version-1/version-2 behavior remains unchanged
last_reviewed_at
2026-10-29
statement
Under explicit operator maintenance authorization, produce a new versioned ledger copy with mandatory byte-integrity baselines and terminal semantic verdicts bound to exact inputs and an independently identified installed validation profile, allowing normal operations to reuse matching terminal semantics while checking every historical byte and structural dependency and retaining explicit full semantic audit and existing execution and completion authority.
acceptance_criteria
  • Index initialization, rebuild and format upgrade are explicit maintenance operations into a new private destination after full semantic validation of the actual source history; dry-run identifies the source, selected installed profile, validation scope and intended output without changing files, state, records or watermarks.
  • Use a new explicitly versioned opt-in ledger format; preserve the source and require one explicit canonical cutover, while current version-1 and version-2 readers, registration, completion and full semantic history validation remain unchanged and never migrate or build an index implicitly.
  • Preserve all exact retained proof, model documents, state bytes, binding contracts, requests, phases and immutable receipts in the new ledger; this first format introduces no archival, expiry, garbage collection or deletion authority.
  • Separate the required historical byte-integrity baseline from optional profile-scoped semantic verdicts; baseline membership covers the exact retained row set without missing, extra or duplicate identities, and every retained input has an unambiguous association with its required baseline.
  • Bind exact raw typed TEXT and BLOB inputs using a canonical domain-separated encoding with explicit field identities, lengths, order and presence; the baseline and verdict dependency closure includes binding contracts, requests and dates, approved model and policy identities, before-state and after-state, admission receipts, archives, reports, admitted state, phase, receipts or explicit receipt absence, and any derived facts used by the cached result.
  • Derive accepted schema and semantic profile identities from the independently installed tool and its compatibility registry, including relevant parser, observer, model, merge, assessment and validation dependencies; a ledger's self-declared version or profile string cannot establish that its verdict is reusable.
  • Reuse only successful terminal semantic verdicts whose required byte baseline, complete dependency association and accepted installed profile match; prepared intents always receive fresh semantic checks and never obtain completion authorization from a cached result.
  • Every normal operation still checks all retained historical bytes, size bounds, exact SQL schema, base metadata, row coverage, binding membership, uniqueness, supersession dependencies, active bindings, state watermarks, phases, receipts, prepared-intent counts, relationships and index associations; only repeated terminal payload interpretation is omitted.
  • A missing required baseline, changed input hash, corrupt coverage or inconsistent baseline association is a hard integrity error; neither a normal read, rebuild nor full semantic audit may silently validate the changed bytes and reseal them as the original retained history.
  • Only missing or deliberately invalidated semantic verdicts and recognized stale profiles with a matching required byte baseline may fall back to full semantic validation in read-only memory before dependent work; unsupported semantics produce an explicit unsupported result, and ordinary reads never write an index or migrate its format.
  • A recognized stale version-4 profile with valid integrity baselines permits fresh read-only semantic validation but blocks operational writes until explicit copy-only activation refreshes the installed profile; ordinary mutations never mix profiles or silently refresh unrelated entries.
  • Initial conversion from version 2 or 3 rejects prepared completions, while explicit copy-only refresh of an existing version-4 ledger may retain prepared work after complete baseline and fresh semantic validation; preserve the exact intent, proof, state path and absent receipt without HTTP or state publication, then require explicit canonical cutover and normal recovery against actual current state under its existing locks.
  • A known reusable verdict whose recorded dependency, phase, receipt, baseline or accepted-profile association is inconsistent fails explicitly; ordinary operations must not silently refresh it or relabel mismatched retained content as a previously validated result.
  • App-owned mutations freshly validate their actual recorded inputs and dependency changes, then atomically maintain the integrity baseline and matching new terminal verdict or explicitly invalidate the semantic verdict with the related binding, phase, receipt and watermark transaction; failed commit or rollback cannot leave a reusable stale positive result.
  • Before committing an owned mutation, verify the planned index write count, exact resulting index rows and complete source baseline and global associations; unexpected writes during index maintenance must roll back with the source mutation rather than be absorbed into an observed change count or detected only after commit.
  • Preserve permanent canonical binding, pending and completion identities and every intent ID, including aborted intents; completed pending work remains unavailable for reuse, while the same aborted request may be retried only through fresh admission under a new intent ID.
  • Exact completed-request replay returns the original immutable historical receipt without HTTP, state publication, another pending-item removal or a serial increment; a cached semantic verdict never authenticates live evidence, changes the approved contract or independently authorizes task completion.
  • Retain all prepared-intent proof needed for exact-before, exact-after and conflict recovery, and preserve explicit hot-journal and completion recovery behavior in the new format; recovery validates the actual durable outcome and never fabricates or reuses a stale baseline or semantic result.
  • Explicit full semantic audit checks the required byte baseline and all global invariants and freshly re-derives every retained observation and state transition regardless of matching verdicts; it checks the index against those results and reports corruption, unsupported semantics or incomplete validation without writing repairs or returning cached success as fresh audit evidence.
  • Publish only a complete validated and synchronized ledger copy with a versioned manifest; interruption preserves the source, uncertain durability preserves complete published output for inspection, and backup or copy-only recovery preserves index and proof coherently under the same explicit canonical cutover rule.
  • Resolve canonical identities through indexed associations and validate supersession membership without repeatedly rescanning all bindings for every pending identity; report byte volume, semantic work and remaining history-wide costs rather than claiming constant storage, constant latency or bounded total history cost.
  • Report whole-history byte and structural consistency separately from reused terminal semantics and freshly re-derived semantics; disclose the installed profile and checked scope so ordinary index-assisted success is not described as a fresh full semantic audit.
  • Baselines, verdicts and digests do not authenticate who produced a cached verdict, defend against a same-user consistent rewrite of proof and index, prove the latest global generation or make receipts self-authenticating; the operator-controlled runtime remains the authority boundary, and fresh semantic audit can expose invalid semantics without authenticating historical origin.
verification_method
Operational index, CLI, maintenance and process-termination tests covering exact-byte validation, terminal reuse, read-only fallback, prepared-intent re-derivation and atomic index writes with completion and recovery; conversion and audit-only format tests verify REQ-029 separately.
observe
tests
cases
  • python/tests/test_execution_history_reuse.py::*
  • python/tests/test_execution_history_reuse_cli.py::*
  • python/tests/test_execution_history_reuse_faults.py::*
  • python/tests/test_execution_history_reuse_crashes.py::*
  • python/tests/test_execution_maintenance_v4.py::*
  • python/tests/test_execution_index_atomicity.py::*
  • python/tests/test_history_distribution.py::*
  • python/tests/test_history_reuse_benchmark.py::*
  • python/tests/test_history_index_distribution.py::*