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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
B
Blog
腾讯CDC
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
罗磊的独立博客
月光博客
月光博客
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
V
Visual Studio Blog
I
InfoQ
有赞技术团队
有赞技术团队
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
Blog — PlanetScale
Blog — PlanetScale

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(matrix): close owner-side device verification loop on...
nklock · 2026-04-30 · via Recent Commits to openclaw:main

@@ -520,7 +520,7 @@ describe("MatrixVerificationManager", () => {

520520

}

521521

});

522522523-

it("does not cross-sign the other own device after auto-confirmed self-verification SAS", async () => {

523+

it("cross-signs the other own device after auto-confirmed self-verification SAS", async () => {

524524

vi.useFakeTimers();

525525

const { confirm, verifier } = createSasVerifierFixture({

526526

decimal: [6158, 1986, 3513],

@@ -541,12 +541,81 @@ describe("MatrixVerificationManager", () => {

541541

await vi.advanceTimersByTimeAsync(30_100);

542542543543

expect(confirm).toHaveBeenCalledTimes(1);

544-

expect(trustOwnDeviceAfterSas).not.toHaveBeenCalled();

544+

expect(trustOwnDeviceAfterSas).toHaveBeenCalledWith("OTHERDEVICE");

545545

} finally {

546546

vi.useRealTimers();

547547

}

548548

});

549549550+

it("confirmVerificationSas awaits the verifier's verify promise before resolving", async () => {

551+

let resolveVerify!: () => void;

552+

const verifyPromise = new Promise<void>((res) => {

553+

resolveVerify = res;

554+

});

555+

const verifyImpl = vi.fn(() => verifyPromise);

556+

const { confirm, verifier } = createSasVerifierFixture({

557+

decimal: [111, 222, 333],

558+

emoji: [["cat", "Cat"]],

559+

verifyImpl,

560+

});

561+

const trustOwnDeviceAfterSas = vi.fn(async () => {});

562+

const request = new MockVerificationRequest({

563+

isSelfVerification: true,

564+

otherDeviceId: "OTHERDEVICE",

565+

transactionId: "txn-await-verify",

566+

initiatedByMe: true,

567+

verifier,

568+

});

569+

const manager = new MatrixVerificationManager({ trustOwnDeviceAfterSas });

570+

const tracked = manager.trackVerificationRequest(request);

571+572+

await manager.startVerification(tracked.id, "sas");

573+

expect(verifyImpl).toHaveBeenCalledTimes(1);

574+575+

let confirmResolved = false;

576+

const confirmPromise = manager.confirmVerificationSas(tracked.id).then(() => {

577+

confirmResolved = true;

578+

});

579+580+

// Yield once so confirmSasForSession + trustOwnDeviceAfterSas finish, but

581+

// verifyPromise stays pending. confirmVerificationSas must still be

582+

// blocked awaiting verifyPromise.

583+

await Promise.resolve();

584+

await Promise.resolve();

585+

expect(confirm).toHaveBeenCalledTimes(1);

586+

expect(trustOwnDeviceAfterSas).toHaveBeenCalledWith("OTHERDEVICE");

587+

expect(confirmResolved).toBe(false);

588+589+

resolveVerify();

590+

await confirmPromise;

591+

expect(confirmResolved).toBe(true);

592+

});

593+594+

it("confirmVerificationSas surfaces a verifier-promise rejection on session.error", async () => {

595+

const verifyImpl = vi.fn(async () => {

596+

throw new Error("verifier rejected mid-protocol");

597+

});

598+

const { verifier } = createSasVerifierFixture({

599+

decimal: [111, 222, 333],

600+

emoji: [["cat", "Cat"]],

601+

verifyImpl,

602+

});

603+

const request = new MockVerificationRequest({

604+

isSelfVerification: true,

605+

otherDeviceId: "OTHERDEVICE",

606+

transactionId: "txn-verify-rejects",

607+

initiatedByMe: true,

608+

verifier,

609+

});

610+

const manager = new MatrixVerificationManager();

611+

const tracked = manager.trackVerificationRequest(request);

612+613+

await manager.startVerification(tracked.id, "sas");

614+

const summary = await manager.confirmVerificationSas(tracked.id);

615+616+

expect(summary.error).toMatch(/verifier rejected mid-protocol/);

617+

});

618+550619

it("does not auto-confirm SAS for verifications initiated by this device", async () => {

551620

vi.useFakeTimers();

552621

const confirm = vi.fn(async () => {});