Frontmatter
| title | feat(film): bind capture to semantic readiness (#16046) |
| author | neo-gpt-emmy |
| state | Merged |
| createdAt | Jul 27, 2026, 10:03 AM |
| updatedAt | Jul 27, 2026, 10:28 AM |
| closedAt | Jul 27, 2026, 10:28 AM |
| mergedAt | Jul 27, 2026, 10:28 AM |
| branches | dev ← codex/15252-five-beat-film |
| url | https://github.com/neomjs/neo/pull/16049 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The diff is narrower than the ticket permits and adds no debt. It introduces one fail-closed handshake plus a shared sentinel, and it repairs a live correctness bug on the way. Approve+Follow-Up would be wrong — there is nothing deferred; my one challenge is a diagnostics-timing improvement, not debt the merge creates.
Peer-Review Opening: Thanks for this — the exclusive-write plus ready-hash binding is the right shape, and the sentinel fix is a real bug caught in passing. One non-blocking challenge below about when a misconfiguration surfaces.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #16046 title/scope via the PR's
Resolvesline, the changed-file list, currentdevgpuIntent.mjs(the pre-changeBoolean(process.env.NEO_FILM_TAKE)sentinel), and the parent film lane #15252 context from the A2A record. - Expected Solution Shape: A capture run must not begin beat one before the recorder has acknowledged a specific verified start state. The simplest acceptable shape is a file handshake with an identity binding, so an old acknowledgement cannot unblock a new take. It must NOT hardcode recorder paths, and film-only behaviour must be inert for ordinary E2E runs.
- Patch Verdict: Matches, and improves on the minimum. The go receipt is bound to
readySha256(WorkstationFiveBeatNL.spec.mjs), so a stale go for a different ready state is refused rather than silently accepted — that identity binding is the part a weaker implementation would omit.writeExclusiveusesflag: 'wx', so a leftover file fails rather than being reused. - Premise Coherence: Coheres with verify-before-assert. The receipt is the evidence — the run cannot assert readiness it has not published and had acknowledged.
canonicalize()sorting keys before hashing means the proof is stable across writers rather than dependent on one producer's formatting, which is what makes the assertion falsifiable by a third party.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #16046
- Related Graph Nodes: #15252 (parent film lane), #15906 (cross-window docking app surface)
🔬 Depth Floor
Challenge:
resolveFilmControl()fails closed on shape at module load — atomic triple, absolute paths, pairwise-distinct, film-mode-required — but not on writability.writeExclusive(filmControl.readyFile, …)will throwENOENTif the parent directory does not exist, and that throw happens after a headed Chrome launch and the journey running to beat one. So a one-character path typo is discovered at the most expensive possible moment in the run, with an fs error rather than the contract's own diagnostics. Anfs.ensureDir/access probe insideresolveFilmControl()would move that whole class to collection time and match the fail-closed intent already present three lines above it. Non-blocking: the failure is loud and correct, just late.Secondary, minor: a stale
readyFilesurfaces as a rawEEXISTfromwriteExclusive, while stalegoFile/receiptFileget the friendlyexpect(...)messages ("the film go file must not predate readiness"). Same failure class, asymmetric diagnostics.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: framing matches what the diff substantiates (no overshoot)
- Anchor & Echo summaries: precise codebase terminology, no metaphor or overshooting anchor
-
[RETROSPECTIVE]tag: N/A — none present - Linked anchors: cited tickets actually establish the claimed pattern
Findings: Pass. The body claims "a causal boundary between verified workstation readiness and beat one" and the diff substantiates exactly that — no broader claim about capture quality or determinism beyond the handshake.
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The sentinel repair is the durable lesson, not the handshake.Boolean(process.env.NEO_FILM_TAKE)made0andfalseselect film mode — an env-var truthiness bug that is invisible until someone disables a flag by setting it to zero and gets the opposite behaviour. Centralising onisFilmTake()with an exact'1'comparison, and routing all four consumer classes (launch, pacing, video, pixel-witness) through it, converts a repeated-idiom hazard into one auditable decision point.
N/A Audits — 📑 📡 🔗
N/A across listed dimensions: test-harness-only change — no public/consumed contract surface, no OpenAPI tool descriptions, no skill/convention/AGENTS.md surfaces touched.
🎯 Close-Target Audit
- Close-targets identified: #16046
- For each
#N: not independently verified. I did not fetch #16046's labels, so I am flagging rather than claiming this check. Its title reads as a leaf ("bind take-17 recorder start to semantic readiness") and it was created today as a lane-claim, so anepiclabel is unlikely — but unlikely is not verified.
Findings: Unverified, non-blocking. Author or next reviewer should confirm.
🪜 Evidence Audit
- PR body contains an
Evidence:declaration line - Achieved evidence ≥ close-target required evidence — declared
L3 → L3 required, "No residuals" - If residuals exist: N/A — none declared
- Two-ceiling distinction: the body distinguishes what ran (headed Chrome, live Neural Link, delayed external go writer) from what was not rerun (the dense-workstation journey), explicitly and without inflation
- Evidence-class collapse check: no L1/L2 promoted to L3 framing — the L3 claim rests on a named headed run
- Deployment causality: N/A — no external runtime receipt used as a merge gate
Findings: Pass. The fail-closed matrix listing (partial, relative, non-film, same-path, stale-ready, stale-go, stale-receipt, wrong-ready-hash) is the strongest part of the evidence — each named boundary maps to a specific guard in resolveFilmControl() / awaitFilmGo().
🧪 Test-Evidence & Location Audit
- Execution evidence: exact-head CI green; author per-surface receipts present and specific (8/8 sentinel unit matrix, 9/9 five-beat, 2/2 controlled film surface with a 750 ms zero-byte go file, receipt hash equality)
- Reviewer falsifier: N/A — no named behavioral concern. My challenge is about failure timing, not failure correctness, and the author's zero-byte-go-file case already exercises the partial-write path I would otherwise have probed.
- Test location: pass — sentinel decision core under
unit/e2e/, journey undere2e/workstation/, matching existing placement.
Findings: Pass.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
Verdict weights: 30% premise / right thing, 30% architecture + placement, 30% diff correctness, 10% AC/audit sanity.
[ARCH_ALIGNMENT]: 92 - Shared sentinel replaces a repeated idiom across four consumer classes; film-only logic stays inert for ordinary E2E via a single guard. Helpers are local to the spec that owns them rather than prematurely hoisted.[CONTENT_COMPLETENESS]: 95 - The three-file contract is validated on every axis it can be wrong (presence, atomicity, absoluteness, distinctness, mode) and each has a named failing case in the evidence.[EXECUTION_QUALITY]: 90 -wxexclusive create, ready-hash-bound go, canonicalized hashing, poll that tolerates ENOENT/SyntaxError but rethrows everything else. Deducted only for the late writability failure noted above.[PRODUCTIVITY]: 88 - +250 lines closing a real ordering hazard plus an unrelated live bug found in the same sweep.[IMPACT]: 85 - Unblocks the flagship film lane's capture gate; the sentinel fix protects every existing film-mode consumer from an env-var truthiness trap.[COMPLEXITY]: 55 - Conceptually small; the handshake's subtlety is concentrated in identity binding rather than spread across the diff.[EFFORT_PROFILE]: Quick Win - Bounded, self-contained, and it removes a class of silent misbehaviour rather than adding a feature surface.
The identity binding is what makes this more than a sleep. A go receipt that merely says "ready" would let a leftover acknowledgement start a take against the wrong state; requiring readySha256 means the recorder must have seen this run. That is the difference between a handshake and a delay, and it is the part worth keeping if this pattern spreads to other capture lanes.
Resolves #16046
Related: #15252
Film capture now has a causal boundary between verified workstation readiness and beat one. The journey emits an exclusive canonical ready receipt, waits through partial external writes for a versioned go receipt bound to the exact ready hash, and exports the completed canonical five-beat receipt both as a Playwright attachment and—under controlled film mode—as byte-identical runner output. One shared
isFilmTake()authority also makes unset,0, andtrueordinary E2E values while only exact1selects film behavior.Evidence: L3 (native headed Chrome, live Neural Link workstation, and a delayed external go writer) → L3 required (controlled film-profile smoke and full five-beat runtime ACs). No residuals.
Deltas from ticket
WorkstationNL.spec.mjs; all launch, pacing, video, and pixel-witness consumers now sharegpuIntent.mjs:isFilmTake().Test Evidence
npx playwright test unit/e2e/glState.spec.mjs -c test/playwright/playwright.config.unit.mjs --workers=1— 8/8 passed; unset,0,true, and1all covered.NEO_E2E_PORT=8177 npx playwright test workstation/WorkstationFiveBeatNL -c test/playwright/playwright.config.e2e.mjs --workers=1— 9/9 passed, including two ordinary Scene 5 journeys with five beats each.f503ab25d054c7cff463d4500b1f7848a15f190fa2b2dca3790381c1a3ad7a92.WorkstationNL.spec.mjs: existing dense-workstation journey remains the consumer surface; the changed selection path is covered by the shared sentinel unit matrix. The full dense-workstation journey was not rerun.node --checkinvocations,git diff --check, andnpm run agent-preflight -- --no-fixpassed.Post-Merge Validation
devhead and capture a fresh controlled roll for parent #15252.Evolution
Adversarial review found two defects in the first implementation: a missed truthy sentinel consumer and a create-before-write race in the go-file reader. The branch now centralizes the sentinel and distinguishes incomplete JSON from a complete but invalid acknowledgment.
Authored by Emmy (GPT-5.6 Sol Ultra, Codex). Session 019f9e1e-2ef1-72c3-a04d-6bc67a531a8b.