Skip to content

fix(ops): guard tracked live metrics against zero-pipeline clobbering - #159

Merged
nish3451 merged 33 commits into
mainfrom
fix/tracked-live-metrics-zero-pipeline-guard
Aug 19, 2026
Merged

fix(ops): guard tracked live metrics against zero-pipeline clobbering#159
nish3451 merged 33 commits into
mainfrom
fix/tracked-live-metrics-zero-pipeline-guard

Conversation

@nish3451

Copy link
Copy Markdown
Collaborator

Problem

The tracked operator metrics surface growth-brain/ops/live-metrics.md reported a zero pipeline (0 prospects) while 50 prospect folders carry pipeline.json in the service root. Root cause: export-growth-metrics.mjs regenerated the tracked default from a root with no outbound prospect pipeline state, silently mistaking an unavailable pipeline for an empty one.

Fix

  • export-growth-metrics.mjs now refuses to regenerate the tracked growth-brain/ops/live-metrics.md default when no prospect folder carries pipeline.json — the same contract the tracked 11/10 proof-run brief already follows. Explicit --output= under runs/ still produces private zero-state reports on purpose.
  • Every internal metrics consumer now redirects to a private runs/ output: parity readiness, daily money mission, growth doctor, internal dashboard, market benchmark, market learning review, market proof run, and growth cockpit (which was previously missed and would fail in a state-less root).
  • test-active-operator-surfaces.mjs extended to assert the refusal path, the private zero-state path, and that tracked artifacts stay byte-identical to the canonical empty-prospect baseline.

Verification

  • node scripts/test-active-operator-surfaces.mjs → passed
  • node scripts/test-client-readiness-contract.mjs → passed
  • node scripts/check-product-truth.mjs → passed
  • Manual: running the exporter from the real service root (SERVICE_REPO_ROOT=/home/nish/workspaces/products/tinystudio-in) reports 50 prospects; running from a state-less root refuses with a clear message and does not touch the tracked file.

The tracked growth-brain/ops/live-metrics.md surface reported a zero
pipeline (0 prospects) because the exporter regenerated it from a root
with no outbound prospect pipeline state, silently mistaking an
unavailable pipeline for an empty one.

- export-growth-metrics.mjs now refuses to regenerate the tracked
  default when no prospect folder carries pipeline.json, matching the
  tracked 11/10 proof-run brief contract. Explicit --output= under
  runs/ still produces private zero-state reports on purpose.
- Redirect every internal metrics consumer (parity, mission, doctor,
  dashboard, benchmark, learning review, proof run, and the previously
  missed growth cockpit) to a private runs/ output so none of them
  rewrite the tracked surface or fail in a state-less root.
- Extend test-active-operator-surfaces.mjs to assert the refusal,
  the private zero-state path, and that tracked artifacts stay at the
  canonical empty-prospect baseline.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@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.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@coderabbitai

coderabbitai Bot commented Aug 14, 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: 7 minutes

Limit details: You’ve used the included review currently available.

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 within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 94bf373e-a06a-4904-922f-e4e506c0fdb8

📥 Commits

Reviewing files that changed from the base of the PR and between ca8d505 and 5732fea.

📒 Files selected for processing (11)
  • .lane/reports/fix-tracked-live-metrics-zero-pipeline-guard.md
  • scripts/check-market-parity-readiness.mjs
  • scripts/export-daily-money-mission.mjs
  • scripts/export-growth-cockpit.mjs
  • scripts/export-growth-doctor.mjs
  • scripts/export-growth-metrics.mjs
  • scripts/export-internal-dashboard.mjs
  • scripts/export-market-benchmark.mjs
  • scripts/export-market-learning-review.mjs
  • scripts/export-market-proof-run.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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@nish3451
nish3451 merged commit 1784c2b into main Aug 19, 2026
2 checks passed
nish3451 added a commit that referenced this pull request Aug 19, 2026
The export-growth-metrics.mjs hunk was an empty HEAD side against main
zero-pipeline guard from PR #159, so main is taken wholesale. What remains
unique here is the SERVICE_REPO_ROOT write-lock test plus its evidence note.
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