惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
A
About on SuperTechFans
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
D
DataBreaches.Net
B
Blog
博客园 - 【当耐特】
爱范儿
爱范儿
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
WordPress大学
WordPress大学
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
雷峰网
雷峰网
量子位
G
Google Developers Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(qa-lab): add gateway log sentinels · openclaw/opencla...
vincentkoc · 2026-05-17 · via Recent Commits to openclaw:main

@@ -0,0 +1,123 @@

1+

import { describe, expect, it } from "vitest";

2+

import {

3+

assertNoGatewayLogSentinels,

4+

formatGatewayLogSentinelSummary,

5+

scanDirectReplyTranscriptSentinels,

6+

scanGatewayLogSentinels,

7+

} from "./gateway-log-sentinel.js";

8+9+

describe("gateway log sentinels", () => {

10+

it("classifies May 13 beta.5 operational failure signatures", () => {

11+

const findings = scanGatewayLogSentinels(

12+

[

13+

"2026-05-13T00:00:01Z plugin before_prompt_build hook failed: TypeError: boom",

14+

"2026-05-13T00:00:02Z plugin before_tool_call crashed while evaluating policy",

15+

"2026-05-13T00:00:03Z plugin manifest invalid: missing contracts.tools registration",

16+

"2026-05-13T00:00:04Z codex app-server attempt timed out after 180000ms",

17+

"2026-05-13T00:00:05Z codex_app_server progress stalled for run abc123",

18+

"2026-05-13T00:00:06Z cron payload model openai/gpt-5.4 is not in model allowlist",

19+

"2026-05-13T00:00:07Z OpenAI quota exceeded for live-frontier request",

20+

].join("\n"),

21+

);

22+23+

expect(findings.map((finding) => finding.kind)).toEqual([

24+

"plugin-hook-failure",

25+

"plugin-hook-failure",

26+

"plugin-contract-error",

27+

"codex-app-server-timeout",

28+

"stalled-agent-run",

29+

"cron-model-allowlist",

30+

"live-quota-or-subscription",

31+

]);

32+

expect(findings.find((finding) => finding.kind === "plugin-hook-failure")).toMatchObject({

33+

verdict: "qa-harness-bug",

34+

owner: "plugin",

35+

productImpact: "P1",

36+

});

37+

expect(findings.find((finding) => finding.kind === "live-quota-or-subscription")).toMatchObject(

38+

{

39+

verdict: "environment-blocked",

40+

owner: "environment",

41+

productImpact: "P4",

42+

},

43+

);

44+

});

45+46+

it("honors log cursors while preserving absolute line numbers", () => {

47+

const prefix = "safe line\n";

48+

const findings = scanGatewayLogSentinels(`${prefix}codex app-server attempt timed out`, {

49+

since: prefix.length,

50+

});

51+52+

expect(findings).toHaveLength(1);

53+

expect(findings[0]).toMatchObject({

54+

kind: "codex-app-server-timeout",

55+

line: 2,

56+

});

57+

});

58+59+

it("throws actionable summaries unless only environment blockers are allowed", () => {

60+

expect(() => assertNoGatewayLogSentinels("codex_app_server progress stalled")).toThrow(

61+

"stalled-agent-run",

62+

);

63+

expect(() =>

64+

assertNoGatewayLogSentinels("OpenAI quota exceeded", { allowEnvironmentBlocked: true }),

65+

).not.toThrow();

66+

expect(formatGatewayLogSentinelSummary(scanGatewayLogSentinels("OpenAI quota exceeded"))).toBe(

67+

"live-quota-or-subscription@1 environment-blocked owner=environment: OpenAI quota exceeded",

68+

);

69+

});

70+71+

it("detects direct reply self-message transcripts separately from gateway logs", () => {

72+

const findings = scanDirectReplyTranscriptSentinels(

73+

[

74+

JSON.stringify({

75+

message: {

76+

role: "assistant",

77+

content: [

78+

{

79+

type: "tool_use",

80+

name: "message",

81+

input: { action: "send", conversationId: "qa-operator", text: "hello" },

82+

},

83+

],

84+

},

85+

}),

86+

JSON.stringify({ message: { role: "assistant", content: "Sent." } }),

87+

].join("\n"),

88+

);

89+90+

expect(findings).toHaveLength(1);

91+

expect(findings[0]).toMatchObject({

92+

kind: "direct-reply-self-message",

93+

verdict: "product-bug",

94+

owner: "openclaw-routing",

95+

});

96+

});

97+98+

it("detects OpenAI function_call-shaped direct reply transcripts", () => {

99+

const findings = scanDirectReplyTranscriptSentinels(

100+

[

101+

JSON.stringify({

102+

message: {

103+

role: "assistant",

104+

content: [

105+

{

106+

type: "function_call",

107+

name: "message",

108+

arguments: JSON.stringify({

109+

action: "send",

110+

target: "current",

111+

text: "hello",

112+

}),

113+

},

114+

],

115+

},

116+

}),

117+

JSON.stringify({ message: { role: "assistant", content: "Sent." } }),

118+

].join("\n"),

119+

);

120+121+

expect(findings.map((finding) => finding.kind)).toEqual(["direct-reply-self-message"]);

122+

});

123+

});