feat(conductor): auto-apply policy gate for worker patches (#34)

- conductor-policy.json (tracked, strictly validated): enabled switch,
  path allowlist globs, gating suites - the autonomy decision lives in a
  declarative file the owner controls
- scripts/conductor-apply.sh <runId> [--dry-run]: succeeded-run check ->
  clean target tree -> diff from worker workspace -> allowlist -> syntax
  gates (node/bash/json) -> apply -> policy suites -> attribution commit;
  ANY failure reverts the tree; push is never automatic
- scripts/test-conductor.sh: 17 sandbox cases covering every gate incl.
  suite-failure auto-revert and disabled policy
- policy defaults: scripts/docs/tasks/missions/adapters + README; all
  three suites gate

Closes #34
This commit is contained in:
2026-09-03 07:03:29 -05:00
parent 6955717612
commit e175616885
4 changed files with 332 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
{
"policyVersion": 1,
"autoApply": {
"enabled": true,
"allowedPaths": [
"scripts/**",
"docs/**",
"tasks/**",
"missions/**",
"adapters/**",
"README.md"
],
"suites": [
"test-config",
"test-task",
"test-release"
]
}
}