hermes: clarify provider history and archive probes
This commit is contained in:
parent
42d4b34557
commit
3a3da95dca
@ -67,7 +67,7 @@
|
|||||||
) : null,
|
) : null,
|
||||||
h("div", { className: "provider-status-stats" },
|
h("div", { className: "provider-status-stats" },
|
||||||
h(Stat, { label: "Completed", value: number(item.calls) }),
|
h(Stat, { label: "Completed", value: number(item.calls) }),
|
||||||
h(Stat, { label: "Errors", value: number(item.errors) }),
|
h(Stat, { label: "Historical errors", value: number(item.errors) }),
|
||||||
h(Stat, { label: "Tokens", value: number(item.total_tokens) }),
|
h(Stat, { label: "Tokens", value: number(item.total_tokens) }),
|
||||||
h(Stat, { label: "Avg latency", value: item.avg_latency_ms ? number(item.avg_latency_ms) + " ms" : "—" })
|
h(Stat, { label: "Avg latency", value: item.avg_latency_ms ? number(item.avg_latency_ms) + " ms" : "—" })
|
||||||
),
|
),
|
||||||
@ -84,11 +84,11 @@
|
|||||||
})
|
})
|
||||||
) : null,
|
) : null,
|
||||||
item.models && item.models.length ? h("div", { className: "provider-status-models" },
|
item.models && item.models.length ? h("div", { className: "provider-status-models" },
|
||||||
h("strong", null, "Observed routes"),
|
h("strong", null, "Observed routes (history)"),
|
||||||
item.models.map(function (model) {
|
item.models.map(function (model) {
|
||||||
return h("div", { className: "provider-status-model", key: model.id },
|
return h("div", { className: "provider-status-model", key: model.id },
|
||||||
h("code", null, model.id),
|
h("code", null, model.id),
|
||||||
h("span", null, number(model.calls) + " completed · " + number(model.errors) + " errors · " + number(model.total_tokens) + " tokens")
|
h("span", null, number(model.calls) + " completed · " + number(model.errors) + " historical errors · " + number(model.total_tokens) + " tokens")
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
) : h("p", { className: "provider-status-empty" }, "No calls observed in this router window.")
|
) : h("p", { className: "provider-status-empty" }, "No calls observed in this router window.")
|
||||||
@ -142,11 +142,11 @@
|
|||||||
),
|
),
|
||||||
h("div", { className: "provider-status-stats" },
|
h("div", { className: "provider-status-stats" },
|
||||||
h(Stat, { label: "Requests", value: number(router.total_requests) }),
|
h(Stat, { label: "Requests", value: number(router.total_requests) }),
|
||||||
h(Stat, { label: "Errors", value: number(router.total_errors) }),
|
h(Stat, { label: "Historical errors", value: number(router.total_errors) }),
|
||||||
h(Stat, { label: "Tokens", value: number(router.total_tokens) }),
|
h(Stat, { label: "Tokens", value: number(router.total_tokens) }),
|
||||||
h(Stat, { label: "Fallbacks", value: number(Object.values(router.fallbacks || {}).reduce(function (a, b) { return a + Number(b || 0); }, 0)) }),
|
h(Stat, { label: "Fallbacks", value: number(Object.values(router.fallbacks || {}).reduce(function (a, b) { return a + Number(b || 0); }, 0)) }),
|
||||||
h(Stat, { label: "Classifier calls", value: number(router.classifier_calls) }),
|
h(Stat, { label: "Classifier calls", value: number(router.classifier_calls) }),
|
||||||
h(Stat, { label: "Classifier errors", value: number(router.classifier_errors) })
|
h(Stat, { label: "Historical classifier errors", value: number(router.classifier_errors) })
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) : null,
|
) : null,
|
||||||
|
|||||||
@ -24,6 +24,10 @@ LEGACY_CASSANDRA_WORKERS = {
|
|||||||
}
|
}
|
||||||
LEGACY_ORPHANED_SMOKE_SESSIONS = {
|
LEGACY_ORPHANED_SMOKE_SESSIONS = {
|
||||||
"e17f2d888689": "Archived agent workspace smoke test",
|
"e17f2d888689": "Archived agent workspace smoke test",
|
||||||
|
"api-cff2ed44d3b0ab61": "Archived operator Codex packing probe",
|
||||||
|
"run_efce779230534721b6e0a3115782fae6": "Archived model availability probe",
|
||||||
|
"run_aab885acce7e4daca65e935cc684ffc6": "Archived Vault path probe",
|
||||||
|
"run_e689e61419a842219c5fdcc789e27c2f": "Archived secret isolation probe",
|
||||||
}
|
}
|
||||||
TRIAGE_PARENT = "automated-triage"
|
TRIAGE_PARENT = "automated-triage"
|
||||||
TRIAGE_PARENT_TITLE = "Automated triage"
|
TRIAGE_PARENT_TITLE = "Automated triage"
|
||||||
|
|||||||
@ -1025,14 +1025,13 @@ def test_legacy_api_sessions_are_nested_idempotently(tmp_path: Path):
|
|||||||
"VALUES (?, 'api_server', NULL, 'old', 'keep-me')",
|
"VALUES (?, 'api_server', NULL, 'old', 'keep-me')",
|
||||||
(worker_id,),
|
(worker_id,),
|
||||||
)
|
)
|
||||||
orphan_id = next(iter(module.LEGACY_ORPHANED_SMOKE_SESSIONS))
|
connection.executemany(
|
||||||
connection.execute(
|
|
||||||
"INSERT INTO sessions (id, source, parent_session_id, title, transcript) "
|
"INSERT INTO sessions (id, source, parent_session_id, title, transcript) "
|
||||||
"VALUES (?, 'api_server', NULL, 'old smoke', 'keep-smoke')",
|
"VALUES (?, 'api_server', NULL, 'old smoke', 'keep-smoke')",
|
||||||
(orphan_id,),
|
((orphan_id,) for orphan_id in module.LEGACY_ORPHANED_SMOKE_SESSIONS),
|
||||||
)
|
)
|
||||||
|
|
||||||
assert module.migrate(database) == 2
|
assert module.migrate(database) == 1 + len(module.LEGACY_ORPHANED_SMOKE_SESSIONS)
|
||||||
assert module.migrate(database) == 0
|
assert module.migrate(database) == 0
|
||||||
with sqlite3.connect(database) as connection:
|
with sqlite3.connect(database) as connection:
|
||||||
row = connection.execute(
|
row = connection.execute(
|
||||||
@ -1045,15 +1044,22 @@ def test_legacy_api_sessions_are_nested_idempotently(tmp_path: Path):
|
|||||||
"keep-me",
|
"keep-me",
|
||||||
)
|
)
|
||||||
with sqlite3.connect(database) as connection:
|
with sqlite3.connect(database) as connection:
|
||||||
orphan = connection.execute(
|
orphans = connection.execute(
|
||||||
"SELECT archived, title, transcript FROM sessions WHERE id = ?",
|
"SELECT id, archived, title, transcript FROM sessions "
|
||||||
(orphan_id,),
|
"WHERE id IN ({}) ORDER BY id".format(
|
||||||
).fetchone()
|
",".join("?" for _ in module.LEGACY_ORPHANED_SMOKE_SESSIONS)
|
||||||
assert orphan == (
|
),
|
||||||
|
tuple(module.LEGACY_ORPHANED_SMOKE_SESSIONS),
|
||||||
|
).fetchall()
|
||||||
|
assert orphans == sorted(
|
||||||
|
(
|
||||||
|
orphan_id,
|
||||||
1,
|
1,
|
||||||
module.LEGACY_ORPHANED_SMOKE_SESSIONS[orphan_id],
|
module.LEGACY_ORPHANED_SMOKE_SESSIONS[orphan_id],
|
||||||
"keep-smoke",
|
"keep-smoke",
|
||||||
)
|
)
|
||||||
|
for orphan_id in module.LEGACY_ORPHANED_SMOKE_SESSIONS
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_automated_triage_sessions_are_grouped_without_touching_interactive_runs(tmp_path: Path):
|
def test_automated_triage_sessions_are_grouped_without_touching_interactive_runs(tmp_path: Path):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user