Skip to content

Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.

test(secure-fs): make same-inode read mutation metadata observable (#652)

Christopher Kevindb1c91d654d2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2321a0e0..858a63e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -342,6 +342,8 @@ All notable changes to SkillEvaluator are documented in this file.
clock granularity by modeling an advanced ctime.
- HTML reports preserve successful execution when Tier 3 quality fails, avoiding
spurious notices that other execution failures need attention.
+- Make the same-inode read-race regression use an observable mtime change without
+ depending on filesystem clock granularity.
- The Tier 2 scale guide names the fixed 8 MiB selected-manifest input budget
and 1 MiB per-manifest limit, including in description-only embedding mode.
- Saved Tier 2 catalogs use compact JSON so indentation no longer rejects dense
diff --git a/docs/developer-guide.mdx b/docs/developer-guide.mdx
index 29dbe880..f1dc6aac 100644
--- a/docs/developer-guide.mdx
+++ b/docs/developer-guide.mdx
@@ -67,6 +67,9 @@ The Makefile wraps the standard tools, so you can run the underlying commands di
evaluation framework used by Tier 3; the `live` marker exercises its in-process
backend.
+The POSIX same-inode read-race test explicitly advances the modified file's
+mtime: two same-size writes can otherwise share a filesystem clock tick.
+
| Marker | What it covers | Run it with |
| --- | --- | --- |
| *(none)* | Fast unit tests — the default selection | `pytest` |
diff --git a/tests/utils/test_secure_fs.py b/tests/utils/test_secure_fs.py
index d10169d3..98cbb6c6 100644
--- a/tests/utils/test_secure_fs.py
+++ b/tests/utils/test_secure_fs.py
@@ -204,6 +204,8 @@ def test_same_inode_mutation_during_read_fails_closed(tmp_path: Path, monkeypatc
nonlocal mutated
if not mutated:
target.write_text("EVIL-CONTENT")
+ metadata = files[0].metadata
+ os.utime(target, ns=(metadata.st_atime_ns, metadata.st_mtime_ns + 2_000_000_000))
mutated = True
return real_read(descriptor, count)
@@ -212,6 +214,8 @@ def test_same_inode_mutation_during_read_fails_closed(tmp_path: Path, monkeypatc
with SecureRoot(root) as secure_root, pytest.raises(SecurePathError, match=r"changed|identity|mutation"):
secure_root.read_bytes(files[0].relative_path, 1024, expected=files[0].metadata)
assert mutated
+ assert target.stat().st_ino == files[0].metadata.st_ino
+ assert target.stat().st_size == files[0].metadata.st_size
def test_directory_swap_to_external_link_is_never_traversed(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: