CLI: export active SPL corpus and replay with fingerprint verification #27

Open
opened 2026-07-16 06:48:50 +00:00 by anuna-02 · 0 comments
anuna-02 commented 2026-07-16 06:48:50 +00:00 (Migrated from codeberg.org)

Summary

Add native export of the active SPL corpus and a replay/verification workflow for
reproducible semantic closure.

Motivation from the grounded two-machine run

The live journal contained 53 entries, but a clean semantic replay required exactly 38
active content assertions. The harness had to manually:

  • exclude theory/member setup entries;
  • exclude six retracted assertions and six retraction records;
  • preserve all active proponent and real machine-B statements;
  • create a fresh identity and theory;
  • assert each statement individually;
  • recompute and compare a custom closure fingerprint.

The replay succeeded, but reconstructing the active corpus by hand is error-prone and
not a reusable CLI contract.

Proposed CLI

For example:

elephant theory export rootclaim-grounded --active --format spl > corpus.spl
elephant theory export rootclaim-grounded --manifest export.json

elephant theory replay corpus.spl \
  --alias rootclaim-grounded-replay \
  --expect-fingerprint ee41f61d... --json

Useful export selectors could include --active, --include-meta,
--include-members, --include-retracted, and --signer. A manifest can preserve
provenance and original entry IDs without embedding non-SPL data into the replayable
corpus.

Acceptance criteria

  • --active --format spl emits only active, parseable SPL statements and is stable
    across repeated exports of the same journal state.
  • Meta/member/retracted inclusion is explicit and documented.
  • Exported statements can be replayed one at a time into a fresh theory without custom
    parsing.
  • Replay reports created theory ID, assertion count, failures, resulting fingerprint,
    and fingerprint match in JSON.
  • Replay is safe to resume or uses the proposed idempotent assertion primitive.
  • A provenance manifest maps exported statements to source entry IDs/signers while the
    semantic replay remains identity-independent.
  • Tests reproduce the same non-member closure under a different replay identity.

Environment / evidence

Observed with Elephant 0.1.2. The hand-maintained corpus and replay script are:

### Summary Add native export of the active SPL corpus and a replay/verification workflow for reproducible semantic closure. ### Motivation from the grounded two-machine run The live journal contained 53 entries, but a clean semantic replay required exactly 38 active content assertions. The harness had to manually: - exclude theory/member setup entries; - exclude six retracted assertions and six retraction records; - preserve all active proponent and real machine-B statements; - create a fresh identity and theory; - assert each statement individually; - recompute and compare a custom closure fingerprint. The replay succeeded, but reconstructing the active corpus by hand is error-prone and not a reusable CLI contract. ### Proposed CLI For example: ```console elephant theory export rootclaim-grounded --active --format spl > corpus.spl elephant theory export rootclaim-grounded --manifest export.json elephant theory replay corpus.spl \ --alias rootclaim-grounded-replay \ --expect-fingerprint ee41f61d... --json ``` Useful export selectors could include `--active`, `--include-meta`, `--include-members`, `--include-retracted`, and `--signer`. A manifest can preserve provenance and original entry IDs without embedding non-SPL data into the replayable corpus. ### Acceptance criteria - `--active --format spl` emits only active, parseable SPL statements and is stable across repeated exports of the same journal state. - Meta/member/retracted inclusion is explicit and documented. - Exported statements can be replayed one at a time into a fresh theory without custom parsing. - Replay reports created theory ID, assertion count, failures, resulting fingerprint, and fingerprint match in JSON. - Replay is safe to resume or uses the proposed idempotent assertion primitive. - A provenance manifest maps exported statements to source entry IDs/signers while the semantic replay remains identity-independent. - Tests reproduce the same non-member closure under a different replay identity. ### Environment / evidence Observed with Elephant 0.1.2. The hand-maintained corpus and replay script are: - https://github.com/anuna-cooperative/flf-elephant-experiment/blob/96ca63675edd88cf4982449c5f78b9441c320a39/corpus/rootclaim-grounded.spl - https://github.com/anuna-cooperative/flf-elephant-experiment/blob/96ca63675edd88cf4982449c5f78b9441c320a39/runs/2026-07-16/grounded-machineB/verify-replay.sh
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
anuna-research/elephant#27
No description provided.