MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / semantic_missing_trunk

Function semantic_missing_trunk

atomic-repository/src/repository/synthesis.rs:669–680  ·  view source on GitHub ↗

Injected semantic corruption (review F4, missing-trunk): deletes the path→trunk index rows for the expectation's semantic delta paths AFTER the FileOps were applied but BEFORE staged verification, so the verification must refuse the corrupted CRDT state before publication.

(
        txn: &mut T,
        paths: &[String],
    )

Source from the content-addressed store, hash-verified

667 /// AFTER the FileOps were applied but BEFORE staged verification, so the
668 /// verification must refuse the corrupted CRDT state before publication.
669 pub fn semantic_missing_trunk<T: MutTxnT>(
670 txn: &mut T,
671 paths: &[String],
672 ) -> Result<(), RepositoryError> {
673 if std::env::var_os("ATOMIC_FAIL_SYNTHESIS_SEMANTIC_MISSING_TRUNK").is_some() {
674 for path in paths {
675 txn.del_crdt_path_trunk(path)
676 .map_err(|e| RepositoryError::Database(e.to_string()))?;
677 }
678 }
679 Ok(())
680 }
681
682 /// Injected semantic corruption (review F4, wrong payload): repoints
683 /// every CRDT branch of the expectation's semantic delta paths to a

Callers 1

Calls 1

del_crdt_path_trunkMethod · 0.80

Tested by

no test coverage detected