Skip to content

MORK / PathMap Schnellverschluss: source switch, typed backend switch, differential probe (D-MPS-0..7) - #1620

Merged
AdaWorldAPI merged 5 commits into
mainfrom
ccr-08f48cec-lbv9l4-mork-pathmap
Oct 19, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
ccr-08f48cec-lbv9l4-mork-pathmap

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

This PR adds a results-only probe that runs MORK and PathMap behind a single replaceable boundary in lance-graph. It is independent of #1618 and #1619 (both merged). main has been merged in.

It adds no production executor and makes no CE64 change. Nothing is wired into Quack, R2IL or Mask-RISC, nothing lands in Lance storage, and no upstream file is modified.

What it adds

  • Plan .claude/plans/mork-pathmap-schnellverschluss-v1.md:
    • verified source and type inventory;
    • ownership and mapping design;
    • specification of the switch between fork and upstream revisions;
    • entropy ledger (semantic, maintenance, translation);
    • measured cost;
    • blockers;
    • a short upstream proposal;
    • §7a: RelationView.generation is a stand-in for the binding witness defined in D-RMAP-1A §7. That witness is DurableRef + index seal + QueryReference::at(v, rung).
  • Probe crates/mork-pathmap-probe:
    • excluded from the workspace and has its own workspace;
    • git dependencies on the AdaWorldAPI forks; vendors nothing;
    • runs the query Q(x,y,z) :- R(x,y), S(y,z) through MORK and through a PathMap read zipper, and compares both against an independent nested-loop oracle;
    • boundary.rs is the only module that names mork or pathmap. Rows go in as [u32; 2] and come out as [u32; 3], so no raw-pointer MORK Expr leaves that module.
  • CI .github/workflows/mork-pathmap-probe.yml: fmt, clippy and tests, once with MORK's default (product-zipper) join and once with --features leapfrog.
  • Board:
    • STATUS_BOARD rows D-MPS-0..7;
    • plan index entry;
    • ISS-MORK-LIBRARY-GLOBAL-ALLOCATOR;
    • LATEST_STATE;
    • entry 2026-10-19-mork-pathmap-schnellverschluss.md;
    • regenerated entries index.

Source switch

  • MORK's workspace declares pathmap = { path = "../PathMap/" }. That path is outside the MORK repository, so a git dependency on MORK fails to resolve: no matching package named pathmap.
  • One line, [patch."https://github.com/AdaWorldAPI/MORK"] pathmap = { git = …, rev = "ef02591" }, fixes this without editing MORK. The dependency graph then contains exactly one pathmap package.
  • Switching between fork and upstream means changing three URL/revision pairs and the patch key. No consumer source changes.
Item Measured
PathMap fork vs upstream master 0 files differ
MORK fork main vs upstream main 0 files differ
MORK fork stable branch de9312e 18 files, +421/−408 (makes the nightly feature opt-in)
Upstream MORK main on Rust 1.99 does not build: E0554 (nightly-only feature)
de9312e on Rust 1.99 builds

Execution switch

  • Backends: Backend::{Mork, PathMapZipper, Native}.
  • Typed refusals instead of silent degradation:
    • SetOnly: both upstream indexes store sets, so a request for bag multiplicities is refused rather than answered with every count collapsed to 1.
    • NoAdmittedNativeJoin: this join reads S at positions chosen by R's values, which the no-gather ruling forbids. The native arm waits for a co-addressed producer. The quarantined feat(mask-risc): expose scoped outgoing graph-hop fold #1616 hop is not used.
    • Stale: the generation witness refuses an index built from older generations.

Tests

  • 8 differential tests plus 1 unit test pass in both the default (product-zipper) and leapfrog builds. They cover:
    • a shared variable;
    • empty and disjoint inputs;
    • per-atom variable scope;
    • wide ids that must not alias;
    • duplicates under bag semantics;
    • a stale generation, and a reused (ABA) generation number, which is pinned as not detected;
    • the native refusal;
    • MORK's index returning to holding only the input facts after a query.
  • Four disable runs each turned exactly their own guard's test red: the stale check, the bag refusal, the PathMap key order, and the removal of MORK's answer facts.
  • clippy -D warnings and fmt --check are clean in both builds.

Measured cost

Release build, one run per cell, re-run after the Codex review. Shared and rebuilt costs are now on the same basis.

Backend n Index build Per row Query Per thought, shared (k=64) Per thought, rebuilt Total for 64, shared Total for 64, rebuilt
PathMap 50 000 14.8 ms 236 ns 24.1 ms 24.3 ms 38.9 ms 1 556 ms 2 487 ms
MORK 50 000 26.0 ms 416 ns 162 ms 162 ms 188 ms 10 377 ms 12 013 ms
  • Sharing saves only the build (1.6× for PathMap, 1.16× for MORK), because the query dominates.
  • The first version of this table compared a per-thought shared figure with a 64-thought rebuilt total and reported 110×. That figure was wrong.
  • The MORK query time includes the probe's text decode of MORK's answers, so it does not measure MORK's join on its own.
  • Allocation counts could not be taken: MORK installs a global allocator inside the library (see below).

Blockers and upstream proposals

None of these upstream changes is opened by this PR.

  • D-MPS-2: declare PathMap as a git or version dependency instead of ../PathMap.
  • D-MPS-3: upstream the stable-build commit de9312e.
  • D-MPS-4: do not enable PathMap's jemalloc in the library. Linking MORK currently replaces the binary's global allocator; a second one fails to link.
  • D-MPS-5: make query_multi_leapfrog / UnifyJoin generic over a cursor provider. SubtermCursor<Z> is already generic over PathMap's public zipper traits.
  • D-MPS-6: BLOCKED. A Lance-owned PathMap-trait cursor over a sealed RelationOrder cannot be built yet, because RelationOrder itself does not exist yet.
  • D-MPS-7: MORK declares no licence, and the upstream MIT-licence PR docs: Statusmatrix (DE) — was funktioniert, Mitigation, Schulden, Pot… #148 is not merged, so this PR vendors no MORK source.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K

An excluded probe crate (own workspace, results only, D-ASM-10) that answers
Q(x,y,z) :- R(x,y), S(y,z) through MORK (product-zipper and leapfrog builds)
and a PathMap read-zipper, against an independent nested-loop oracle.

- Source switch: pinned git revisions of the AdaWorldAPI forks plus one
  [patch] that resolves MORK's out-of-repo `../PathMap` path to the same
  PathMap revision (one package identity, no upstream file edited).
- Execution switch: Backend::{Mork, PathMapZipper, Native} with typed
  refusals: SetOnly (both upstream indexes are sets), NoAdmittedNativeJoin
  (no-gather ruling), Stale (generation witness).
- boundary.rs is the only module naming mork or pathmap; rows cross as
  [u32; 2] in and [u32; 3] out, so no raw-pointer MORK Expr escapes.
- examples/cost.rs measures index build, query and amortization over
  1/8/64 thoughts. CI job mork-pathmap-probe.yml runs both builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
Plan with the verified source and type inventory, ownership and mapping
design, fork/upstream switch specification, entropy ledger, measured cost,
blockers and a short upstream proposal (PathMap dependency path, stable
build, library allocator, generic join input). Board: STATUS_BOARD rows,
plan index, ISS-MORK-LIBRARY-GLOBAL-ALLOCATOR, LATEST_STATE, an entry with
the measurements; entries index regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1fc8ecf0-7682-47ef-97b4-ef56aa1bc873
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The probe's bare u64 generation is enough for the in-probe Stale
refusal, but outside the probe two datasets can share a version number.
D-RMAP-1A §7 (#1619) replaces it with DurableRef + index seal +
QueryReference::at(v, rung). The backend switch does not touch the
witness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 19, 2026 21:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T21:17:45.718092Z 0d73c1e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ork-pathmap

# Conflicts:
#	.claude/board/entries/README.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d73c1e911

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/mork-pathmap-probe/examples/cost.rs Outdated
The probe printed the shared cost per thought (build / 64 + query) next to
the rebuilt cost as a 64-thought total (64 * (build + query)), and the plan
read that as a 110x saving. It now prints both per thought and both as a
64-thought total. Re-run in release: a shared PathMap index over 64 thoughts
costs 1 556 ms vs 2 487 ms rebuilt (1.6x; 24.3 vs 38.9 ms per thought) at
n = 50 000. Sharing saves the build only; the query dominates. Plan §6 and
the board entry now cite the re-run.

Found by Codex review on #1620.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
@AdaWorldAPI
AdaWorldAPI merged commit dca8e7b into main Oct 19, 2026
14 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 19, 2026
Merges main (#1620, dca8e7b) into the #1621 branch and resolves the
LATEST_STATE conflict by keeping #1620's own section, now marked merged,
under a new "main after #1620" section. Adds the PR_ARC_INVENTORY entry
for #1620, including the corrected cost figure (1.6x shared vs rebuilt,
not 110x). Entries index regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VyWZYKycy6MoYDxHRVnV5K
AdaWorldAPI added a commit that referenced this pull request Oct 20, 2026
D-RMAP focus probe and native join over a relationship table; board rows for #1618–#1620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants