Publish AI workspace source through the isolated runtime
Verify control plane / verify (push) Canceled after 0s
Verify control plane / verify (pull_request) Canceled after 0s

This commit is contained in:
WebUp Cloud committed 2026-11-08 17:29:54 +08:00
1 parent 03169bd0f6
commit d1d14f0f77
21 files changed
+487 -68

No files matched your search

+15
View File
@@ -41,6 +41,21 @@ class GatewayTests(unittest.TestCase):
(root / "large.txt").write_bytes(b"x" * 64001)
self.assertIn("error", self.execute_file_tool(root, "read_file", {"path": "large.txt"}))
def test_source_snapshot_checks_start_and_excludes_credentials_and_local_data(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
(root / "package.json").write_text('{"scripts":{"start":"node server.js"}}')
result = self.execute_file_tool(root, "release_snapshot", {})
self.assertIn("server.js", result["error"])
(root / "server.js").write_text("console.log('ready')")
(root / ".env").write_text("secret")
(root / "data").mkdir()
(root / "data/students.db").write_text("private rows")
result = self.execute_file_tool(root, "release_snapshot", {})
self.assertEqual("NODE", result["runtime"])
with zipfile.ZipFile(io.BytesIO(base64.b64decode(result["archive"]))) as archive:
self.assertEqual({"package.json", "server.js"}, set(archive.namelist()))
def test_agent_file_change_counts_and_manual_edits_are_separate(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)