Commit Graph

438 Commits

Author SHA1 Message Date
Dom
f18de016d7 fix(wp-b): verrou d'enrôlement du parc (RPA_FLEET_ENROLL_LOCKED)
Ferme le contournement "poste révoqué + nouveau machine_id + token global" :
quand RPA_FLEET_ENROLL_LOCKED=true, l'enrôlement d'un machine_id INCONNU est refusé
(FleetEnrollLockedError). Les machines déjà connues conservent leur comportement :
active -> AlreadyEnrolled, désinstallé non-revoke -> réactivable, admin_revoke -> Revoked.

- agent_registry.py : _fleet_enroll_locked() + FleetEnrollLockedError + gate avant INSERT
- tests/unit/test_fleet_enroll_lock_wpb.py : 6 tests (verts)

NB : le handler HTTP 403 (api_stream.py /api/v1/agents/enroll) reste dans le WIP de la
branche (api_stream déjà modifié par le préflight non committé) — sera embarqué au commit
de consolidation api_stream. La logique de sécurité (gate) est dans agent_registry, committée.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:43:04 +02:00
Dom
549ea0631b fix(wp-a): dashboard fail-closed sans mot de passe par défaut
Le dashboard refuse de démarrer si DASHBOARD_PASSWORD absent ET auth non
explicitement désactivée (DASHBOARD_AUTH_DISABLED). Supprime le mot de passe
par défaut hardcodé exploitable.

- web_dashboard/app.py : _require_dashboard_password() fail-closed (lève en prod
  sans secret ; mode dev/test = DASHBOARD_AUTH_DISABLED=true)
- tests/unit/conftest.py : DASHBOARD_AUTH_DISABLED=true par défaut pour les tests
- tests/unit/test_dashboard_failclosed_wpa.py : 5 tests (fail-closed, anti-régression défaut)
- tests/unit/test_dashboard_auth_p0a.py : fixture _restore_module restaure un état neutre sûr

48 tests dashboard verts (WP-A + non-régression auth/routes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:27:06 +02:00
Dom
0e215da842 feat(p1g): device policy GPU/CPU paramétrable pour la cascade vision
resolve_device(auto/cuda/cpu) avec garde-fou VRAM et fallback CPU propre.
Bascule EasyOCR/SoM/docTR sur GPU si VRAM libre, rollback env sans toucher au code.

- core/gpu/device_policy.py (nouveau) : resolve_device + garde-fou VRAM (max_total_gb)
- core/detection/som_engine.py, core/llm/ocr_extractor.py,
  agent_v0/server_v1/resolve_engine.py : câblage device auto (35 lignes)
- tests/unit/test_device_policy.py : 15 tests (verts venv réel)

Rollback sans toucher au code : RPA_VISION_DEVICE=cpu (force CPU global) / RPA_EASYOCR_GPU=0.
Bench GPU réel (latence) + activation large après verdict Qwen. QG Qwen deja valide sur le patch.
Mergé depuis worktree agent-a4f390f410e00ad7c (base 5b2afa362), 3 fichiers cibles non modifiés
dans le principal (zéro écrasement), dry-run apply propre.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:20:52 +02:00
Dom
d00fe7b00b feat(health): gate vision + détection des modèles aveugles
Détecte les modèles VLM/grounding « aveugles » (capabilities sans vision, ex.
UI-TARS réimporté sans mmproj) pour éviter le HTTP 500 silencieux masqué par
la cascade de grounding.

- core/detection/model_health.py : has_vision_capability() (cache, fail-open)
  + smoke_check_models()
- core/execution/input_handler.py : gate vision dans _grounding_ui_tars
  (skip propre vers niveau 3 si modèle aveugle, plus de 500 silencieux)
- tests/unit/test_model_health.py : 6 tests (vision/aveugle/fail-open/cache/smoke)

Incident 2026-06-08 : UI-TARS sans mmproj -> niveau 2 cascade en 500 silencieux,
non détecté (hors chemin runtime démo + échec avalé par fallback + zéro test).
NB : le smoke non bloquant au démarrage (api_stream.py startup) reste dans le WIP
de la branche, mélangé au préflight non committé.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 11:51:18 +02:00
Dom
5b2afa3629 fix(p1w): make default VLM model DGX-safe (qwen2.5vl:7b-rpa)
Sans env RPA_VLM_MODEL/VLM_MODEL, get_vlm_model() tombait sur le default
gemma4:latest, qui peut etre absent du tunnel DGX (depull) -> 404 Ollama et
echec de tout le pipeline VLM avant un test Lea humain.

- core/detection/vlm_config.py : DEFAULT_VLM_MODEL gemma4:latest -> qwen2.5vl:7b-rpa
  (confirme present DGX, deja default reasoning + fallback bbox grounding).
  + DGX_SAFE_VLM_MODELS allow-list documentee.
- tests/unit/test_vlm_default_dgx_safe.py : 5 tests (default != gemma4:latest,
  default in allow-list, no-env -> DGX-safe, env garde priorite).

Logique de resolution inchangee, pas d'appel reseau a l'import.
gemma4:latest reste accessible via env explicite.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 12:06:10 +02:00
Dom
0f122a512f feat(p1y-alpha): add OpenAI-compatible LeaBench adapter (benchmark only)
Adapter de benchmark isole (hors runtime Lea) ciblant un serveur
/v1/chat/completions a support vision (vLLM/SGLang/TGI), pour comparer
plus tard a Ollama via LeaBench. Ne controle jamais le desktop.

- core/evaluation/openai_compat_lea_bench_adapter.py : payload data-URL
  image_url, parsing choices[0].message.content. Reutilise par import la
  logique prompt/parse/normalisation de ollama_lea_bench_adapter (zero refactor).
- tools/lea_bench_openai_compat.py : wrapper CLI (--base-url defaut :8001).
- tests/unit/test_openai_compat_lea_bench_adapter.py : 6 tests mockes HTTP
  (data URL, pas de fuite expectation/click_region, prediction valide,
  abstain safe sur HTTP!=200 et reponse malformee, JSONL rechargeable).

Aucun runtime Lea modifie. Aucun service lance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 16:49:53 +02:00
Dom
806cc04b82 feat(p1z): centralize V4 reasoning model resolution (DGX-safe)
Remplace le default runtime dangereux `qwen2.5vl:7b` (absent du tunnel DGX
-> 404) des chemins V4/reasoning par un helper central get_reasoning_model().

- core/detection/vlm_config.py : + get_reasoning_model() + DEFAULT_REASONING_MODEL
  (qwen2.5vl:7b-rpa). Ordre : RPA_REASONING_MODEL -> RPA_VLM_MODEL/VLM_MODEL ->
  default DGX-safe. Pas d'appel reseau (lazy, safe a l'import).
