fix(gitops): allow task-plane delivery roots

This commit is contained in:
AIOS Task Plane Writer
2026-07-24 10:14:18 +08:00
parent 1594ac9a18
commit cdefcc18dd
2 changed files with 17 additions and 1 deletions
@@ -10,7 +10,15 @@ WRITE_ENDPOINTS = frozenset({
"/api/branch", "/api/create-branch", "/api/file", "/api/commit-file",
"/api/commit", "/api/patch", "/api/create-patch",
})
ALLOWED_ROOTS = ("active-runtime", "docs", "test", "tests", "patches")
ALLOWED_ROOTS = (
"active-runtime",
"docs",
"patches",
"reports",
"scripts",
"test",
"tests",
)
DENIED_ROOTS = ("baseline", "config", "deploy", "deployments", "ops", "runtime", "services")
_TRUE = frozenset({"1", "true", "yes", "on"})
_FALSE = frozenset({"0", "false", "no", "off"})
+8
View File
@@ -36,6 +36,14 @@ class IsolatedWriterPolicyTests(unittest.TestCase):
"active-runtime/app/x.py",
)
self.assertEqual(policy.validate_path("docs/x.md", workspace), "docs/x.md")
self.assertEqual(
policy.validate_path("scripts/task-plane/run.sh", workspace),
"scripts/task-plane/run.sh",
)
self.assertEqual(
policy.validate_path("reports/task-plane.json", workspace),
"reports/task-plane.json",
)
rejected = (
"",
"../docs/x.md",