feat: restore legacy named playlist workflows
This commit is contained in:
@@ -209,6 +209,25 @@ test("legacy signature round-trips only the exact verified entry", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("enabled replacement preserves the branded foreign-index proof immutably", () => {
|
||||
const storedRaw = raw("S&P500", "20일", 6, true);
|
||||
const pending = workflow.classify(storedRaw, {
|
||||
id: "foreign_toggle", fadeDuration: 6
|
||||
});
|
||||
const normalized = workflow.normalizeResponse(response("load_toggle", [pending]),
|
||||
"load_toggle", [pending]);
|
||||
const entry = workflow.materialize(pending, normalized.rows[0]);
|
||||
const replacement = workflow.withEnabled(entry, false);
|
||||
|
||||
assert.notEqual(replacement, entry);
|
||||
assert.equal(Object.isFrozen(replacement), true);
|
||||
assert.equal(entry.enabled, true);
|
||||
assert.equal(replacement.enabled, false);
|
||||
assert.equal(workflow.isMaterializedEntry(replacement), true);
|
||||
assert.equal(workflow.matchesRaw(replacement, { ...storedRaw, enabled: false }), true);
|
||||
assert.equal(workflow.withEnabled({ ...entry }, false), null);
|
||||
});
|
||||
|
||||
test("bridge errors are request-bound and never retryable", () => {
|
||||
const error = {
|
||||
requestId: "load_error",
|
||||
|
||||
Reference in New Issue
Block a user