Files
raea/bench/direction/proof/ad-cheat.tsx
shinyobjectz 973ee00acc DR4: a check is a system, and raea's own are written the same way. raea check PROJECT|EDIT.tsx runs every rule that applies to each composition: raea's floor on its newest render, the person's taste, and the workspace's and the project's controller rule fields. It reads the frames each check ranges over (all, cuts, lines, once or a list) into worlds once, runs raea's named checks in Rust (apps/direction systems.rs) and a project's .ts checks in the JS host (raea/check: check({ id, text, needs, level, frames }, (world, frame, values) => ...) and found(...), with the components' types generated from core/facts), and keeps the findings in the project's record. A check that needs a render and has none waits, and says what for; a check that throws, or a rule file raea can't read, is a finding. raea check VIDEO.mp4 is the floor as before.
Proved by bench/direction/proof/proof.sh: five checks that import nothing of Bevy's (a lyric layer over footage, a footage cut, a cue in a mix, a caption in a vertical ad, a rider on a 3D seat), each passing its piece and failing its cheat, and a taste line failing the ad's cheat as the named check of its form.

Fixed on the way: a text's box grows over words drawn past it (the caption cheat passed); a word a cut passes through is in each clip's words (the cut cheat passed); a Part carries its own box before its transform, so a turned part is tested as turned; the help reads `[A|B]` as one argument. Copies folded rather than added: a command's words (apps/check, now also raea workspace's), the printed report and exit code, the person's taste folder, a controller read from JSON (core/brief, now also apps/workspace's), and a path made plain (runtime/bundle's). The spec's lines that the code showed wrong are fixed beside them: --stage moves to DR10, a note's checks to DR6, and the rule field from DR8 to DR4.
2026-11-10 12:14:15 -08:00

17 lines
767 B
TypeScript

// DR4's proof, the ad's cheat: the caption's box is set to end above the band (70 px tall at 640 px, 74% down), but
// its words wrap past it to about 85%. A check of the element's box passes it; checks/caption.ts reads the words'
// own box and must fail it.
import { AbsoluteFill, Composition, registerRoot } from "raea";
function Ad() {
return (
<AbsoluteFill style={{ background: "#f4e9d8" }}>
<div style={{ position: "absolute", left: 60, top: 640, width: 380, height: 70, fontSize: 44, fontWeight: 700, color: "#222" }}>
Fresh bread every morning, baked in the shop since six
</div>
</AbsoluteFill>
);
}
registerRoot(() => <Composition id="ad-cheat" component={Ad} width={540} height={960} fps={30} durationInFrames={90} />);