Exacly model

Requirement · active · spec/exacly/observation.yaml

REQ-023 Publish state conditionally and atomically

Cooperating local observers cannot overwrite a state change made since their observation began or expose a partially written document.

Why it exists

  • REQ-023 Publish state conditionally and atomically 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-023 Publish state conditionally and atomically Requirement main: verification passed
    • implements ← APP-002 Refresh Application
      • depends_on → INF-001 GitHub Actions Infrastructure
      • depends_on → INF-002 GitHub repository Infrastructure
      • reads → INFO-001 Model config Information
        • stores ← INF-002 GitHub repository Infrastructure (above)
      • writes → INFO-002 Model state Information
        • stores ← INF-002 GitHub repository Infrastructure (above)

main config 94cbae926e86

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

Findings

None.

Config

owner
exacly-maintainers
lifecycle
active
last_reviewed_at
2026-10-28
statement
Publish an observed state only when the destination still matches the captured state or its captured absence, under a shared local POSIX lock, and replace the complete document atomically.
acceptance_criteria
  • Refresh and manual-QA observation capture the earlier state before computing their observations and use the same publication protocol.
  • Publication checks the captured exact file content and namespace, context, lineage and serial under a stable parent-directory lock; concurrent creation, deletion or content changes conflict without overwriting the destination.
  • Existing state advances by exactly one serial with the same namespace, context and lineage; initial state starts at serial one.
  • A conflict requires a new snapshot and observation; the writer never automatically retries a previously computed state against newer content.
  • The lock wait accepts a finite nonnegative timeout, defaults to 30 seconds, and allows an immediate attempt at zero; timeout leaves the state unchanged.
  • Publication synchronizes a hidden temporary file, atomically replaces the destination and synchronizes its directory before reporting success; failure before replacement preserves the earlier state bytes or absence.
  • Failure after replacement reports that publication may already have happened and durability is uncertain, leaving the complete new document in place rather than attempting rollback.
  • Process termination before or after replacement leaves a complete earlier or newer state; a leftover hidden staging file does not block a later write or become a model document.
  • Captured and candidate documents must satisfy the 0.2 state schema; the writer refuses duplicate keys, nonfinite JSON values and symbolic-link, hard-linked or nonregular destinations, and a changed destination is never treated as a valid successor merely because its serial matches.
  • Existing destination permission bits are preserved and new state files use mode 0600; required parent-directory creation is synchronized and replacing the captured parent directory conflicts.
  • Guarantees apply to cooperating writers on supported local POSIX filesystems, without claiming coordination with arbitrary file editors, network filesystems, or an execution ledger transaction.
verification_method
State-writer, CLI interleaving, bounded-lock and process termination tests in CI.
observe
tests
cases
  • python/tests/test_state_writer.py::*
  • python/tests/test_state_writer_faults.py::*
  • python/tests/test_state_writer_cli.py::*