Skip to content

fix(ops): honor --help in the 7 growth/ops exporters that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS - #135

Merged
nish3451 merged 1 commit into
mainfrom
fix/lane1-tracked-ops-artefacts-help
Aug 13, 2026
Merged

fix(ops): honor --help in the 7 growth/ops exporters that overwrite tracked ACTIVE_OPERATOR_ARTIFACTS#135
nish3451 merged 1 commit into
mainfrom
fix/lane1-tracked-ops-artefacts-help

Conversation

@nish3451

Copy link
Copy Markdown
Collaborator

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:

  1. Call handleHelp() before any work — --help/-h prints usage and exits 0.
  2. Route every operator-supplied --output/--ops/--html through resolveOutputPath() so the shared path guard refuses any escape attempt (Refusing ...: the path escapes the repository).

The seven:

  • export-growth-metricsgrowth-brain/ops/live-metrics.md
  • export-proof-librarygrowth-brain/ops/proof-library.md
  • export-market-benchmarkgrowth-brain/ops/competitive-proof-matrix.{md,html} + docs/strategy/market-parity-benchmark-2026.md
  • export-sender-setup-guidegrowth-brain/ops/sender-setup-guide.{md,html}
  • export-market-proof-rungrowth-brain/ops/11-10-proof-run.md
  • check-market-parity-readinessgrowth-brain/ops/market-parity-readiness.md
  • export-internal-dashboardruns/internal-dashboard.* (whose surface reads from every tracked ops artifact above)

export-internal-dashboard.mjs child-call path /tmp/tinystudio-internal-dashboard-parity.md was moved to runs/internal-dashboard-parity.md 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 all seven and that they refuse escaping output paths without creating the file outside the repository.

node scripts/test-active-operator-surfaces.mjs passes.

…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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@nish3451, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: f8f2cd5c-1ecd-4e94-bffa-f586dd5409b2

📥 Commits

Reviewing files that changed from the base of the PR and between d54c91f and 184febd.

📒 Files selected for processing (8)
  • scripts/check-market-parity-readiness.mjs
  • scripts/export-growth-metrics.mjs
  • scripts/export-internal-dashboard.mjs
  • scripts/export-market-benchmark.mjs
  • scripts/export-market-proof-run.mjs
  • scripts/export-proof-library.mjs
  • scripts/export-sender-setup-guide.mjs
  • scripts/test-active-operator-surfaces.mjs

Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands.

@nish3451
nish3451 merged commit d4f3ef4 into main Aug 13, 2026
2 checks passed
nish3451 pushed a commit that referenced this pull request Aug 13, 2026
…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.
nish3451 added a commit that referenced this pull request Aug 14, 2026
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>
nish3451 added a commit that referenced this pull request Aug 14, 2026
…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>
nish3451 added a commit that referenced this pull request Aug 17, 2026
…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.
nish3451 added a commit that referenced this pull request Aug 21, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant