Skip to content

Commit 9eeaf37

Browse files
test(lifecycle): record compatible readers and project-only command limits
Exercise deps info, cache info/prune, project target inspection, and global absolute-file find refusal without inventing unsupported flags or weakening durable-state checks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent d126ee2 commit 9eeaf37

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

‎tests/integration/test_required_lifecycle_state_machine.py‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,34 @@ def _exercise_global_revision_commands(
20232023
_assert_same_state(installed, capture())
20242024
assert_snapshot_set_unchanged(before, ArtifactSnapshotSet.capture(artifact_roots))
20252025

2026+
for args, expected_text in (
2027+
(("deps", "info", source.package.name), source.package.name),
2028+
(("cache", "info"), "Git repositories"),
2029+
(("cache", "prune", "--days", "30"), "Pruned 0 SHA group(s)"),
2030+
):
2031+
result = run(
2032+
args,
2033+
f"global-compatible-{'-'.join(args[:2])}",
2034+
command_cwd=manifest_path.parent,
2035+
)
2036+
assert expected_text in result.stdout, _result_evidence(result)
2037+
_assert_same_state(installed, capture())
2038+
assert_snapshot_set_unchanged(before, ArtifactSnapshotSet.capture(artifact_roots))
2039+
# targets observes project markers, not the user-scope deployment inventory.
2040+
targets = run(("targets", "--json"), "global-compatible-targets")
2041+
target_rows = json.loads(targets.stdout)
2042+
assert target_rows and all(row["status"] == "inactive" for row in target_rows)
2043+
# find is a project-relative lookup; legacy absolute global records are not supported.
2044+
found = run(
2045+
("find", str(compiled_path.parent / "skills" / "global-audit" / "SKILL.md")),
2046+
"global-find-absolute-refusal",
2047+
command_cwd=manifest_path.parent,
2048+
expected_returncode=1,
2049+
)
2050+
assert "is not tracked by any installed package" in found.stdout, _result_evidence(found)
2051+
_assert_same_state(installed, capture())
2052+
assert_snapshot_set_unchanged(before, ArtifactSnapshotSet.capture(artifact_roots))
2053+
20262054
run(("compile", "--global"), "global-compile-a")
20272055
assert "# revision-a" in compiled_path.read_text(encoding="ascii")
20282056
compiled_a = compiled_path.read_bytes()

0 commit comments

Comments
 (0)