fix: distinguish source preparation from retry failures

This commit is contained in:
root
2026-07-20 20:56:28 +02:00
parent 999eed20af
commit 618f52fe46
2 changed files with 58 additions and 1 deletions
@@ -179,6 +179,58 @@ describe("TraceTimeline sequence authority", () => {
wrapper.unmount();
});
it("does not classify normal Git source preparation as an infrastructure failure", async () => {
const wrapper = mount(TraceTimeline, {
props: {
autoExpanded: true,
trace: {
traceId: "trc_git_fetch_timeline",
eventSource: "hwlab-kafka-sse",
status: "completed",
eventCount: 2,
events: [{
sourceEventId: "evt_git_fetch_started",
runId: "run_git_fetch",
sourceSeq: 5,
source: "agentrun.kafka",
type: "backend",
status: "running",
label: "agentrun:backend:runner-source-fetch-started",
failureDomain: "infrastructure",
failureComponent: "git-mirror",
failureCode: "git-mirror-fetch-in-progress",
summary: "正在从 Git mirror 获取 Runner 源码",
retryPhase: "initialAttempt",
retryAttempt: 1,
retryMaxAttempts: 3,
createdAt: "2026-07-20T10:00:01.000Z"
}, {
sourceEventId: "evt_git_fetch_completed",
runId: "run_git_fetch",
sourceSeq: 6,
source: "agentrun.kafka",
type: "backend",
status: "running",
label: "agentrun:backend:runner-source-fetch-completed",
failureDomain: "infrastructure",
failureComponent: "git-mirror",
failureCode: "git-mirror-fetch-completed",
summary: "Git mirror 源码获取完成",
retryPhase: "initialAttempt",
retryAttempt: 1,
retryMaxAttempts: 3,
createdAt: "2026-07-20T10:00:03.000Z"
}]
}
}
});
await nextTick();
expect(wrapper.text()).not.toContain("基础设施故障");
expect(wrapper.findAll('[data-row-id^="event:semantic-retry:"]')).toHaveLength(0);
wrapper.unmount();
});
it("keeps a tool row stable while projecting visual and accessibility state", async () => {
const wrapper = mount(TraceTimeline, {
props: {