sync SVN r18211

This commit is contained in:
2026-09-28 09:17:38 +03:00
parent 7c8da7bf66
commit 35dbaa4446
8 changed files with 316 additions and 19 deletions

View File

@@ -140,11 +140,27 @@ nodes:
Aprobi implementarea conform acestui plan?
# ============================================================
# b2. SNAPSHOT BASELINE (bash, 0 tokeni) - starea git INAINTE de implement,
# ca `verifica`/`verifica2` sa poata detecta "diff gol" fara sa confunde
# fisiere deja modificate (WIP neatins de implement, ex. docs/todos.txt)
# cu munca reala a nodului. worktree.enabled: false -> toate nodurile
# lucreaza pe acelasi working copy, deci fara acest instantaneu un
# checkout deja murdar ar face "diff gol" nedetectabil (26.09.2026).
# ============================================================
- id: snapshot_baseline
depends_on: [aprobare_plan]
bash: |
mkdir -p "$ARTIFACTS_DIR"
cd D:/roa/roacont
{ git status --porcelain; git -C COMUN status --porcelain | sed 's/^/COMUN: /'; } > "$ARTIFACTS_DIR/baseline_status.txt"
echo "Baseline: $(wc -l < "$ARTIFACTS_DIR/baseline_status.txt") linii modificate/netracked inainte de implement."
# ============================================================
# c. IMPLEMENT (Pi / DeepSeek V4.1 Flash, prin abonamentul opencode go)
# ============================================================
- id: implement
depends_on: [aprobare_plan]
depends_on: [snapshot_baseline]
provider: pi
model: opencode-go/deepseek-v4.1-flash
idle_timeout: 900000
@@ -210,15 +226,50 @@ nodes:
# ============================================================
# d. VERIFICA (bash, 0 tokeni) - primul rand
# Garda diff-gol/stop_reason=length (26.09.2026, run aca8c771): un
# implement care nu scrie nimic (sau se opreste trunchiat cu
# stop_reason=length) trecea aici cu OK ("nimic de verificat" din
# verifica_vfp_text.ps1 -> exit 0), sarind direct la `review` in loc de
# `implement_retry`. Cele doua verificari noi sunt independente de
# verifica_vfp_text.ps1 si se aplica peste rezultatul lui.
# IMPORTANT: `when: "$verifica.output == 'FAIL'"` cere ca $verifica.output
# sa fie STRICT literalul "OK"/"FAIL" (egalitate exacta pe tot stdout-ul
# nodului, nu pe ultima linie - confirmat din codul `archon.exe`, functiile
# `ly7`/`ny7`: `.output` fara sub-camp returneaza stdout-ul brut integral).
# `cat`-ul vechi al log-ului inainte de OK/FAIL facea `$verifica.output`
# mereu multi-linie -> `implement_retry`/`escaladare` NU se declansau
# niciodata in executie reala (doar testele dry-run cu stub literal
# "FAIL" pareau sa functioneze). Confirmat empiric 26.09.2026: dry-run
# --exec-code cu implement stubbat (fara scriere) a dat "...FAIL" pe
# ultima linie, dar `implement_retry` a fost "skipped: when_condition_false".
# Fix: stdout-ul nodului e STRICT tokenul OK/FAIL; detaliile merg in
# $ARTIFACTS_DIR/verifica_log.txt (deja citit explicit de implement_retry).
# ============================================================
- id: verifica
depends_on: [implement]
bash: |
mkdir -p "$ARTIFACTS_DIR"
powershell -ExecutionPolicy Bypass -File D:/roa/roacont/.archon/scripts/verifica_vfp_text.ps1 -ProjectRoot D:\roa\roacont > "$ARTIFACTS_DIR/verifica_log.txt" 2>&1
cd D:/roa/roacont
LOG="$ARTIFACTS_DIR/verifica_log.txt"
powershell -ExecutionPolicy Bypass -File D:/roa/roacont/.archon/scripts/verifica_vfp_text.ps1 -ProjectRoot D:\roa\roacont > "$LOG" 2>&1
RC=$?
cat "$ARTIFACTS_DIR/verifica_log.txt"
if [ $RC -eq 0 ]; then echo OK; else echo FAIL; fi
FAIL=0
if [ $RC -ne 0 ]; then FAIL=1; fi
{ git status --porcelain; git -C COMUN status --porcelain | sed 's/^/COMUN: /'; } > "$ARTIFACTS_DIR/status_after_implement.txt"
if diff -q "$ARTIFACTS_DIR/baseline_status.txt" "$ARTIFACTS_DIR/status_after_implement.txt" > /dev/null 2>&1; then
echo "DIFF_GOL: implement nu a modificat niciun fisier fata de inceputul rularii." >> "$LOG"
FAIL=1
fi
SQLITE="D:/roa/roacont/sqlite3.exe"; DB="C:/Users/mmari/.archon/archon.db"
RUNID=$("$SQLITE" -ascii "$DB" "SELECT id FROM remote_agent_workflow_runs WHERE workflow_name='roa-fix' AND working_path LIKE '%ROACONT%' ORDER BY started_at DESC LIMIT 1;" 2>/dev/null | tr -d '\036\037')
if [ -n "$RUNID" ] && "$SQLITE" -ascii "$DB" "SELECT data FROM remote_agent_workflow_events WHERE workflow_run_id='$RUNID' AND step_name='implement' AND event_type='node_completed' ORDER BY event_order DESC LIMIT 1;" 2>/dev/null | grep -q '"stop_reason":"length"'; then
echo "STOP_REASON_LENGTH: nodul implement s-a oprit trunchiat (stop_reason=length)." >> "$LOG"
FAIL=1
fi
if [ $FAIL -eq 1 ]; then echo FAIL; else echo OK; fi
# ============================================================
# e. RETRY: implement inca o data cu eroarea, apoi re-verifica
@@ -241,13 +292,32 @@ nodes:
Iesirea verificarii (citeste si $ARTIFACTS_DIR/verifica_log.txt pentru detalii complete):
$verifica.output
# `escaladare` foloseste `$verifica2.output == 'FAIL'` - aceeasi cerinta de
# egalitate exacta ca la `verifica` (vezi nota de acolo); stdout STRICT OK/FAIL.
- id: verifica2
depends_on: [implement_retry]
bash: |
powershell -ExecutionPolicy Bypass -File D:/roa/roacont/.archon/scripts/verifica_vfp_text.ps1 -ProjectRoot D:\roa\roacont > "$ARTIFACTS_DIR/verifica_log2.txt" 2>&1
cd D:/roa/roacont
LOG="$ARTIFACTS_DIR/verifica_log2.txt"
powershell -ExecutionPolicy Bypass -File D:/roa/roacont/.archon/scripts/verifica_vfp_text.ps1 -ProjectRoot D:\roa\roacont > "$LOG" 2>&1
RC=$?
cat "$ARTIFACTS_DIR/verifica_log2.txt"
if [ $RC -eq 0 ]; then echo OK; else echo FAIL; fi
FAIL=0
if [ $RC -ne 0 ]; then FAIL=1; fi
{ git status --porcelain; git -C COMUN status --porcelain | sed 's/^/COMUN: /'; } > "$ARTIFACTS_DIR/status_after_retry.txt"
if diff -q "$ARTIFACTS_DIR/baseline_status.txt" "$ARTIFACTS_DIR/status_after_retry.txt" > /dev/null 2>&1; then
echo "DIFF_GOL: implement_retry nu a modificat niciun fisier fata de inceputul rularii." >> "$LOG"
FAIL=1
fi
SQLITE="D:/roa/roacont/sqlite3.exe"; DB="C:/Users/mmari/.archon/archon.db"
RUNID=$("$SQLITE" -ascii "$DB" "SELECT id FROM remote_agent_workflow_runs WHERE workflow_name='roa-fix' AND working_path LIKE '%ROACONT%' ORDER BY started_at DESC LIMIT 1;" 2>/dev/null | tr -d '\036\037')
if [ -n "$RUNID" ] && "$SQLITE" -ascii "$DB" "SELECT data FROM remote_agent_workflow_events WHERE workflow_run_id='$RUNID' AND step_name='implement_retry' AND event_type='node_completed' ORDER BY event_order DESC LIMIT 1;" 2>/dev/null | grep -q '"stop_reason":"length"'; then
echo "STOP_REASON_LENGTH: nodul implement_retry s-a oprit trunchiat (stop_reason=length)." >> "$LOG"
FAIL=1
fi
if [ $FAIL -eq 1 ]; then echo FAIL; else echo OK; fi
# ============================================================
# al doilea esec -> escaladare la Opus
@@ -292,6 +362,10 @@ nodes:
diff (corectitudine, nu stil). Verifica fiecare afirmatie pe codul real inainte de
verdict - citeste fisierele schimbate, nu doar diful.
Confirma implementarea prin hash: `git hash-object <fisier>` ==
`git rev-parse HEAD:<fisier>` pe fisierele tinta din plan; egalitate = diff gol =
BLOCANT "nu exista implementare", nu se trece la analiza calitatii codului.
## Cautare rapida (obligatorie)
Niciodata `grep -r` pe tot arborele `D:\ROA\ROACONT`. In ordine:
1. Unealta `grep`/`find` (rapide, bazate pe ripgrep) sau `rg` direct din bash - exclude