interplane.Get Omega
Read in your language

synapse

A component of the AienOS ecosystem.

Brought by drakestapleton

branch main Branches Tags History

synapse / evidence / REPAIR-RECOVERY-L662 / README.md

46 lines · 5852 bytes Raw Blame History Source

L662: recover the existing Synapse105 implementation

Intermediate qualification, not merge/closure approval. Existing PR110 still names an earlier partial implementation. This branch preserves the full original work rather than starting another repair tool or PR. Dependency PR103 is now merged. Publisher handoff L663 must advance existing PR110 only after final source review and exact-head signed gates; paused lanes are not resumed here.

Source lineage

The original full implementation includes read-only diagnosis, explicit roll-forward/adopt intent, backup-before-write, signed chained on-device repair history, healthy-image no-op, foreign-signature refusal and exclusive locking. Existing tests exercise acknowledged content recovered byte-identically, signed history verified on reopen, loss ranges and interrupted adopt. This is library/CLI host-image qualification, not real partition testing, independent security audit or a new operator-key trust policy. A signature attributes a key; replacing the whole raw disk/log under a different key is not prevented by this mechanism alone.

Actual new behavioral RED/GREEN

  1. A tiny backup with a valid body checksum and a u64::MAX section length panicked in read_backup at unchecked index addition. The regression failed101 with attempt to add with overflow; the reader now uses checked length conversion and bounds arithmetic and returns a refusal without altering the file.
  2. A pipe-synchronized helper forks while the parent owns a DirectFile and never accesses the device. Dropping the parent wrapper left the advisory lock held through the inherited open file description. Reopening failed101 deterministically, without sleep or timing retries. The wrapper now explicitly releases its advisory lock on final drop before closing. The same test passes while existing live-owner lock refusals stay intact. Child cleanup/reaping precedes the assertion. This reproduces the mechanism conjectured in the old handoff, not proof of the exact helper responsible for its historical flaky run. It does not claim raw-partition O_EXCL inheritance was separately qualified.

Raw failure and post-fix logs are retained separately. No assertions were weakened and no failure was retried until it happened to pass.

Qualification at this checkpoint

Reproduction boundary

All runs are on the Spark Linux host, max6 build jobs under quiet-build; per-head target and owned TMPDIR are recorded in each state/log. Only synthetic in-memory or regular-file device images were used. No real block device, production store, GPU/model, live inference process, private editorial content or credentials were used. Scripts, compiler versions, exact commands and exit statuses are preserved. Test-generated signing keys are synthetic fixtures, not operator credentials.

Core commands:

cargo test --locked -j 6 --workspace --no-fail-fast
cargo test --locked -j 6 -p synapse-store r1_repair -- --test-threads=1
cargo test --locked -j 6 -p synapse-bench --test store_repair_cli
cargo fmt --all --check
cargo clippy --locked -j 6 --workspace --all-targets -- -D warnings

The fixture gate environment, full commands, actual source input hashes and failed result are in fixture-gates/state.json; ordinary suite totals and ignore names are in suite-counts.json. Failed records and historical source are not rewritten by later qualifications. No deployment/publisher workflow was added or run.