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

推荐订阅源

H
Help Net Security
T
ThreatConnect
SecWiki News
SecWiki News
F
Future of Privacy Forum
AWS News Blog
AWS News Blog
C
Cisco Blogs
A
Arctic Wolf
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Scott Helme
Scott Helme
V
V2EX
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
K
Kaspersky official blog
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
NISL@THU
NISL@THU
Microsoft Azure Blog
Microsoft Azure Blog
量子位
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
Security Latest
Security Latest
M
Microsoft Research Blog - Microsoft Research
Google Online Security Blog
Google Online Security Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
F
Fox-IT International blog
S
Security @ Cisco Blogs
博客园 - 司徒正美
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Comments on: Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 最新话题
GbyAI
GbyAI
Project Zero
Project Zero
腾讯CDC
T
Tailwind CSS Blog

Recent Commits to openclaw:main

refactor: reuse realtime output activity in google meet (#86665) fix(test): harden bundled plugin install sweep · openclaw/openclaw@84929e4 fix: prefer source public artifacts in source checkouts · openclaw/openclaw@c87957d test: type child process spawn mock · openclaw/openclaw@65a2105 test(installer): cover rocky cli installs · openclaw/openclaw@fe33747 docs: update changelog for landed fixes · openclaw/openclaw@da831e2 fix(ui): keep local file markdown links inert · openclaw/openclaw@fc2d2d5 fix(update): avoid duplicate plugin smoke failures · openclaw/openclaw@342bde2 fix(gateway): cap retained compaction checkpoint bytes · openclaw/openclaw@d7361ef fix: stabilize tests and reduce plugin memory churn · openclaw/openclaw@c1a026a perf: reduce runtime metadata hotpath churn · openclaw/openclaw@1d21224 refactor: share realtime output activity tracking (#86661) fix(memory-wiki): bound compile page reads (#86660) · openclaw/openclaw@acbdb8c test(qa-matrix): use larger media coverage jpeg fix(cli): reject unknown command help roots (#81083) (thanks @YB0y) · openclaw/openclaw@bec7d56 test: improve test profiling helpers · openclaw/openclaw@68ab48b perf: reduce fuzzy matching allocations · openclaw/openclaw@ec7ad3b perf: reduce runtime cache churn · openclaw/openclaw@1531fe2 refactor: reuse forced consult coordinator in discord voice (#86656) · openclaw/openclaw@0164fd5 fix(scripts): drain codex-cli metadata stdout (#84239) (thanks @Iftek… fix(test): avoid discord voice tts activation tax · openclaw/openclaw@75ac0b5 fix(codex): disable native thread personality (#85891) (thanks @lastg… · openclaw/openclaw@0f35ec2 Refactor realtime voice turn context tracking (#86650) fix(discord): surface silent reply-delivery skips and remove runtime.… · openclaw/openclaw@3a48366 test(discord): cover deliver-lambda abort-skip path via processDiscor… · openclaw/openclaw@48adcb1 docs: update changelog for landed bug fixes · openclaw/openclaw@75c6cf2 test(qa-matrix): use valid media coverage jpeg · openclaw/openclaw@0f54221 fix(gmail-watcher): strip listeners from old process after settleProc… · openclaw/openclaw@0a38932 fix(gmail-watcher): prevent TDZ in settleProcess and guard exit handl… · openclaw/openclaw@94968c8 fix(hooks): stop existing Gmail watcher before re-entry to prevent leaks fix(codex): honor yolo app-server approval policy · openclaw/openclaw@7b30291 fix(usage-cost): invalidate durable cache on missing-cost semantics c… · openclaw/openclaw@9c79a0f fix(usage-cost): preserve transport-recorded positive cost for unpric… · openclaw/openclaw@6e85869 fix(usage-cost): only flag catalog-default zeros, preserve operator-c… · openclaw/openclaw@1670249 fix: treat zero-rate usage cost as unknown · openclaw/openclaw@116c600 fix(usage-cost): surface unpriced-model spend as missingCostEntries i… · openclaw/openclaw@1cc0a96 fix(irc): normalize channel route ids · openclaw/openclaw@9cb1e47 test(irc): cover transient channel join · openclaw/openclaw@c4c80ce fix(irc): store inbound channel routes as channel:#name and join befo… · openclaw/openclaw@63dee51 fix(test): harden macos onboarding e2e · openclaw/openclaw@cd96542 fix(agents): strip markdown code spans from IDENTITY.md values and la… · openclaw/openclaw@55c9a6b perf: reduce runtime cache churn · openclaw/openclaw@5b6d03e fix(pi-runner): flush blocks after compaction retry (#85288) (thanks … · openclaw/openclaw@0d4575a fix(gateway): abort stale agent runs on restart · openclaw/openclaw@a122d80 fix(ui): harden control e2e browser setup · openclaw/openclaw@4424daf fix(telegram): keep overlapping DM replies deliverable (#85361) (than… · openclaw/openclaw@0f67dfd fix(openai): route compaction through Codex auth provider (#86408) · openclaw/openclaw@f4cfa01 refactor: share realtime forced consult coordination · openclaw/openclaw@5dccba7 test(qa-lab): add runtime confidence reports build: refresh dependency pins (#86628) · openclaw/openclaw@cda7c30 test: port release validation stabilizers · openclaw/openclaw@9f7485e fix(cron): stop forcing message tool for delivery · openclaw/openclaw@c51fa0d fix(google): omit request config with cached content test: stabilize release validation test harnesses fix(test): bound kitchen sink command output · openclaw/openclaw@f1197ed fix(discord): stabilize realtime wake-name feedback test(config): guard legacy agentRuntime regression perf: precompute audio resample kernels fix(codex): allow env api-key app-server bootstrap · openclaw/openclaw@009b18c refactor: reuse shared coercion helpers (#86419) · openclaw/openclaw@77d9ac3 fix(cron): preserve runtime snapshot for isolated delivery · openclaw/openclaw@a98660e fix(test): model active assistant failover attempts · openclaw/openclaw@c55bee5 docs: update changelog for bug sweep landings test: fix mock signatures for tsgo · openclaw/openclaw@aa05c5c docs: document fail-closed behavior for rejected modelPatterns · openclaw/openclaw@36f269d fix(security): guard plugin modelPatterns with compileSafeRegex · openclaw/openclaw@117e082 docs(manifest): note safe-regex validation for modelPatterns · openclaw/openclaw@e7c7ee4 style: use bracket notation for __openclaw to satisfy no-underscore-d… · openclaw/openclaw@9a6c161 fix(security): escape field names in transcript regex extraction · openclaw/openclaw@fe8d99d test: tighten oversized metadata assertion to check exact id in __ope… · openclaw/openclaw@aff8e64 fix(logging): exit on stdout/stderr EPIPE instead of spinning · openclaw/openclaw@2aa5f17 fix(logging): preserve failure exit on EPIPE · openclaw/openclaw@623a60a fix(logging): keep string failure codes on EPIPE · openclaw/openclaw@78a1e7d fix(scripts): docs-spellcheck.sh fails on bash 3.2 with set -u · openclaw/openclaw@fef57f9 fix(docs): keep spellcheck bash 3.2-compatible · openclaw/openclaw@778fa87 fix(test): assert e2e agent reply payloads · openclaw/openclaw@74f3a1e test(gateway): pin live gateway models to pi runtime · openclaw/openclaw@c88f660 perf: speed up local TUI startup · openclaw/openclaw@a0023fb refactor: share realtime voice activation helpers (#86615) · openclaw/openclaw@d0ab0d9 fix(feishu): render native presentation buttons (#86588) · openclaw/openclaw@170e0aa fix(test): narrow plugin gauntlet prebuild · openclaw/openclaw@423f7d2 fix: route Discord gateway metadata through proxy (#86601) · openclaw/openclaw@5b6d409 fix: tighten Discord voice wake matching (#86595) · openclaw/openclaw@f00a912 refactor(logging): share diagnostic message lifecycle · openclaw/openclaw@baab4cf fix(cron): restore suspended lanes to default concurrency · openclaw/openclaw@e844d1d fix(auth): emit one-shot doctor-pointer warning for Keychain-only leg… · openclaw/openclaw@a61d530 fix(codex): recover stale preflight bindings (#86602) · openclaw/openclaw@9b9d897 fix(cron): preserve unsupported payload rows on writes · openclaw/openclaw@c916906 fix(cron): canonicalize preserved row ids · openclaw/openclaw@985bc93 test(cron): pin sequential duration regression · openclaw/openclaw@8351556 docs: update changelog for cron preservation (#86415) · openclaw/openclaw@bdc6b32 build: bump qs to patched release · openclaw/openclaw@9330b76 fix(status): prefer active OAuth for runtime aliases chore(acpx): bump bundled acpx to 0.10.0 · openclaw/openclaw@407cf8e docs: make changelog release-owned · openclaw/openclaw@c0f2d89 fix(google): stop appending preview to flash lite · openclaw/openclaw@915c820 docs: update changelog for bug sweep landings · openclaw/openclaw@cd7994f fix(crabbox): detect timed macos js commands · openclaw/openclaw@44bb0be fix(mantis): release telegram user leases on startup failure · openclaw/openclaw@cf27567 fix(agents): deliver stale cron media completions · openclaw/openclaw@f01b2a8
fix: dampen repeated device-required probes · openclaw/openclaw@399c692
ferminquant · 2026-05-26 · via Recent Commits to openclaw:main

@@ -180,6 +180,31 @@ function expectProbeAuthFields(

180180

}

181181

}

