fix(platform): six medium-severity design/consistency issues on /repos - #157
Merged
Conversation
- 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #156 — the six 🟡 medium findings from the same
/reposaudit.Fixes
Unified three independently hand-picked significance thresholds into one canonical
PP_STABLE=5.0/PP_NOTABLE=15.0, mirrored fromiris/analysis/trend_delta.py(docs/METRICS.md).detectChanges' stabilization check used 10pp (matched neither engine bound), revert used 5pp (matchedPP_STABLE), AI coverage used 15pp (matchedPP_NOTABLE) — three different bars with no shared rationale. All three now usePP_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.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.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.
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_origindata at all —sourceCountsalready 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.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
detectChangesand the adoption timeline's direction classifier) — confirmed both fail against the pre-fix thresholds.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