fix(archive): preserve prepared sessions across restarts

This commit is contained in:
DCCONSTRUCTIONS
2026-07-18 11:08:27 +03:00
parent aa3680948f
commit 574a494759
13 changed files with 398 additions and 132 deletions
@@ -160,7 +160,7 @@ test("session catalog exposes authoritative background preparation state", () =>
});
});
test("saved-session rows use only authoritative ready, processing and error states", () => {
test("saved-session rows distinguish durable, active, cold and failed states", () => {
const makeDecoded = (state, overrides = {}) => decodeObservationSessionCatalog({
items: [session({
status: "interrupted",
@@ -187,7 +187,7 @@ test("saved-session rows use only authoritative ready, processing and error stat
observationSessionVisualState(makeDecoded("failed", { status: "recording" })),
"error",
);
assert.equal(observationSessionVisualState(makeDecoded(null)), "error");
assert.equal(observationSessionVisualState(makeDecoded(null)), "cold");
assert.equal(
observationSessionVisualState(makeDecoded(null, { status: "recording" })),
"processing",
@@ -206,6 +206,7 @@ test("saved-session rows use only authoritative ready, processing and error stat
);
assert.equal(observationSessionVisualLabel("ready"), "Готово");
assert.equal(observationSessionVisualLabel("processing"), "Обработка");
assert.equal(observationSessionVisualLabel("cold"), "Подготовить");
assert.equal(observationSessionVisualLabel("error"), "Ошибка");
});