- core/execution/input_handler.py, observe_reason_act.py (x3),
  core/cognition/vram_orchestrator.py : migration des 5 call-sites.
- tests/unit/test_reasoning_model.py : 8 tests (default DGX-safe, ordre de
  resolution, non-regression wiring des 3 modules V4).

Hors scope (signale lot P1.w) : DEFAULT_VLM_MODEL=gemma4:latest reste fallback
de get_vlm_model(). Client gele non touche.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 16:23:10 +02:00
Dom
4dc7d840d6 feat(p1x): de-hardcode VLM models/endpoints to vlm_config (DGX-ready)
Migre les call-sites VLM serveur vers la configuration centrale pour
fonctionner sur DGX (tunnel Ollama 11434), où gemma4:* est absent et le
port Docker 11435 est mort.

- task_planner, replay_verifier, domain_context, ir_builder, resolve_engine
  (popup): modele -> vlm_config.get_vlm_model(), defaut 11435 -> 11434
  (override GEMMA4_PORT legacy conserve)
- resolve_engine (grounding bbox x2): nouvel helper
  vlm_config.get_bbox_grounding_model() (var dediee RPA_BBOX_GROUNDING_MODEL,
  fallback RPA_GROUNDING_MODEL puis qwen2.5vl:7b-rpa) -> desambiguise le
  conflit D5-v3b, bbox_2d + num_ctx 4096 preserves
- safety_checks_provider: defaut -> get_vlm_model(), override
  RPA_SAFETY_CHECKS_LLM_MODEL preserve
