8000 [Principia M1] Add canonical source-object packets, mappings, safe authoring, and validation · Issue #19 · Mnehmos/mathcorpus · GitHub
[go: up one dir, main page]

Skip to content

[Principia M1] Add canonical source-object packets, mappings, safe authoring, and validation #19

Open

Description

@Mnehmos

Parent: #17
Blocked by: #18

Objective

Add a backward-compatible, policy-enforced source ontology to MathCorpus. The implementation must make historical source identity and source-to-modern mappings canonical without weakening the existing formal packet path.

Schema changes

  • Add source_object to packet kind.
  • Add source_only to packet status.
  • Enforce source_only → trust.rung = 0 and proof_authority = none.
  • Add optional category_ref, validated against Expand the packet curriculum taxonomy across mathematics and add a generic first-principles-to-frontier authoring prompt #11's category registry.
  • Add a conditional source_object block with:
    • literature source ID and hash;
    • textual layer;
    • source role;
    • structured edition/book/section/item/page locator;
    • segment-normalization version and source-segment SHA-256;
    • source/target language;
    • attribution roles;
    • extraction method;
    • editorial review state;
    • rights review state;
    • excerpt/full-text export permissions;
    • fidelity notes.
  • Add canonical source_mappings relations for faithful restatement, modern specialization/generalization, formalization, analytical core, approximation justification, empirical premise, and historical context.

Safe authoring

Create tools/author_source_packet.py; do not overload the formal authoring defaults.

It must:

  • default to source-only, rung 0, no proof authority;
  • default training eligibility to private_audit_only;
  • default proof/full-text export to false;
  • require source record/hash, role, textual layer, structured locator, segment hash, attribution, and rights state;
  • never invent authorship, license, public-domain status, review state, or training eligibility;
  • refuse public eligibility until rights and review fields are explicit;
  • use existing canonical JSON/hash utilities;
  • produce deterministic output and support a check/no-op mode.

Policy and validation

  • Resolve every mapping target.
  • Enforce relation/target compatibility.
  • Require formalization targets to be recognized as formal by policy.
  • Require empirical_premise targets to carry no proof authority.
  • Detect duplicate locator + segment-hash pairs.
  • Reject authority propagation from a target theorem back to source wording.
  • Reject reviewed mappings to superseded/quarantined packets without an explicit reason.
  • Fail public export for pending/restricted rights or disallowed excerpts.
  • Require authoritative Proof Search artifact-index resolution in the Principia release workflow.

Generated artifacts

  • manifests/source_object_index.json
  • manifests/source_relation_index.json
  • manifests/principia_coverage.json
  • reports/principia_source_map.md

Required tests

Include positive and adversarial tests for valid source packets, missing pins, locator errors, hash mismatches, duplicate sources, illicit proof authority, unsafe training defaults, pending rights with public excerpts, missing or mistyped targets, formalization-to-nonformal mappings, empirical-to-proof-bearing mappings, superseded targets, deterministic authoring, export separation, and unchanged behavior of author_packet.py.

CI gates

Acceptance criteria

Existing packets remain valid and canonically identical unless a documented migration requires a version bump. A source packet cannot accidentally become a theorem, public training object, MathCorpus-authored text, or rights-cleared export through defaults.

Activity

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