Fix dreaming replay, repair polluted artifacts, and gate wiki tabs (#65138)

* fix(active-memory): preserve parent channel context for recall runs

* fix(active-memory): keep recall runs on the resolved channel

* fix(active-memory): prefer resolved recall channel over wrapper hints

* fix(active-memory): trust explicit recall channel hints

* fix(active-memory): rank recall channel fallbacks by trust

* Fix dreaming replay and recovery flows

* fix: prevent dreaming event loss and diary write races

* chore: add changelog entry for memory fixes

* fix: harden dreaming repair and diary writes

* fix: harden dreaming artifact archive naming
This commit is contained in:
Tak Hoffman
2026-04-12 00:25:11 -05:00
committed by GitHub
parent 5543925cd2
commit 847739d82c
45 changed files with 2016 additions and 148 deletions

View File

@@ -1033,7 +1033,10 @@ function buildPluginDebugLine(params: {
if (fallback) {
debugParts.push(`fallback=${fallback}`);
}
if (typeof params.searchDebug?.searchMs === "number" && Number.isFinite(params.searchDebug.searchMs)) {
if (
typeof params.searchDebug?.searchMs === "number" &&
Number.isFinite(params.searchDebug.searchMs)
) {
debugParts.push(`searchMs=${Math.max(0, Math.round(params.searchDebug.searchMs))}`);
}
if (typeof params.searchDebug?.hits === "number" && Number.isFinite(params.searchDebug.hits)) {
@@ -1220,7 +1223,9 @@ function normalizeSearchDebug(value: unknown): ActiveMemorySearchDebug | undefin
: undefined;
}
function readActiveMemorySearchDebugFromRunResult(result: unknown): ActiveMemorySearchDebug | undefined {
function readActiveMemorySearchDebugFromRunResult(
result: unknown,
): ActiveMemorySearchDebug | undefined {
const record = asRecord(result);
const meta = asRecord(record?.meta);
return (