- ui_detector: default_factory + resolution lazy (corrige aussi un gel a
  l'import), pas d'appel reseau a l'import
- field_extractor: property lazy via vlm_config

TDD strict (RED->GREEN), 305 tests verts, tests mockes HTTP (zero dependance
DGX reel), aucun alias Ollama.

Hors perimetre (arbitrage Dom): client Lea agent_v1/executor.py (gele),
chemin V4 observe_reason_act (RPA_REASONING_MODEL), core/config.py defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 14:06:03 +02:00
Dom
4e7c2a7628 docs(coordination): dispatch dgx vlm model cleanup 2026-06-02 18:16:55 +02:00
Dom
3697e3ba0e docs(coordination): record p11 option a decision 2026-06-02 17:46:22 +02:00
Dom
5289f3de48 feat(p11): learn from offline cross-session matches 2026-06-02 17:46:15 +02:00
Dom
4b3d5ce0d7 chore(gitignore): ignore local agent and runtime artifacts 2026-06-02 16:31:09 +02:00
Dom
9b8bdfdbbe docs(coordination): sync agent inboxes and active decisions 2026-06-02 16:30:14 +02:00
Dom
f2e9aac6b7 docs: add POC specs, handoffs, and research notes 2026-06-02 16:28:34 +02:00
Dom
18ed6cb751 feat(vwb): add dashboard competence testing and health tools 2026-06-02 16:27:19 +02:00
Dom
d38f0b0f2f feat(agent): add learn action flow and grounding guards 2026-06-02 16:24:10 +02:00
Dom
86b3c8f7e7 feat(p1): persist workflows and semantic learning artifacts 2026-06-02 16:20:38 +02:00
Dom
7a1a5cb6fd fix(p0): secure agent revocation and R6 worker queue 2026-06-02 15:52:35 +02:00
Dom
2dd306724c docs(coordination): report no-cli competence test patch 2026-06-01 12:10:01 +02:00
Dom
335d576830 feat(dashboard): launch supervised competence tests 2026-06-01 12:09:09 +02:00
Dom
1a58a0d1f1 docs(coordination): sync dgx no-cli phase1 gaps 2026-06-01 11:59:27 +02:00
Dom
eb2df539f1 docs(poc): revise dgx spark dsi prerequisites docx 2026-06-01 11:04:16 +02:00
Dom
c9f848273b docs(poc): add minimal dgx spark dsi prerequisites 2026-06-01 10:45:46 +02:00
Dom
45ec5fe969 docs(coordination): answer c gamma clarifications 2026-06-01 10:40:53 +02:00
Dom
8b6c397531 docs(poc): share dgx spark readiness context 2026-06-01 10:37:00 +02:00
Dom
6a300a4298 docs(coordination): add dgx spark multi-poste poc focus 2026-06-01 10:14:27 +02:00
Dom
0587036c17 docs(coordination): dispatch dgx spark poc readiness 2026-06-01 10:05:12 +02:00
Dom
f2a9e40502 docs(coordination): report c gamma dashboard promotion 2026-05-29 21:49:36 +02:00
Dom
34527b5cc5 feat(lea): add dashboard competence promotion dry run 2026-05-29 21:48:00 +02:00
Dom
bd3aaf7d64 docs(coordination): dispatch c gamma dashboard work 2026-05-29 19:04:58 +02:00
Dom
05a30f2d1d docs(coordination): propose c gamma writeback decisions 2026-05-29 18:58:12 +02:00
Dom
47377226f2 feat(vwb): harden supervised verdict evidence 2026-05-29 18:54:54 +02:00
Dom
d515b22d1b docs(coordination): report c beta supervision 2026-05-29 18:40:03 +02:00
Dom
aba849324a feat(vwb): log supervised competence verdicts 2026-05-29 18:36:06 +02:00
Dom
7ad260d02f docs(coordination): report c alpha preview 2026-05-29 18:15:30 +02:00
Dom
794a248dae feat(vwb): preview lea competence workflows 2026-05-29 18:13:36 +02:00
Dom
8332b2cd37 docs(coordination): delegate yaml vwb supervision patch 2026-05-29 17:54:10 +02:00
Dom
9a45e61e2a docs(coordination): report wait for state runtime 2026-05-29 17:26:35 +02:00
Dom
e66bc6d452 feat(vwb): execute wait for state 2026-05-29 17:22:35 +02:00
Dom
7b1f30af1a fix(vwb): preserve static palette tools 2026-05-29 17:16:24 +02:00
Dom
488d14240a docs(coordination): report vwb catalog patch 2026-05-29 17:11:02 +02:00
Dom
45b6da5e3f feat(vwb): load palette from catalog 2026-05-29 17:09:47 +02:00
Dom
02211fddf2 docs(coordination): answer lea vwb mapping questions 2026-05-29 16:30:11 +02:00
Dom
ed36bc2b37 docs(coordination): share reflex vwb supervision findings 2026-05-29 14:33:57 +02:00
Dom
9677738f32 docs(coordination): request global review after vwb feedback 2026-05-29 14:05:40 +02:00
Dom
d422aa119c docs(coordination): require claude qwen vision guardrails 2026-05-29 13:59:39 +02:00
Dom
7b943926db docs(coordination): clarify vwb learning bridge 2026-05-29 13:46:22 +02:00
Dom
99f89317cb feat(lea): substitute save menu gesture 2026-05-29 13:45:44 +02:00
Dom
6b8114eb97 docs(coordination): recadre lea direct competence flow 2026-05-29 13:41:18 +02:00
Dom
7ef98d8089 feat(lea): expose competence replay api 2026-05-29 13:40:15 +02:00