docs: document v02 deploy yaml source

This commit is contained in:
Codex Agent
2026-06-08 13:21:26 +08:00
parent 435ce50f11
commit a5f38a95ee
6 changed files with 31 additions and 6 deletions
+22
View File
@@ -1743,6 +1743,28 @@ test("hwlab-cli Web trace render reports suppressed noise and command tool detai
assert.match(text, / HWPOD/u);
});
test("hwlab-cli Web trace render keeps full tool details with --full", async () => {
const longStdout = `first line\n${"X".repeat(1500)}\nlast line`;
const command = "/bin/sh -lc 'cat > /tmp/main_patch.txt << '\''PATCHMAIN'\''\n*** Begin Patch\n*** Update File: projects/01_baseline/User/main.c\n@@\n+d601_arm2d_demo_task();\n*** End Patch\nPATCHMAIN\nhwpod workspace apply-patch --spec .hwlab/hwpod-spec.yaml --reason demo'";
const result = await runHwlabCli(["client", "agent", "trace", "trc_render_full", "--base-url", "http://web.test", "--cookie", "hwlab_session=session-a", "--render", "web", "--full"], {
fetchImpl: async () => new Response(JSON.stringify({
status: "completed",
traceId: "trc_render_full",
events: [
{ traceId: "trc_render_full", seq: 1, label: "item/commandExecution:completed", type: "tool_call", toolName: "commandExecution", status: "completed", itemId: "call_full", command, exitCode: 0, stdoutSummary: longStdout, createdAt: "2026-06-01T13:00:02.000Z" }
]
}), { status: 200 })
});
assert.equal(result.exitCode, 0);
const row = result.payload.body.rows[0];
assert.match(row.body, /cat > \/tmp\/main_patch\.txt << '+PATCHMAIN'+/u);
assert.match(row.body, /\n\*\*\* Begin Patch/u);
assert.match(row.body, /stdout:\nfirst line\nX{1500}\nlast line/u);
assert.match(row.body, /exitCode=0/u);
assert.doesNotMatch(row.body, /last line\.\.\./u);
});
test("hwlab-cli Web trace render keeps AgentRun middle assistant message", async () => {
const result = await runHwlabCli(["client", "agent", "trace", "trc_render_agentrun_middle", "--base-url", "http://web.test", "--cookie", "hwlab_session=session-a", "--render", "web"], {
fetchImpl: async () => new Response(JSON.stringify({
-2
View File
@@ -2200,9 +2200,7 @@ async function archivedAgentTraceBody(run: PreparedCaseRun, evidence: any) {
async function materializeFullAgentTraceWithExistingCli(context: CaseContext, run: PreparedCaseRun, evidence: any, initialTrace: any) {
const body = initialTrace?.body && typeof initialTrace.body === "object" ? initialTrace.body : initialTrace;
const existingRows = arrayOfObjects(body?.rows ?? body?.renderedRows ?? body?.traceRows);
const existingEvents = arrayOfObjects(body?.events ?? body?.trace?.events ?? body?.sourceEvents);
if (existingRows.length > 0) return initialTrace;
if (existingEvents.length > 0) return initialTrace;
if (!run.agent) return initialTrace;
const traceId = text(body?.traceId ?? initialTrace?.traceId ?? evidence.agent?.traceId ?? run.agent?.traceId);