feat(control-room): add reviewed Video-editor release flow #129

Merged
janpeter merged 10 commits from codex/ops-control-room into main 2026-08-02 10:31:18 +02:00
Owner

Summary

Delivers the reviewed Ops Control Room implementation for the Video-editor initial-deploy flow:

  • durable three-column operator UI and reconnecting client;
  • exact Video-editor v2 definition, runner and adapter;
  • secure admission, evidence, rollback and restart-recovery behavior;
  • Tailscale-only foundation provisioning contracts;
  • end-to-end verification harnesses and operator runbooks.

Provenance

  • Reviewed design commit: 3c5d17ea9b4a0626cac073a06bc5a072297c969f
  • Final plan-review reply: 837be298-3c6a-4d48-9aec-b23e495f8afb (PLAN READY: YES)
  • Implementation plan: docs/superpowers/plans/2026-07-29-ops-control-room-video-editor-initial-deploy-implementation-plan.md
  • Scrum4Me product: Ops Dashboard (cmp43iaoi000h6o7rxklqivl5)
  • Sprint: cms69x5dk004jx617fviyb3pa
  • Story ST-026: cms69xmve004mx6176hn4lgt6
  • Tasks 9–11: cms69yaq5004vx617myopbcs9, cms69yasm004wx617eo94l970, cms69yaux004xx617r6ojyhn5
  • Release-gate Task 12: cms69yaxd004yx617baxwen77

Implementation commits

  • 1429a3d — durable operations UI
  • 84dce85, 5fca0a8, 76b67de — reviewed UI hardening
  • 84e55df — Video-editor release adapter
  • 0d5f00e, 33b168d, 030fcd2, c03d765 — reviewed adapter and recovery hardening
  • a476c63 — release-verification runbooks

All task-scoped independent review findings classified Critical/Important were resolved and re-reviewed to READY: YES before this PR.

Verification

  • Focused Control Room suite: 103/103 passed
  • Full test suite: 1088 passed, 1 skipped
  • Root TypeScript check: passed
  • Production build: passed with a non-secret placeholder DATABASE_URL; generated build metadata restored afterward
  • Ops-agent check: passed
  • Shell syntax checks for setup/wrappers: passed
  • Prisma validation: passed with a non-secret placeholder database URL
  • Worktree and diff checks: clean

Release 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.

## Summary Delivers the reviewed Ops Control Room implementation for the Video-editor initial-deploy flow: - durable three-column operator UI and reconnecting client; - exact Video-editor v2 definition, runner and adapter; - secure admission, evidence, rollback and restart-recovery behavior; - Tailscale-only foundation provisioning contracts; - end-to-end verification harnesses and operator runbooks. ## Provenance - Reviewed design commit: `3c5d17ea9b4a0626cac073a06bc5a072297c969f` - Final plan-review reply: `837be298-3c6a-4d48-9aec-b23e495f8afb` (`PLAN READY: YES`) - Implementation plan: `docs/superpowers/plans/2026-07-29-ops-control-room-video-editor-initial-deploy-implementation-plan.md` - Scrum4Me product: Ops Dashboard (`cmp43iaoi000h6o7rxklqivl5`) - Sprint: `cms69x5dk004jx617fviyb3pa` - Story ST-026: `cms69xmve004mx6176hn4lgt6` - Tasks 9–11: `cms69yaq5004vx617myopbcs9`, `cms69yasm004wx617eo94l970`, `cms69yaux004xx617r6ojyhn5` - Release-gate Task 12: `cms69yaxd004yx617baxwen77` ## Implementation commits - `1429a3d` — durable operations UI - `84dce85`, `5fca0a8`, `76b67de` — reviewed UI hardening - `84e55df` — Video-editor release adapter - `0d5f00e`, `33b168d`, `030fcd2`, `c03d765` — reviewed adapter and recovery hardening - `a476c63` — release-verification runbooks All task-scoped independent review findings classified Critical/Important were resolved and re-reviewed to `READY: YES` before this PR. ## Verification - Focused Control Room suite: `103/103` passed - Full test suite: `1088` passed, `1` skipped - Root TypeScript check: passed - Production build: passed with a non-secret placeholder `DATABASE_URL`; generated build metadata restored afterward - Ops-agent check: passed - Shell syntax checks for setup/wrappers: passed - Prisma validation: passed with a non-secret placeholder database URL - Worktree and diff checks: clean ## Release 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.
s4m-codex-reviewer requested changes 2026-08-02 10:21:44 +02:00
Dismissed
s4m-codex-reviewer left a comment

Verdict: REQUEST_CHANGES

geen gekoppeld plan gevonden — beoordeeld op codekwaliteit + product-standaarden.

Findings

  • ERRORdeploy/ops-agent/setup.sh:84 / deploy/ops-agent/scripts/video-editor-control-room.sh:29: de privileged wrapper zet CALIBRATION_CLI op /usr/local/lib/ops-agent/control-room/video-editor.js, en setup kopieert daar alleen video-editor.js en canonical.js heen, buiten het /opt/ops-agent package. Zonder nabijgelegen package.json met type: module behandelt Node dit .js bestand als CommonJS, terwijl de build output ESM import statements bevat. Daardoor falen alle wrapper-CLI calls zoals prepare-snapshot, edge-address, compare-http-probe en check-login direct 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.

  • ERRORops-agent/src/control-room/definition.ts:200 en ops-agent/src/control-room/video-editor.ts:1558: beide CLI entrypoints gebruiken if (typeof require !== 'undefined' && require.main === module). De ops-agent codebase is ESM-georiënteerd (imports met .js, tests via import.meta.url), dus require is in native ESM niet gedefinieerd en deze blokken worden nooit uitgevoerd. Zelfs wanneer definition.js vanuit /opt/ops-agent/dist onder 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 lege definition-calibration.json, waarna transit-calibratie fail-closed blijft. Gebruik een ESM-compatible main check, bijvoorbeeld via import.meta.url en pathToFileURL(process.argv[1]).href, en zorg dat de geïnstalleerde privileged CLI als ESM uitvoerbaar blijft.

