aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-09-07 22:04:55 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-09-07 22:04:55 +0300
commit9be481fea6f884555dffdc39ff88286a4b07db46 (patch)
tree18cb1f46a1b14c0af193fb2e1af5923ea9e5b1f0 /scripts
parent702aa1e45527509bec73dad9b8d443f449c0379b (diff)
docs: prepare 0.9.0 release documentation
Diffstat (limited to 'scripts')
-rw-r--r--scripts/agent_detection_manifest_check.py10
-rw-r--r--scripts/test_agent_detection_manifest_check.py28
2 files changed, 21 insertions, 17 deletions
diff --git a/scripts/agent_detection_manifest_check.py b/scripts/agent_detection_manifest_check.py
index f0dc0005..6990a215 100644
--- a/scripts/agent_detection_manifest_check.py
+++ b/scripts/agent_detection_manifest_check.py
@@ -64,15 +64,7 @@ STAGED_PUBLISHED_MANIFESTS = {
),
}
-# Muse is bundled on master but has not shipped in a stable binary yet. Stable
-# clients cannot identify it, so publish it with the release that first ships
-# the corresponding Agent variant and remove this exact-content exception.
-UNPUBLISHED_BUNDLED_MANIFESTS = {
- "muse": (
- "2026.08.26.1",
- "b69c4d87fa9c19e3e6453b706fbe39c98a8b33ffbaa48e8cd5ae6751e9615074",
- ),
-}
+UNPUBLISHED_BUNDLED_MANIFESTS: dict[str, tuple[str, str]] = {}
def parse_args() -> argparse.Namespace:
diff --git a/scripts/test_agent_detection_manifest_check.py b/scripts/test_agent_detection_manifest_check.py
index 6c4cd726..fed0e06f 100644
--- a/scripts/test_agent_detection_manifest_check.py
+++ b/scripts/test_agent_detection_manifest_check.py
@@ -1,6 +1,8 @@
+import hashlib
import tempfile
import unittest
from pathlib import Path
+from unittest.mock import patch
from scripts import agent_detection_manifest_check as check
@@ -42,14 +44,21 @@ def staged_grok_dirs(root: Path) -> tuple[Path, Path]:
return bundled, published
-def unpublished_muse_dirs(root: Path) -> tuple[Path, Path]:
+UNPUBLISHED_TEST_MANIFEST = manifest("testagent", "2026.06.10.1")
+UNPUBLISHED_TEST_EXCEPTION = {
+ "testagent": (
+ "2026.06.10.1",
+ hashlib.sha256(UNPUBLISHED_TEST_MANIFEST.encode()).hexdigest(),
+ ),
+}
+
+
+def unpublished_manifest_dirs(root: Path) -> tuple[Path, Path]:
bundled = root / "bundled"
published = root / "published"
bundled.mkdir()
published.mkdir()
- (bundled / "muse.toml").write_bytes(
- (check.DEFAULT_BUNDLED_DIR / "muse.toml").read_bytes()
- )
+ (bundled / "testagent.toml").write_text(UNPUBLISHED_TEST_MANIFEST, encoding="utf-8", newline="\n")
(published / "index.toml").write_text("schema_version = 1\nagents = []\n")
return bundled, published
@@ -135,9 +144,10 @@ class AgentDetectionManifestCheckTests(unittest.TestCase):
with self.assertRaisesRegex(check.CheckError, "same version"):
check.validate_catalog(website, bundled_manifests, engine_version=1)
+ @patch.dict(check.UNPUBLISHED_BUNDLED_MANIFESTS, UNPUBLISHED_TEST_EXCEPTION, clear=True)
def test_allows_exact_unpublished_bundled_manifest(self):
with tempfile.TemporaryDirectory() as tmp:
- bundled, published = unpublished_muse_dirs(Path(tmp))
+ bundled, published = unpublished_manifest_dirs(Path(tmp))
bundled_manifests = check.load_manifest_dir(bundled, engine_version=3)
check.validate_catalog(
published,
@@ -146,17 +156,19 @@ class AgentDetectionManifestCheckTests(unittest.TestCase):
allow_unpublished=True,
)
+ @patch.dict(check.UNPUBLISHED_BUNDLED_MANIFESTS, UNPUBLISHED_TEST_EXCEPTION, clear=True)
def test_release_gate_rejects_exact_unpublished_bundled_manifest(self):
with tempfile.TemporaryDirectory() as tmp:
- bundled, published = unpublished_muse_dirs(Path(tmp))
+ bundled, published = unpublished_manifest_dirs(Path(tmp))
bundled_manifests = check.load_manifest_dir(bundled, engine_version=3)
with self.assertRaisesRegex(check.CheckError, "missing bundled agent"):
check.validate_catalog(published, bundled_manifests, engine_version=3)
+ @patch.dict(check.UNPUBLISHED_BUNDLED_MANIFESTS, UNPUBLISHED_TEST_EXCEPTION, clear=True)
def test_rejects_mutated_unpublished_bundled_manifest(self):
with tempfile.TemporaryDirectory() as tmp:
- bundled, published = unpublished_muse_dirs(Path(tmp))
- with (bundled / "muse.toml").open("a") as manifest_file:
+ bundled, published = unpublished_manifest_dirs(Path(tmp))
+ with (bundled / "testagent.toml").open("a") as manifest_file:
manifest_file.write("\n# unexpected mutation\n")
bundled_manifests = check.load_manifest_dir(bundled, engine_version=3)
with self.assertRaisesRegex(check.CheckError, "missing bundled agent"):