8000 Phase 2: add deterministic bounded graph traversal · Issue #8 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content

Phase 2: add deterministic bounded graph traversal #8

Closed

Description

@Mnehmos

Product outcome

Make the version-bound mathematical graph queryable without introducing a graph database or losing the distinction between edge namespaces.

Acceptance criteria

  • Traversal begins from an exact object ID and exact version hash owned by that object.
  • Callers select incoming, outgoing, or both directions.
  • Callers may filter by one or more exhaustive typed edge kinds.
  • Depth and result count are explicitly bounded and validated.
  • Results retain exact source and target version hashes plus path depth.
  • Cycles terminate deterministically without duplicate edge results.
  • Ordering is deterministic across process restart.
  • Unknown roots, mismatched versions, invalid depth, and invalid limits return structured errors.
  • Traversal is read-only and cannot promote, mutate, or infer mathematical status.
  • Unit and adversarial tests exercise the real SQLite store, including logical cycles and pedagogical direction.

Trust checks

  • Logical edges and pedagogical prerequisites remain distinct typed relations.
  • Traversal does not treat reachability as implication unless the edge kind explicitly says so.
  • No raw SQL or recursive query text is accepted from callers.
  • No unbounded recursive query is possible.

Out of scope

Context ranking, declaration lookup, MCP exposure, vector search, truth derivation, and graph mutation are separate deliverables.

Activity

  1. Mnehmos commented on Jul 19, 2026

    @Mnehmos
    OwnerAuthor

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

    Implemented:

    • exact object-and-version traversal roots;
    • typed outgoing, incoming, and bidirectional traversal;
    • typed edge-kind filters with no caller-supplied SQL;
    • explicit depth, result, and edge-scan bounds;
    • cycle-safe breadth traversal with no duplicate edge results;
    • exact source and target version hashes plus path depth in every hit;
    • deterministic ordering verified across process restart;
    • structured failures for mismatched roots, invalid depth, and invalid limits;
    • read-only semantics with no truth, fidelity, novelty, or pedagogy inference.

    Local validation:

    • cargo fmt --check: passed
    • warnings-denied Clippy: passed
    • Rust unit tests: 36 passed
    • Rust CLI integration tests: 4 passed
    • graph traversal tests against real SQLite: 4 passed
    • legacy Python regression tests: 39 passed

    The issue remains open pending authenticated branch push and remote CI. This capability is not yet exposed through the future shared CLI/MCP query path, which is deliberately tracked as a later deliverable and not claimed complete here.

  2. Mnehmos commented on Jul 19, 2026

    @Mnehmos
    OwnerAuthor

    Remote preservation update: local commit 655fa33 was replayed as remote commit 6027f55 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