# 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 zet `CALIBRATION_CLI` op `/usr/local/lib/ops-agent/control-room/video-editor.js`, en setup kopieert daar alleen `video-editor.js` en `canonical.js` heen, buiten het `/opt/ops-agent` package. Zonder nabijgelegen `package.json` met `type: module` behandelt Node dit `.js` bestand als CommonJS, terwijl de build output ESM `import` statements bevat. Daardoor falen alle wrapper-CLI calls zoals `prepare-snapshot`, `edge-address`, `compare-http-probe` en `check-login` direct 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:200` en `ops-agent/src/control-room/video-editor.ts:1558`: beide CLI entrypoints gebruiken `if (typeof require !== 'undefined' && require.main === module)`. De ops-agent codebase is ESM-georiënteerd (imports met `.js`, tests via `import.meta.url`), dus `require` is in native ESM niet gedefinieerd en deze blokken worden nooit uitgevoerd. Zelfs wanneer `definition.js` vanuit `/opt/ops-agent/dist` onder 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 lege `definition-calibration.json`, waarna transit-calibratie fail-closed blijft. Gebruik een ESM-compatible main check, bijvoorbeeld via `import.meta.url` en `pathToFileURL(process.argv[1]).href`, en zorg dat de geïnstalleerde privileged CLI als ESM uitvoerbaar blijft.
Author
Owner

PR #129 review disposition

Review: s4m-codex-reviewer, review id 198, commit a476c638dfcc69c344a319b5b829d5991b547d88

Verdict received: REQUEST_CHANGES

Finding 1 — installed privileged CLI allegedly contains ESM syntax

Disposition: not reproducible / rejected.

Evidence:

  • ops-agent/tsconfig.json explicitly sets "module": "commonjs".
  • A fresh npm --prefix ops-agent run build --silent emits "use strict" and CommonJS require(...) calls, not ESM import statements.
  • dist/control-room/video-editor.js has one relative runtime dependency: ./canonical; setup.sh installs both video-editor.js and canonical.js in the same root-owned directory.
  • A clean isolated directory containing only those two installed files passes node --check.
  • Executing the isolated video-editor.js without arguments enters its CLI main path, emits VIDEO_EDITOR_TRANSIT_PROBE_FAILED, and exits 1. If the main guard were inactive it would silently exit 0.

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.js and video-editor.js therefore have defined require and module bindings.

  • Exact command reproduced successfully:

    node ops-agent/dist/control-room/definition.js calibration-binding deploy/control-room/video_editor_initial_deploy.v2.yml

    Output: {"status":"pending"}; exit 0.

  • The isolated privileged CLI execution above independently proves that its require.main === module guard runs.

Replacing the working CommonJS guards with ESM-only import.meta.url logic would conflict with the actual compiler target. No product-code change is warranted.

Worktree state

  • The diagnostic root build temporarily regenerated lib/build-info.ts; it was restored exactly via apply_patch.
  • git status --short: clean.
  • git diff --check: clean.
  • No foundation, calibration, deployment or activation was performed.
# PR #129 review disposition Review: `s4m-codex-reviewer`, review id `198`, commit `a476c638dfcc69c344a319b5b829d5991b547d88` Verdict received: `REQUEST_CHANGES` ## Finding 1 — installed privileged CLI allegedly contains ESM syntax Disposition: **not reproducible / rejected**. Evidence: - `ops-agent/tsconfig.json` explicitly sets `"module": "commonjs"`. - A fresh `npm --prefix ops-agent run build --silent` emits `"use strict"` and CommonJS `require(...)` calls, not ESM `import` statements. - `dist/control-room/video-editor.js` has one relative runtime dependency: `./canonical`; `setup.sh` installs both `video-editor.js` and `canonical.js` in the same root-owned directory. - A clean isolated directory containing only those two installed files passes `node --check`. - Executing the isolated `video-editor.js` without arguments enters its CLI main path, emits `VIDEO_EDITOR_TRANSIT_PROBE_FAILED`, and exits `1`. If the main guard were inactive it would silently exit `0`. 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.js` and `video-editor.js` therefore have defined `require` and `module` bindings. - Exact command reproduced successfully: `node ops-agent/dist/control-room/definition.js calibration-binding deploy/control-room/video_editor_initial_deploy.v2.yml` Output: `{"status":"pending"}`; exit `0`. - The isolated privileged CLI execution above independently proves that its `require.main === module` guard runs. Replacing the working CommonJS guards with ESM-only `import.meta.url` logic would conflict with the actual compiler target. No product-code change is warranted. ## Worktree state - The diagnostic root build temporarily regenerated `lib/build-info.ts`; it was restored exactly via `apply_patch`. - `git status --short`: clean. - `git diff --check`: clean. - No foundation, calibration, deployment or activation was performed.
janpeter dismissed s4m-codex-reviewer's review 2026-08-02 10:30:18 +02:00
Reason:

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.

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
janpeter/Ops-dashboard!129
No description provided.