8000 Phase 2: implement immutable canonical records and deterministic identities · Issue #5 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content

Phase 2: implement immutable canonical records and deterministic identities #5

Closed

Description

@Mnehmos

Product outcome

Implement the smallest complete canonical-record slice required by sections 8 and 9 of SPEC.md. This issue does not implement mathematical proof authority or satisfy MathOS 1.0.

Acceptance criteria

  • Stable object IDs use UUIDv7.
  • Record versions are immutable and identified by SHA256(schema_version || NUL || canonical_json(payload)).
  • Canonical JSON has deterministic key ordering, number handling, Unicode behavior, and whitespace, with golden vectors.
  • The logical API uses exhaustive typed record kinds rather than arbitrary status strings.
  • Create and version operations are transactional.
  • Versioning requires an expected head hash and returns a structured conflict without overwriting newer work.
  • Retrying the same idempotency key returns the existing result.
  • Exact lookup by stable ID and version hash works.
  • FTS5 receives the explicitly supplied searchable projection for committed heads.
  • Actor attribution is persisted.
  • Unit, property-style, integration, restart, and concurrent conflict tests exercise the real SQLite path.
  • Implementation status and exact validation evidence are updated.

Trust checks

  • There is no direct proved or disproved status mutation.
  • Source claims and formalizations remain distinct record kinds.
  • Old record versions cannot be rewritten.
  • Canonical hashes exclude timestamps, paths, host names, and row IDs.
  • Failed compare-and-swap writes do not change the head.

Out of scope

Typed graph-edge validation, run event chains, MCP transport, Lean verification, pedagogy, exports, and product pilots remain separate deliverables unless explicitly tested here.

Activity

  1. Mnehmos commented on Jul 19, 2026

    @Mnehmos
    OwnerAuthor

    Local implementation checkpoint completed on feat/spec-driven-rust-rebuild at commit c8bbe2d (not yet pushed because the required gh CLI is unavailable in the work environment).

    Validated locally:

    • RFC 8785 canonical JSON with safe-integer rejection and a golden SHA-256 vector
    • UUIDv7 objects and immutable schema-bound versions
    • transactional create/version paths with actor attribution
    • immutable idempotency receipts and conflicting-key rejection
    • exact object/version lookup and current-head FTS5 search
    • restart persistence
    • deterministic one-winner/one-conflict concurrent CAS behavior
    • database triggers rejecting version rewrites, head clearing, downgrade, cross-object heads, identity changes, and receipt mutation
    • 19 Rust unit tests, 4 real CLI integration tests, warnings-denied Clippy, formatting, 39 legacy regression tests, and clean patch checks

    This is not MathOS 1.0 completion. The issue remains open until the branch is published and remote CI verifies Linux, Windows, and the pinned Lean setup.

  2. Mnehmos commented on Jul 19, 2026

    @Mnehmos
    OwnerAuthor

    Remote preservation update: local commit c8bbe2d was replayed as remote commit d69f13d on draft PR #11. The earlier local hash remains useful only for the ephemeral checkout; d69f13d is the durable GitHub identity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0