docs(coordination): report c gamma dashboard promotion
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
# Codex - RESULTAT C-gamma dashboard promotion dry-run no-CLI
|
||||
|
||||
Date: 2026-05-29 21:48
|
||||
Branche: `backup/post-demo-2026-05-19`
|
||||
|
||||
## Sources
|
||||
|
||||
Retours lus:
|
||||
- `docs/coordination/inbox_codex/2026-05-29_2140_claude-to-codex_ACK-mission-Cgamma-dashboard-no-cli.md`
|
||||
- `docs/coordination/inbox_codex/2026-05-29_qwen-to-codex-claude_REVUE-CONTRAT-C-GAMMA.md`
|
||||
|
||||
Decision Dom appliquee:
|
||||
- pas de CLI operateur en demo/POC;
|
||||
- promotion/write-back uniquement via dashboard avec bouton;
|
||||
- dry-run + preview + confirmation;
|
||||
- pas de commit git automatique depuis backend.
|
||||
|
||||
## Implementation
|
||||
|
||||
Commit:
|
||||
- `34527b5cc feat(lea): add dashboard competence promotion dry run`
|
||||
|
||||
Ajoute:
|
||||
- `core/competences/promotions.py`;
|
||||
- endpoint VWB/backend `POST /api/v1/lea/competences/<competence_id>/promote`;
|
||||
- endpoint dashboard 5001 meme route;
|
||||
- stats `/api/knowledge-base/stats` enrichies avec `competences`;
|
||||
- section dashboard `/knowledge-base` "Competences apprises par supervision";
|
||||
- boutons de promotion avec dry-run, modal diff YAML, evidence verdicts, confirmation explicite;
|
||||
- audit `data/competences/promotions.jsonl` seulement au confirm;
|
||||
- backup YAML timestamp + atomic write;
|
||||
- aucun commit git automatique.
|
||||
|
||||
## Contrat
|
||||
|
||||
Dry-run:
|
||||
- `dry_run=true`;
|
||||
- ne modifie aucun YAML;
|
||||
- retourne `dry_run_token`, `yaml_diff`, `eligible`, `blocking_reasons`.
|
||||
|
||||
Confirm:
|
||||
- `dry_run=false`;
|
||||
- exige le `dry_run_token` exact;
|
||||
- refuse si non eligible;
|
||||
- backup YAML;
|
||||
- write atomique;
|
||||
- validation YAML post-write;
|
||||
- append `promotions.jsonl`.
|
||||
|
||||
Regles:
|
||||
- `observed -> candidate`: 1 verdict `valid` avec `workflow_id` et `step_results[]`;
|
||||
- `candidate -> stable`: 3 verdicts valid, 3 contextes distincts, 0 invalid non explique;
|
||||
- pas de downgrade automatique;
|
||||
- regression suspectee exposee au dashboard.
|
||||
|
||||
## Validations
|
||||
|
||||
Tests:
|
||||
- `.venv/bin/python3 -m pytest tests/unit/test_competence_promotions.py tests/unit/test_lea_competence_verdict_api.py tests/unit/test_dashboard_routes.py tests/unit/test_dashboard_auth_p0a.py tests/unit/test_competence_verdicts.py tests/unit/test_competence_catalog_loader.py tests/unit/test_competence_to_vwb_preview.py tests/unit/test_supervised_popup_guard.py tests/unit/test_vwb_supervised_pause_runtime.py tests/unit/test_vwb_wait_for_state.py -q`
|
||||
- resultat: 82 tests OK.
|
||||
|
||||
Controles:
|
||||
- `py_compile` OK;
|
||||
- `git diff --check` OK;
|
||||
- parsing JS dashboard OK via Node.
|
||||
|
||||
Smoke live:
|
||||
- serveurs actifs:
|
||||
- dashboard `http://localhost:5001/knowledge-base`;
|
||||
- backend VWB `http://localhost:5002`;
|
||||
- frontend VWB `http://localhost:3002`;
|
||||
- `GET /api/knowledge-base/stats` -> 200 avec 9 competences (`candidate`: 6, `observed`: 3);
|
||||
- dry-run dashboard promote -> 200, `eligible=false`, `yaml_write=false`;
|
||||
- dry-run VWB backend promote -> 200, `eligible=false`, `yaml_write=false`;
|
||||
- aucun YAML competence modifie;
|
||||
- aucun `data/competences/promotions.jsonl` cree par les dry-runs.
|
||||
|
||||
## Limites connues
|
||||
|
||||
- Les boutons restent naturellement desactives tant qu'il n'existe pas assez de verdicts `valid` avec evidence.
|
||||
- L'agent de menage worktree n'est pas implemente dans C-gamma; chantier separe.
|
||||
- Le diff YAML est produit depuis une serialisation PyYAML complete, donc il peut etre plus large qu'un patch texte minimal; le write reste valide, audite et reversible.
|
||||
Reference in New Issue
Block a user