Credibility pass: the session seams sanded from the clips-and-camera batch

Two blind reviews of everything since the last pass (afa0e17), every
finding checked against the code, no behavior changed: all thirty
scene goldens match without a re-bless and the engine suite is
untouched.

Reel and renderer: the camera's look-down rule is stated once, beside
LOOK_DOWN, instead of twice in the effect; the empty aim branch that
stood where a cutaway used to be is gone (the guard it implied is now
explicit); the pit events and the punch are handled by their own
types, not through "in" casts; smoothstep is one export used by every
tween instead of eleven inline copies; the two floor rings share one
painter; project() takes a Billboard instead of a third hand-typed
copy of its fields; the strides-left figure and the web rim no longer
shadow the reel's steps and the pane's fx; the die card's verdict is
built from events, not by matching an emoji; the workshop asks for the
hover cue by name instead of passing an empty click handler.

Server and engine: one requestBase() for the origin, one slug pattern
in store.ts gating both the clip page and its files, one 404 for both;
LOOPBACK sits above its only caller; doCounteract names what a counter
is played against once; fearCells sits beside its own docblock rather
than between sightedCellsFor and its.

Deploy: chromiumExe, the private server, ffmpeg, and the reel rewind
live in deploy/lib/harness.mjs, shared by the gate, the recorder, and
the card cutter instead of pasted three times; the recorder drops its
duplicate frame counters and names its poster settle; the card uses the
gallery's exact gold; the one-time Sentry URL bootstrap leaves
deploy.sh; the backup comment states the rule rather than the incident.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-03 11:55:57 -04:00
co-authored by Claude Fable 5.1
parent ddd2e347bd
commit e1a740119c
20 changed files with 238 additions and 263 deletions
+7 -21
View File
@@ -14,9 +14,10 @@
// Needs ffmpeg + ffprobe and the Playwright chromium cache (see
// verify-scenes.mjs). Idempotent: run it again after re-recording.
import { execFileSync } from "node:child_process";
import { existsSync, readdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
import { existsSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import { chromium } from "playwright-core";
import { chromiumExe, ff } from "./lib/harness.mjs";
const dir = process.argv[2];
if (!dir || !existsSync(join(dir, "clips.json"))) {
@@ -29,22 +30,6 @@ if (!dir || !existsSync(join(dir, "clips.json"))) {
const VIEWPORT = { x: 18, y: 51, w: 700, h: 393 };
const CARD = { width: 1200, height: 630 };
function chromiumExe() {
if (process.env.WIZWAR_CHROME) return process.env.WIZWAR_CHROME;
const cache = join(process.env.HOME ?? "", "Library", "Caches", "ms-playwright");
const builds = existsSync(cache)
? readdirSync(cache).filter((d) => /^chromium-\d+$/.test(d)).sort()
: [];
for (const build of builds.reverse()) {
const exe = join(cache, build, "chrome-mac-arm64",
"Google Chrome for Testing.app", "Contents", "MacOS", "Google Chrome for Testing");
if (existsSync(exe)) return exe;
}
throw new Error("no Playwright chromium found — run: npx playwright-core install chromium (or set WIZWAR_CHROME)");
}
const ff = (...args) => execFileSync("ffmpeg", ["-loglevel", "error", "-y", ...args]);
function faststart(file) {
const tmp = `${file}.tmp.mp4`;
ff("-i", file, "-c", "copy", "-movflags", "+faststart", tmp);
@@ -61,10 +46,11 @@ const esc = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;");
/** The share card: the viewport scaled to the card's width (a 16:9 crop
* runs 674 tall at 1200 wide, so 22px shave top and bottom), a shade
* rising from the bottom, the title in the gallery's gold over it. */
* rising from the bottom, the title over it in the gallery's gold — set
* in Georgia, since the card is rendered offline with no web fonts. */
function cardHtml(title, viewportPngDataUrl) {
return `<!doctype html><html><head><meta charset="utf-8"><style>
html, body { margin: 0; width: ${CARD.width}px; height: ${CARD.height}px; overflow: hidden; background: #171a21; }
html, body { margin: 0; width: ${CARD.width}px; height: ${CARD.height}px; overflow: hidden; background: #171a20; }
.card { position: relative; width: ${CARD.width}px; height: ${CARD.height}px;
font-family: Georgia, "Times New Roman", serif; color: #d6d2c4; }
.card img { position: absolute; left: 0; top: -22px; width: ${CARD.width}px; height: 674px;
@@ -72,11 +58,11 @@ function cardHtml(title, viewportPngDataUrl) {
.shade { position: absolute; inset: 0;
background: linear-gradient(to bottom, rgba(23,26,33,0) 45%, rgba(23,26,33,0.92) 100%); }
.title { position: absolute; left: 56px; right: 56px; bottom: 94px;
font-size: 66px; line-height: 1.1; color: #e8c87a; letter-spacing: 0.02em;
font-size: 66px; line-height: 1.1; color: #e0b34a; letter-spacing: 0.02em;
text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.mark { position: absolute; left: 58px; bottom: 52px; font-size: 26px; letter-spacing: 0.08em;
color: #d6d2c4; opacity: 0.9; text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
.mark b { font-weight: normal; color: #e8c87a; }
.mark b { font-weight: normal; color: #e0b34a; }
</style></head><body><div class="card">
<img src="${viewportPngDataUrl}">
<div class="shade"></div>