fix(ops): honor --help in the 7 growth/ops exporters that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS - #135
Conversation
…racked ACTIVE_OPERATOR_ARTIFACTS
The active operator surface pass covered 21 npm-backed exporters plus the
remaining 8 retired broad-service / client runtime writers, but the seven
scripts that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS still ignored
--help and silently clobbered the tracked brief when asked for help:
- export-growth-metrics (growth-brain/ops/live-metrics.md)
- export-proof-library (growth-brain/ops/proof-library.md)
- export-market-benchmark (competitive-proof-matrix.{md,html} and
market-parity-benchmark-2026.md)
- export-sender-setup-guide (sender-setup-guide.{md,html})
- export-market-proof-run (11-10-proof-run.md)
- check-market-parity-readiness (market-parity-readiness.md)
- export-internal-dashboard (runs/internal-dashboard.* whose surface
reads from every tracked ops artifact above)
All seven now call handleHelp() before any work: --help/-h prints usage
and exits 0 without writing. Every operator-supplied --output/--ops/--html
is routed through resolveOutputPath() so the new path guard refuses any
escape attempt, mirroring the existing pattern in the owned-*/client
writers (shared scripts/lib/operator-cli.mjs). The internal
/tmp/tinystudio-internal-dashboard-parity.md child call in
export-internal-dashboard is moved under runs/ so the new guard does not
refuse the call. export-market-benchmark and export-market-proof-run
keep the relative path for their internal "prospects/kit-" branching and
JSON output paths so the regenerated tracked artifacts stay byte-identical.
test-active-operator-surfaces.mjs now asserts the --help/-h contract for
the seven growth/ops scripts, and that they refuse escaping output paths
without creating the file outside the repository.
|
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: 20 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 (8)
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 |
…le with main after PRs #135/#104/#99/#112/#100/#105) The PR #130 branch had already been reconciled with origin/main through c617364 (PRs #131 + #133/#134/#132/#116). Since then origin/main moved to d4f3ef4 with six more merges (#135 #104 #99 #112 #100 #105). Pull them in so PR #130 can be reviewed against current main without weakening the capture/rollback/reverification implementation or the PR #131 fail-closed missing-secret gate. The merge resolved cleanly: - PR #130 capture/rollback logic (publish-public-site.mjs canonical_deployment, rollbackTo, restored identity re-verify, accept-again) is intact. - PR #130 test file (scripts/test-pages-release.mjs) is intact and wired into the npm ci/test scripts. - PR #131 fail-loud missing-secret workflow step in .github/workflows/deploy-public-site.yml is preserved byte-for-byte. - The new origin/main changes touch operator surfaces and the deploy bundle prep; none of them modify the publish-public-site.mjs rollback contract or the Pages token gate, so there were no conflict markers.
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. Co-authored-by: minimax-vps <minimax-vps@local>
…on main (#165) The growth/ops exporters that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS (live-metrics, proof-library, market-benchmark, sender-setup-guide, market-proof-run, market-parity-readiness, internal-dashboard) already honor --help/-h via commit d4f3ef4 (PR #135): handleHelp() runs before any work, --output/--ops/--html are routed through resolveOutputPath(), and scripts/test-active-operator-surfaces.mjs enforces exit 0 + usage + no artifact rewrite for both flags. Re-verified live: both probes exit 0 with usage and leave tracked artifacts byte-identical; the full operator-surface test passes. No source change is possible or needed; this report documents the verification. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
…d on main (PR #135) (#187) The 7 growth/ops exporters that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS (live-metrics, proof-library, market-benchmark, sender-setup-guide, market-proof-run, market-parity-readiness, internal-dashboard) honor --help/-h via commit d4f3ef4 (PR #135): handleHelp() runs before any work, --output/--ops/--html are routed through resolveOutputPath(), and scripts/test-active-operator-surfaces.mjs enforces exit 0 + usage + no artifact rewrite for both flags. Re-verified live against fresh origin/main (4b8e240): both named probes exit 0 with usage and leave tracked artifacts byte-identical (md5 unchanged); the full operator-surface test passes. No source change is possible or needed; this report documents the verification.
…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>
Fixes the lane-1 item Growth/ops exporters ignore --help and overwrite tracked ops artifacts (live-metrics, proof-library, ...).
The earlier active-operator-surface pass (PR #99) covered 8 remaining scripts but missed the seven that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS. All seven now:
handleHelp()before any work —--help/-hprints usage and exits 0.--output/--ops/--htmlthroughresolveOutputPath()so the shared path guard refuses any escape attempt (Refusing ...: the path escapes the repository).The seven:
export-growth-metrics→growth-brain/ops/live-metrics.mdexport-proof-library→growth-brain/ops/proof-library.mdexport-market-benchmark→growth-brain/ops/competitive-proof-matrix.{md,html}+docs/strategy/market-parity-benchmark-2026.mdexport-sender-setup-guide→growth-brain/ops/sender-setup-guide.{md,html}export-market-proof-run→growth-brain/ops/11-10-proof-run.mdcheck-market-parity-readiness→growth-brain/ops/market-parity-readiness.mdexport-internal-dashboard→runs/internal-dashboard.*(whose surface reads from every tracked ops artifact above)export-internal-dashboard.mjschild-call path/tmp/tinystudio-internal-dashboard-parity.mdwas moved toruns/internal-dashboard-parity.mdso the new guard does not refuse the call.export-market-benchmarkandexport-market-proof-runkeep the relative path for their internalprospects/kit-branching and JSON output paths, so the regenerated tracked artifacts stay byte-identical.test-active-operator-surfaces.mjsnow asserts the--help/-hcontract for all seven and that they refuse escaping output paths without creating the file outside the repository.node scripts/test-active-operator-surfaces.mjspasses.