mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:00:47 +00:00
test(subagent-announce): fix flaky Windows-only test failure (#31298) (openclaw#31370) thanks @zwffff
Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check (fails on main baseline issues in extensions/googlechat and extensions/phone-control) - pnpm test:e2e src/agents/subagent-announce.format.e2e.test.ts Co-authored-by: zwffff <5809959+zwffff@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -46,6 +46,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- Tests/Subagent announce: set `OPENCLAW_TEST_FAST=1` before importing `subagent-announce` format suites so module-level fast-mode constants are captured deterministically on Windows CI, preventing timeout flakes in nested completion announce coverage. (#31370) Thanks @zwffff.
|
||||
- Gateway/Node dangerous-command parity: include `sms.send` in default onboarding node `denyCommands`, share onboarding deny defaults with the gateway dangerous-command source of truth, and include `sms.send` in phone-control `/phone arm writes` handling so SMS follows the same break-glass flow as other dangerous node commands. Thanks @zpbrent.
|
||||
- Zalo/Pairing auth tests: add webhook regression coverage asserting DM pairing-store reads/writes remain account-scoped, preventing cross-account authorization bleed in multi-account setups. (#26121) Thanks @bmendonca3.
|
||||
- Logging: use local time for logged timestamps instead of UTC, aligning log output with documented local timezone behavior and avoiding confusion during local diagnostics. (#28434) Thanks @liuy.
|
||||
|
||||
@@ -147,8 +147,13 @@ describe("subagent announce formatting", () => {
|
||||
let runSubagentAnnounceFlow: (typeof import("./subagent-announce.js"))["runSubagentAnnounceFlow"];
|
||||
|
||||
beforeAll(async () => {
|
||||
({ runSubagentAnnounceFlow } = await import("./subagent-announce.js"));
|
||||
// Set FAST_TEST_MODE before importing the module to ensure the module-level
|
||||
// constant picks it up. This fixes flaky Windows CI failures where the test
|
||||
// timeout budget is too tight without fast mode enabled.
|
||||
// See: https://github.com/openclaw/openclaw/issues/31298
|
||||
previousFastTestEnv = process.env.OPENCLAW_TEST_FAST;
|
||||
process.env.OPENCLAW_TEST_FAST = "1";
|
||||
({ runSubagentAnnounceFlow } = await import("./subagent-announce.js"));
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
@@ -160,7 +165,8 @@ describe("subagent announce formatting", () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.stubEnv("OPENCLAW_TEST_FAST", "1");
|
||||
// OPENCLAW_TEST_FAST is set in beforeAll before module import
|
||||
// to ensure the module-level constant picks it up.
|
||||
agentSpy
|
||||
.mockClear()
|
||||
.mockImplementation(async (_req: AgentCallRequest) => ({ runId: "run-main", status: "ok" }));
|
||||
|
||||
Reference in New Issue
Block a user