File size: 1,472 Bytes
b4396f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
"""Dashboard patch (2026-11-20): update ONLY the JEDI-lite line in the
verdict ledger of ~/sera_v4_dashboard/server.py.

Gate 1 was re-measured after the first measurement crashed
(measure_jedi.py mode_swap shape bug, fixed separately):
dv_swap @ ckpt 010000 = 0.8958, @ 005000 = 0.8870, fs1 reference =
0.0993 -> Gate 1 PASS (threshold 0.08). Gate 2 rollout eval is still
running, so the line stays RUNNING. Exact-match asserted; backup at
server.py.bak-gate1-20261120.
"""
import py_compile
import shutil
from pathlib import Path

P = Path.home() / "sera_v4_dashboard" / "server.py"
src = P.read_text()
orig = src

OLD_NOTE = ("Check PASS 路 smoke PASS (DD median 3,512) 路 Cong 0 PASS: "
            "DD_task 5,91 tai ckpt 2k (nguong 1,5) 路 Cong 1/2 chua co "
            "ket qua tai thoi diem cap nhat 20/11/2026.")
NEW_NOTE = ("Check PASS 路 smoke PASS (DD median 3,512) 路 "
            "C峄昻g 0 PASS (DD 5,91) 路 "
            "C峄昻g 1 PASS (螖v_swap 0,896 t岷 10k, fs1 tham chi岷縰 0,099) 路 "
            "C峄昻g 2 膽ang ch岷")

n = src.count(OLD_NOTE)
assert n == 1, f"old JEDI-lite note found {n} times (expected 1)"
assert NEW_NOTE not in src
src = src.replace(OLD_NOTE, NEW_NOTE)
assert src != orig

shutil.copy(P, P.with_name("server.py.bak-gate1-20261120"))
P.write_text(src)
py_compile.compile(str(P), doraise=True)
print("dashboard JEDI-lite line updated OK; backup at "
      "server.py.bak-gate1-20261120; py_compile OK")