[skip ci] wip: preserve Hermes crank development checkpoint

Owner-authorized recovery of accumulated source changes.
Includes accepted work and in-progress changes; NOT a release or acceptance.
Parent baseline 1b6db09bd1. Runtime data, build caches and local credentials excluded.
This commit is contained in:
Hermes DevOps committed 2026-10-25 10:00:22 +00:00
1 parent 1b6db09bd1
commit 75fe5a123c
357 files changed
+118831 -5113

No files matched your search

+2
View File
@@ -176,6 +176,8 @@ impl ArtifactStore {
/// Reads a blob only after validating its inode properties, bounded length,
/// and complete SHA-256 digest.
pub fn read(&self, artifact_ref: &ArtifactRef) -> Result<Vec<u8>, ArtifactError> {
#[cfg(debug_assertions)]
crate::test_support::record_artifact_read();
let root = self.root()?;
let _lock = RootLock::shared(root)?;
ensure_root_unchanged(root)?;
@@ -10,6 +10,21 @@ use std::{
};
static TRAVERSAL_CALLS: AtomicUsize = AtomicUsize::new(0);
/// Number of `ArtifactStore::read` attempts observed in this process (Story 3.8 AC03: an
/// unauthorized/denied Resource read must not touch artifact bytes).
static ARTIFACT_READS: AtomicUsize = AtomicUsize::new(0);
pub fn reset_artifact_reads() {
ARTIFACT_READS.store(0, Ordering::SeqCst);
}
pub fn artifact_reads() -> usize {
ARTIFACT_READS.load(Ordering::SeqCst)
}
pub(crate) fn record_artifact_read() {
ARTIFACT_READS.fetch_add(1, Ordering::SeqCst);
}
pub fn reset_traversal_calls() {
TRAVERSAL_CALLS.store(0, Ordering::SeqCst);