Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: nicoechaniz/collective-memory
ref: 3e3b39416917f8e3c2bc5ca69362b20296205938
path: .collective-memory-contract
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -42,14 +47,22 @@ jobs:
- run: python -m ruff format --check tools/generate_dm070_vectors.py tests/test_dm070_multihost.py
- run: python -m ruff check tools/generate_dm070_vectors.py tests/test_dm070_multihost.py
- run: MYPYPATH=src python -m mypy tools/generate_dm070_vectors.py tests/test_dm070_multihost.py
- run: python -m ruff format --check tools/generate_dm036_vectors.py tests/test_dm036_collective_memory.py
- run: python -m ruff check tools/generate_dm036_vectors.py tests/test_dm036_collective_memory.py
- run: MYPYPATH=src python -m mypy tools/generate_dm036_vectors.py tests/test_dm036_collective_memory.py
- run: python tools/generate_dm041_vectors.py --check
- run: python tools/generate_dm042_vectors.py --check
- run: python tools/generate_dm036_vectors.py --check
env:
COLLECTIVE_MEMORY_CONTRACT_ROOT: ${{ github.workspace }}/.collective-memory-contract
- run: python tools/generate_dm061_vectors.py --check
- run: python tools/generate_dm070_vectors.py --check
- run: python tools/generate_dm081_vectors.py --check
- run: python tools/generate_dm082_vectors.py --check
- run: python -m compileall -q coordination src tools tests
- run: PYTHONPATH=src python -W error::ResourceWarning -m unittest discover -s tests -v
env:
COLLECTIVE_MEMORY_CONTRACT_ROOT: ${{ github.workspace }}/.collective-memory-contract
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: nicoechaniz/hermes-memory-kit
Expand Down Expand Up @@ -112,6 +125,11 @@ jobs:
- run: python -m pip install -r requirements-build.txt
- run: python tools/reproducible_build.py --output dist
- run: python tools/scan_secrets.py . dist/daimon_matrix-0.0.0.tar.gz dist/daimon_matrix-0.0.0-py3-none-any.whl
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: nicoechaniz/collective-memory
ref: 3e3b39416917f8e3c2bc5ca69362b20296205938
path: .collective-memory-contract
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: nicoechaniz/hermes-memory-kit
Expand All @@ -120,6 +138,7 @@ jobs:
- name: Smoke-test the installed wheel
env:
HMK_CONTRACT_ROOT: ${{ github.workspace }}/.hmk-contract
COLLECTIVE_MEMORY_CONTRACT_ROOT: ${{ github.workspace }}/.collective-memory-contract
run: |
python -m venv "${RUNNER_TEMP}/dm020-wheel"
"${RUNNER_TEMP}/dm020-wheel/bin/python" -m pip install -r requirements-vectors.txt
Expand All @@ -129,6 +148,7 @@ jobs:
"${RUNNER_TEMP}/dm020-wheel/bin/python" -c 'import importlib.metadata as m; import daimon_matrix; assert daimon_matrix.__version__ == "0.0.0"; assert m.requires("daimon-matrix") == ["cryptography==50.0.0", "mcp==2.0.0", "wasmtime==45.0.0"]'
"${RUNNER_TEMP}/dm020-wheel/bin/python" -c 'from daimon_matrix.identity import create_genesis, verify_genesis; roots=[bytes([n])*32 for n in (1,2,3)]; recovery=[bytes([n])*32 for n in (4,5,6)]; artifact=create_genesis(roots,2,recovery,2,created_at_ms=1); assert verify_genesis(artifact).being_ref.startswith("dm:being:v1:")'
"${RUNNER_TEMP}/dm020-wheel/bin/python" -c 'from daimon_matrix.ledger import Ledger; from daimon_matrix.weave import BeingManifest; assert Ledger and BeingManifest'
"${RUNNER_TEMP}/dm020-wheel/bin/python" -c 'from daimon_matrix.collective_memory import create_source_manifest, create_publisher_manifest; assert create_source_manifest()["adapter_id"] != create_publisher_manifest()["adapter_id"]'
"${RUNNER_TEMP}/dm020-wheel/bin/python" -c 'from daimon_matrix.sealed import PROFILE; from cryptography.hazmat.primitives.hpke import Suite; assert PROFILE.startswith("HPKE-X25519") and Suite'
"${RUNNER_TEMP}/dm020-wheel/bin/python" -W error::ResourceWarning -m unittest tests.test_dm022_ledger -q
"${RUNNER_TEMP}/dm020-wheel/bin/python" -W error::ResourceWarning -m unittest tests.test_dm023_sync -q
Expand All @@ -137,6 +157,7 @@ jobs:
"${RUNNER_TEMP}/dm020-wheel/bin/python" -W error::ResourceWarning -m unittest tests.test_dm033_human_review -q
"${RUNNER_TEMP}/dm020-wheel/bin/python" -W error::ResourceWarning -m unittest tests.test_dm034_memory_projection -q
"${RUNNER_TEMP}/dm020-wheel/bin/python" -W error::ResourceWarning -m unittest tests.test_dm035_publication.DM035PublicContractTests -q
"${RUNNER_TEMP}/dm020-wheel/bin/python" -W error::ResourceWarning -m unittest tests.test_dm036_collective_memory.DM036ContractTests -q
"${RUNNER_TEMP}/dm020-wheel/bin/daimon-matrixd" --help
"${RUNNER_TEMP}/dm020-wheel/bin/daimon-bootstrap" --help
"${RUNNER_TEMP}/dm020-wheel/bin/daimon" --help
Expand Down Expand Up @@ -191,6 +212,11 @@ jobs:
requirements-vectors.txt
- run: python -m pip install -r requirements-build.txt -r requirements-vectors.txt
- run: python tools/reproducible_build.py --output dist
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: nicoechaniz/collective-memory
ref: 3e3b39416917f8e3c2bc5ca69362b20296205938
path: .collective-memory-contract
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: nicoechaniz/hermes-memory-kit
Expand All @@ -199,6 +225,7 @@ jobs:
- name: Run installed deterministic conformance twice
env:
HMK_CONTRACT_ROOT: ${{ github.workspace }}/.hmk-contract
COLLECTIVE_MEMORY_CONTRACT_ROOT: ${{ github.workspace }}/.collective-memory-contract
run: |
python -m venv "${RUNNER_TEMP}/dm026-wheel"
"${RUNNER_TEMP}/dm026-wheel/bin/python" -m pip install -r requirements-vectors.txt mcp==2.0.0
Expand Down
9 changes: 9 additions & 0 deletions CONCURRENT-WORK-AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ credential patterns, and prevent revocation from deleting an untracked target.
Inbound collective knowledge is a separate attributed source/quarantine
direction and must use the supported API or an atomic snapshot boundary.

DM-036 resolves that pending boundary against the public MIT upstream commit
`3e3b39416917f8e3c2bc5ca69362b20296205938`, with closed schema SHA-256
`2aad43d1b309ee95108c855fc8dc682a854e5fdf3a1e799ecfca96d3ebf7c5d9`.
The exact repository/tree/blob/license inventory is
`provenance/collective-memory-exchange-v1.json`. No upstream source, database,
WAL, corpus or live state is imported or vendored. Matrix uses two independent
injected contracts: immutable export into quarantine and exact reviewed
publication with fresh effect-truth reconciliation.

### compaii-state and Wiki

Retain hash-pinned generations, staging, conflict checks, classified artifact
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ adopts a shared target and Hermes locally rejects it. The published
`dm.local-we.validation/v1` receipt is deterministic and path-free; the card is
a synthetic single-host gate, not a Matrix.org, multihost Cluster or CompAII
rebirth claim.
DM-036 adds independent inbound and outbound `collective-memory` adapters over
the exact public exchange-v1 contract. Immutable generations enter only an
append-only source log plus `source.imported` quarantine evidence, with offline
catch-up and ledger/source-log rebuild. Publication requires exact current
Matrix source refs, recomputable checkpoints, subject consent, independent
human review, deterministic final-byte secret scanning and fresh upstream
effect truth. The directions have content-addressed DM-018 identities and no
shared credential, store, queue, receipt or authority; the real-I/O lane uses
only isolated synthetic corpus roots.
DM-060 adds the root-authorized birth V1 ceremony and installed
`daimon-synthetic-birth` acceptance. A parent can offer attributed context but
cannot precommit or retain the newborn root; the newborn independently accepts,
Expand Down
56 changes: 56 additions & 0 deletions conformance/registry-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,62 @@
"ci_lane": "complete",
"required": true
},
{
"id": "collective_exchange_recovery",
"owners": ["DM-022", "DM-036"],
"specifications": ["docs/dm036-collective-memory.md", "specs/source-ancestry.md"],
"setup": "Separate owner-only inbound source-log and outbound publication journals with one pinned immutable collective-memory generation and one reviewed derived target.",
"stimulus": "Crash after inbound prepare, after its Matrix event, after outbound prepare, after provider effect and after Matrix acceptance, then restart each adapter.",
"fault": "Process loss occurs on every side of the authoritative Matrix events and external content-addressed receipts.",
"expected": "Recovery deterministically completes all-old or all-new, authors or discovers exactly one event and never advances a mixed generation or serves blind replay.",
"evidence": ["tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_recovers_crash_after_ledger_without_mixed_head", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_recovers_crash_after_prepare_before_ledger", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_recovers_after_acceptance_event_before_journal_commit", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_recovers_after_effect_before_matrix_acceptance", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_recovers_after_prepare_before_request_event"],
"cleanup": "Close both SQLite stores and discard only fixture-owned source, publication and corpus roots.",
"platform": "linux",
"ci_lane": "complete",
"required": true
},
{
"id": "collective_publication_review",
"owners": ["DM-015", "DM-018", "DM-033", "DM-036"],
"specifications": ["docs/dm036-collective-memory.md", "specs/adapter-contracts.md", "specs/source-ancestry.md"],
"setup": "Pinned reviewed-publisher boundary, exact current Matrix source checkpoint, subject consent key and distinct current human review key.",
"stimulus": "Publish, retry, advance a successor and tombstone, then substitute evidence, final bytes, source checkpoint, target state and effect truth.",
"fault": "Expired or revoked consent, self-review, final-render secret, stale predecessor, response loss, drift or an inbound credential attempts to authorize publication.",
"expected": "Only exact final reviewed bytes commit monotonically; every retry re-observes effect truth and neither inbound trust nor an external receipt gains Matrix authority.",
"evidence": ["tests.test_dm036_collective_memory.DM036IntegrationTests.test_direction_separation_and_exact_review_fail_closed", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_real_boundary_publish_response_loss_and_replay", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_rejects_expired_or_revoked_consent_and_source_drift", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_rejects_provider_preview_injection_untracked_tombstone_and_drift", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_outbound_successor_and_reviewed_tombstone_are_monotonic"],
"cleanup": "Remove isolated external targets, projection databases, Matrix ledger and publisher journal.",
"platform": "linux",
"ci_lane": "complete",
"required": true
},
{
"id": "collective_real_io",
"owners": ["DM-015", "DM-036"],
"specifications": ["docs/dm036-collective-memory.md", "schemas/collective-memory/v1/contracts.schema.json"],
"setup": "Real pinned collective-memory export and publication boundaries over an isolated synthetic corpus with FTS SQLite and Atlas projections plus unrelated content.",
"stimulus": "Export, quarantine in Matrix, publish an independently reviewed derivative, verify search and Atlas, then publish a reviewed tombstone and reindex.",
"fault": "A direction shares SQLite, WAL or SHM state, commit exposes a mixed generation, or the transaction mutates unrelated corpus content.",
"expected": "Every view is old-or-new, both databases pass integrity checks, the target converges through tombstone and unrelated content remains exact.",
"evidence": ["tests.test_dm036_collective_memory.DM036IntegrationTests.test_real_export_matrix_quarantine_publish_search_atlas_and_tombstone"],
"cleanup": "Close SQLite handles and remove the complete isolated corpus and both independent Matrix adapter roots.",
"platform": "linux",
"ci_lane": "complete",
"required": true
},
{
"id": "collective_source_quarantine",
"owners": ["DM-015", "DM-018", "DM-023", "DM-036"],
"specifications": ["docs/dm036-collective-memory.md", "specs/source-ancestry.md"],
"setup": "Pinned read-only export capability, immutable attributed generations, separate append-only Matrix source log and root-authorized ledger.",
"stimulus": "Preview and apply initial, paged, successor, tombstone and offline generations, then rebuild from the authoritative Matrix event and local immutable source log.",
"fault": "Tampered or partial pages, implicit removal, predecessor fork, symlink, timeout or collective text attempts to become autobiographical memory.",
"expected": "Only complete continuous generations advance; every artifact remains attributed and quarantined, prior active truth survives failure and personal-memory assertions remain exactly zero.",
"evidence": ["tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_contract_rejects_adversarial_manifests_and_partial_page", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_initial_retry_successor_and_tombstone_remain_quarantined", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_offline_catch_up_walks_historical_manifests", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_paginates_bounded_generation_without_large_ledger_event", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_rebuilds_active_projection_from_ledger_and_source_log", "tests.test_dm036_collective_memory.DM036IntegrationTests.test_inbound_rejects_artifact_fork_and_symlink_source"],
"cleanup": "Close the inbound source store and ledger, then remove their separate owner-only fixture roots.",
"platform": "linux",
"ci_lane": "complete",
"required": true
},
{
"id": "communication_cursor_contiguous",
"owners": ["DM-052"],
Expand Down
2 changes: 1 addition & 1 deletion conformance/source-v0-section14.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dm026-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Cluster lifecycle, external-effect, or rebirth certification.
## Closed evidence registry

`conformance/registry-v1.json` is the canonical
`dm.conformance.registry/v1`. Its 97 scenario identifiers are closed in both
`dm.conformance.registry/v1`. Its 101 scenario identifiers are closed in both
directions: a missing scenario, an unknown scenario, duplicate identifier,
unknown field, unregistered evidence reference, or non-required release
scenario fails validation. Each scenario names its owner cards,
Expand Down
Loading
Loading