Skip to content

Commit ece4b1f

Browse files
committed
update
1 parent 51f3e50 commit ece4b1f

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

prototype/agingbench/telemetry/card_render.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,27 @@ def _per_mechanism_severity(mechanism: str, block: dict) -> float:
149149
return _revision_severity(block)
150150
if mechanism == "maintenance":
151151
return _maintenance_severity(block)
152+
if mechanism == "consistency":
153+
return _consistency_severity(block)
154+
return 0.0
155+
156+
157+
def _consistency_severity(block: dict) -> float:
158+
"""Consistency block isn't a mechanism but it carries the aging-happened
159+
signal. Score by behavior_drift_at_repeat magnitude so the 5th sparkline
160+
on the website gets a meaningful strength meter rather than always 0.
161+
"""
162+
drift = float(block.get("behavior_drift_at_repeat") or 0.0)
163+
if drift > 0.5:
164+
return 5.0
165+
if drift > 0.3:
166+
return 4.0
167+
if drift > 0.15:
168+
return 3.0
169+
if drift > 0.05:
170+
return 2.0
171+
if drift > 0.0:
172+
return 1.0
152173
return 0.0
153174

154175

prototype/agingbench/telemetry/inference/consistency.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,11 @@ def infer_consistency(
158158
"tool_path_jaccard_drop_mean": round(tool_drop_mean, 4),
159159
"response_cosine_drop_mean": round(resp_drop_mean, 4),
160160
"outcome_consistency_rate": (round(outcome_rate, 4) if outcome_rate is not None else None),
161-
"consistency_drop_trajectory": [(i, round(v, 4) if v is not None else None)
162-
for i, v in enumerate(drop_trajectory)],
161+
# Flat list of values (one per session) — matches the shape of every
162+
# other website-rendered trajectory (e.g. context_noise_ratio_trajectory).
163+
# Tuple/(idx, value) form was producing empty sparklines in the demo UI.
164+
"consistency_drop_trajectory": [round(v, 4) if v is not None else None
165+
for v in drop_trajectory],
163166
"consistency_drop_slope": (round(drop_slope, 6) if drop_slope is not None else None),
164167
"consistency_drop_verdict": drop_verdict,
165168
"coverage": coverage.as_dict(),

0 commit comments

Comments
 (0)