Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
775d622
fix: persist each committed preflight fold as it lands (#3978)
Oct 20, 2026
9be2ec6
test: register issue3978 suite in LIVE_FILES (process-spawning tripwi…
Oct 20, 2026
dbcc6c8
test: harden issue3978 T3 child boot against shard-load cold starts (…
Oct 20, 2026
5722ac7
test: mark the issue3978 T3 child dir as ESM so bare acp-kernel impor…
Oct 20, 2026
6d765e5
Merge branch 'master' into wt-3978-ework-daemon
Oct 23, 2026
12de55b
test: wait for the durable per-fold save before killing the issue3978…
Oct 23, 2026
980f060
Merge remote-tracking branch 'origin/master' into wt-4046-rebase
Oct 23, 2026
a46fd0d
fix(ci): drop the duplicate top-level concurrency key introduced by #…
Oct 23, 2026
683d90b
test: wait for the affinity-chain snapshot before killing the issue39…
Oct 24, 2026
2b8c26d
test(ci): widen the rmrf transient-lock budget past the #4046 win22-1…
Oct 24, 2026
7eee06d
Merge branch 'master' into wt-3978-ework-daemon (conflict: LIVE_FILES…
Oct 24, 2026
305b4f3
sentinel help-merge: bring ci-fixes (177bbce32) into #4046 branch (#4…
Oct 25, 2026
c1d3a19
merge ci-fixes into wt-3978-ework-daemon (#4599 help-merge sweep)
Oct 25, 2026
470098e
merge ci-fixes into wt-3978-ework-daemon (#4599 help-merge sweep)
Oct 25, 2026
bd0fe6f
merge ci-fixes into wt-3978-ework-daemon (#4599 help-merge sweep)
Oct 26, 2026
c8cd6f1
merge ci-fixes into wt-3978-ework-daemon (#4599 help-merge sweep)
Oct 26, 2026
dfadc21
fix(ci): sync lockfile recorded versions with acp-kernel 0.0.165 (#4599)
Oct 26, 2026
f7e9e62
Merge remote-tracking branch 'origin/ci-fixes' into sweep-wip
Oct 26, 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
4 changes: 2 additions & 2 deletions kernel/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions scripts/live-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const LIVE_FILES = [
"tests/issue1958-routed-warn.test.ts",
"tests/issue2752-forward-partial-outcome.test.ts",
"tests/issue3472-mcp-structured-text.test.ts",
// #3978: spawns one short-lived child proxy (SIGKILL mid-test); all ports
// are listen(0)-dynamic, store dirs are per-test mkdtemp, so it runs clean
// at shard concurrency 4 like its neighbors.
"tests/issue3978-preflight-abort-persistence.test.ts",
"tests/issue4341-early-twin-adoption.test.ts",
"tests/issue760-percall-conversation.test.ts",
"tests/issue927-opencode-install.test.ts",
Expand Down
6 changes: 5 additions & 1 deletion src/preflight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { fetchWithTimeout, isTransientUpstreamError, replayMaxAttempts, replayBa
import { dumpSummaryRejection } from "./error-dump.js";
import { proxyDispatcher } from "./upstream-proxy.js";
import { isTlsTrustCode, tlsTrustRemediation, TLS_TRUST_CODES } from "./upstream-fail.js";
import { lastCompressSuffix, type Session } from "./session.js";
import { lastCompressSuffix, markDirty, type Session } from "./session.js";
import { epochConfirmPending } from "./fold-reconcile.js";
import { deadSkipKeys, filterDeadRanges, parseStructuralEmptyVerdict, recordDeadRange } from "./dead-ranges.js";
import { peekRegistryOutputLimit } from "./registry.js";
Expand Down Expand Up @@ -2393,6 +2393,10 @@ export async function preflightCompress(deps: PreflightDeps, messages: CoreMessa
deps.session.stats.lastInputTokens += defaultCountTokens(summary);
appliedThisRound += 1;
result.compressedRanges += 1;
// #3978: persist each committed fold as it lands — a client-disconnect
// abort early-returns before any post-loop markDirty, and a retry under a
// new session id continues only if the parent's partial blocks are loadable.
markDirty(deps.session);
return true;
};
// #2678/#2667: fold several disjoint ranges in ONE external-summary call
Expand Down
478 changes: 478 additions & 0 deletions tests/issue3978-preflight-abort-persistence.test.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/tmp-rm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ test("rmrf: a transient storm past the budget throws after the full ladder", ()
} finally {
_setRmImplForTest();
}
assert.equal(calls, 10, "one attempt + all nine backoffs, then give up");
assert.ok(Date.now() - t0 >= 9400, "paid the 25..3200ms ladder (~9.6s)");
assert.equal(calls, 12, "one attempt + all eleven backoffs, then give up");
assert.ok(Date.now() - t0 >= 15750, "paid the 25..3200ms ladder (~16s)");
});

test("rmrf: non-transient errors throw at once, no backoff", () => {
Expand Down
8 changes: 7 additions & 1 deletion tests/tmp-rm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ import { rmSync } from "node:fs";
// family). A probe confirmed the harness holds NO self-handle at rmrf time
// (flushAllSessions closes the store's shadow first), so this is not masking
// an in-process leak: it re-sizes the external-lock budget to the c=4 reality.
const RETRY_DELAYS_MS = [25, 50, 100, 200, 400, 800, 1600, 3200, 3200] as const;
//
// #4046 CI lane (win22-1 @ a46fd0d1a): the #2771 corrupt-index proof then
// spent the full ~9.6s ladder on EBUSY unlinking index.db — the same
// external-lock family with a longer-lived lock under shard load; extend the
// flat tail rather than the exponential front (the early rungs exist to win
// cheap races without paying for the slow ones).
const RETRY_DELAYS_MS = [25, 50, 100, 200, 400, 800, 1600, 3200, 3200, 3200, 3200] as const;

/** Sync sleep that is legal on any thread in Node (blocks the event loop —
* exactly what a teardown-path retry wants; no pending I/O ordering to keep). */
Expand Down
Loading