@yasaswy.nagavolu/agents 0.36.1 → 0.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -290,7 +290,9 @@ def _sole_active_session(session_id: str, procs: ledger.ProcTable) -> bool:
|
|
|
290
290
|
|
|
291
291
|
|
|
292
292
|
def _spelled_in_command(name: str, cmdline: str, command: str) -> bool:
|
|
293
|
-
"""True when every argument of the process is spelled in the launching command; without arguments, when its full image file name is."""
|
|
293
|
+
"""True when every argument of the process is spelled in the launching command; without arguments, when its full image file name is; an unreadable (empty) command line never matches."""
|
|
294
|
+
if not cmdline.strip():
|
|
295
|
+
return False
|
|
294
296
|
try:
|
|
295
297
|
tokens = shlex.split(cmdline, posix=False)[1:]
|
|
296
298
|
except ValueError:
|
|
@@ -865,19 +865,28 @@ def run_tests(targets: list[str], repo_root: Path | None = None) -> tuple[int, i
|
|
|
865
865
|
|
|
866
866
|
|
|
867
867
|
NODE_PKG = "packages/cli"
|
|
868
|
+
CLEANROOM_DIR = "tools/docker_cleanroom"
|
|
869
|
+
CLEANROOM_ENTRY = "tools/docker_cleanroom.js"
|
|
868
870
|
|
|
869
871
|
|
|
870
872
|
def discover_node_tests(files: list[str], repo_root: Path) -> tuple[list[str], set[str]]:
|
|
871
873
|
"""Node test targets for touched .js files under packages/cli/. lib/<name>.js
|
|
872
874
|
maps to test/<name>.test.js; a touched test file runs itself; anything else
|
|
873
875
|
(bin/cli.js, no matching test) falls back to the whole test dir, which then
|
|
874
|
-
absorbs the single files.
|
|
876
|
+
absorbs the single files. Any touched file under tools/docker_cleanroom/ (or
|
|
877
|
+
tools/docker_cleanroom.js) runs every tools/docker_cleanroom/*.test.js.
|
|
878
|
+
Returns (targets, rel paths covered)."""
|
|
875
879
|
test_dir = repo_root / NODE_PKG / "test"
|
|
876
880
|
singles: list[str] = []
|
|
877
881
|
full = False
|
|
882
|
+
cleanroom = False
|
|
878
883
|
covered: set[str] = set()
|
|
879
884
|
for f in files:
|
|
880
885
|
rel = _resolve(f, repo_root).relative_to(repo_root).as_posix()
|
|
886
|
+
if rel == CLEANROOM_ENTRY or rel.startswith(CLEANROOM_DIR + "/"):
|
|
887
|
+
covered.add(rel)
|
|
888
|
+
cleanroom = True
|
|
889
|
+
continue
|
|
881
890
|
prefix = NODE_PKG + "/"
|
|
882
891
|
if not (rel.startswith(prefix) and rel.endswith(".js")) or not test_dir.is_dir():
|
|
883
892
|
continue
|
|
@@ -894,7 +903,10 @@ def discover_node_tests(files: list[str], repo_root: Path) -> tuple[list[str], s
|
|
|
894
903
|
singles.append(str(match))
|
|
895
904
|
else:
|
|
896
905
|
full = True
|
|
897
|
-
|
|
906
|
+
targets = [str(test_dir)] if full else singles
|
|
907
|
+
if cleanroom:
|
|
908
|
+
targets += sorted(str(t) for t in (repo_root / CLEANROOM_DIR).glob("*.test.js"))
|
|
909
|
+
return targets, covered
|
|
898
910
|
|
|
899
911
|
|
|
900
912
|
def run_node_tests(targets: list[str], repo_root: Path) -> tuple[int, int, list[str]]:
|
|
@@ -786,6 +786,31 @@ class TestNodeGate:
|
|
|
786
786
|
targets, covered = self._discover(repo, "packages/cli/README.md", "skills/x/ship.py")
|
|
787
787
|
assert targets == [] and covered == set()
|
|
788
788
|
|
|
789
|
+
def _cleanroom_repo(self, tmp_path):
|
|
790
|
+
repo = self._cli_repo(tmp_path)
|
|
791
|
+
for rel in ("tools/docker_cleanroom.js", "tools/docker_cleanroom/verify.js",
|
|
792
|
+
"tools/docker_cleanroom/verify.test.js", "tools/docker_cleanroom/contract.test.js",
|
|
793
|
+
"tools/docker_cleanroom/known_findings.json"):
|
|
794
|
+
write(repo, rel, "x\n")
|
|
795
|
+
return repo
|
|
796
|
+
|
|
797
|
+
@pytest.mark.parametrize("touched", [
|
|
798
|
+
"tools/docker_cleanroom.js", "tools/docker_cleanroom/verify.js",
|
|
799
|
+
"tools/docker_cleanroom/verify.test.js", "tools/docker_cleanroom/known_findings.json"])
|
|
800
|
+
def test_touching_the_docker_cleanroom_gate_runs_all_its_test_files(self, tmp_path, touched):
|
|
801
|
+
repo = self._cleanroom_repo(tmp_path)
|
|
802
|
+
targets, covered = self._discover(repo, touched)
|
|
803
|
+
assert targets == [str(repo / "tools/docker_cleanroom/contract.test.js"),
|
|
804
|
+
str(repo / "tools/docker_cleanroom/verify.test.js")]
|
|
805
|
+
assert covered == {touched}
|
|
806
|
+
|
|
807
|
+
def test_cleanroom_tests_join_the_cli_targets(self, tmp_path):
|
|
808
|
+
repo = self._cleanroom_repo(tmp_path)
|
|
809
|
+
targets, _ = self._discover(repo, "packages/cli/lib/foo.js", "tools/docker_cleanroom/verify.js")
|
|
810
|
+
assert targets == [str(repo / "packages/cli/test/foo.test.js"),
|
|
811
|
+
str(repo / "tools/docker_cleanroom/contract.test.js"),
|
|
812
|
+
str(repo / "tools/docker_cleanroom/verify.test.js")]
|
|
813
|
+
|
|
789
814
|
def test_python_discovery_skips_node_covered_files(self, tmp_path):
|
|
790
815
|
repo = self._cli_repo(tmp_path)
|
|
791
816
|
_targets, covered = self._discover(repo, "packages/cli/lib/foo.js")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yasaswy.nagavolu/agents",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"description": "CLI for installing the yasaswy.nagavolu agent/skill/hook bundle into Claude Code and Codex. `install` opens an interactive bundle menu in a TTY (or `--bundle <key> --yes` for non-interactive installs), with hash-tracked idempotent deploys, native hook wiring, and masked secret prompting. `update` reconciles installed bundles against the current source (hash-tracked: silent overwrite, conflict diff+prompt, or --theirs/--keep-mine). `uninstall` removes a bundle's files and wiring. `secrets` re-runs secret prompting for already-installed bundles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|