Skip to content

writ-relate: Rust-native, Relate-centered connected-memory app (proposed, pending review) - #11

Merged
infinri merged 5 commits into
mainfrom
rust-relate-app
Nov 15, 2026
Merged

infinri merged 5 commits into
mainfrom
rust-relate-app

Conversation

@infinri

@infinri infinri commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

relate-app/: a Python-free Rust application. It provides connected project memory for
coding agents, centered on embedded Relate 1.0.1. Proposed in
ADR-0002 as an owner-directed product
requirement, not a measured performance win. Do not merge before joint review. Nothing
here is published or submitted.

What works

  • One Rust binary on the public relate 1.0.1 crate, directory store, Rust 1.88.0
    (the engine's MSRV):
    • Commands: extract, import, capture, retract, context, inspect, verify,
      demo, mcp.
    • No C dependencies; CI checks the binary does not link libpython.
  • Relate does the storage and retrieval work:
    • Records, relationships, receipts, transactions and the writer lease.
    • A native vector index, filtered by scope before the limit.
    • Native full-text indexes, one per scope, because Relate 1.0.1 rejects full-text
      WHERE; this also keeps hidden documents out of IDF.
    • RRF fusion inside one Cypher statement, and bounded typed traversal with visibility
      checks.
    • Details: OWNERSHIP.md.
  • Rust inference matches the Python reference: the pinned MiniLM ONNX model, run
    through tract, has a worst cosine of 0.9999995 across 20 reference cases.
  • The Rust extractor matches the committed passage fixtures byte-for-byte (254
    passages).
  • A real decision chain from this repo's history is in the committed
    relate-app/demo-store/:
  • Demo: 13 separate processes, 15/15 checks.
  • Real host run: one Claude Code session calling the read-only MCP server (two tools,
    network denied), recorded in evidence/mcp-trace/.
  • Tests: 18 real-engine tests, with no capability mocks. They cover identities and
    citations, scope-before-limit, hidden bridges, supersession, expiry, retraction, replay,
    no rebinding after restored wording, no trust from imports, conflict bundles, hard
    UTF-8 budgets, tamper detection, rolled-back failed writes, restart, fail-closed
    corruption, the writer lease and the offline seccomp boundary.

Measured (see RESULTS.md)

  • Regression on 72 opened tasks (labels unreviewed; regression data only):
    • Natural-language delivery: dev 19/24 and held-out 21/24, against Python grounded 15/20
      and legacy 17/19. No task regressed against either reference.
    • Candidate rankings are identical to Python grounded-relate on 54/54 natural-track
      tasks, so the gain comes from the leaner payload format: about 2.7 vs 1.5 records fit
      per payload.
  • Fusion owner: Cypher RRF and Rust RRF deliver identically on 72/72 tasks. Cypher is
    about 1–1.6 ms slower at p50.
  • Paired cold CLI on the same laptop: Rust p50 345 ms, 198 MiB, against Python
    grounded-relate at 917 ms and 235 MiB. These are whole-CLI differences, not a
    language-only claim.
  • Disclosed policy correction: the first Rust run cut each ranking list to k before
    fusion. It was preserved, then corrected to the reference policy.

Not supported

  • Multi-writer use.
  • Owner confirmation or approval (deliberately absent).
  • Confidence thresholds.
  • A remote server or Neo4j.
  • Non-Linux offline enforcement.
  • Scale beyond about 250 records.
  • Power-loss guarantees beyond Relate's WAL.

Housekeeping (deterministic, originals preserved)

In experiments/laptop_decision/:

  • Full-context human-review packets.
  • Explicit not_applicable counts.
  • Detection of citations to unregistered revisions. The first version's false positive
    ("cceeded") was fixed; the result is 0 such citations.

No model calls were repeated. All 403 preservation hashes are unchanged. The Python
baseline passes 149 pytest tests and the original demos.

Contest audit and owner actions (CONTEST.md)

  • The repository lacks the required GitHub topic relate (it currently has
    relate-hackathon). The owner needs to add it.
  • Judging criteria conflict: the homepage uses weights 10/30/25/20/15, while the
    Official Rules say "weighted equally" and name a different criterion (Clarity). A
    clarification question is drafted and has not been sent.
  • Video: the ≤2-minute demo video is not recorded. A storyboard is in
    DEMO-SCRIPT.md.

How a judge runs it

cd relate-app
scripts/fetch-model.sh model && cargo build --release --locked
./target/release/writ-relate context --store demo-store --project writ-retrieval-system \
  --path src/writ_retrieval/reliable/grounded_cli.py --include-history "Which retrieval implementation should we ship?"
./target/release/writ-relate demo --out /tmp/writ-demo

Reuse and AI assistance (Claude Code / Claude Opus 5.5; earlier milestones OpenAI Codex)
are disclosed in REUSE-MAP.md and NOTICE.md.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

infinri and others added 5 commits November 14, 2026 17:46
…niLM inference, context, MCP, demo and real-engine tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…istic grading housekeeping (originals preserved)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ence view, CI with fmt/clippy/tests/demo, regenerated demo store

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… evidence summaries; interactive budget 16000/12000; final MCP trace

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ript, reuse map, results; final eval and cold benchmark

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@infinri
infinri merged commit 00505e9 into main Nov 15, 2026
4 checks passed
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.

1 participant