feat: restore legacy named playlist workflows

This commit is contained in:
2026-07-12 11:59:18 +09:00
parent a481c96c39
commit af80c36cde
52 changed files with 9261 additions and 83 deletions

View File

@@ -361,6 +361,29 @@ test("only entries bound to a correlated fresh read are playable", () => {
viRead)), false);
});
test("enabled replacement transfers only the correlated manual-list read capability", () => {
const netRead = workflow.normalizeNetSellDataResponse({
requestId,
audience: "FOREIGN",
rows: rows()
}, { requestId, audience: "FOREIGN" });
const entry = workflow.createNetSellPlaylistEntry("FOREIGN", {
id: "entry_net_toggle",
fadeDuration: 6
}, netRead);
const replacement = workflow.withEnabled(entry, false);
assert.notEqual(replacement, entry);
assert.equal(entry.enabled, true);
assert.equal(replacement.enabled, false);
assert.equal(workflow.isPlaylistEntryPlayable(replacement), true);
assert.equal(workflow.withEnabled({ ...entry }, false), null);
assert.equal(workflow.withEnabled(workflow.createNetSellPlaylistEntry("FOREIGN", {
id: "entry_net_toggle_untrusted",
fadeDuration: 6
}), false), null);
});
test("request identifiers and option bounds are strict", () => {
assert.throws(() => workflow.createStatusRequest("bad id"));
assert.throws(() => workflow.createNetSellPlaylistEntry("FOREIGN", {