Lucy-Annahme-Fixes: Start-Process-Quoting, Python-3.14-Parse, Executor ohne Fensterblitz
Der erste Live-Lauf der Lucy-Annahme (wartung/pc-annahme-und-turncheck-aus) fand zwei Bugs im Box-Runner — der Build selbst war gruen, nur Start und Abschluss mussten manuell nachgezogen werden: 1) Start-Process -ArgumentList quotet Elemente NICHT (PS 5.1): der Runner-Pfad 'F:\Coding Stuff\lucy\...' zerbrach am Leerzeichen, die gespawnte powershell starb still (kein Status, kein Log). Fix: Anfuehrungszeichen ins -File-Element eingebettet. (Der Probe-Test lief ueber einen Pfad OHNE Leerzeichen — deshalb nicht gefangen.) 2) Poll-Parser: \" in f-String-Ausdruecken ist seit Python 3.12 ein SyntaxError (Box: 3.14) -> der Poll blieb blind und haette den GRUENEN Merge nach 25 min revertiert. Fix: keine f-String-Quote-Akrobatik mehr, Werte in Variablen. Neuer Parser 1:1 auf der Box getestet. 3) executor.py /shell: CREATE_NO_WINDOW — der Executor laeuft unter pythonw, jede gespawnte powershell bekam ein SICHTBARES Konsolenfenster (Polling blitzte im 10-s-Takt auf dem Desktop). Nach Annahme: PC-Checkout pullen + HermesPCExecutor-Task neu starten (mache ich, steht auch in FALLEN.md). Beide Fallen + Fensterblitz in docs/wissen/FALLEN.md; OFFENE-FAEDEN: S3-Stand. Geprueft: bash -n gruen, py_compile gruen, Parser auf Box-Python 3.14 verifiziert.
This commit is contained in:
@@ -155,7 +155,10 @@ pc_shell "git -C '$PC_REPO' fetch origin main 2>&1; if (\$LASTEXITCODE -ne 0) {
|
||||
pc_shell "if (Test-Path '$PC_RUNNER') { exit 0 } else { exit 1 }" >>"$LOG" 2>&1 \
|
||||
|| revert_main "PC-Runner-Skript fehlt im Lucy-Repo (deploy/lucy-annahme.ps1)"
|
||||
|
||||
pc_shell "Remove-Item -Force '$PC_STATUSFILE' -ErrorAction SilentlyContinue; Start-Process powershell -WindowStyle Hidden -ArgumentList '-NoProfile','-ExecutionPolicy','Bypass','-File','$PC_RUNNER','-WasRunning','$WAS_RUNNING'" >>"$LOG" 2>&1 \
|
||||
# WICHTIG: -File-Pfad MUSS eingebettete Anführungszeichen tragen — Start-Process fügt
|
||||
# die ArgumentList-Elemente OHNE Quoting zusammen; 'F:\Coding Stuff\…' zerbricht sonst am
|
||||
# Leerzeichen und die gespawnte powershell stirbt still (erster Live-Lauf, 12.07.).
|
||||
pc_shell "Remove-Item -Force '$PC_STATUSFILE' -ErrorAction SilentlyContinue; Start-Process powershell -WindowStyle Hidden -ArgumentList '-NoProfile','-ExecutionPolicy','Bypass','-File','\"$PC_RUNNER\"','-WasRunning','$WAS_RUNNING'" >>"$LOG" 2>&1 \
|
||||
|| revert_main "PC-Build ließ sich nicht starten"
|
||||
|
||||
# ── Status-Datei pollen, Fortschritt in die UI spiegeln ─────────────────────
|
||||
@@ -167,6 +170,8 @@ while [ "$(date +%s)" -lt "$DEADLINE" ]; do
|
||||
sleep 10
|
||||
RAW="$(pc_shell "if (Test-Path '$PC_STATUSFILE') { Get-Content -Raw '$PC_STATUSFILE' }" 2>>"$LOG")" || continue
|
||||
[ -n "$RAW" ] || continue
|
||||
# Parse OHNE f-String-Escapes: \" in f-String-Ausdruecken ist seit Python 3.12/3.14
|
||||
# ein SyntaxError (alter Pre-3.12-Stil) — genau das legte den ersten Live-Lauf lahm.
|
||||
PARSED="$(printf '%s' "$RAW" | python3 -c '
|
||||
import json, sys
|
||||
try:
|
||||
@@ -174,7 +179,9 @@ try:
|
||||
except Exception:
|
||||
sys.exit(0)
|
||||
detail = str(d.get("detail", "")).replace("|", "/").replace("\n", " ")
|
||||
print(f"{1 if d.get(\"done\") else 0}|{1 if d.get(\"ok\") else 0}|{detail}")
|
||||
done = "1" if d.get("done") else "0"
|
||||
ok = "1" if d.get("ok") else "0"
|
||||
print(done + "|" + ok + "|" + detail)
|
||||
')"
|
||||
[ -n "$PARSED" ] || continue
|
||||
DONE="${PARSED%%|*}"; REST="${PARSED#*|}"; OK="${REST%%|*}"; DETAIL="${REST#*|}"
|
||||
|
||||
Reference in New Issue
Block a user