8000 Phase 2: enforce versioned source and claim schemas · Issue #9 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content
8000

Phase 2: enforce versioned source and claim schemas #9

Closed

Description

@Mnehmos

Product outcome

Replace untyped source and claim payload acceptance with committed, versioned contracts that preserve source text separately from normalized truth-valued claims.

Acceptance criteria

  • Rust types exhaustively model the Source and Claim fields required by sections 8.1, 8.3, and 12 of SPEC.md.
  • Claim kinds are an exhaustive enum with no proof-status field.
  • Source licensing, redistribution, redaction, locator, citation, and provenance fields are explicit.
  • Claim source reference, normalized statement, assumptions, variables/domains, concept links, citations, and ambiguity notes are explicit.
  • Committed JSON Schemas exist under schemas/source/ and schemas/claim/ with explicit schema versions and closed objects.
  • Schema consistency tests compare committed schemas to the Rust-owned schema contract.
  • Canonical record creation and versioning validate supported source and claim schema versions before persistence.
  • Unknown fields, malformed hashes, empty required text, excessive collections, and unsupported schema versions fail with structured errors.
  • Rejected payloads leave no canonical record or idempotency receipt.
  • Valid typed payloads survive restart and exact lookup unchanged.

Trust checks

  • Original source content is never silently normalized into a claim.
  • A source and claim remain distinct stable objects and versions.
  • No direct proved, disproved, certified, or novelty status exists in either payload.
  • Validation is enforced in code, not by prompt instruction.

Out of scope

Formalization schemas, fidelity review, source acquisition, URL fetching, literature authority, CLI/MCP exposure, and claim truth derivation are separate deliverables.

Activity

  1. Mnehmos commented on Jul 19, 2026

    @Mnehmos
    OwnerAuthor

    Local acceptance evidence is complete in commit 5e8fcaa on feat/spec-driven-rust-rebuild.

    Implemented:

    • closed Rust payload types for sources and claims;
    • exhaustive typed source, redistribution, redaction, and claim-kind fields;
    • explicit original source text, locator, acquisition, licensing, citation, redaction, and provenance fields;
    • explicit claim source-version reference, normalized statement, logical kind/shape, assumptions, variables/domains, concept links, citations, and ambiguity;
    • committed Draft 2020-12 JSON Schemas at schemas/source/source-1.schema.json and schemas/claim/claim-1.schema.json;
    • schema consistency tests against the Rust-owned schema contract;
    • create and version validation before canonical hashing or transaction writes;
    • fail-closed checks for unknown fields, covert proved status, malformed hashes, blank required text, excessive collections, and unsupported versions;
    • persistence tests proving rejection leaves no record or idempotency receipt and valid original text survives restart unchanged.

    Local validation:

    • cargo fmt --check: passed
    • warnings-denied Clippy: passed
    • Rust unit tests: 41 passed
    • Rust CLI integration tests: 4 passed
    • legacy Python regression tests: 39 passed

    This does not implement fidelity review, truth derivation, source acquisition, or formalization. The issue remains open pending authenticated branch push and remote CI.

  2. Mnehmos commented on Jul 19, 2026

    @Mnehmos
    OwnerAuthor

    Remote preservation update: local commit 5e8fcaa was replayed as remote commit d618c1a on draft PR #11. CI is now running against the durable GitHub branch.

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