182182183+

let probeUrlSeq = 0;

184+185+

function nextProbeUrl(label: string): string {

186+

probeUrlSeq += 1;

187+

return `ws://127.0.0.1:18789/${label}-${probeUrlSeq}`;

188+

}

189+190+

function setDeviceRequiredProbeMode(): void {

191+

deviceIdentityState.cachedToken = null;

192+

gatewayClientState.startMode = "close";

193+

gatewayClientState.close = { code: 1008, reason: "device identity required" };

194+

}

195+196+

function lastGatewayClientOptions(): Record<string, unknown> | null {

197+

return gatewayClientState.options;

198+

}

199+200+

async function runLightweightProbe(url: string): Promise<Awaited<ReturnType<typeof probeGateway>>> {

201+

return await probeGateway({

202+

url,

203+

timeoutMs: 1_000,

204+

includeDetails: false,

205+

});

206+

}

207+183208

describe("probeGateway", () => {

184209

beforeEach(() => {

185210

deviceIdentityState.throwOnLoad = false;

@@ -536,4 +561,160 @@ describe("probeGateway", () => {

536561

close: null,

537562

});

538563

});

564+565+

it("short-circuits later unpaired probes after repeated device-required closes", async () => {

566+

setDeviceRequiredProbeMode();

567+

const url = nextProbeUrl("device-required");

568+569+

for (let i = 0; i < 3; i += 1) {

570+

gatewayClientState.options = null;

571+

const result = await runLightweightProbe(url);

572+573+

expectProbeResultFields(result, {

574+

ok: false,

575+

error: "gateway closed (1008): device identity required",

576+

close: { code: 1008, reason: "device identity required" },

577+

});

578+

expect(lastGatewayClientOptions()?.url).toBe(url);

579+

}

580+581+

const startCalls = gatewayClientState.startCalls;

582+

gatewayClientState.options = null;

583+584+

const result = await runLightweightProbe(url);

585+586+

expectProbeResultFields(result, {

587+

ok: false,

588+

connectLatencyMs: null,

589+

error: "gateway closed (1008): device identity required",

590+

close: {

591+

code: 1008,

592+

reason: "device identity required",

593+

hint: "probe short-circuited by recent device-required rejections",

594+

},

595+

health: null,

596+

status: null,

597+

presence: null,

598+

configSnapshot: null,

599+

});

600+

expectProbeAuthFields(result, {

601+

role: null,

602+

scopes: [],

603+

capability: "unknown",

604+

});

605+

expect(gatewayClientState.startCalls).toBe(startCalls);

606+

expect(lastGatewayClientOptions()).toBeNull();

607+

});

608+609+

it("does not cache other policy-close reasons", async () => {

610+

deviceIdentityState.cachedToken = null;

611+

gatewayClientState.startMode = "close";

612+

gatewayClientState.close = { code: 1008, reason: "pairing required" };

613+

const url = nextProbeUrl("pairing-required");

614+615+

for (let i = 0; i < 4; i += 1) {

616+

gatewayClientState.options = null;

617+

const result = await runLightweightProbe(url);

618+619+

expect(result.close).toEqual({ code: 1008, reason: "pairing required" });

620+

expect(lastGatewayClientOptions()?.url).toBe(url);

621+

}

622+

});

623+624+

it("keeps device-required probe cache entries per URL", async () => {

625+

setDeviceRequiredProbeMode();

626+

const firstUrl = nextProbeUrl("first-device-required");

627+

const secondUrl = nextProbeUrl("second-device-required");

628+629+

for (let i = 0; i < 3; i += 1) {

630+

await runLightweightProbe(firstUrl);

631+

}

632+633+

gatewayClientState.options = null;

634+

const result = await runLightweightProbe(secondUrl);

635+636+

expect(result.close).toEqual({ code: 1008, reason: "device identity required" });

637+

expect(result.close?.hint).toBeUndefined();

638+

expect(lastGatewayClientOptions()?.url).toBe(secondUrl);

639+

});

640+641+

it("expires device-required probe cache entries after the TTL", async () => {

642+

setDeviceRequiredProbeMode();

643+

const url = nextProbeUrl("ttl-device-required");

644+

let nowMs = 1_000_000;

645+

const dateNowSpy = vi.spyOn(Date, "now").mockImplementation(() => nowMs);

646+

try {

647+

for (let i = 0; i < 3; i += 1) {

648+

await runLightweightProbe(url);

649+

}

650+651+

nowMs += 5 * 60_000;

652+

gatewayClientState.options = null;

653+

const result = await runLightweightProbe(url);

654+655+

expect(result.close).toEqual({ code: 1008, reason: "device identity required" });

656+

expect(result.close?.hint).toBeUndefined();

657+

expect(lastGatewayClientOptions()?.url).toBe(url);

658+

} finally {

659+

dateNowSpy.mockRestore();

660+

}

661+

});

662+663+

it("lets paired probes clear prior device-required failures", async () => {

664+

setDeviceRequiredProbeMode();

665+

const url = nextProbeUrl("paired-device-required");

666+667+

for (let i = 0; i < 3; i += 1) {

668+

await runLightweightProbe(url);

669+

}

670+671+

deviceIdentityState.cachedToken = {

672+

token: "cached-operator-token",

673+

role: "operator",

674+

scopes: ["operator.read"],

675+

updatedAtMs: 1,

676+

};

677+

gatewayClientState.startMode = "hello";

678+

gatewayClientState.options = null;

679+680+

const success = await runLightweightProbe(url);

681+682+

expect(success.ok).toBe(true);

683+

expect(lastGatewayClientOptions()?.url).toBe(url);

684+

expect(lastGatewayClientOptions()?.deviceIdentity).toEqual(deviceIdentityState.value);

685+686+

setDeviceRequiredProbeMode();

687+

gatewayClientState.options = null;

688+

const afterSuccess = await runLightweightProbe(url);

689+690+

expect(afterSuccess.close).toEqual({ code: 1008, reason: "device identity required" });

691+

expect(afterSuccess.close?.hint).toBeUndefined();

692+

expect(lastGatewayClientOptions()?.url).toBe(url);

693+

});

694+695+

it("does not short-circuit explicit-auth probes after unauthenticated failures", async () => {

696+

setDeviceRequiredProbeMode();

697+

const url = nextProbeUrl("explicit-auth-device-required");

698+699+

for (let i = 0; i < 3; i += 1) {

700+

await runLightweightProbe(url);

701+

}

702+703+

gatewayClientState.startMode = "hello";

704+

gatewayClientState.helloAuth = {};

705+

gatewayClientState.options = null;

706+707+

const result = await probeGateway({

708+

url,

709+

auth: { token: "explicit-token" },

710+

timeoutMs: 1_000,

711+

includeDetails: false,

712+

});

713+714+

expect(result.ok).toBe(true);

715+

expectProbeAuthFields(result, { capability: "connected_no_operator_scope" });

716+

expect(lastGatewayClientOptions()?.url).toBe(url);

717+

expect(lastGatewayClientOptions()?.token).toBe("explicit-token");

718+

expect(lastGatewayClientOptions()?.deviceIdentity).toBeNull();

719+

});

539720

});