feat: certify codegen chat drafts through loop

This commit is contained in:
thanhnv
2026-07-08 23:20:54 +09:00
parent 780fe86273
commit b3b0544ba8
15 changed files with 359 additions and 24 deletions
+5 -2
View File
@@ -57,7 +57,7 @@ Approval inbox / HITL:
or supplied `approvalJwt` is verified by harness `approval-verify.sh`; approved
settings proposals apply through `control-plane-settings.py`.
Governed Chat (Plan-18 MVP-0/1 + MVP-2 Track 4, Operator Track 5/6, and Track 8.1-8.4):
Governed Chat (Plan-18 MVP-0/1/2):
- `POST /api/v1/chat/ask` — Ask CASAN endpoint. The API only wraps harness
`chat-turn.py`; router verdicts, H4 input/output scan, action-gate decisions,
@@ -76,9 +76,12 @@ Governed Chat (Plan-18 MVP-0/1 + MVP-2 Track 4, Operator Track 5/6, and Track 8.
by chat audit/replay evidence, loop ticker rows, and token budget gauge.
- Delegation escalation returns `ESCALATED` and creates a pending `chat.escalate`
proposal in the approval inbox.
- CODEGEN requests are draft-only: `codegen-draft` outputs a state artifact, runs
`artifact-scan.sh` + `tool-output-scan.sh`, certifies through Plan-17 loop-run,
and never writes to the source tree.
- `/chat` UI shows actor/role scope, `mode/risk/decision` badges, certified answer,
evidence sources, registered operator actions, agent binding, loop certification,
action-gate status, router details, and audit hash. Side-effect requests outside
codegen draft scan status, action-gate status, router details, and audit hash. Side-effect requests outside
registered actions return governed `BLOCK` or `NOT_SUPPORTED` responses; operator
side effects are held until the loop draft is certified.
- `/command` UI renders the Chat/Loop widget in the existing evidence drawer flow.