fix(ops): honor --help in the 4 recording-batch exporters - #145
Conversation
The recording-cockpit / recording-queue / recording-rehearsal-check / recording-teleprompter scripts never tested process.argv for --help / -h and never routed their --output= / --html= flags through the shared operator CLI safety helpers. Calling any of them with --help ran the full batch export and silently rewrote the corresponding artifact in prospects/, the same hazard PR #135 and PR #99 closed for the growth/ops exporters and the retired broad-service writers. All four now follow the established handleHelp / resolveOutputPath pattern (scripts/lib/operator-cli.mjs): 1. Call handleHelp(args, 'Usage: ...') immediately after parsing process.argv, before any work, so --help/-h print usage and exit 0. 2. Route every operator-supplied --output= / --html= value through resolveOutputPath(..., { fallback }) so paths that escape the service repository are refused with a clear error. scripts/test-active-operator-surfaces.mjs now registers the four recording-batch scripts in remainingHelpSurface, so the shared --help / -h loop asserts the same exit-0 + 'Usage:' contract and confirms no tracked, runtime, or retired artifact is rewritten when help is asked for.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Warning Review limit reached
Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (6)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
… on main (PR #145) (#180) The four recording-batch exporters (teleprompter / rehearsal / cockpit / queue) that previously ignored --help and rewrote their artifacts in prospects/ were fixed in a01b261 / fc44b42 (PR #145): handleHelp() runs before any work, --output= / --html= are routed through resolveOutputPath(), and scripts/test-active-operator-surfaces.mjs enforces exit 0 + usage for both --help and -h. Re-verified live against fresh origin/main: all four probes print usage and exit 0 without writing any artifact, and the full operator-surface suite passes. No source change is possible or needed; this report documents the verification. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
… on main (PR #145) (#188) The four recording-batch exporters (teleprompter / rehearsal / cockpit / queue) that previously ignored --help and rewrote their artifacts in prospects/ were fixed in PR #145 (merge fc44b42): handleHelp() runs before any work, --output= / --html= are routed through resolveOutputPath(), and scripts/test-active-operator-surfaces.mjs enforces exit 0 + usage for both --help and -h. Re-verified live against fresh origin/main (4b8e240): the shared operator-surface suite passes, all four probes print usage and exit 0 for both --help and -h without writing any artifact, and git status shows no source change. No source change is possible or needed; this report documents the reverification.
…main by PR #80 (duplicate guard) (#234) The duplicate-PR guard (PR #80, merged 2026-08-19) is now live on main, preventing the same-fix duplication pattern at the CI level. The named duplicate pairs (#36/#44, #39/#49, #40/#52) are functionally superseded: their underlying fixes are on main via PRs #135, #145, and #178. The prior 2026-08-15 lane run had concluded the guard existed but was stuck unmerged; on 2026-08-19 it landed and the item is resolved at the root-cause level. Verification-only run (no product or test files touched): - PR #80 source commit 2091c7a and merge commit 0a9909b are ancestors of origin/main - scripts/test-pr-duplicates.mjs → 'test-pr-duplicates: ok' (exit 0) - Superseding PRs #135 (d4f3ef4), #145 (fc44b42), #178 (77f6922) all on main - Guard workflow runs on pull_request events; not a required status, so existing work never blocks Co-authored-by: minimax-vps <minimax-vps@nish3451.dev>
… on main (PR #145) (#218) The four recording-batch exporters (teleprompter / rehearsal / cockpit / queue) that previously ignored --help and rewrote their artifacts in prospects/ were fixed in PR #145 (merge fc44b42): handleHelp() runs before any work, --output= / --html= are routed through resolveOutputPath(), and scripts/test-active-operator-surfaces.mjs enforces exit 0 + usage for both --help and -h. Re-verified live against fresh origin/main (6c3d83f): the shared operator-surface suite passes, all four probes print usage and exit 0 for both --help and -h without writing any artifact, and git status shows no source change. No source change is possible or needed; this report documents the reverification. Co-authored-by: minimax-vps <minimax-vps@MiniMax.local> Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Summary
Closes the unreviewed-by-opus item: recording-batch exporters
(teleprompter / rehearsal / cockpit / queue) ignored
--help/-hand silently rewrote their default artifact in
prospects/when askedfor help.
This is the same hazard PR #135 and PR #99 closed for the
growth/ops exporters and the retired broad-service writers.
Changes
All four scripts now follow the established
handleHelp/resolveOutputPathpattern (sharedscripts/lib/operator-cli.mjs):handleHelpandresolveOutputPath.handleHelp(args, "Usage: ...")immediately after parsingprocess.argv, before any work, so--help/-hprint usage andexit 0.
--output=/--html=value throughresolveOutputPath(..., { fallback })so paths that escape theservice repository are refused with a clear error (exit 1, no
write).
scripts/export-recording-cockpit.mjsprospects/recording-cockpit.htmlscripts/export-recording-queue.mjsprospects/recording-queue.mdscripts/export-recording-rehearsal-check.mjsprospects/recording-rehearsal-check.{md,html}scripts/export-recording-teleprompter.mjsprospects/recording-teleprompter.htmlscripts/test-active-operator-surfaces.mjsnow registers the fourrecording-batch scripts in
remainingHelpSurface, so the shared--help/-hloop asserts the same exit-0 +Usage:contract andconfirms no tracked, runtime, or retired artifact is rewritten when
help is asked for.
Verification
node scripts/test-active-operator-surfaces.mjs— passes(
Active operator surface checks passed.).--help/-hprobes for each script: exit 0, printsusage, no
prospects/artifact created.--output=/tmp/escape-*.mdprobes: refused withRefusing --output=...: the path escapes the repository, exit 1,no file written outside the service root.