8000 Phase 5: canonical pedagogy records and Pilot A curriculum path · Issue #48 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content

Phase 5: canonical pedagogy records and Pilot A curriculum path #48

Closed

Description

@Mnehmos

Context

MathOS 1.0 requires canonical pedagogy before release/export projections. RecordKind::LearningUnit and typed pedagogy edges already exist, but learning_unit/1 currently bypasses validation and neither CLI nor MCP exposes the SPEC §21.8 pedagogy actions.

This issue is intentionally limited to the Phase 5 canonical pedagogy layer and Pilot A learning path. Release bundles and RL-task export remain a separate follow-up slice.

Scope

  • Define a closed, bounded Rust-owned learning_unit/1 payload and committed JSON Schema for the SPEC learning-unit kinds.
  • Validate exact target, source, formalization, content-artifact, license, review, and training-policy data through the shared application path.
  • Expose one first-class mcl pedagogy family and one MCP pedagogy tool family for propose, version, get, validate, review, link, and path operations.
  • Reuse immutable records and exact version-bound pedagogy edges; preserve the existing hard-prerequisite cycle rejection.
  • Build and playtest a deterministic Pilot A path containing explanation, counterexample, misconception, exercise, and mastery check units grounded in canonical claim/evidence artifacts.

Acceptance criteria

  • learning_unit/1 denies unknown fields, enforces bounded text/collections and closed enums, and has a committed schema equality test.
  • Every unit names exactly one claim or concept target, an audience track, entry assumptions, objectives, hard/soft prerequisites, grounded source/formal references, one content artifact, review state, license, and training status.
  • Application validation resolves every exact canonical reference and content artifact; stale/missing/wrong-kind references fail closed.
  • Public/training eligibility fails closed when license, review, redistribution, or artifact restrictions do not permit it; pedagogy review never grants mathematical authority.
  • propose, version, get, validate, review, link, and deterministic bounded path use the same application methods from CLI and MCP.
  • Links accept only pedagogy edge kinds and exact learning-unit versions where required; hard and soft prerequisites remain distinct; hard cycles are rejected.
  • Dry-run, idempotency, compare-and-swap, restart persistence, CLI/MCP parity, malformed input, stale reference, cycle, and training-policy tests pass.
  • Pilot A CLI playtest creates and traverses explanation, counterexample, misconception, exercise, and mastery-check units against real canonical Pilot A state.
  • Implementation status/checklist documentation records exact tested capability and explicitly leaves release/RL export open.

Verification

  • cargo fmt --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace
  • PYTHONPATH=src PYTHONWARNINGS=error::ResourceWarning python -m unittest discover -s tests -v
  • focused CLI/MCP playtest from a fresh root and after restart
  • git diff --check

