cli+dashboard: --panel flag, panel dict keys, TF-dialog panel section
main.py: --panel runs the agent panel on demand (force bypasses enabled/surface/quality toggles; daily budget + LLM cap still apply), prints the verdict + persona takes, and report_to_dict carries the four panel keys — which auto-propagates them into the dashboard's snapshot.json via report_to_webapp_dict. dashboard_publisher attaches in scan_tf gated by agent_panel.dashboard (default off); dashboard.html renders an "AI panel (advisory)" section in the TF detail dialog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SisdfkxnXNL9iZsXxN3T15
This commit is contained in:
+19
@@ -7282,6 +7282,25 @@ def _():
|
||||
ap.reset_panel_state()
|
||||
|
||||
|
||||
@test("report_to_dict carries panel keys → dashboard snapshot propagation")
|
||||
def _():
|
||||
from main import report_to_dict as _rtd
|
||||
from dashboard_publisher import report_to_webapp_dict as _rtw
|
||||
report = _panel_report()
|
||||
d = _rtd(report)
|
||||
assert d["panel_verdict"] == "" and d["panel_takes"] == []
|
||||
report.panel_verdict = "AGREE"
|
||||
report.panel_confidence = 77.5
|
||||
report.panel_rationale = "solid confluence"
|
||||
report.panel_takes = [{"persona": "risk", "stance": "support",
|
||||
"confidence": 66.0, "note": "rr fine"}]
|
||||
wd = _rtw(report)
|
||||
assert wd["panel_verdict"] == "AGREE"
|
||||
assert wd["panel_confidence"] == 77.5
|
||||
assert wd["panel_takes"][0]["persona"] == "risk"
|
||||
json.dumps(wd, allow_nan=False)
|
||||
|
||||
|
||||
@test("agent_panel: attach never raises (LLM explosion, garbage settings)")
|
||||
def _():
|
||||
class _Bomb:
|
||||
|
||||
Reference in New Issue
Block a user