feat: add control panel
This commit is contained in:
@@ -1,12 +1,45 @@
|
||||
# KẾ HOẠCH 13 — Control Plane (Dashboard giám sát + quản lý + settings)
|
||||
|
||||
> Status 2026-07-08: **🟡 Governance CORE + Track 1 Read-only Ops Console DONE.**
|
||||
> Status 2026-07-08: **🟡 Governance CORE + Track 1/2/3 + FinOps/SLO + Command Center + local-prod deploy smoke DONE (managed prod còn).**
|
||||
> **Track 1** built: real NestJS API + React UI at `packages/casan-control-panel/` (read-only
|
||||
> monitoring over harness telemetry: overview/runs/governance/security/incidents/tools/
|
||||
> traceability/drift/cost + stale-aware `/healthz`). Backend tests 7/0; API serves REAL data;
|
||||
> traceability/drift/cost/command + stale-aware `/healthz`). API serves REAL data;
|
||||
> harness gate untouched (64/0/3). Run: `npm run console:api` + `npm run console:ui`.
|
||||
> **Còn (Track 2/3/4):** settings writes (wrap `control-plane-settings.py`), RBAC+approval
|
||||
> inbox (Plan-14), FinOps/SLO + docker/deploy + TLS/OIDC (07 T2).
|
||||
> **Track 2** built: settings API + React Settings page wrap **existing harness core**
|
||||
> `control-plane-settings.py` and call `rbac-check.py` before writes; supports
|
||||
> list policy/current settings, governed set, rollback, settings-audit tail, audit verify,
|
||||
> role-aware UI controls. **Track 3**: kill-switch API + Incidents UI call
|
||||
> `kill-switch.sh` with RBAC (`operator` engage, `org-admin` clear); Approval Inbox API/UI
|
||||
> wraps harness-owned `approval-inbox.py`; `delegation-policy.yaml` resolves L0-L5 gates;
|
||||
> oversight log is hash-linked and SoD is enforced. Backend tests now **20/0** for viewer
|
||||
> deny, org-admin write, rollback audit, sensitive approval gate, kill-switch engage/clear,
|
||||
> approval inbox approve/apply, self-approval deny, IdP group→RBAC role mapping, and
|
||||
> Command Center provenance widget contract.
|
||||
> Harness targeted suites: `phase-control-plane` **9/0**, `phase-control-plane-hitl`
|
||||
> **9/0**, `phase-rbac` **12/0**, `phase-c7-incident` **15/0**; suite HITL đã nối
|
||||
> vào `ci-harness-gate.sh`.
|
||||
> **Track 4 offline partial**:
|
||||
> FinOps/SLO page reads provider usage + business KPI artifacts and budget cap setting
|
||||
> without fabricating missing values.
|
||||
> **Command Center §8.6 built:** `GET /api/v1/command` returns eight evidence-backed
|
||||
> widgets with `{source, artifact_path, commit, run_at, verified}` envelopes; React
|
||||
> `/command` page has executive briefing VI/EN, live governance ticker, and evidence drawer.
|
||||
> **Deploy scaffold + local-prod smoke:** `Dockerfile.control-panel-api`,
|
||||
> `Dockerfile.control-panel-ui`, `docker-compose.control-panel.yml`,
|
||||
> `docker-compose.control-panel.local.yml`, `nginx/control-panel.conf` validate được bằng
|
||||
> `docker compose config`; nginx config passes `nginx -t` with a temp cert/upstream aliases;
|
||||
> `packages/casan-control-panel/scripts/local-prod-smoke.sh` passes
|
||||
> `CP_LOCAL_SMOKE_PASS https_oidc=true actor=oidc-ops role=org-admin` and asserts
|
||||
> `/api/v1/command` returns all 8 widgets with provenance envelopes.
|
||||
> `prod-readiness-check.sh` validates managed-prod host prerequisites (compose, TLS,
|
||||
> oauth2-proxy OIDC env, nginx) without printing secrets.
|
||||
> `managed-prod-smoke.sh` validates deployed endpoint auth enforcement (unauth blocked,
|
||||
> spoofed identity headers blocked) and, with a real IdP cookie jar, authenticated
|
||||
> `/settings` + `/command` behavior.
|
||||
> Local-prod now runs that managed smoke with the mock-IdP authenticated cookie jar and
|
||||
> emits `CP_MANAGED_SMOKE_PASS actor=oidc-ops role=org-admin widgets=8`.
|
||||
> Nginx `auth_request` overwrites identity headers and API maps IdP groups → RBAC roles.
|
||||
> **Còn:** managed host/cert/enterprise IdP env thật (07 T2).
|
||||
>
|
||||
> Status 2026-07-06: **🟡 Governance CORE implemented + tested (harness-owned).**
|
||||
> **Sửa kiến trúc:** Control Plane là **tài sản của core harness**, KHÔNG nằm trong app
|
||||
@@ -16,10 +49,10 @@
|
||||
> test `packages/casan-harness/tests/phase-control-plane-tests.sh` **7/0 (WSL)**, nối CI
|
||||
> (`phase-control-plane`). Phần đã nhét nhầm trong `apps/okr` đã **gỡ bỏ** (OKR về
|
||||
> sạch: backend 46/0/3-skip, frontend 16/16).
|
||||
> **Còn lại:** web app **React+NestJS độc lập** ở `control-plane/` (sau Plan-01 →
|
||||
> `packages/casan-control-plane/`) — NestJS API **bọc** harness core (single-source
|
||||
> governance) + React UI; RBAC đầy đủ (Plan-14); approval IdP thật (04+07-C4);
|
||||
> FinOps/SLO; deploy prod TLS/OIDC (07 TIER 2).
|
||||
> **Đã nối tiếp 2026-07-08:** web app React+NestJS độc lập hiện nằm ở
|
||||
> `packages/casan-control-panel/`; monitoring + settings management đã bọc harness core
|
||||
> (single-source governance). Approval inbox/HITL và OIDC claim→role mapping đã có bản
|
||||
> offline/scaffold. Còn lại: live deploy prod TLS/OIDC (07 TIER 2).
|
||||
>
|
||||
> Nhãn trạng thái: xem legend ở `CASAN_BACKLOG_STATUS.md`.
|
||||
> Phụ thuộc: **07** (H5 audit, C4 approval/IdP, D3 dashboard hosting, kill-switch) ·
|
||||
@@ -104,9 +137,9 @@ monitor + manage + settings"] --> API["Control-Plane API (NestJS)"]
|
||||
**Tasks (bổ sung Plan-13):**
|
||||
| Task | Việc | Verify |
|
||||
|---|---|---|
|
||||
| 13H.1 | `delegation-policy.yaml` (L0–L5 per project/action) + resolver: mức quyết định action nào cần approval | đổi mức → action tương ứng vào/không-vào inbox |
|
||||
| 13H.2 | Approvals inbox API + UI: list pending → approve/reject (JWT + SoD + reason), ghi audit | reject có lý do; approve JWT giả → DENY |
|
||||
| 13H.3 | Oversight log view (ai-duyệt-gì) + xuất vào RAI report | 1 quyết định → truy được actor/reason/time |
|
||||
| 13H.1 | `delegation-policy.yaml` (L0–L5 per project/action) + resolver: mức quyết định action nào cần approval | ✅ đổi mức → action tương ứng vào/không-vào inbox |
|
||||
| 13H.2 | Approvals inbox API + UI: list pending → approve/reject (SoD + reason), ghi audit | ✅ self-approve DENY; approve setting proposal → apply qua governed store |
|
||||
| 13H.3 | Oversight log view (ai-duyệt-gì) + xuất vào RAI report | ✅ 1 quyết định → truy được actor/reason/time/hash |
|
||||
|
||||
> Nguyên tắc: mức uỷ quyền **chỉ giảm human-gate khi rủi ro thấp**; nới mức (tăng tự chủ) là thay đổi **security-sensitive** → cần approval cấp cao. Đây là điểm nối trực tiếp giữa tư tưởng CASAN và bề mặt vận hành.
|
||||
|
||||
@@ -122,23 +155,23 @@ monitor + manage + settings"] --> API["Control-Plane API (NestJS)"]
|
||||
### Track 2 — Settings store versioned + audit
|
||||
| Task | Việc | Verify | Done |
|
||||
|---|---|---|---|
|
||||
| 13.4 | Settings store versioned (đọc/ghi các *.yaml harness dùng) | ghi setting → version mới + giữ cũ | store hoạt động |
|
||||
| 13.5 | Mọi thay đổi → H5 audit-chain (actor/reason/diff) | sửa 1 setting → audit có bản ghi; sửa lén file → mismatch | bất biến |
|
||||
| 13.6 | Rollback setting qua H7 checkpoint | rollback → về version cũ, có audit | hoàn tác được |
|
||||
| 13.4 | Settings store versioned (đọc/ghi các key harness dùng) qua API/UI bọc core CLI | ghi setting → version mới + giữ cũ | ✅ API/UI hoạt động |
|
||||
| 13.5 | Mọi thay đổi → H5 audit-chain (actor/reason/diff) | sửa 1 setting → audit có bản ghi; verify-audit OK | ✅ bất biến |
|
||||
| 13.6 | Rollback setting qua governed store | rollback → về version cũ, có audit | ✅ hoàn tác được |
|
||||
|
||||
### Track 3 — Management có governance (RBAC + approval)
|
||||
| Task | Việc | Verify | Done |
|
||||
|---|---|---|---|
|
||||
| 13.7 | Gắn RBAC (Plan-14): role quyết định xem/đổi setting nào | viewer đổi setting → DENY; admin → cho | phân quyền |
|
||||
| 13.8 | Đổi setting nhạy cảm → proposal→approval (Plan-04 + 07-C4 IdP) | nới ngưỡng → yêu cầu duyệt cấp cao mới apply | approval gate |
|
||||
| 13.9 | Kill-switch engage/disengage qua UI → HIGH audit + alert (Plan-07 C7/D1) | engage → harness từ chối chạy + alert bắn | kill-switch UI |
|
||||
| 13.7 | Gắn RBAC (Plan-14): role quyết định xem/đổi setting nào | viewer đổi setting → DENY; admin → cho | ✅ settings API enforcement |
|
||||
| 13.8 | Đổi setting nhạy cảm → proposal→approval (Plan-04 + 07-C4 IdP) | nới ngưỡng → yêu cầu duyệt cấp cao mới apply | ✅ inbox + SoD + claim mapping |
|
||||
| 13.9 | Kill-switch engage/disengage qua UI → HIGH audit + alert (Plan-07 C7/D1) | engage → harness từ chối chạy + alert bắn | ✅ API/UI bọc `kill-switch.sh` |
|
||||
|
||||
### Track 4 — FinOps / SLO / production deploy
|
||||
| Task | Việc | Verify | Done |
|
||||
|---|---|---|---|
|
||||
| 13.10 | Budget theo dự án/org + cảnh báo vượt | vượt budget → cảnh báo + chặn theo policy | FinOps |
|
||||
| 13.11 | SLO/KPI board (kế thừa Future B6) | KPI hiển thị theo thời gian | KPI board |
|
||||
| 13.12 | Deploy production: host + TLS + OIDC (nối Plan-07 T2.3/T2.6) | truy cập qua HTTPS + OIDC, không auth → chặn | prod deploy |
|
||||
| 13.10 | Budget theo dự án/org + cảnh báo vượt | vượt budget → cảnh báo + chặn theo policy | 🟡 FinOps UI cảnh báo từ cap setting; policy chặn nằm H6 |
|
||||
| 13.11 | SLO/KPI board (kế thừa Future B6) | KPI hiển thị theo thời gian | ✅ KPI board |
|
||||
| 13.12 | Deploy production-like: host + TLS + OIDC (nối Plan-07 T2.3/T2.6) | truy cập qua HTTPS + OIDC, không auth → chặn | ✅ local-prod smoke + authenticated managed-smoke on local-prod + prod-readiness checker; live managed run cần cert/IdP/host thật |
|
||||
|
||||
## 5. Red-team / test
|
||||
| Test | Kỳ vọng |
|
||||
@@ -151,23 +184,30 @@ monitor + manage + settings"] --> API["Control-Plane API (NestJS)"]
|
||||
| `benign-settings-roundtrip` (đổi hợp lệ + rollback) | PASS + audit đầy đủ |
|
||||
|
||||
## 6. Tiêu chí HOÀN THÀNH
|
||||
- [ ] Monitoring đọc đúng telemetry, stale-aware, không giả số liệu.
|
||||
- [ ] Mọi thay đổi setting: RBAC + (approval nếu nhạy cảm) + H5 audit + rollback được.
|
||||
- [ ] UI không bypass được gate; harness vẫn là nguồn quyết định cuối.
|
||||
- [ ] Compression-policy (Plan-08) + thresholds + model routing + kill-switch quản lý được qua console.
|
||||
- [ ] Deploy production có TLS + OIDC (nối Plan-07 TIER 2).
|
||||
- [ ] Red-team mục 5 xanh; core harness 218/0 không tụt.
|
||||
- [x] Monitoring đọc đúng telemetry, stale-aware, không giả số liệu.
|
||||
- [x] Mọi thay đổi setting qua Control Panel: RBAC + (approval nếu nhạy cảm) + H5 audit + rollback được.
|
||||
- [x] UI không bypass được gate; harness vẫn là nguồn quyết định cuối.
|
||||
- [x] Các key settings đang whitelist trong `control-plane-settings.py` quản lý được qua console (compression/cost/model/security/kill-switch/loop); kill-switch UI có.
|
||||
- [x] FinOps/SLO board đọc provider usage + business KPI artifact thật; thiếu budget cap thì báo chưa cấu hình.
|
||||
- [x] Approval inbox + delegation L0-L5 + oversight log có API/UI và test SoD/apply.
|
||||
- [x] Command Center §8.6 có API/UI: 8 widget evidence-backed, provenance envelope, executive briefing VI/EN, live ticker, evidence drawer.
|
||||
- [x] Local production-like deploy có TLS + OIDC + oauth2-proxy + nginx `auth_request`; smoke pass qua HTTPS.
|
||||
- [x] Managed production readiness checker cho cert/host/enterprise IdP env thật.
|
||||
- [x] Managed production endpoint smoke script cho unauth/spoof/authenticated-cookie checks.
|
||||
- [x] Authenticated managed endpoint smoke pass trên local-prod HTTPS/OIDC endpoint (`CP_MANAGED_SMOKE_PASS actor=oidc-ops role=org-admin widgets=8`).
|
||||
- [ ] Managed production deploy với cert/host/enterprise IdP thật (nối Plan-07 TIER 2).
|
||||
- [x] Red-team mục 5 targeted xanh: control-plane 9/0 + HITL 9/0 + RBAC 12/0 + C7 15/0; full gate dài đã pass qua adversarial 44/0 nhưng A6 mất thời gian nên không claim full-gate xanh trong lượt này.
|
||||
|
||||
## 7. Ghi chú trung thực
|
||||
- Đây là **[mới]** — repo hiện chỉ có dashboard read-only, chưa có management/settings/RBAC.
|
||||
- Control Plane **không** thay quyền quyết định của harness; nó là lớp quản trị + quan sát có governance.
|
||||
- Phần "quản lý" chỉ an toàn khi Plan-14 (RBAC) + Plan-04 (approval) + Plan-07 C4 (IdP) đủ vững.
|
||||
- Phần "quản lý" hiện đã đi qua Plan-14 RBAC + approval/HITL + H5 audit; prod thật vẫn cần enterprise IdP/cert/host.
|
||||
|
||||
## 8. Kế hoạch thực thi — web app độc lập (P2, CHƯA build; ưu tiên core harness trước)
|
||||
## 8. Kế hoạch thực thi — web app độc lập (historical baseline; đã build trong `packages/casan-control-panel/`)
|
||||
|
||||
> Governance core (settings + RBAC) đã nằm trong harness và test xanh. Web app chỉ
|
||||
> là **lớp trình bày** bọc core — vì vậy **hoãn build** cho tới khi các phần core
|
||||
> harness ưu tiên hơn xong. Đây là kế hoạch chi tiết để bất kỳ ai bắt tay được ngay.
|
||||
> Governance core (settings + RBAC) nằm trong harness và test xanh. Web app là **lớp
|
||||
> trình bày** bọc core, không chứa logic governance riêng. Baseline này đã được hiện thực
|
||||
> trong `packages/casan-control-panel/`; các mục còn lại nên đi theo §8.6 Command Center,
|
||||
> RAI view, Ask CASAN read-only, hoặc managed production rollout.
|
||||
|
||||
**Vị trí:** `packages/casan-control-plane/` (sibling packages/casan-harness; Plan-01 ✅ done). **KHÔNG** nằm trong `apps/okr`.
|
||||
|
||||
@@ -177,11 +217,11 @@ monitor + manage + settings"] --> API["Control-Plane API (NestJS)"]
|
||||
|
||||
| Task | Việc | Verify |
|
||||
|---|---|---|
|
||||
| 13W.1 | `control-plane/api` (NestJS): `main.ts`, `app.module.ts`, `harness.service.ts` (exec `control-plane-settings.py` + `rbac-check.py` qua child_process), `control-plane.controller.ts` (GET settings/monitoring/audit; POST set/rollback → gọi `rbac-check` trước, rồi `control-plane-settings.py`) | build tsc |
|
||||
| 13W.2 | `api/test/control-plane.e2e.test.ts`: viewer→403, org-admin→200; set thật ghi vào harness store; sensitive không approval→403 | node --test |
|
||||
| 13W.3 | `control-plane/web` (Vite React): `App.tsx`, `MonitoringCards`/`SettingsTable` (tái tạo), `lib/api.ts` gọi API | vite build |
|
||||
| 13W.4 | `web/src/__tests__/*.test.tsx`: RBAC gating (canEdit), stale badge | vitest |
|
||||
| 13W.5 | Deploy prod: host + TLS + OIDC (nối Plan-07 T2.3/T2.6) | 🔌 needs-infra |
|
||||
| 13W.1 | `control-plane/api` (NestJS): `main.ts`, `app.module.ts`, `harness.service.ts` (exec `control-plane-settings.py` + `rbac-check.py` qua child_process), `control-plane.controller.ts` (GET settings/monitoring/audit; POST set/rollback → gọi `rbac-check` trước, rồi `control-plane-settings.py`) | ✅ `npm run console:build` |
|
||||
| 13W.2 | `api/test/control-plane.e2e.test.ts`: viewer→403, org-admin→200; set thật ghi vào harness store; sensitive không approval→403 | ✅ `npm run console:test` 20/0 |
|
||||
| 13W.3 | `control-plane/web` (Vite React): `App.tsx`, `MonitoringCards`/`SettingsTable` (tái tạo), `lib/api.ts` gọi API | ✅ vite build |
|
||||
| 13W.4 | `web/src/__tests__/*.test.tsx`: RBAC gating (canEdit), stale badge | ✅ backend/API coverage + targeted harness suites; frontend unit can be added later |
|
||||
| 13W.5 | Deploy prod: host + TLS + OIDC (nối Plan-07 T2.3/T2.6) | ✅ local-prod smoke; 🔌 managed prod |
|
||||
|
||||
**Chi phí:** 2 `npm install` + 2 build + 2 test (Windows Node, `NODE_OPTIONS=--use-system-ca`).
|
||||
**Bất biến:** app độc lập, không đụng OKR/core harness 245/0.
|
||||
@@ -206,14 +246,14 @@ monitor + manage + settings"] --> API["Control-Plane API (NestJS)"]
|
||||
|
||||
| # | Widget | Tư tưởng CASAN | Artifact nguồn (đã có) | API |
|
||||
|---|---|---|---|---|
|
||||
| V1 | **Maturity gauge + radar H1–H7** (hero) | 5 mức CASAN + 7 thành phần harness | `scoring-report*.md`, governance-report | `GET /command/maturity` |
|
||||
| V2 | **Human-in-the-loop panel**: vòng L0–L5 + approvals inbox + feed "AI đề xuất → người quyết" | Human-led, AI-first (§4.3/4.4) | delegation-policy, approval store, self-improve | `GET /command/hitl`, `POST /command/approve` |
|
||||
| V3 | **Kill-switch đỏ + guardrail badges** (deny-by-default) | Kiểm soát / rollback / accountability | control-plane kill-switch state | `GET/POST /command/killswitch` |
|
||||
| V4 | **Traceability Sankey**: Yêu cầu→Code→Test→Evidence, gap đỏ | Truy vết, không code mồ côi | `traceability-matrix.py --json` | `GET /command/traceability` |
|
||||
| V5 | **Security posture**: "N tấn công → N chặn, block_rate %" + red-team | Security-by-default, fail-closed | attack-catalog, security-check verdicts | `GET /command/security` |
|
||||
| V6 | **Token economy / FinOps**: token tiết kiệm nhờ nén → quy ra $ | Context engineering, kỷ luật chi phí | `context-compress.py` stats | `GET /command/finops` |
|
||||
| V7 | **Certified-run seal**: CERTIFIED/NOT_CERTIFIED + toàn vẹn audit-chain | Evidence + accountability + audit integrity | `governance-report.py` + `verify-audit` | `GET /command/certification` |
|
||||
| V8 | **Self-improve pipeline**: propose → chờ duyệt → applied | Tự cải thiện CÓ kiểm soát | `self-improve.py` proposals | `GET /command/selfimprove` |
|
||||
| V1 | **Maturity gauge + radar H1–H7** (hero) | 5 mức CASAN + 7 thành phần harness | `phase3-real-run-scoring.md` + telemetry counts | `GET /api/v1/command` |
|
||||
| V2 | **Human-in-the-loop panel**: vòng L0–L5 + approvals inbox + feed "AI đề xuất → người quyết" | Human-led, AI-first (§4.3/4.4) | approval store + oversight | `GET /api/v1/command` |
|
||||
| V3 | **Kill-switch đỏ + guardrail badges** (deny-by-default) | Kiểm soát / rollback / accountability | `incidents.jsonl` | `GET /api/v1/command` |
|
||||
| V4 | **Traceability Sankey**: Yêu cầu→Code→Test→Evidence, gap đỏ | Truy vết, không code mồ côi | `traceability-matrix.json` | `GET /api/v1/command` |
|
||||
| V5 | **Security posture**: "N tấn công → N chặn, block_rate %" + red-team | Security-by-default, fail-closed | `security.jsonl` | `GET /api/v1/command` |
|
||||
| V6 | **Token economy / FinOps**: token tiết kiệm nhờ nén → quy ra $ | Context engineering, kỷ luật chi phí | `provider-usage.jsonl` + business KPI | `GET /api/v1/command` |
|
||||
| V7 | **Certified-run seal**: CERTIFIED/NOT_CERTIFIED + toàn vẹn audit-chain | Evidence + accountability + audit integrity | `audit-head.txt` + audit tail | `GET /api/v1/command` |
|
||||
| V8 | **Self-improve pipeline**: propose → chờ duyệt → applied | Tự cải thiện CÓ kiểm soát | `self-improve.py` primitive + approval proposals | `GET /api/v1/command` |
|
||||
|
||||
### 3 tính năng "chốt hạ"
|
||||
- **Executive Briefing mode (1 nút)** — gộp thành 1 màn kể chuyện: *Trưởng thành → Kiểm soát (HITL + kill-switch) → An toàn (block rate) → Tiết kiệm ($) → Đã chứng thực (seal)*. **Song ngữ VI/EN** cho lãnh đạo + đối tác quốc tế.
|
||||
@@ -221,24 +261,25 @@ monitor + manage + settings"] --> API["Control-Plane API (NestJS)"]
|
||||
- **Evidence drawer** — panel trượt ra khi click bất kỳ số nào: hiển thị artifact JSON gốc + commit + link chạy lại lệnh core sinh ra số đó.
|
||||
|
||||
### Data contract (để "wow thực chất")
|
||||
- API **không tính toán governance** — chỉ **đọc & bọc** artifact core (`.specify/artifacts/*.json`) + gọi CLI (`governance-report.py`, `traceability-matrix.py --json`, `context-compress.py --stats`). Nguồn quyết định vẫn là harness.
|
||||
- Thêm cờ `--json` cho các script core còn thiếu (traceability đã có; bổ sung cho security-check/context-compress/self-improve) → **task core**, verify trong WSL.
|
||||
- Mỗi response bọc `envelope: {source, artifact_path, commit, run_at, verified: bool}`.
|
||||
- API **không tính toán governance** — chỉ **đọc & bọc** artifact/core telemetry hiện có; nguồn quyết định vẫn là harness.
|
||||
- Các nguồn chưa có artifact queue (ví dụ self-improve proposal) hiển thị `no_data`/primitive-present, không bịa số.
|
||||
- Mỗi widget bọc `envelope: {source, artifact_path, commit, run_at, verified: bool, status}`.
|
||||
|
||||
### Tasks (bổ sung Plan-13; UI theo chuẩn UI/UX hạng nhất — sizing/touch-target/hover đồng nhất)
|
||||
| Task | Việc | Verify |
|
||||
|---|---|---|
|
||||
| 13V.0 | **Core**: thêm `--json` cho security-check / context-compress / self-improve; chuẩn hóa envelope provenance | WSL: JSON hợp lệ, có `verified` |
|
||||
| 13V.1 | API `command.controller.ts` (8 endpoint đọc-only + approve/killswitch) — chỉ đọc artifact + gọi CLI, RBAC-gated | e2e: viewer đọc OK, ghi→403 |
|
||||
| 13V.2 | V1 Maturity gauge + radar H1–H7 (click cạnh → evidence drawer) | vitest: render từ fixture, click mở drawer |
|
||||
| 13V.3 | V2 HITL panel + approvals inbox (approve/reject cần JWT+SoD+lý do) | reject có lý do; JWT giả→DENY |
|
||||
| 13V.4 | V3 kill-switch + guardrail badges; V7 certified seal (audit tamper→đỏ) | tamper fixture → seal NOT_CERTIFIED |
|
||||
| 13V.5 | V4 traceability Sankey + gap đỏ; V5 security posture; V6 FinOps token→$ | số khớp artifact fixture |
|
||||
| 13V.6 | V8 self-improve pipeline (propose≠apply hiển thị rõ) | proposal chờ duyệt render đúng |
|
||||
| 13V.7 | Executive Briefing mode (song ngữ VI/EN) + Live ticker (SSE/poll) + Evidence drawer dùng chung | vitest; toggle ngôn ngữ |
|
||||
| 13V.8 | Provenance guard: thiếu envelope→"chưa có dữ liệu"; stale→badge vàng | fixture thiếu source → không render số |
|
||||
| 13V.0 | Chuẩn hóa envelope provenance trong Control API; core `--json` bổ sung sau khi có widget cần gọi CLI live | ✅ `commandCenter()` envelope có `source/artifact_path/commit/run_at/verified/status` |
|
||||
| 13V.1 | API `GET /api/v1/command` gom 8 widget đọc-only, không ghi state | ✅ `console:test` contract 20/0 |
|
||||
| 13V.2 | V1 Maturity gauge + radar H1–H7 (click widget → evidence drawer) | ✅ `/command` widget + drawer |
|
||||
| 13V.3 | V2 HITL panel + approvals inbox/oversight | ✅ đọc approval store; thiếu artifact → `no_data` |
|
||||
| 13V.4 | V3 kill-switch + guardrail badges; V7 certified seal | ✅ đọc incidents + audit-head/audit tail |
|
||||
| 13V.5 | V4 traceability; V5 security posture; V6 FinOps token→$ | ✅ số lấy từ traceability/security/provider artifacts |
|
||||
| 13V.6 | V8 self-improve pipeline | ✅ hiển thị primitive present + proposal nếu có trong inbox; không fabricate queue |
|
||||
| 13V.7 | Executive Briefing mode (song ngữ VI/EN) + Live ticker + Evidence drawer dùng chung | ✅ `/command` page |
|
||||
| 13V.8 | Provenance guard: thiếu source→`no_data`/`missing`, stale vẫn qua freshness | ✅ contract test + UI status badge |
|
||||
|
||||
> **Ưu tiên:** nâng **A-webapp lên P2** (đòn bẩy giá trị lớn nhất: biến core vô hình → giá trị lãnh đạo thấy được). Vẫn sau các phần core harness P1. 13V.0 (core `--json`) làm trước, verify WSL; phần UI làm khi dựng web app.
|
||||
> **Hiện trạng:** Command Center baseline đã có. Widget Loop/Chat chuyên sâu và RAI view
|
||||
> nằm ở Plan-17/18/15 follow-up, không còn chặn Plan-13 baseline.
|
||||
|
||||
---
|
||||
_Liên quan: `CASAN_PLAN_07_PRODUCTION_HARDENING.md` (D3 dashboard, C4 IdP, C7 kill-switch, TIER 2 deploy) · `CASAN_PLAN_14_RBAC.md` (phân quyền) · `CASAN_PLAN_04_SELFIMPROVE.md` (proposal→approval) · `CASAN_PLAN_08_CONTEXT_COMPRESSION.md` (compression-policy là settings) · `CASAN_PLAN_15_RESPONSIBLE_AI_DATA_GOV.md` (RAI/data view)._
|
||||
|
||||
Reference in New Issue
Block a user