Activity

  1. Mnehmos commented on Jul 21, 2026

    @Mnehmos
    OwnerAuthor

    Implementation checkpoint on issue-48-canonical-pedagogy:

    • Added a closed Rust-owned learning_unit/1 contract and committed schemas/pedagogy/learning-unit-1.schema.json for all 13 SPEC unit kinds and every §18.2 field.
    • Authored propose/version paths are draft-only; actor-bound review alone can create reviewed/rejected state or choose training status. Pedagogy review creates no evidence and no mathematical authority.
    • Application validation rehashes content CAS bytes, enforces the learning-content role, resolves exact current targets/sources/formalizations/related units, verifies related-unit kinds, checks exact license agreement, and fails public/private training policy closed.
    • The Store rechecks all current reference heads inside the write transaction, closing the application-validation/commit race.
    • Exact hard/soft prerequisite declarations must match version-bound edges; existing SQLite hard-cycle rejection remains intact. Reviewed prerequisite and recommended paths are bounded and deterministic.
    • CLI and MCP now share propose, version, get, validate, review, link, and path application methods. MCP action fields are closed and retain a root object schema.
    • The coherent Phase 5 crosswalk gap is also closed: concept taxonomy crosswalks require an exact current source and an exactly matching source license; mismatches fail before persistence.

    Focused playtest evidence:

    • The real CLI integration starts a fresh migration-11 SQLite/CAS instance and creates Pilot A source “Every prime number is odd,” canonical claim, explanation, counterexample, misconception, exercise, and mastery-check units.
    • It exercises dry-run hash parity, create retry, review dry-run/retry, incomplete-link rejection, exact link validation, prerequisite ordering after restart, stale-source rejection, public-training rejection for restricted grounding, and taxonomy-license mismatch rejection.
    • MCP proposes, reviews, validates, and restarts the same canonical service path; CLI exact-get bytes match MCP.

    Local Windows verification so far:

    • cargo fmt --check — pass
    • warnings-denied Clippy — pass before the final transactional crosswalk addition; final rerun pending
    • cargo test --workspace — 141 unit + 1 Lean + 4 MCP + 13 CLI tests passed
    • legacy Python regressions — 39 passed
    • mcl doctor — healthy with Lean 4.32.0
    • git diff --check — pass

    Release bundles and RL/evaluation exports remain explicitly out of scope and unfinished.

  2. Mnehmos commented on Jul 21, 2026

    @Mnehmos
    OwnerAuthor

    Final merged-tree evidence for #48:

    • PR Add canonical pedagogy workflow #49 merged exact reviewed head d85be145666188dfce8c4999015e128a713d7e4b as merge commit 6764ac2dc832e6eab0a984be5ccd252a214c5321 (tree 526159961fd1e22b817f16672d375e115315512c).
    • PR CI run 29875685174 passed Linux Rust, Windows Rust, pinned Lean, real-storage smoke, and legacy Python on that exact head; CodeRabbit was green.
    • Codex review found one actionable idempotency-ordering defect. Commit d85be14 added receipt-first preflight for learning-unit propose/version/review and pedagogy links, plus CLI regressions that advance dependency heads and prove exact retries still return their original stored result. The review thread was answered and resolved; zero unresolved threads remained at merge.
    • Main CI run 29875909954 passed all five jobs on exact merge 6764ac2.
    • Protected publication run 29875910000 passed and retained artifact publication-boundary-6764ac2dc832e6eab0a984be5ccd252a214c5321 (artifact ID 8512988490, 226,131 bytes).
    • Independent download/replay audited all 193 retained files: no symlinks, empty stderr captures, canonical record hashes, exact commit/tree/run bindings, attestation raw replay, repaired claim progression not_started -> open -> proved, original claim still disproved, and byte-identical original claim/status/counterexample-package/repair-edge state. Proof request f6511ab5def57f0da240894d96bb92862d6e30d8893e6f0874179220c7504d73, report 536bb0a6ab1a035d2c50ac3e8d7a659f641e0d2bbf4139865aa2308fe97330ad, closure bb9b103cff4f92620aafb2252a1e208974222130cd33e25de247c37516f178fa.
    • The fresh-root CLI/MCP tests cover all canonical pedagogy actions and policy failures. A separate process-per-action CLI playtest traversed explanation -> counterexample/misconception -> exercise -> mastery_check against exact Pilot A source 019f868e-463d-7103-9cc3-222213939c55@59ef27897c032cab17d1c371f509ab05898a65bef03376e5deb33d18822c8c40, repaired claim 019f868e-464e-78e0-9125-035f7fba0e87@288e4ee259fb2f7cb5fd5295c971fec10ee85415601d6ea13d7d09d3103a6ddc, and Lean formalization 019f868e-4662-7bc0-ba7b-b1b6d1214e05@527785065de148fc1ba15f4001afcce41a1e4bf10d0fee33c3de157df8b7afc5; claim status stayed unchanged and mcl doctor remained healthy.

    The protected artifact contains zero pedagogy/learning-unit files. That is expected for this canonical Phase 5 slice and is direct evidence that portable release, MathCorpus/MCIP, and RL/evaluation projections remain unfinished Phase 6 work; #48 does not claim those capabilities.

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