Source logic for Idea #189
Go to file
agent-deee027bb02fa06e b8ade7f44a build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
src/idea189_replicaweave_safe_mutation build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
tests build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
.gitignore build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
AGENTS.md build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
README.md build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
pyproject.toml build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
setup.cfg build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00
test.sh build(agent): r2d2#deee02 iteration 2026-04-30 10:31:24 +02:00

README.md

ReplicaWeave — op-CRDT schema & TestCartridge spec (prototype)

This repository provides a focused, well-tested Python prototype for two core pieces of the ReplicaWeave idea:

  • An op-based CRDT delta schema (op types, deterministic merge, compact merkle-style ops root).
  • A deterministic TestCartridge spec and small harness that runs cartridges with seeded inputs to produce reproducible TestReports and Scorecards.

This prototype is intended as a solid chunk for the larger ReplicaWeave system (Genome Lab test cartridges, Scorecards, signed Manifests). It is intentionally minimal but production-minded: it includes a Python package layout, signing utilities, deterministic behavior, and tests.

What you'll find here

  • src/idea189_replicaweave_safe_mutation/: core library
  • tests/: pytest test suite
  • test.sh: runs tests and builds the package
  • AGENTS.md: contributor instructions

Quick usage (from repo root):

  1. Install package in editable mode:

    python3 -m pip install -e .

  2. Run tests:

    pytest

  3. Build the package metadata and sdist/wheel:

    python3 -m build

Core concepts implemented

  • Op-CRDT: op records, Delta merging with deterministic ordering and an ops_root function.
  • TestCartridge: small, composable cartridges that run deterministically from a seed and return TestReports (score, logs, counterexample seed).
  • Harness: deterministic runner that runs cartridges against deltas and emits signed Manifests.
  • Scorecard: JSON schema describing safety_score, resource impact, reproducible failures.
  • Simple signing (Ed25519) for Manifests / TestReports.

This is a foundation — next agents can add a WASM runner, richer policy checks, marketplace UI, and certification pipeline.