慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

The GitHub Blog
The GitHub Blog
T
ThreatConnect
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
U
Unit 42
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tenable Blog
博客园 - 叶小钗
D
Docker
T
Threatpost
WordPress大学
WordPress大学
腾讯CDC
I
Intezer
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
PCI Perspectives
PCI Perspectives
S
Security Archives - TechRepublic
Simon Willison's Weblog
Simon Willison's Weblog
A
Arctic Wolf
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Hacker News: Ask HN
Hacker News: Ask HN
O
OpenAI News
博客园 - 【当耐特】
L
LINUX DO - 最新话题
C
Comments on: Blog
S
Securelist
月光博客
月光博客
S
Secure Thoughts
Security Latest
Security Latest
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
F
Full Disclosure
M
Microsoft Research Blog - Microsoft Research
T
True Tiger Recordings
SecWiki News
SecWiki News
aimingoo的专栏
aimingoo的专栏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 热门话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
L
Lohrmann on Cybersecurity
H
Help Net Security

Recent Commits to openclaw:main

Deprecate memory-specific embedding provider registration (#85072) · openclaw/openclaw@c9d4f7e fix(gateway): reject no-auth tailscale exposure · openclaw/openclaw@dc5954b fix(agents): avoid false Codex runtime live switches perf(gateway): trust current metadata lifecycle cache chore(release): update appcast for 2026.5.26 · openclaw/openclaw@c95b51f refactor: move channel message sdk compat into core · openclaw/openclaw@8e5183c ci(release): accept main full-validation proof · openclaw/openclaw@1e67af7 ci(release): harden postpublish verification · openclaw/openclaw@ef17bba fix(cli): reject malformed gateway timeouts · openclaw/openclaw@e61f175 fix(dev): bound issue labeler OpenAI waits fix(openai): normalize responses replay tool ids fix(status): keep default status fast path bounded · openclaw/openclaw@7121f67 feat(embeddings): add OpenAI-compatible core provider (#85269) · openclaw/openclaw@4d89e00 Make Telegram sendMessage actions durable (#87261) · openclaw/openclaw@f3fe48e fix(dev): bound gh-read API waits · openclaw/openclaw@5fb57b5 fix(vllm): wire configured thinking params · openclaw/openclaw@e153ece fix(agents): separate heartbeat runtime template (#85416) · openclaw/openclaw@75221e0 fix(agents): honor OpenAI-compatible cache retention · openclaw/openclaw@3e351b7 fix: require admin for node device approvals · openclaw/openclaw@517ce3d fix(qa): create Matrix mention progress target · openclaw/openclaw@983759b fix(dev): bound Claude usage debug fetches · openclaw/openclaw@d09eb43 fix(cli): validate message numeric options · openclaw/openclaw@5fdaf6b perf(gateway): cache current plugin metadata fingerprints · openclaw/openclaw@7efbaf7 fix(dev): bound realtime smoke HTTP waits · openclaw/openclaw@e2cebe8 fix(qa): accept Matrix tool error final races · openclaw/openclaw@a275ce8 fix(qa): cap Matrix readiness polling · openclaw/openclaw@099b0f8 fix(cli): validate directory limits before resolution · openclaw/openclaw@513a223 fix(cli): reject loose webhook and directory numeric options · openclaw/openclaw@0889106 fix(agents): keep runtime context before active user turns · openclaw/openclaw@0503853 fix(qa): stop Matrix phases after run timeout · openclaw/openclaw@f4b9d24 fix(agents): strip stale Anthropic thinking · openclaw/openclaw@66965f5 fix(doctor): validate bundled MCP tool schemas · openclaw/openclaw@a02fe52 fix(qa): kill timed out Matrix CLI runs · openclaw/openclaw@b8fc2f6 fix(dev): bound discord smoke waits · openclaw/openclaw@545ad7f feat(pixverse): add video generation provider · openclaw/openclaw@c183705 feat(pixverse): add api region selection · openclaw/openclaw@b3083de chore(pixverse): publish as external plugin · openclaw/openclaw@5366209 fix(qa): tolerate fast Matrix tool replies · openclaw/openclaw@a46e839 refactor: remove channel turn runtime aliases · openclaw/openclaw@6c37402 fix(test): bound qa otel receiver bodies · openclaw/openclaw@83ab0ba fix(lint): clean manifest registry installed checks · openclaw/openclaw@fd648ed fix(scripts): resolve npm package candidates through npm runner · openclaw/openclaw@7a7d9de fix(qa): hide Matrix tool progress marker in workspace · openclaw/openclaw@42f3550 fix(usage): forward cached token usage in chat completions (#82062) · openclaw/openclaw@12e5876 test(codex): align provider claim expectation · openclaw/openclaw@42387af perf(gateway): cache stable plugin index fingerprints · openclaw/openclaw@2babe03 fix(test): scan kitchen rpc readiness logs incrementally · openclaw/openclaw@1d4537a fix(test): fail startup bench on bad samples · openclaw/openclaw@8c6da93 fix(onboard): preserve agents.list and bindings on rerun · openclaw/openclaw@bbdff39 fix: send bare direct Anthropic model ids · openclaw/openclaw@aa0a290
修(fix)之(ci):束(bound)实(real)行(behavior)证(proof)API待(waits) · 开(open)爪(claw)/开(open)爪(claw)@4a8d89f
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main

@@ -1,9 +1,12 @@

11

#!/usr/bin/env node

22

import { readFileSync } from "node:fs";

3+

import { pathToFileURL } from "node:url";

34

import {

5+

DEFAULT_GITHUB_API_TIMEOUT_MS,

46

evaluateClawSweeperExactHeadProof,

57

evaluateRealBehaviorProof,

68

isMaintainerTeamMember,

9+

withGitHubApiTimeout,

710

} from "./real-behavior-proof-policy.mjs";

811912

function escapeCommandValue(value) {

@@ -14,7 +17,14 @@ function escapeCommandValue(value) {

1417

.replace(/:/g, "%3A");

1518

}

161917-

async function fetchProofComments({ owner, repo, issueNumber, tokens }) {

20+

export async function fetchProofComments({

21+

owner,

22+

repo,

23+

issueNumber,

24+

tokens,

25+

fetchImpl = fetch,

26+

timeoutMs = DEFAULT_GITHUB_API_TIMEOUT_MS,

27+

}) {

1828

let lastError;

1929

for (const token of tokens.filter(Boolean)) {

2030

const comments = [];

@@ -25,17 +35,27 @@ async function fetchProofComments({ owner, repo, issueNumber, tokens }) {

2535

);

2636

url.searchParams.set("per_page", "100");

2737

url.searchParams.set("page", String(page));

28-

const response = await fetch(url, {

29-

headers: {

30-

Accept: "application/vnd.github+json",

31-

Authorization: `Bearer ${token}`,

32-

"X-GitHub-Api-Version": "2022-11-28",

33-

},

34-

});

38+

const response = await withGitHubApiTimeout(

39+

`proof comment lookup page ${page}`,

40+

timeoutMs,

41+

(signal) =>

42+

fetchImpl(url, {

43+

headers: {

44+

Accept: "application/vnd.github+json",

45+

Authorization: `Bearer ${token}`,

46+

"X-GitHub-Api-Version": "2022-11-28",

47+

},

48+

signal,

49+

}),

50+

);

3551

if (!response.ok) {

3652

throw new Error(`comments API returned ${response.status}`);

3753

}

38-

const pageComments = await response.json();

54+

const pageComments = await withGitHubApiTimeout(

55+

`proof comment response page ${page}`,

56+

timeoutMs,

57+

() => response.json(),

58+

);

3959

comments.push(...pageComments);

4060

if (pageComments.length < 100) {

4161

break;

@@ -49,69 +69,83 @@ async function fetchProofComments({ owner, repo, issueNumber, tokens }) {

4969

throw lastError ?? new Error("No GitHub token available for proof comment lookup.");

5070

}

517152-

const eventPath = process.env.GITHUB_EVENT_PATH;

53-

if (!eventPath) {

54-

console.error("::error title=Real behavior proof failed::GITHUB_EVENT_PATH is not set.");

55-

process.exit(1);

72+

function isMainModule() {

73+

return Boolean(process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href);

5674

}

577558-

const event = JSON.parse(readFileSync(eventPath, "utf8"));

59-

const pullRequest = event.pull_request;

60-

if (!pullRequest) {

61-

console.log("No pull_request payload found; skipping real behavior proof gate.");

62-

process.exit(0);

63-

}

76+

async function main(env = process.env) {

77+

const eventPath = env.GITHUB_EVENT_PATH;

78+

if (!eventPath) {

79+

console.error("::error title=Real behavior proof failed::GITHUB_EVENT_PATH is not set.");

80+

process.exit(1);

81+

}

648265-

const appToken = process.env.GH_APP_TOKEN;

66-

const org = event.repository?.owner?.login;

67-

const authorLogin = pullRequest.user?.login;

68-

if (appToken && org && authorLogin) {

69-

try {

70-

if (await isMaintainerTeamMember({ token: appToken, org, login: authorLogin })) {

71-

console.log(

72-

`PR author @${authorLogin} is an active member of the ${org}/maintainer team; skipping real behavior proof gate.`,

83+

const event = JSON.parse(readFileSync(eventPath, "utf8"));

84+

const pullRequest = event.pull_request;

85+

if (!pullRequest) {

86+

console.log("No pull_request payload found; skipping real behavior proof gate.");

87+

process.exit(0);

88+

}

89+90+

const appToken = env.GH_APP_TOKEN;

91+

const org = event.repository?.owner?.login;

92+

const authorLogin = pullRequest.user?.login;

93+

if (appToken && org && authorLogin) {

94+

try {

95+

if (await isMaintainerTeamMember({ token: appToken, org, login: authorLogin })) {

96+

console.log(

97+

`PR author @${authorLogin} is an active member of the ${org}/maintainer team; skipping real behavior proof gate.`,

98+

);

99+

process.exit(0);

100+

}

101+

} catch (error) {

102+

console.warn(

103+

`::warning title=Maintainer membership check failed::${escapeCommandValue(error?.message ?? String(error))}`,

73104

);

74-

process.exit(0);

75105

}

76-

} catch (error) {

77-

console.warn(

78-

`::warning title=Maintainer membership check failed::${escapeCommandValue(error?.message ?? String(error))}`,

79-

);

80106

}

81-

}

8210783-

const evaluation = evaluateRealBehaviorProof({ pullRequest });

84-

if (evaluation.passed) {

85-

console.log(evaluation.reason);

86-

process.exit(0);

87-

}

108+

const evaluation = evaluateRealBehaviorProof({ pullRequest });

109+

if (evaluation.passed) {

110+

console.log(evaluation.reason);

111+

process.exit(0);

112+

}

8811389-

const repository = process.env.GITHUB_REPOSITORY;

90-

if ((appToken || process.env.GITHUB_TOKEN) && repository && pullRequest.number) {

91-

const [owner, repo] = repository.split("/");

92-

try {

93-

const comments = await fetchProofComments({

94-

owner,

95-

repo,

96-

issueNumber: pullRequest.number,

97-

tokens: [appToken, process.env.GITHUB_TOKEN],

98-

});

114+

const repository = env.GITHUB_REPOSITORY;

115+

if ((appToken || env.GITHUB_TOKEN) && repository && pullRequest.number) {

116+

const [owner, repo] = repository.split("/");

117+

try {

118+

const comments = await fetchProofComments({

119+

owner,

120+

repo,

121+

issueNumber: pullRequest.number,

122+

tokens: [appToken, env.GITHUB_TOKEN],

123+

});

99124100-

const clawSweeperEvaluation = evaluateClawSweeperExactHeadProof({

101-

pullRequest,

102-

comments,

103-

});

104-

if (clawSweeperEvaluation.passed) {

105-

console.log(clawSweeperEvaluation.reason);

106-

process.exit(0);

125+

const clawSweeperEvaluation = evaluateClawSweeperExactHeadProof({

126+

pullRequest,

127+

comments,

128+

});

129+

if (clawSweeperEvaluation.passed) {

130+

console.log(clawSweeperEvaluation.reason);

131+

process.exit(0);

132+

}

133+

} catch (error) {

134+

console.warn(

135+

`::warning title=Proof verdict comment lookup failed::${escapeCommandValue(error?.message ?? String(error))}`,

136+

);

107137

}

108-

} catch (error) {

109-

console.warn(

110-

`::warning title=Proof verdict comment lookup failed::${escapeCommandValue(error?.message ?? String(error))}`,

111-

);

112138

}

139+140+

const message = `${evaluation.reason} Add after-fix evidence from a real OpenClaw setup in the PR body. Screenshots, recordings, terminal screenshots, console output, redacted runtime logs, linked artifacts, or copied live output count. Unit tests, mocks, snapshots, lint, typechecks, and CI are supplemental only. A maintainer can apply proof: override when appropriate.`;

141+

console.error(`::error title=Real behavior proof required::${escapeCommandValue(message)}`);

142+

process.exit(1);

113143

}

114144115-

const message = `${evaluation.reason} Add after-fix evidence from a real OpenClaw setup in the PR body. Screenshots, recordings, terminal screenshots, console output, redacted runtime logs, linked artifacts, or copied live output count. Unit tests, mocks, snapshots, lint, typechecks, and CI are supplemental only. A maintainer can apply proof: override when appropriate.`;

116-

console.error(`::error title=Real behavior proof required::${escapeCommandValue(message)}`);

117-

process.exit(1);

145+

export const testing = {

146+

fetchProofComments,

147+

};

148+149+

if (isMainModule()) {

150+

await main();

151+

}