feat(control-room): add reviewed Video-editor release flow #129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/ops-control-room"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Delivers the reviewed Ops Control Room implementation for the Video-editor initial-deploy flow:
Provenance
3c5d17ea9b4a0626cac073a06bc5a072297c969f837be298-3c6a-4d48-9aec-b23e495f8afb(PLAN READY: YES)docs/superpowers/plans/2026-07-29-ops-control-room-video-editor-initial-deploy-implementation-plan.mdcmp43iaoi000h6o7rxklqivl5)cms69x5dk004jx617fviyb3pacms69xmve004mx6176hn4lgt6cms69yaq5004vx617myopbcs9,cms69yasm004wx617eo94l970,cms69yaux004xx617r6ojyhn5cms69yaxd004yx617baxwen77Implementation commits
1429a3d— durable operations UI84dce85,5fca0a8,76b67de— reviewed UI hardening84e55df— Video-editor release adapter0d5f00e,33b168d,030fcd2,c03d765— reviewed adapter and recovery hardeninga476c63— release-verification runbooksAll task-scoped independent review findings classified Critical/Important were resolved and re-reviewed to
READY: YESbefore this PR.Verification
103/103passed1088passed,1skippedDATABASE_URL; generated build metadata restored afterwardRelease safety
No foundation activation, calibration, deployment, migration, Caddy/public-route change or production release has occurred. The checked-in definition remains fail-closed with
calibration.status: pending. Task 12 requires CI/auto-review and merge before the separately audited max2 foundation and non-mutating calibration gates. A real release remains blocked behind a later, separate explicit user authorization.Verdict: REQUEST_CHANGES
geen gekoppeld plan gevonden — beoordeeld op codekwaliteit + product-standaarden.
Findings
ERROR —
deploy/ops-agent/setup.sh:84/deploy/ops-agent/scripts/video-editor-control-room.sh:29: de privileged wrapper zetCALIBRATION_CLIop/usr/local/lib/ops-agent/control-room/video-editor.js, en setup kopieert daar alleenvideo-editor.jsencanonical.jsheen, buiten het/opt/ops-agentpackage. Zonder nabijgelegenpackage.jsonmettype: modulebehandelt Node dit.jsbestand als CommonJS, terwijl de build output ESMimportstatements bevat. Daardoor falen alle wrapper-CLI calls zoalsprepare-snapshot,edge-address,compare-http-probeencheck-logindirect in productie. Dit blokkeert de Control Room initial deploy flow en ondermijnt de spec-eis dat de agent autoritatief preflight/probe/recovery evidence kan produceren.ERROR —
ops-agent/src/control-room/definition.ts:200enops-agent/src/control-room/video-editor.ts:1558: beide CLI entrypoints gebruikenif (typeof require !== 'undefined' && require.main === module). De ops-agent codebase is ESM-georiënteerd (imports met.js, tests viaimport.meta.url), dusrequireis in native ESM niet gedefinieerd en deze blokken worden nooit uitgevoerd. Zelfs wanneerdefinition.jsvanuit/opt/ops-agent/distonder het juiste package wordt gestart,node dist/control-room/definition.js calibration-binding ...schrijft dan niets en exit met code 0; setup installeert vervolgens een legedefinition-calibration.json, waarna transit-calibratie fail-closed blijft. Gebruik een ESM-compatible main check, bijvoorbeeld viaimport.meta.urlenpathToFileURL(process.argv[1]).href, en zorg dat de geïnstalleerde privileged CLI als ESM uitvoerbaar blijft.PR #129 review disposition
Review:
s4m-codex-reviewer, review id198, commita476c638dfcc69c344a319b5b829d5991b547d88Verdict received:
REQUEST_CHANGESFinding 1 — installed privileged CLI allegedly contains ESM syntax
Disposition: not reproducible / rejected.
Evidence:
ops-agent/tsconfig.jsonexplicitly sets"module": "commonjs".npm --prefix ops-agent run build --silentemits"use strict"and CommonJSrequire(...)calls, not ESMimportstatements.dist/control-room/video-editor.jshas one relative runtime dependency:./canonical;setup.shinstalls bothvideo-editor.jsandcanonical.jsin the same root-owned directory.node --check.video-editor.jswithout arguments enters its CLI main path, emitsVIDEO_EDITOR_TRANSIT_PROBE_FAILED, and exits1. If the main guard were inactive it would silently exit0.No product-code change is warranted for this finding.
Finding 2 — CommonJS main guards allegedly never execute
Disposition: not reproducible / rejected.
Evidence:
The source uses TypeScript import syntax, but the production compiler target is CommonJS.
The generated
definition.jsandvideo-editor.jstherefore have definedrequireandmodulebindings.Exact command reproduced successfully:
node ops-agent/dist/control-room/definition.js calibration-binding deploy/control-room/video_editor_initial_deploy.v2.ymlOutput:
{"status":"pending"}; exit0.The isolated privileged CLI execution above independently proves that its
require.main === moduleguard runs.Replacing the working CommonJS guards with ESM-only
import.meta.urllogic would conflict with the actual compiler target. No product-code change is warranted.Worktree state
lib/build-info.ts; it was restored exactly viaapply_patch.git status --short: clean.git diff --check: clean.Dismissed after exact production-build reproduction: ops-agent compiles CommonJS, the isolated installed CLI executes its main guard, and definition calibration-binding outputs valid JSON. Full evidence: issue comment 3577.