Skip to content

Commit 6244f58

Browse files
committed
docs(dashboard-agent): say that the health verbs rewrite the environment's queue metrics
1 parent f9238d7 commit 6244f58

4 files changed

Lines changed: 13 additions & 10 deletions

File tree

apps/webapp/test/dashboardAgentTranscriptStore.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ function textMessage(id: string, text = id) {
7777

7878
// Compile-time: the insert reads `role` off the body and throws without one, so a
7979
// message that satisfies the signature must never be able to lack it.
80-
() => {
80+
const _roleIsRequired = (message: { id: string }) =>
8181
// @ts-expect-error a message with no role is not appendable
82-
void appendChatMessageOnceByChatId(agentDb, { chatId: "chat_x", message: { id: "m1" } });
83-
};
82+
appendChatMessageOnceByChatId(agentDb, { chatId: "chat_x", message });
8483

8584
function toolMessage(id: string, state: "input-available" | "output-available") {
8685
return {

internal-packages/dashboard-agent/GUIDEBOOK.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,11 @@ verb rather than hand-run Redis and ClickHouse surgery:
185185
pnpm --filter webapp run scenarios:watch -- --help
186186
```
187187

188-
It targets any local project and environment, is idempotent, wipes nothing, and
189-
prints the next dashboard step itself. Node 20 is the version it is run on.
188+
It targets any local project and environment, is idempotent, and prints the next
189+
dashboard step itself. Node 20 is the version it is run on. Everything but the
190+
`health:` verbs is additive; those two rewrite the environment's recent queue
191+
metrics in ClickHouse, so point them at an environment whose history you don't
192+
need.
190193

191194
Every command takes `--project <ref-or-slug>` and `--env <dev|staging|prod|slug>`
192195
(default `dev`). The walkthroughs below assume a shell alias so the flags aren't

internal-packages/dashboard-agent/src/eval-error-category.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,9 @@ describe("the derived error category", () => {
139139
it("does not label a run that simply carries an error field", () => {
140140
// `curateRun` always emits the key, undefined when the run succeeded, and a run that
141141
// failed is still a tool call that worked.
142-
const succeeded = redactEvalToolValue(curateRun({ id: "run_1", status: "COMPLETED" })) as Record<
143-
string,
144-
unknown
145-
>;
142+
const succeeded = redactEvalToolValue(
143+
curateRun({ id: "run_1", status: "COMPLETED" })
144+
) as Record<string, unknown>;
146145
expect(succeeded).not.toHaveProperty("errorCategory");
147146
expect(toolResultErrored(succeeded)).toBe(false);
148147

internal-packages/dashboard-agent/src/eval-redaction.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ describe("an errored tool result", () => {
194194
});
195195

196196
it("reads the derived category once the message is gone", () => {
197-
expect(toolResultErrored({ errorCategory: "timeout", error: { redacted: "error" } })).toBe(true);
197+
expect(toolResultErrored({ errorCategory: "timeout", error: { redacted: "error" } })).toBe(
198+
true
199+
);
198200
expect(toolResultErrored({ error: { name: "TimeoutError" } })).toBe(false);
199201
expect(toolResultErrored({ id: "run_1" })).toBe(false);
200202
expect(toolResultErrored("boom")).toBe(false);

0 commit comments

Comments
 (0)