@automovie/template 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -22
- package/generated/pnpm-workspace.json +5 -5
- package/generated/skills/3d-modeling/conditioning.md +3 -1
- package/generated/skills/3d-modeling/crafting/construction.md +29 -1
- package/generated/skills/3d-modeling/environments.md +47 -0
- package/generated/skills/3d-modeling/inspection.md +7 -4
- package/generated/skills/contracts/development/common.md +4 -6
- package/generated/skills/contracts/development/design.md +7 -17
- package/generated/skills/contracts/development/implementation.md +8 -36
- package/generated/skills/development/repair.md +2 -0
- package/generated/skills/documentation/SKILL.md +5 -5
- package/generated/skills/documentation/writing.md +2 -2
- package/generated/skills/motion/laws/authoring.md +2 -2
- package/generated/skills/motion/laws/contacts.md +6 -2
- package/generated/skills/motion/laws/transitions.md +14 -4
- package/generated/skills/motion/laws/variation.md +2 -2
- package/generated/skills/motion/laws/verification.md +7 -5
- package/generated/skills/multi-agent/continuing.md +5 -0
- package/generated/skills/prompting/SKILL.md +8 -22
- package/generated/skills/visual-debugging/correction-rounds.md +4 -0
- package/lib/IAutoMovieScaffoldProps.d.ts +12 -12
- package/lib/assertScaffoldProjectName.d.ts +8 -10
- package/lib/assertScaffoldProjectName.js +8 -10
- package/lib/assertScaffoldProjectName.js.map +1 -1
- package/lib/createAutoMovieScaffold.d.ts +23 -15
- package/lib/createAutoMovieScaffold.js +35 -18
- package/lib/createAutoMovieScaffold.js.map +1 -1
- package/lib/listAutoMovieScaffoldFiles.d.ts +8 -10
- package/lib/listAutoMovieScaffoldFiles.js +16 -12
- package/lib/listAutoMovieScaffoldFiles.js.map +1 -1
- package/lib/renderAutoMovieWorkspace.d.ts +8 -12
- package/lib/renderAutoMovieWorkspace.js +16 -14
- package/lib/renderAutoMovieWorkspace.js.map +1 -1
- package/lib/scaffoldSharedSkillPath.d.ts +13 -12
- package/lib/scaffoldSharedSkillPath.js +13 -12
- package/lib/scaffoldSharedSkillPath.js.map +1 -1
- package/package.json +6 -6
- package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +2 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +3 -1
- package/scaffold/instructions/.agents/skills/3d-modeling/materials.md +11 -0
- package/scaffold/instructions/.agents/skills/audio/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/audio/acquisition.md +5 -1
- package/scaffold/instructions/.agents/skills/audio/film-sound.md +3 -1
- package/scaffold/instructions/.agents/skills/audio/soundtrack.md +14 -0
- package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +4 -2
- package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/development/catalog.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/development/composition.md +37 -25
- package/scaffold/instructions/.agents/skills/contracts/development/entities.md +3 -1
- package/scaffold/instructions/.agents/skills/contracts/development/films.md +39 -0
- package/scaffold/instructions/.agents/skills/contracts/development/testing.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/principles/research.md +1 -1
- package/scaffold/instructions/.agents/skills/development/SKILL.md +2 -4
- package/scaffold/instructions/.agents/skills/development/entities.md +14 -2
- package/scaffold/instructions/.agents/skills/development/modules.md +16 -6
- package/scaffold/instructions/.agents/skills/development/source-layout.md +6 -6
- package/scaffold/instructions/.agents/skills/development/testing.md +1 -1
- package/scaffold/instructions/.agents/skills/evidence/configuration.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/SKILL.md +4 -5
- package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +3 -3
- package/scaffold/instructions/.agents/skills/motion/compose/composition.md +37 -18
- package/scaffold/instructions/.agents/skills/motion/compose/refusals.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/control-channels.md +4 -4
- package/scaffold/instructions/.agents/skills/motion/diffusion/SKILL.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/judgment.md +7 -3
- package/scaffold/instructions/.agents/skills/motion/laws/SKILL.md +2 -3
- package/scaffold/instructions/.agents/skills/motion/laws/method-references.md +4 -2
- package/scaffold/instructions/.agents/skills/motion/performance.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +6 -4
- package/scaffold/instructions/.agents/skills/motion/retargeting.md +1 -1
- package/scaffold/instructions/.agents/skills/motion/segment-review.md +1 -1
- package/scaffold/instructions/.agents/skills/motion/staging.md +12 -8
- package/scaffold/instructions/.agents/skills/multi-agent/$continuing.md +0 -0
- package/scaffold/instructions/.agents/skills/multi-agent/SKILL.md +8 -0
- package/scaffold/instructions/.agents/skills/production/SKILL.md +1 -2
- package/scaffold/instructions/.agents/skills/production/assembly.md +7 -5
- package/scaffold/instructions/.agents/skills/production/director.md +5 -5
- package/scaffold/instructions/.agents/skills/production/media-records.md +16 -1
- package/scaffold/instructions/.agents/skills/production/project-context.md +7 -13
- package/scaffold/instructions/.agents/skills/production/sustained-runs.md +3 -3
- package/scaffold/instructions/.agents/skills/production/workflow.md +1 -1
- package/scaffold/instructions/.agents/skills/review/delivery-review.md +4 -2
- package/scaffold/instructions/.agents/skills/review/source-review.md +3 -1
- package/scaffold/instructions/.agents/skills/story/answers.md +1 -1
- package/scaffold/instructions/.agents/skills/story/document-layout.md +2 -2
- package/scaffold/instructions/.agents/skills/story/layers/shots.md +1 -1
- package/scaffold/instructions/.agents/skills/story/planning/discovery.md +1 -1
- package/scaffold/instructions/.agents/skills/story/planning/research.md +2 -2
- package/scaffold/instructions/.agents/skills/story/workflow/routes.md +1 -1
- package/scaffold/instructions/.agents/skills/video/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/video/diffusion/hints.md +1 -1
- package/scaffold/instructions/.agents/skills/video/direct-film.md +44 -9
- package/scaffold/instructions/.agents/skills/video/finishing.md +11 -3
- package/scaffold/instructions/.agents/skills/video/generated-film.md +1 -0
- package/scaffold/instructions/.agents/skills/video/requests.md +6 -2
- package/scaffold/instructions/AGENTS.md +21 -48
- package/scaffold/production/README.md +18 -99
- package/scaffold/production/package.json +3 -2
- package/scaffold/production/src/IFilm.ts +1 -6
- package/scaffold/production/src/IFilmProduction.ts +255 -31
- package/scaffold/production/src/clampProductionSeconds.ts +5 -8
- package/scaffold/production/src/composition/films/starter.ts +2 -7
- package/scaffold/production/src/executable/motionTake/IMotionTakeSource.ts +1 -2
- package/scaffold/production/src/executable/motionTake/assertMotionTakeBindings.ts +3 -10
- package/scaffold/production/src/executable/motionTake/collectMotionTakeFiles.ts +2 -6
- package/scaffold/production/src/executable/motionTake/hashMotionTakeFile.ts +2 -6
- package/scaffold/production/src/executable/motionTake/openMotionTake.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeArtifact.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeInstalledLock.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakePackageVersion.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeSource.ts +2 -6
- package/scaffold/production/src/executable/motionTake/replayMotionTake.ts +2 -6
- package/scaffold/production/src/executable/motionTake/resolveMotionTakePath.ts +5 -12
- package/scaffold/production/src/executable/motionTake/verifyMotionTakeEditPrefix.ts +2 -6
- package/scaffold/production/src/executable/motionTake/writeMotionTakeArtifact.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/artifact/archiveAutoMovieRecoveryModel.ts +12 -19
- package/scaffold/production/src/executable/recovery/node/artifact/createAutoMovieRecoveryArtifact.ts +13 -26
- package/scaffold/production/src/executable/recovery/node/artifact/writeAutoMovieRecoveryArtifact.ts +16 -22
- package/scaffold/production/src/executable/recovery/node/internal/IAutoMovieRecoveryMemoryUsage.ts +1 -2
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTable.ts +11 -32
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTableInput.ts +5 -14
- package/scaffold/production/src/executable/recovery/node/internal/createRecoveryFileVectorTable.ts +6 -13
- package/scaffold/production/src/executable/recovery/node/internal/observeRecoveryAtlas.ts +16 -24
- package/scaffold/production/src/executable/recovery/node/internal/readAutoMovieRecoveryBoundedFile.ts +9 -17
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryCameraImages.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryFixedReference.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/recovery.ts +12 -17
- package/scaffold/production/src/executable/recovery/node/internal/recoveryAtlas.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraMap.ts +6 -12
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraScene.ts +2 -10
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameras.ts +2 -9
- package/scaffold/production/src/executable/recovery/node/internal/recoveryContourPath.ts +7 -11
- package/scaffold/production/src/executable/recovery/node/internal/recoveryImages.ts +6 -14
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryContourFileMesh.ts +10 -25
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryMeshSpool.ts +9 -15
- package/scaffold/production/src/executable/recovery/node/mesh/readAutoMovieRecoveryMeshFrontier.ts +10 -13
- package/scaffold/production/src/executable/recovery/node/publishAutoMovieRecoveryArtifact.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/reconstruction/reconstructAutoMovieRecoveryLocal.ts +13 -19
- package/scaffold/production/src/executable/recovery/node/runAutoMovieRecoveryCommand.ts +4 -19
- package/scaffold/production/src/executable/verify.ts +11 -0
- package/scaffold/production/src/inspectFilmProduction.ts +252 -0
- package/scaffold/production/src/main.ts +1 -0
- package/scaffold/production/src/markFilmProduction.ts +31 -19
- package/scaffold/production/src/readFilmVerdicts.ts +43 -0
- package/scaffold/production/src/selectFilm.ts +2 -6
- package/scaffold/production/src/subjectOfFilm.ts +158 -0
- package/scaffold/production/src/subjects.ts +13 -61
- package/scaffold/production/test/features/test_clamp_production_seconds.ts +2 -4
- package/scaffold/production/test/features/test_inspect_film_production.ts +325 -0
- package/scaffold/production/test/features/test_recovery_publication_cancellation.ts +2 -4
- package/scaffold/production/test/features/test_select_film.ts +2 -4
- package/scaffold/production/test/features/test_subject_of_film.ts +95 -0
- package/scaffold/production/test/features/testing/test_test_execution.ts +2 -4
- package/scaffold/production/test/features/testing/test_test_selection.ts +2 -4
- package/scaffold/production/test/helpers/assessTestExecution.ts +4 -7
- package/scaffold/production/test/helpers/overlappingPerformance.ts +199 -0
- package/scaffold/production/test/tsconfig.json +4 -1
- package/scaffold/production/tsconfig.json +2 -6
- package/scaffold/production/vite.config.ts +25 -2
- package/scaffold/workspace/README.md +9 -28
- package/scaffold/workspace/package.json +1 -1
- package/src/IAutoMovieScaffoldProps.ts +12 -12
- package/src/assertScaffoldProjectName.ts +8 -10
- package/src/createAutoMovieScaffold.ts +35 -18
- package/src/listAutoMovieScaffoldFiles.ts +16 -12
- package/src/renderAutoMovieWorkspace.ts +20 -15
- package/src/scaffoldSharedSkillPath.ts +13 -12
- package/generated/skills/contracts/development/testing.md +0 -27
- package/scaffold/instructions/.agents/skills/automovie/SKILL.md +0 -32
- package/scaffold/instructions/.agents/skills/motion/laws/extension.md +0 -39
- package/scaffold/instructions/.agents/skills/production/stage-caches.md +0 -26
- package/scaffold/production/src/executable/recovery/node/internal/recoveryLocal.ts +0 -153
- package/scaffold/production/src/executable/recovery/node/internal/recoveryOpen.ts +0 -237
- package/scaffold/production/tsconfig.test.json +0 -9
- /package/scaffold/instructions/.agents/skills/{contracts/development/$testing.md → 3d-modeling/$environments.md} +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { preparePhysicalGeometry } from "@automovie/engine";
|
|
2
|
+
import type {
|
|
3
|
+
IAutoMovieDialogueMouths,
|
|
4
|
+
IAutoMovieFilmOptics,
|
|
5
|
+
IAutoMovieFilmShading,
|
|
6
|
+
IAutoMovieInspectionDiagnostics,
|
|
7
|
+
IAutoMovieMark,
|
|
8
|
+
IAutoMovieRenderSoftPropFrame,
|
|
9
|
+
} from "@automovie/interface";
|
|
10
|
+
import {
|
|
11
|
+
type IAutoMovieDrawScene,
|
|
12
|
+
type IAutoMovieDrawSubject,
|
|
13
|
+
bindAutoMovieDrawSceneSoftProps,
|
|
14
|
+
} from "@automovie/render";
|
|
15
|
+
import type * as THREE from "three";
|
|
16
|
+
|
|
17
|
+
import type { IFilm } from "./IFilm";
|
|
18
|
+
import type { IFilmProduction } from "./IFilmProduction";
|
|
19
|
+
import { clampProductionSeconds } from "./clampProductionSeconds";
|
|
20
|
+
import { inspectFilmProduction } from "./inspectFilmProduction";
|
|
21
|
+
import { markFilmProduction } from "./markFilmProduction";
|
|
22
|
+
import { readFilmVerdicts } from "./readFilmVerdicts";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* One registered film as a draw subject: what the capture, the render and the
|
|
26
|
+
* Viewer create, draw and place.
|
|
27
|
+
*
|
|
28
|
+
* The film is created as the Viewer creates it, at its delivery raster (1280 ×
|
|
29
|
+
* 720 when it states none), placed by its own `seek` at a second clamped to its
|
|
30
|
+
* running time, and marked by `markFilmProduction`. Its `optics`, `shading`,
|
|
31
|
+
* `beforeDraw`, soft props and marks are read for the film as last placed, at
|
|
32
|
+
* the same clamped second, so a capture, a delivered frame and the Viewer show
|
|
33
|
+
* the same state through the same camera response. A film with `playback` hands
|
|
34
|
+
* its timeline over as the subject's `cut`, which the render records in its
|
|
35
|
+
* report, and its sequence, whose transitions every film picture draws through
|
|
36
|
+
* the film's `seekShot`: the shot and its shot-local time pass through
|
|
37
|
+
* unclamped, a sample's handle before the trim included, and the film second is
|
|
38
|
+
* clamped. A film with `speak` takes the dialogue mouths the capture and the
|
|
39
|
+
* render hand the subject, and reads them in its own placements.
|
|
40
|
+
*
|
|
41
|
+
* @param name The film's registered name, which the subject is drawn under.
|
|
42
|
+
* @param film The registered film.
|
|
43
|
+
* @returns The film's draw subject.
|
|
44
|
+
* @evidence contracts/development/common.md#meaningful-documentation States what the subject is, who draws it, how its raster, placements and readers are taken and what passes through `seekShot` unclamped.
|
|
45
|
+
* @evidence contracts/development/implementation.md#principled-implementation Maps the film's placement, readers and shared marks onto the draw contract, clamping only the film second, and binds optional soft surfaces after every placement, a shot placement included. No film is named; a member the film lacks is left absent rather than stubbed.
|
|
46
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One mapping of one film; `subjects` maps the registry through it. Constant work per mapped member; the film is created only when its subject is, and its verdict reader reads the whole performance once, at the first capture or delivery sample. A mapping made once per film and page. The subject's dispose releases the film, and the render adapter independently releases any soft prop meshes it mounts.
|
|
47
|
+
*/
|
|
48
|
+
export function subjectOfFilm(
|
|
49
|
+
name: string,
|
|
50
|
+
film: IFilm,
|
|
51
|
+
): IAutoMovieDrawSubject {
|
|
52
|
+
return {
|
|
53
|
+
create: async (): Promise<IAutoMovieDrawScene> => {
|
|
54
|
+
const geometry: Awaited<ReturnType<typeof preparePhysicalGeometry>> =
|
|
55
|
+
await preparePhysicalGeometry();
|
|
56
|
+
const production: IFilmProduction = await film.create();
|
|
57
|
+
// One reader per mount: a capture or delivery run reads the whole
|
|
58
|
+
// performance once, and the viewer never asks.
|
|
59
|
+
const verdicts: ReturnType<typeof readFilmVerdicts> =
|
|
60
|
+
readFilmVerdicts(production);
|
|
61
|
+
const clamp: (seconds: number) => number = (seconds: number): number =>
|
|
62
|
+
clampProductionSeconds(seconds, film.durationSeconds);
|
|
63
|
+
const subject: IAutoMovieDrawScene = {
|
|
64
|
+
scene: production.scene,
|
|
65
|
+
camera: production.camera,
|
|
66
|
+
durationSeconds: film.durationSeconds,
|
|
67
|
+
fps: film.fps,
|
|
68
|
+
width: film.width ?? 1280,
|
|
69
|
+
...(production.delivery === undefined
|
|
70
|
+
? {}
|
|
71
|
+
: { delivery: production.delivery }),
|
|
72
|
+
...(production.sound === undefined ? {} : { sound: production.sound }),
|
|
73
|
+
...(production.speak === undefined
|
|
74
|
+
? {}
|
|
75
|
+
: {
|
|
76
|
+
speak: (mouths: IAutoMovieDialogueMouths): void =>
|
|
77
|
+
production.speak!(mouths),
|
|
78
|
+
}),
|
|
79
|
+
...(production.playback === undefined
|
|
80
|
+
? {}
|
|
81
|
+
: {
|
|
82
|
+
cut: production.playback.timeline,
|
|
83
|
+
sequence: production.playback.sequence,
|
|
84
|
+
}),
|
|
85
|
+
height: film.height ?? 720,
|
|
86
|
+
markKinds: [
|
|
87
|
+
...(production.markKinds ?? []),
|
|
88
|
+
...(production.performance === undefined
|
|
89
|
+
? []
|
|
90
|
+
: ["joint", "bone", "contact"]),
|
|
91
|
+
...(production.performance?.maximumArrowLength === undefined
|
|
92
|
+
? []
|
|
93
|
+
: ["contact/clamped"]),
|
|
94
|
+
...(production.performance?.supports === undefined
|
|
95
|
+
? []
|
|
96
|
+
: ["support/allocated", "support/shortfall"]),
|
|
97
|
+
],
|
|
98
|
+
...(production.views === undefined ? {} : { views: production.views }),
|
|
99
|
+
...(production.optics === undefined
|
|
100
|
+
? {}
|
|
101
|
+
: {
|
|
102
|
+
optics: (seconds: number): IAutoMovieFilmOptics =>
|
|
103
|
+
production.optics!(clamp(seconds)),
|
|
104
|
+
}),
|
|
105
|
+
...(production.shading === undefined
|
|
106
|
+
? {}
|
|
107
|
+
: {
|
|
108
|
+
shading: (seconds: number): IAutoMovieFilmShading =>
|
|
109
|
+
production.shading!(clamp(seconds)),
|
|
110
|
+
}),
|
|
111
|
+
...(production.beforeDraw === undefined
|
|
112
|
+
? {}
|
|
113
|
+
: {
|
|
114
|
+
beforeDraw: (
|
|
115
|
+
renderer: THREE.WebGLRenderer,
|
|
116
|
+
seconds: number,
|
|
117
|
+
): void => production.beforeDraw!(renderer, clamp(seconds)),
|
|
118
|
+
}),
|
|
119
|
+
inspectPlaced: (
|
|
120
|
+
sample: IAutoMovieDrawScene.IPlacedSample,
|
|
121
|
+
): IAutoMovieInspectionDiagnostics =>
|
|
122
|
+
inspectFilmProduction({
|
|
123
|
+
name,
|
|
124
|
+
production,
|
|
125
|
+
geometry,
|
|
126
|
+
fps: film.fps,
|
|
127
|
+
...(verdicts === undefined ? {} : { verdicts }),
|
|
128
|
+
sample,
|
|
129
|
+
}),
|
|
130
|
+
marks: (seconds: number): IAutoMovieMark[] =>
|
|
131
|
+
markFilmProduction(production, seconds),
|
|
132
|
+
seek: async (seconds: number): Promise<void> =>
|
|
133
|
+
production.seek(clamp(seconds)),
|
|
134
|
+
place: (seconds: number): void => production.seek(clamp(seconds)),
|
|
135
|
+
...(production.seekShot === undefined
|
|
136
|
+
? {}
|
|
137
|
+
: {
|
|
138
|
+
seekShot: async (
|
|
139
|
+
shot: string,
|
|
140
|
+
time: number,
|
|
141
|
+
seconds: number,
|
|
142
|
+
): Promise<void> =>
|
|
143
|
+
production.seekShot!(shot, time, clamp(seconds)),
|
|
144
|
+
}),
|
|
145
|
+
dispose: (): void => production.dispose(),
|
|
146
|
+
};
|
|
147
|
+
const softPropsAt: IFilmProduction["softPropsAt"] =
|
|
148
|
+
production.softPropsAt?.bind(production);
|
|
149
|
+
return softPropsAt === undefined
|
|
150
|
+
? subject
|
|
151
|
+
: bindAutoMovieDrawSceneSoftProps(
|
|
152
|
+
subject,
|
|
153
|
+
(seconds: number): readonly IAutoMovieRenderSoftPropFrame[] =>
|
|
154
|
+
softPropsAt(clamp(seconds)),
|
|
155
|
+
);
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
}
|
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "@automovie/interface";
|
|
5
|
-
import {
|
|
6
|
-
type AutoMovieDrawSubjects,
|
|
7
|
-
type IAutoMovieDrawScene,
|
|
8
|
-
type IAutoMovieDrawSubject,
|
|
9
|
-
bindAutoMovieDrawSceneSoftProps,
|
|
2
|
+
AutoMovieDrawSubjects,
|
|
3
|
+
IAutoMovieDrawSubject,
|
|
10
4
|
} from "@automovie/render";
|
|
11
5
|
|
|
12
6
|
import type { IFilm } from "./IFilm";
|
|
13
|
-
import type { IFilmProduction } from "./IFilmProduction";
|
|
14
|
-
import { clampProductionSeconds } from "./clampProductionSeconds";
|
|
15
7
|
import { films } from "./composition/films";
|
|
16
|
-
import {
|
|
8
|
+
import { subjectOfFilm } from "./subjectOfFilm";
|
|
17
9
|
|
|
18
10
|
/**
|
|
19
|
-
* The production's films as subjects, one per registered film under the film's
|
|
11
|
+
* The production's films as subjects, one per registered film under the film's
|
|
12
|
+
* name: what the draw-only page `automovie capture --module src/subjects.ts`
|
|
13
|
+
* and `automovie render --module src/subjects.ts` build over this module
|
|
14
|
+
* offers, and what `automovie inspect` shows. Each film becomes its subject by
|
|
15
|
+
* `subjectOfFilm`, so a capture, a delivered frame and the Viewer place and
|
|
16
|
+
* read it the same way.
|
|
20
17
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @evidence contracts/development/
|
|
24
|
-
* @evidence contracts/development/implementation.md#principled-implementation Maps the film registry, placement and shared marks onto the draw contract, and binds optional soft surfaces after placement at the same clamped second.
|
|
25
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One mapping per film.
|
|
26
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No film is named; the props are not read, since films need none.
|
|
27
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the registered films; a film is created only when its subject is.
|
|
28
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A mapping made once per page.
|
|
29
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The subject's dispose releases the film, and the render adapter independently releases any soft prop meshes it mounts.
|
|
18
|
+
* @evidence contracts/development/common.md#meaningful-documentation States what the subjects are, who draws them, and which mapping makes each one.
|
|
19
|
+
* @evidence contracts/development/implementation.md#principled-implementation Maps the film registry through the one film-to-subject mapping. No film is named; the props are not read, since films need none.
|
|
20
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One entry per film; the mapping lives in `subjectOfFilm`. Linear in the registered films; a film is created only when its subject is. A mapping made once per page. Each subject's dispose releases its film, as `subjectOfFilm` states.
|
|
30
21
|
*/
|
|
31
22
|
export const subjects: AutoMovieDrawSubjects = (): Readonly<
|
|
32
23
|
Record<string, IAutoMovieDrawSubject>
|
|
@@ -35,46 +26,7 @@ export const subjects: AutoMovieDrawSubjects = (): Readonly<
|
|
|
35
26
|
Object.entries(films).map(
|
|
36
27
|
([name, film]: [string, IFilm]): [string, IAutoMovieDrawSubject] => [
|
|
37
28
|
name,
|
|
38
|
-
|
|
39
|
-
create: async (): Promise<IAutoMovieDrawScene> => {
|
|
40
|
-
const production: IFilmProduction = await film.create();
|
|
41
|
-
const subject: IAutoMovieDrawScene = {
|
|
42
|
-
scene: production.scene,
|
|
43
|
-
camera: production.camera,
|
|
44
|
-
durationSeconds: film.durationSeconds,
|
|
45
|
-
fps: film.fps,
|
|
46
|
-
width: film.width ?? 1280,
|
|
47
|
-
height: film.height ?? 720,
|
|
48
|
-
markKinds: [
|
|
49
|
-
...(production.markKinds ?? []),
|
|
50
|
-
...(production.performance === undefined
|
|
51
|
-
? []
|
|
52
|
-
: ["joint", "bone", "contact"]),
|
|
53
|
-
],
|
|
54
|
-
...(production.views === undefined
|
|
55
|
-
? {}
|
|
56
|
-
: { views: production.views }),
|
|
57
|
-
marks: (seconds: number): IAutoMovieMark[] =>
|
|
58
|
-
markFilmProduction(production, seconds),
|
|
59
|
-
seek: async (seconds: number): Promise<void> =>
|
|
60
|
-
production.seek(
|
|
61
|
-
clampProductionSeconds(seconds, film.durationSeconds),
|
|
62
|
-
),
|
|
63
|
-
dispose: (): void => production.dispose(),
|
|
64
|
-
};
|
|
65
|
-
const softPropsAt: IFilmProduction["softPropsAt"] =
|
|
66
|
-
production.softPropsAt?.bind(production);
|
|
67
|
-
return softPropsAt === undefined
|
|
68
|
-
? subject
|
|
69
|
-
: bindAutoMovieDrawSceneSoftProps(
|
|
70
|
-
subject,
|
|
71
|
-
(seconds: number): readonly IAutoMovieRenderSoftPropFrame[] =>
|
|
72
|
-
softPropsAt(
|
|
73
|
-
clampProductionSeconds(seconds, film.durationSeconds),
|
|
74
|
-
),
|
|
75
|
-
);
|
|
76
|
-
},
|
|
77
|
-
},
|
|
29
|
+
subjectOfFilm(name, film),
|
|
78
30
|
],
|
|
79
31
|
),
|
|
80
32
|
);
|
|
@@ -10,10 +10,8 @@ import { clampProductionSeconds } from "../../src/clampProductionSeconds";
|
|
|
10
10
|
* 2. Nonfinite time and nonpositive or nonfinite duration fail admission.
|
|
11
11
|
*
|
|
12
12
|
* @evidence contracts/development/common.md#meaningful-documentation The comment lists the two scenarios, preserved and bounded times and refused inputs, and the clamp behavior each pins.
|
|
13
|
-
* @evidence contracts/development/testing.md#behavioral-verification
|
|
14
|
-
* @evidence contracts/development/testing.md#independent-expectations Expected values come from the closed interval from zero to a literal fifteen-second duration; 2.125 is exactly representable, so equality needs no tolerance.
|
|
15
|
-
* @evidence contracts/development/testing.md#distinguishing-cases Cases cover times just outside each end, both ends, one interior time, each nonfinite time, and zero, negative and nonfinite durations. Browser controls and drawing belong to Viewer review.
|
|
16
|
-
* @evidence contracts/development/testing.md#execution-ownership A pure unit test with in-memory numbers, discovered by test/index.ts as an exported test_ function; it starts no Viewer, browser or render.
|
|
13
|
+
* @evidence contracts/development/testing.md#behavioral-verification The generated runner discovers this export and calls the clamp used by subjectOfFilm with literal numbers. It checks preserved times, both clamped bounds and refusal of invalid inputs.
|
|
14
|
+
* @evidence contracts/development/testing.md#independent-expectations Expected values come from the closed interval from zero to a literal fifteen-second duration; 2.125 is exactly representable, so equality needs no tolerance. Cases cover times just outside each end, both ends, one interior time, each nonfinite time, and zero, negative and nonfinite durations. Browser controls and drawing belong to Viewer review.
|
|
17
15
|
*/
|
|
18
16
|
export function test_clamp_production_seconds(): void {
|
|
19
17
|
for (const [seconds, expected] of [
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import {
|
|
2
|
+
preparePhysicalGeometry,
|
|
3
|
+
validateClipArtifact,
|
|
4
|
+
} from "@automovie/engine";
|
|
5
|
+
import type {
|
|
6
|
+
IAutoMovieConstraintViolation,
|
|
7
|
+
IAutoMovieInspectionDiagnostics,
|
|
8
|
+
IAutoMovieMotionHumanPerformance,
|
|
9
|
+
IAutoMovieMotionHumanVerdicts,
|
|
10
|
+
} from "@automovie/interface";
|
|
11
|
+
import { HumanVerdicts } from "@automovie/motions";
|
|
12
|
+
import {
|
|
13
|
+
type IAutoMovieDrawScene,
|
|
14
|
+
observeAutoMoviePlacedInspection,
|
|
15
|
+
reduceAutoMovieInspectionEpisodes,
|
|
16
|
+
selectAutoMoviePlacedChecks,
|
|
17
|
+
} from "@automovie/render";
|
|
18
|
+
import { TestValidator } from "@nestia/e2e";
|
|
19
|
+
import * as THREE from "three";
|
|
20
|
+
|
|
21
|
+
import type { IFilmProduction } from "../../src/IFilmProduction";
|
|
22
|
+
import { inspectFilmProduction } from "../../src/inspectFilmProduction";
|
|
23
|
+
import { readFilmVerdicts } from "../../src/readFilmVerdicts";
|
|
24
|
+
import { overlappingPerformance } from "../helpers/overlappingPerformance";
|
|
25
|
+
|
|
26
|
+
/** Output frames per second of the inspected film. */
|
|
27
|
+
const FPS: number = 10;
|
|
28
|
+
|
|
29
|
+
/** Output frames of the inspected film. */
|
|
30
|
+
const FRAMES: number = 6;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Drive the production's own inspection path, `inspectFilmProduction` behind a
|
|
34
|
+
* draw subject mounted as `src/subjects.ts` mounts one, through playback, a
|
|
35
|
+
* reverse seek, capture samples and a delivery pass.
|
|
36
|
+
*
|
|
37
|
+
* Scenarios:
|
|
38
|
+
*
|
|
39
|
+
* 1. Playback reports the planted foot's 5 cm lift on frames 3 and 4 only, with
|
|
40
|
+
* its measured gap, and the raw authored clip's malformed track on every
|
|
41
|
+
* frame.
|
|
42
|
+
* 2. Seeking back to frame 3 after the last frame reports exactly the packet
|
|
43
|
+
* playback reported there.
|
|
44
|
+
* 3. Capture samples produce a support episode first seen on frame 3.
|
|
45
|
+
* 4. A delivery pass over every frame observes the whole schedule and holds a
|
|
46
|
+
* blocking finding.
|
|
47
|
+
* 5. The film's human performance, two men standing on one point, is asked for
|
|
48
|
+
* once however many capture and delivery samples read it and never by
|
|
49
|
+
* playback; each capture packet holds its `partner` verdict at the
|
|
50
|
+
* violation's own second with each observation at the packet's sample time,
|
|
51
|
+
* and playback packets hold no verdict finding or coverage.
|
|
52
|
+
*
|
|
53
|
+
* @evidence contracts/development/common.md#meaningful-documentation Lists five scenarios and the outcome each pins.
|
|
54
|
+
* @evidence contracts/development/testing.md#behavioral-verification The generated test runner discovers this integration check. It needs the real placed-inspection host, Three nodes, clip admission, physical queries and episode reducer to verify their shared playback, capture and delivery packets in a small in-memory scene.
|
|
55
|
+
* @evidence contracts/development/testing.md#independent-expectations The fixture defines a 50 mm lift on frames 3 and 4 and a clip with one translation value for two keys. The check rounds the measured gap to millimetres. It compares repeat seeks and capture versus delivery, and checks that the inspection packet forwards the emitted HumanVerdicts time and uses the packet's sample time for an observation without its own time.
|
|
56
|
+
*/
|
|
57
|
+
export async function test_inspect_film_production(): Promise<void> {
|
|
58
|
+
const scene: THREE.Scene = new THREE.Scene();
|
|
59
|
+
const camera: THREE.PerspectiveCamera = new THREE.PerspectiveCamera(
|
|
60
|
+
45,
|
|
61
|
+
16 / 9,
|
|
62
|
+
0.1,
|
|
63
|
+
100,
|
|
64
|
+
);
|
|
65
|
+
camera.position.set(0, 1.5, 5);
|
|
66
|
+
camera.lookAt(0, 0, 0);
|
|
67
|
+
const deck: THREE.Group = new THREE.Group();
|
|
68
|
+
deck.name = "deck";
|
|
69
|
+
const top: THREE.Group = new THREE.Group();
|
|
70
|
+
top.name = "top";
|
|
71
|
+
top.position.y = 0.05;
|
|
72
|
+
deck.add(top);
|
|
73
|
+
const foot: THREE.Group = new THREE.Group();
|
|
74
|
+
foot.name = "foot";
|
|
75
|
+
scene.add(deck, foot);
|
|
76
|
+
|
|
77
|
+
const track: IAutoMovieConstraintViolation[] = [];
|
|
78
|
+
validateClipArtifact(
|
|
79
|
+
{
|
|
80
|
+
id: "lantern-motion",
|
|
81
|
+
name: null,
|
|
82
|
+
duration: 1,
|
|
83
|
+
loop: false,
|
|
84
|
+
tracks: [
|
|
85
|
+
{
|
|
86
|
+
channel: { kind: "node", node: "lantern", path: "translation" },
|
|
87
|
+
times: [0, 1],
|
|
88
|
+
values: [0],
|
|
89
|
+
interpolation: "linear",
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
"film.clips[0]",
|
|
94
|
+
track,
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
const performance: IAutoMovieMotionHumanPerformance = overlappingPerformance([
|
|
98
|
+
"a",
|
|
99
|
+
"b",
|
|
100
|
+
]);
|
|
101
|
+
let asked: number = 0;
|
|
102
|
+
const production: IFilmProduction = {
|
|
103
|
+
scene,
|
|
104
|
+
camera,
|
|
105
|
+
humanPerformance: (): IAutoMovieMotionHumanVerdicts.ISource => {
|
|
106
|
+
++asked;
|
|
107
|
+
return {
|
|
108
|
+
performance,
|
|
109
|
+
paths: { a: "film.performers[0]", b: "film.performers[1]" },
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
seek: (seconds: number): void => {
|
|
113
|
+
deck.position.set(0.3 * seconds, 0, 0);
|
|
114
|
+
const frame: number = Math.round(seconds * FPS);
|
|
115
|
+
foot.position.set(
|
|
116
|
+
deck.position.x + 0.2,
|
|
117
|
+
0.05 + (frame === 3 || frame === 4 ? 0.05 : 0),
|
|
118
|
+
0,
|
|
119
|
+
);
|
|
120
|
+
scene.updateMatrixWorld(true);
|
|
121
|
+
},
|
|
122
|
+
inspectionChecks: (
|
|
123
|
+
sample: IAutoMovieDrawScene.IPlacedSample,
|
|
124
|
+
): ReturnType<NonNullable<IFilmProduction["inspectionChecks"]>> => [
|
|
125
|
+
...selectAutoMoviePlacedChecks({
|
|
126
|
+
scene: sample.scene,
|
|
127
|
+
time: sample.time,
|
|
128
|
+
fps: FPS,
|
|
129
|
+
supports: [
|
|
130
|
+
{
|
|
131
|
+
key: "foot",
|
|
132
|
+
required: true,
|
|
133
|
+
path: "film.supports[0]",
|
|
134
|
+
paths: ["foot"],
|
|
135
|
+
maxGap: 0.01,
|
|
136
|
+
maxSlip: 0.02,
|
|
137
|
+
phases: [
|
|
138
|
+
{
|
|
139
|
+
from: 0,
|
|
140
|
+
to: FRAMES / FPS,
|
|
141
|
+
socket: foot,
|
|
142
|
+
support: top,
|
|
143
|
+
anchor: { x: 0.2, y: 0, z: 0 },
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
}),
|
|
149
|
+
{
|
|
150
|
+
key: "lantern-clip",
|
|
151
|
+
required: true,
|
|
152
|
+
input: { kind: "track", path: "film.clips[0]", violations: track },
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
dispose: (): void => {
|
|
156
|
+
scene.clear();
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
const geometry: Awaited<ReturnType<typeof preparePhysicalGeometry>> =
|
|
160
|
+
await preparePhysicalGeometry();
|
|
161
|
+
const verdicts: ReturnType<typeof readFilmVerdicts> =
|
|
162
|
+
readFilmVerdicts(production);
|
|
163
|
+
// Mounted as src/subjects.ts mounts a registered film.
|
|
164
|
+
const subject: IAutoMovieDrawScene = {
|
|
165
|
+
scene,
|
|
166
|
+
camera,
|
|
167
|
+
durationSeconds: FRAMES / FPS,
|
|
168
|
+
fps: FPS,
|
|
169
|
+
width: 1280,
|
|
170
|
+
height: 720,
|
|
171
|
+
markKinds: [],
|
|
172
|
+
inspectPlaced: (
|
|
173
|
+
sample: IAutoMovieDrawScene.IPlacedSample,
|
|
174
|
+
): IAutoMovieInspectionDiagnostics =>
|
|
175
|
+
inspectFilmProduction({
|
|
176
|
+
name: "proof",
|
|
177
|
+
production,
|
|
178
|
+
geometry,
|
|
179
|
+
verdicts,
|
|
180
|
+
sample,
|
|
181
|
+
}),
|
|
182
|
+
seek: async (seconds: number): Promise<void> => production.seek(seconds),
|
|
183
|
+
dispose: (): void => production.dispose(),
|
|
184
|
+
};
|
|
185
|
+
const observe = async (
|
|
186
|
+
frame: number,
|
|
187
|
+
mode: IAutoMovieDrawScene.IPlacedSample["mode"],
|
|
188
|
+
): Promise<IAutoMovieInspectionDiagnostics> => {
|
|
189
|
+
await subject.seek(frame / FPS);
|
|
190
|
+
return observeAutoMoviePlacedInspection(subject, frame / FPS, mode)!;
|
|
191
|
+
};
|
|
192
|
+
const gapOf = (
|
|
193
|
+
packet: IAutoMovieInspectionDiagnostics,
|
|
194
|
+
): number | string | undefined =>
|
|
195
|
+
packet.findings
|
|
196
|
+
.find(
|
|
197
|
+
(finding: IAutoMovieInspectionDiagnostics.IFinding): boolean =>
|
|
198
|
+
finding.check === "support",
|
|
199
|
+
)
|
|
200
|
+
?.witness.measurements?.find(
|
|
201
|
+
(measure: IAutoMovieInspectionDiagnostics.IMeasurement): boolean =>
|
|
202
|
+
measure.name === "gap",
|
|
203
|
+
)?.value;
|
|
204
|
+
const isVerdict = (row: { check: string }): boolean =>
|
|
205
|
+
row.check.startsWith("human-");
|
|
206
|
+
const hasTrack = (packet: IAutoMovieInspectionDiagnostics): boolean =>
|
|
207
|
+
packet.findings.some(
|
|
208
|
+
(finding: IAutoMovieInspectionDiagnostics.IFinding): boolean =>
|
|
209
|
+
finding.check === "authored-track" &&
|
|
210
|
+
finding.paths.some((path: string): boolean =>
|
|
211
|
+
path.startsWith("film.clips[0].tracks[0]"),
|
|
212
|
+
),
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
try {
|
|
216
|
+
const playback: IAutoMovieInspectionDiagnostics[] = [];
|
|
217
|
+
for (let frame: number = 0; frame < FRAMES; ++frame)
|
|
218
|
+
playback.push(await observe(frame, "viewer"));
|
|
219
|
+
TestValidator.equals(
|
|
220
|
+
"playback reports the lift on its frames",
|
|
221
|
+
playback
|
|
222
|
+
.map(gapOf)
|
|
223
|
+
.map((gap: number | string | undefined) =>
|
|
224
|
+
typeof gap === "number" ? Math.round(gap * 1000) / 1000 : gap,
|
|
225
|
+
),
|
|
226
|
+
[undefined, undefined, undefined, 0.05, 0.05, undefined],
|
|
227
|
+
);
|
|
228
|
+
TestValidator.predicate(
|
|
229
|
+
"playback reports the raw track on every frame",
|
|
230
|
+
playback.every(hasTrack),
|
|
231
|
+
);
|
|
232
|
+
TestValidator.equals(
|
|
233
|
+
"a reverse seek reports the playback packet",
|
|
234
|
+
await observe(3, "viewer"),
|
|
235
|
+
playback[3],
|
|
236
|
+
);
|
|
237
|
+
TestValidator.predicate(
|
|
238
|
+
"playback asks for no performance and holds no verdict",
|
|
239
|
+
asked === 0 &&
|
|
240
|
+
playback.every(
|
|
241
|
+
(packet: IAutoMovieInspectionDiagnostics): boolean =>
|
|
242
|
+
!packet.findings.some(isVerdict) &&
|
|
243
|
+
!packet.coverage.some(isVerdict),
|
|
244
|
+
),
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
const sampled: IAutoMovieInspectionDiagnostics[] = [
|
|
248
|
+
await observe(2, "capture"),
|
|
249
|
+
await observe(3, "capture"),
|
|
250
|
+
await observe(4, "capture"),
|
|
251
|
+
];
|
|
252
|
+
const capture: IAutoMovieInspectionDiagnostics.IAudit =
|
|
253
|
+
reduceAutoMovieInspectionEpisodes(sampled);
|
|
254
|
+
const support: IAutoMovieInspectionDiagnostics.IEpisode | undefined =
|
|
255
|
+
capture.episodes.find(
|
|
256
|
+
(episode: IAutoMovieInspectionDiagnostics.IEpisode): boolean =>
|
|
257
|
+
episode.first.finding.check === "support",
|
|
258
|
+
);
|
|
259
|
+
TestValidator.predicate(
|
|
260
|
+
"capture folds the lift into one episode from frame 3",
|
|
261
|
+
support?.first.time.outputFrame === 3 && support.samples === 2,
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
const violation: IAutoMovieMotionHumanVerdicts.IFinding | undefined =
|
|
265
|
+
HumanVerdicts(performance).findings.find(
|
|
266
|
+
(finding: IAutoMovieMotionHumanVerdicts.IFinding): boolean =>
|
|
267
|
+
finding.check === "partner",
|
|
268
|
+
);
|
|
269
|
+
TestValidator.predicate(
|
|
270
|
+
"the planted violation is a partner finding",
|
|
271
|
+
violation !== undefined,
|
|
272
|
+
);
|
|
273
|
+
for (const packet of sampled) {
|
|
274
|
+
const found: IAutoMovieInspectionDiagnostics.IFinding | undefined =
|
|
275
|
+
packet.findings.find(
|
|
276
|
+
(finding: IAutoMovieInspectionDiagnostics.IFinding): boolean =>
|
|
277
|
+
finding.check === "human-partner",
|
|
278
|
+
);
|
|
279
|
+
TestValidator.equals(
|
|
280
|
+
"each capture packet reports the violation at its second",
|
|
281
|
+
found?.witness.measurements?.find(
|
|
282
|
+
(measure: IAutoMovieInspectionDiagnostics.IMeasurement): boolean =>
|
|
283
|
+
measure.name === "seconds",
|
|
284
|
+
)?.value,
|
|
285
|
+
violation?.seconds,
|
|
286
|
+
);
|
|
287
|
+
TestValidator.predicate(
|
|
288
|
+
"the observation takes the packet's sample time",
|
|
289
|
+
found?.witness.time === undefined &&
|
|
290
|
+
packet.coverage.some(
|
|
291
|
+
(row: IAutoMovieInspectionDiagnostics.ICoverage): boolean =>
|
|
292
|
+
row.check === "human-partner" &&
|
|
293
|
+
row.key === "a+b" &&
|
|
294
|
+
row.status === "checked",
|
|
295
|
+
),
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
const partner: IAutoMovieInspectionDiagnostics.IEpisode | undefined =
|
|
299
|
+
capture.episodes.find(
|
|
300
|
+
(episode: IAutoMovieInspectionDiagnostics.IEpisode): boolean =>
|
|
301
|
+
episode.first.finding.check === "human-partner",
|
|
302
|
+
);
|
|
303
|
+
TestValidator.predicate(
|
|
304
|
+
"capture folds the verdict into one episode from frame 2",
|
|
305
|
+
partner?.first.time.outputFrame === 2 && partner.samples === 3,
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
const delivery: IAutoMovieInspectionDiagnostics[] = [];
|
|
309
|
+
for (let frame: number = 0; frame < FRAMES; ++frame)
|
|
310
|
+
delivery.push(await observe(frame, "delivery"));
|
|
311
|
+
const audit: IAutoMovieInspectionDiagnostics.IAudit =
|
|
312
|
+
reduceAutoMovieInspectionEpisodes(delivery, FRAMES);
|
|
313
|
+
TestValidator.predicate(
|
|
314
|
+
"a delivery pass observes every frame and is blocked",
|
|
315
|
+
audit.observedOutputFrames === FRAMES && audit.hasBlockingFinding,
|
|
316
|
+
);
|
|
317
|
+
TestValidator.equals(
|
|
318
|
+
"the performance is asked for once across capture and delivery",
|
|
319
|
+
asked,
|
|
320
|
+
1,
|
|
321
|
+
);
|
|
322
|
+
} finally {
|
|
323
|
+
subject.dispose();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
@@ -18,10 +18,8 @@ import { publishAutoMovieRecoveryArtifact } from "../../src/executable/recovery/
|
|
|
18
18
|
* 2. Nonboolean predicate results fail, while a nonfunction predicate refuses, without output.
|
|
19
19
|
* 3. False permits exact JSON publication and a later cancellation preserves the existing bytes.
|
|
20
20
|
*
|
|
21
|
-
* @evidence contracts/development/testing.md#behavioral-verification
|
|
22
|
-
* @evidence contracts/development/testing.md#independent-expectations Literal
|
|
23
|
-
* @evidence contracts/development/testing.md#distinguishing-cases Separates true/false, thrown callback, undefined/null/string/number result, malformed callback and cancellation after an immutable output already exists.
|
|
24
|
-
* @evidence contracts/development/testing.md#execution-ownership The entry owns one unique temporary directory and removes it in finally; it replaces no foreign method and starts no subprocess, compiler, renderer or timer.
|
|
21
|
+
* @evidence contracts/development/testing.md#behavioral-verification The discovered Node integration check uses one temporary directory to observe the real publication boundary. It checks the returned status, callback count, presence of the file and preservation of its bytes, then removes the directory in finally.
|
|
22
|
+
* @evidence contracts/development/testing.md#independent-expectations Literal callbacks and malformed runtime inputs distinguish cancellation, failure and successful publication. The directory exposes any premature write. Parsed JSON verifies the first publication's value, and the captured bytes are the oracle for preserving it on cancellation.
|
|
25
23
|
* @evidence contracts/development/common.md#meaningful-documentation States pre-work cancellation and failure behavior alongside exact output/lifetime checks.
|
|
26
24
|
*/
|
|
27
25
|
export function test_recovery_publication_cancellation(): void {
|
|
@@ -11,10 +11,8 @@ import { selectFilm } from "../../src/selectFilm";
|
|
|
11
11
|
* 2. An omitted name with several films, an unknown or inherited name, and an empty registry are refused.
|
|
12
12
|
*
|
|
13
13
|
* @evidence contracts/development/common.md#meaningful-documentation The comment lists the two scenarios, selection and refusal, and the rule each pins.
|
|
14
|
-
* @evidence contracts/development/testing.md#behavioral-verification Calls selectFilm on literal registries and asserts the selected name and film object or the thrown refusal; silently playing the first film, resolving an inherited key or accepting an unknown name fails.
|
|
15
|
-
* @evidence contracts/development/testing.md#independent-expectations Expected selections follow from the documented rule: a lone film is implied, several films need a name, and only registered names resolve.
|
|
16
|
-
* @evidence contracts/development/testing.md#distinguishing-cases Cases cover a singleton with null, empty and explicit names, a two-film registry with each name and with null, an unknown name, the inherited key toString and an empty registry.
|
|
17
|
-
* @evidence contracts/development/testing.md#execution-ownership A pure unit test with in-memory registries, discovered by test/index.ts as an exported test_ function; it starts no Viewer or render.
|
|
14
|
+
* @evidence contracts/development/testing.md#behavioral-verification Calls selectFilm on literal registries and asserts the selected name and film object or the thrown refusal; silently playing the first film, resolving an inherited key or accepting an unknown name fails. A pure unit test with in-memory registries, discovered by test/index.ts as an exported test_ function; it starts no Viewer or render.
|
|
15
|
+
* @evidence contracts/development/testing.md#independent-expectations Expected selections follow from the documented rule: a lone film is implied, several films need a name, and only registered names resolve. Cases cover a singleton with null, empty and explicit names, a two-film registry with each name and with null, an unknown name, the inherited key toString and an empty registry.
|
|
18
16
|
*/
|
|
19
17
|
export function test_select_film(): void {
|
|
20
18
|
const film: (durationSeconds: number) => IFilm = (
|