test: enforce Scene 11 decision navigation
This commit is contained in:
@@ -12,7 +12,6 @@ describe("requirementForDemoBeat", () => {
|
||||
["run-from-deployment", "graph", "run_start"],
|
||||
["typed-human-boundary", "interrupt", "interrupt"],
|
||||
["typed-human-boundary", "approval", "interrupt"],
|
||||
["typed-human-boundary", "cancel", "interrupt"],
|
||||
["resume-output-evidence", "resume", "run_resume"],
|
||||
["resume-output-evidence", "output", "run_resume"],
|
||||
["resume-output-evidence", "trace", "trace_read"],
|
||||
@@ -20,6 +19,13 @@ describe("requirementForDemoBeat", () => {
|
||||
expect(requirementForDemoBeat(sceneId, beatId).requiredStage).toBe(stage);
|
||||
});
|
||||
|
||||
it("has no requirement for the removed Scene 11 cancel beat", () => {
|
||||
expect(requirementForDemoBeat("typed-human-boundary", "cancel")).toEqual({
|
||||
requiredStage: null,
|
||||
reason: "No demo replay state needed.",
|
||||
});
|
||||
});
|
||||
|
||||
it("returns no required stage for non-demo beats", () => {
|
||||
expect(requirementForDemoBeat("thesis", "title")).toEqual({
|
||||
requiredStage: null,
|
||||
|
||||
@@ -42,10 +42,6 @@ const requirements: Readonly<Record<string, DemoBeatRequirement>> = {
|
||||
requiredStage: "interrupt",
|
||||
reason: "Approval beat needs the typed review payload before controls can act.",
|
||||
},
|
||||
"typed-human-boundary/cancel": {
|
||||
requiredStage: "interrupt",
|
||||
reason: "Cancel beat needs the review payload but no submitted replay evidence.",
|
||||
},
|
||||
"resume-output-evidence/resume": {
|
||||
requiredStage: "run_resume",
|
||||
reason: "Resume beat needs the recorded resume operation.",
|
||||
|
||||
@@ -87,4 +87,20 @@ describe("storyboard navigation", () => {
|
||||
focusPath: [],
|
||||
});
|
||||
});
|
||||
|
||||
it("advances Scene 11 directly from interrupt to approval, then Scene 12", () => {
|
||||
const interrupt = { kind: "main", sceneId: "typed-human-boundary", beatId: "interrupt", focusPath: [] } as const;
|
||||
const approval = { kind: "main", sceneId: "typed-human-boundary", beatId: "approval", focusPath: [] } as const;
|
||||
|
||||
expect(nextMainLocation(interrupt)).toEqual(approval);
|
||||
expect(nextMainLocation(approval)).toMatchObject({
|
||||
kind: "main",
|
||||
sceneId: "resume-output-evidence",
|
||||
beatId: "resume",
|
||||
});
|
||||
});
|
||||
|
||||
it("fails closed for the removed Scene 11 cancel hash", () => {
|
||||
expect(locationFromHash("#scene/typed-human-boundary/cancel")).toEqual(defaultMainLocation);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user