Skip to content

H-6736: Support campaign-based QA measurement, update low sample and outlier exclusion logic - #9118

Merged
CiaranMn merged 4 commits into
mainfrom
cm/update-qa-release-timing
Jul 29, 2026
Merged

H-6736: Support campaign-based QA measurement, update low sample and outlier exclusion logic#9118
CiaranMn merged 4 commits into
mainfrom
cm/update-qa-release-timing

Conversation

@CiaranMn

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

The PR is primarily aimed at supporting a production campaign-based measurement of QA hold, whereby a single observation is produced per production campaign, rather than an observation per batch. The rationale being that the actual time for QA testing starts when the campaign is finished, and earlier batches in the campaign aren't on hold for QA, they're on hold for the entire production to be complete.

Because this massively reduces the number of observations for production -> QA release, the PR also includes some rethinking of the 'exclude low samples' logic (most campaigns become 'low sample'). Instead, a 'low sample' is now < 5 (was < 10), and we introduce a new 'limited' sample tier at 5-9 which isn't excluded when the box is checked, but is shown with a badge.

Finally, the 'exclude outliers' logic is updated to only apply when calculating the mean. It previously applied to everything, but the median is already resistant to outliers, and the P95 (which drives planning parameter mismatch observations) should include the tail (and excluding outliers from the P95 when you have a population of e.g. a lot of 2 day QA release observations, and then a sizeable minority of 5 day QA release, leads to less informative results).

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

@CiaranMn CiaranMn self-assigned this Jul 28, 2026
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jul 29, 2026 3:43pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Jul 29, 2026 3:43pm
petrinaut Skipped Skipped Jul 29, 2026 3:43pm

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes core timing grain for QA, outlier semantics, and sample filtering across many derived metrics; behavior is well-tested but users may see different means, counts, and table visibility than before.

Overview
Adds campaign-grain QA hold timing: one observation per production campaign from campaign_rows (batch detail_rows stay as evidence), with UI copy and counts labeled as campaigns where timing_grain === "campaign".

Exclude outliers is renamed and narrowed to exclude outliers from mean — Tukey fences populate mean_observations and recompute means (including monthly means and batch-timeline / what-if means) while raw observations, sample size, median, percentiles, min/max, and yield/consumption series stay untouched. Period trends and opportunity comparisons use filtered values only for mean deltas; P95-driven planning signals stay on the full series.

Low-sample handling moves the hide threshold to < 5 observations, introduces a limited (5–9) tier with badges (not hidden by “exclude low samples”), and wires confidence/opportunity labels through shared sample-confidence helpers.

Site overview windowing now runs filterGraphNodeByDateRange (outlier + range in one path). In-app docs and settings text are updated to match.

Reviewed by Cursor Bugbot for commit 50eb1a4. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/apps > hash* Affects HASH (a `hash-*` app) type/eng > frontend Owned by the @frontend team area/apps labels Jul 28, 2026
Comment thread apps/hash-frontend/src/pages/supply-chain/shared/period-trends.ts
Comment thread apps/hash-frontend/src/pages/supply-chain/shared/range-filter.ts
@vercel
vercel Bot temporarily deployed to Preview – petrinaut July 28, 2026 15:20 Inactive

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d092c78. Configure here.

Comment thread apps/hash-frontend/src/pages/supply-chain/supply-chain-data-shell/product.tsx Outdated
vilkinsons
vilkinsons previously approved these changes Jul 28, 2026
@vercel
vercel Bot temporarily deployed to Preview – petrinaut July 29, 2026 15:26 Inactive
@CiaranMn
CiaranMn enabled auto-merge July 29, 2026 15:33
@CiaranMn
CiaranMn added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit 6dea12d Jul 29, 2026
44 checks passed
@CiaranMn
CiaranMn deleted the cm/update-qa-release-timing branch July 29, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants