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

Function private_material_in_change

atomic-repository/src/git_binding/pack.rs:342–358  ·  view source on GitHub ↗

The private material a change carries for Git transport, if any (§12.13). This resolves the CB-6A-format ambiguity for CB-6B: a change file's key pins its bytes, but hash authority is not privacy authorization. Provenance with unhashed prompt bodies (`Full`/`Compressed`) and any `unhashed` section (free-form transcripts, review comments) never enters Git; such changes travel only via an Atomic re

(change: &Change)

Source from the content-addressed store, hash-verified

340/// section (free-form transcripts, review comments) never enters Git; such
341/// changes travel only via an Atomic remote.
342pub fn private_material_in_change(change: &Change) -> Option<String> {
343 for provenance in change.provenance() {
344 match &provenance.prompt {
345 PromptContent::Full(_) => {
346 return Some("provenance carries a full prompt body".to_string())
347 }
348 PromptContent::Compressed(_) => {
349 return Some("provenance carries a compressed prompt body".to_string())
350 }
351 PromptContent::Hashed(_) | PromptContent::None => {}
352 }
353 }
354 if change.unhashed.is_some() {
355 return Some("the change carries an unhashed metadata section".to_string());
356 }
357 None
358}
359
360/// Whether `key` is a 64-character lowercase-hex blake3 key.
361fn is_blake3_key(key: &str) -> bool {

Callers 2

quarantine_change_recordFunction · 0.85

Calls 1

provenanceMethod · 0.45

Tested by

no test coverage detected