Skip to content

fix(platform): six medium-severity design/consistency issues on /repos - #157

Merged
clickmatos merged 1 commit into
mainfrom
fix/repos-medium-issues
Aug 13, 2026
Merged

fix(platform): six medium-severity design/consistency issues on /repos#157
clickmatos merged 1 commit into
mainfrom
fix/repos-medium-issues

Conversation

@clickmatos

Copy link
Copy Markdown
Contributor

Follow-up to #156 — the six 🟡 medium findings from the same /repos audit.

Fixes

  1. Unified three independently hand-picked significance thresholds into one canonical PP_STABLE=5.0/PP_NOTABLE=15.0, mirrored from iris/analysis/trend_delta.py (docs/METRICS.md). detectChanges' stabilization check used 10pp (matched neither engine bound), revert used 5pp (matched PP_STABLE), AI coverage used 15pp (matched PP_NOTABLE) — three different bars with no shared rationale. All three now use PP_STABLE. The adoption timeline's flat/up/down classifier used a separate 2pp threshold, well under even the engine's own noise floor — a 2.5pp move was rendering as a confident "improved" arrow. Now shares the same constant.

  2. Added a sample-size floor to the repo-scoped DORA card, matching the org dashboard's MIN_EVALUATED_FOR_KPIS=10 (extracted to a shared export so both surfaces stay in sync going forward). A repo with 1 failed deploy showed "CFR: 100.0%" with the same visual confidence as one with hundreds of evaluated deploys.

  3. Disclosed the DORA card's time anchor: it's a live rolling window from Datadog as of request time, while the rest of the repo-detail page reflects whatever analysis run was last ingested (which can be stale by weeks). Added a sentence to the card's subtitle.

  4. Investment Hotspots' empty state showed the same "all healthy" message whether a repo was genuinely evaluated and clean, or had no stability_map/churn_couplings/fix_target_by_origin data at all — sourceCounts already distinguished these but was computed and never read. Added a distinct "not enough data yet" message with neutral (non-purple) styling for the true no-data case.

  5. Stabilization/Revert Rate cards showed "100%"/"0.0%" for a zero-commit window with no indication this was the engine's documented default for "nothing to measure" rather than a real result. Added a hint on both cards when commits_total === 0.

Verification

  • Added regression tests for the threshold unification (detectChanges and the adoption timeline's direction classifier) — confirmed both fail against the pre-fix thresholds.
  • The other four fixes are UI-only changes this codebase doesn't unit-test anywhere (same convention as fix(platform): five high-severity bugs on /repos and repo-detail #156).
  • npx tsc --noEmit: clean.
  • npm run test: 260/260 passing (254 + 6 new).
  • npm run lint: 0 errors, same 72 pre-existing warnings.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

- Unified three independently hand-picked "is this delta worth an
  alert" thresholds into one canonical PP_STABLE=5.0/PP_NOTABLE=15.0,
  mirrored from iris/analysis/trend_delta.py (docs/METRICS.md).
  detectChanges' stabilization check used 10pp (matched neither engine
  bound), revert used 5pp (matched PP_STABLE), AI coverage used 15pp
  (matched PP_NOTABLE) — three different bars with no shared rationale.
  Now all three use PP_STABLE. The adoption timeline's flat/up/down
  classifier used a separate 2pp threshold, well under even the
  engine's own noise floor — a 2.5pp move was rendering as a confident
  "improved" arrow. Now shares the same PP_STABLE constant.

- Added a sample-size floor to the repo-scoped DORA card, matching the
  org dashboard's existing MIN_EVALUATED_FOR_KPIS=10 (extracted to a
  shared export in lib/queries/dora.ts so both surfaces stay in sync).
  A repo with 1 failed deploy was showing "CFR: 100.0%" with the same
  visual confidence as one with hundreds of evaluated deploys — and a
  single repo is more likely to sit below the floor than the org
  aggregate, not less.

- Disclosed the DORA card's time anchor: it's a live rolling window
  from Datadog as of request time, while the rest of the repo-detail
  page reflects whatever analysis run was last ingested (which can be
  stale by weeks). Added a sentence to the card's subtitle instead of
  leaving the two time bases sitting side by side unexplained.

- Investment Hotspots' empty state showed the same "all healthy"
  message whether a repo was actually evaluated and clean, or had no
  stability_map/churn_couplings/fix_target_by_origin data at all —
  sourceCounts already distinguished these but was computed and never
  read. Added a distinct "not enough data yet" message + neutral
  (non-purple) styling for the true no-data case.

- The top MetricCard row's Stabilization/Revert Rate cards showed
  "100%"/"0.0%" for a zero-commit window with no indication this was
  the engine's documented default for "nothing to measure" rather than
  a real result. Added a hint on both cards when commits_total === 0.

Added regression tests for the threshold unification (detectChanges
and the adoption timeline's direction classifier) — confirmed both
fail against the pre-fix thresholds. The other four fixes are
UI-only changes this codebase doesn't unit-test anywhere (same
convention noted in the prior PR).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickbus-iris Ready Ready Preview Aug 13, 2026 8:30pm

Request Review

@clickmatos
clickmatos merged commit 8f2e937 into main Aug 13, 2026
5 checks passed
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