codexdocumentationhelp wanted
Metriche repository
- Star
- (4 stelle)
- Metriche merge PR
- (Merge medio 13h 44m) (20 PR mergiate in 30 g)
Descrizione
Motivation
- Provide production-grade authority and receipt proofs (Ed25519) and durable, crash-recoverable admission evidence to move the IOC vertical-slice forward.
- Replace test-only, in-memory-only receipt persistence with a content-addressed, fsync-backed ledger so admissions survive process restart and can be lineage-verified.
Description
- Add strict Ed25519 adapters:
Ed25519VerifierandLocalEd25519Signerinadmission_gate.pyto verify and emit Ed25519-signed authority envelopes and receipts. - Introduce
FileDecisionLedgerinadmission_gate.py, a content-addressed append-only receipt store that writes canonical JSON, verifies receipt hashes before publish, fsyncs both the file and containing directory, atomically publishes without overwriting existing receipts, and rejects malformed or tampered receipts on reload. - Keep existing
Secp256k1support and in-memory ledger for tests while exposing the new durable ledger for IOC-focused flows. - Add integration tests in
tests/test_admission_gate.pythat exercise an Ed25519-authenticated, context-bound admission decision, verify the receipt survives restart viaFileDecisionLedger, and assert that post-write tampering is detected and rejected.
Testing
- Ran the full test suite with
python -m pytest -q, all tests passed (411 passed). - Verified bytecode/compilation with
python -m compileall -q admission_gate.py tests/test_admission_gate.py. - Performed repository checks (
git diff --check) and local status validation after the change with no outstanding check failures.
Originally posted by @TrueAlpha-spiral in https://github.com/Sovereign-Data-Foundation/truealphaspiral-ethent/pull/48