Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
7695026
test: wait for state instead of fixed timing in three flaky tests
yiliang114 Sep 2, 2026
40eff54
fix(release): retry a flaky workspace test instead of failing the rel…
yiliang114 Sep 2, 2026
8f63b43
fix(acp): keep a failing late-drain recovery from ending the process
yiliang114 Sep 2, 2026
6ef630d
fix(release): let the surviving-hook test's descendant outlive the de…
yiliang114 Sep 2, 2026
3526104
fix(deps): update vulnerable production packages
yiliang114 Sep 2, 2026
3c5e95c
chore(vscode-ide-companion): regenerate NOTICES.txt for bumped deps
yiliang114 Sep 2, 2026
53eebfa
test(release): align widened waits with per-test budgets and lane-awa…
yiliang114 Sep 2, 2026
d6ebe03
docs(test): correct two comments that now describe the opposite of th…
yiliang114 Sep 2, 2026
bb72ad3
test(ci): give the autofix workflow suite headroom over host contention
Sep 3, 2026
cd0b91c
test(cli): pin the late drain recovery guard against unhandled reject…
yiliang114 Sep 3, 2026
8351379
Merge branch 'main' into fix/flaky-release-tests
yiliang114 Sep 3, 2026
3bf8283
test(core): size the surviving-hook timeout fixture for loaded startup
yiliang114 Sep 3, 2026
329e134
fix(ci): isolate Maven config per SDK Java job
yiliang114 Sep 3, 2026
f20fcc1
Merge remote updates into CI fix
yiliang114 Sep 3, 2026
a4729e9
test(serve): wait for the shared session/list waiter before cutting a…
yiliang114 Sep 3, 2026
db1069c
test(serve): skip an interface that vanished mid-suite instead of fai…
yiliang114 Sep 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion packages/cli/src/serve/server/session-pr-refresh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ import {
startSessionPrRefreshTimer,
} from './session-pr-refresh.js';

// dispose() stops the next tick but does not await the sweep already in
// flight, so a sweep can still be writing under the temp tree while teardown
// walks it — recursive rm then fails with ENOTEMPTY when a file lands between
// its readdir and rmdir. Retry so cleanup waits the writer out instead of
// failing a test that already passed.
const removeTempTree = (dir: string) =>
fsp.rm(dir, {
recursive: true,
force: true,
maxRetries: 10,
retryDelay: 50,
});

// Delegating spy: the Aone tests seed a real repository, so resolution must
// really run — the spy only makes its per-sweep cost observable.
const aoneMocks = vi.hoisted(() => ({
Expand Down Expand Up @@ -1927,7 +1940,7 @@ describe('startSessionPrRefreshTimer', () => {
vi.useRealTimers();
delete process.env['QWEN_RUNTIME_DIR'];
for (const dir of [baseDir, trustedCwd, untrustedCwd]) {
await fsp.rm(dir, { recursive: true, force: true });
await removeTempTree(dir);
}
});

Expand Down
10 changes: 8 additions & 2 deletions packages/core/src/hooks/hook-runner.process.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,13 @@ setInterval(() => {}, 1000);
input,
);

descendantPid = await readPid(descendantPidPath);
// The root's 300ms hook timeout can fire before the descendant node
// process has started far enough to write its pid file, so poll for
// the file instead of reading it once the hook returns.
await waitFor(async () => {
descendantPid = await readPid(descendantPidPath);
return descendantPid !== undefined;
}, 10_000);
expect(descendantPid).toBeDefined();
expect(result).toMatchObject({
success: false,
Expand All @@ -919,7 +925,7 @@ setInterval(() => {}, 1000);
}
await rm(tempDir, { recursive: true, force: true });
}
}, 10_000);
}, 30_000);

it('delivers complete large input after the parent exits', async () => {
const tempDir = await mkdtemp(join(tmpdir(), 'qwen-hook-input-'));
Expand Down
26 changes: 16 additions & 10 deletions packages/web-shell/client/components/MessageList.dom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,19 @@ const nextFrame = () =>
() =>
new Promise<void>((resolve) => requestAnimationFrame(() => resolve())),
);
// A fixed frame budget expires early on a loaded CI host: the frames still
// tick, but the effect they were meant to flush is queued behind everything
// else on the box. Poll frames against a wall-clock deadline instead, so the
// wait stretches with the machine rather than with a frame count. The bound
// stays well inside the 60s per-test budget this config gives shared ECS
// runners, so a wait that never resolves still fails as an assertion.
const FLUSH_DEADLINE_MS = 10_000;
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
const waitForFrames = async (predicate: () => boolean) => {
const deadline = Date.now() + FLUSH_DEADLINE_MS;
while (!predicate() && Date.now() < deadline) {
await nextFrame();
}
};
const mockMessageListWidth = (width: number) =>
vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({
width,
Expand Down Expand Up @@ -1401,15 +1414,8 @@ describe('MessageList — turn collapse (DOM)', () => {
hasOlderHistory: true,
onLoadOlderHistory,
});
const waitForLoadCount = async (count: number) => {
for (
let frame = 0;
frame < 32 && onLoadOlderHistory.mock.calls.length < count;
frame += 1
) {
await nextFrame();
}
};
const waitForLoadCount = (count: number) =>
waitForFrames(() => onLoadOlderHistory.mock.calls.length >= count);
const list = c.querySelector(
'[data-web-shell-message-list]',
) as HTMLElement;
Expand Down Expand Up @@ -2536,7 +2542,7 @@ describe('MessageList — turn collapse (DOM)', () => {
resolveLoad();
await Promise.resolve();
});
await nextFrame();
await waitForFrames(() => list.scrollTop === 600);
// The keep-open re-expanded the turn, and the anchor restore followed
// the re-keyed run to a visible row instead of dropping: the scroll
// position moved with the prepended history.
Expand Down
Loading