Repository navigation
feat(scorecard): add evidence-based QA readiness scorecard (#151) - #392
Merged
Merged
Conversation
3 tasks done
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7457bcbbc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Compose an evidence-based QA readiness scorecard from already-produced artifacts and DERIVE a readiness recommendation — it is an evidence summary, never a predictive quality score, and refuses a ready state whenever a risk is an uncovered blocker or evidence is stale. - New module trio (mirrors the #144 ledger / #149 bundle pattern): scorecard_models.py (the derivation: ready / ready_with_accepted_ residuals / blocked / insufficient_evidence, per-dimension statuses incl. not_measured), scorecard_format.py (markdown + compact summary + a JSON-able serialized snapshot for the #157 report), and scorecard_validation.py (reuses the ledger/bundle loaders verbatim). - New read-only MCP tool sumo_qa_format_qa_scorecard. The recommendation is computed from the evidence — the caller cannot assert "ready". - Reuses the #144 ledger + #149 context-bundle schemas; never duplicates them. Absent coverage/mutation signals are reported as "not measured", never assumed passing, and never outweigh an uncovered high-impact risk. - Optional readiness appendix wired into sumo-qa-reviewing-before-merge (agrees with the SAFE gate by construction), sumo-qa-finishing-qa-work, and sumo-qa-creating-test-plan. - Promptfoo eval skill-reviewing-before-merge-scorecard.yaml with uncovered-risk and stale-evidence seeds asserting the scorecard refuses ready; docs/SCORECARD.md, TOOLS.md, ARCHITECTURE.md, README, and a worked-example turn show good and bad scorecard states.
…to not_measured
A coverage/mutation payload that validates but carries no actual measurement
(an empty {} or freshness/detail metadata only) was reported as a measured
dimension (ok/stale) and dropped from not_measured, contradicting the
scorecard's core guarantee that absent coverage/mutation is reported as
not_measured and never assumed green.
Add has_measurement() to the signal models (via a shared _MeasurementSignal
base + MEASUREMENT_FIELDS classvar, fields/schema unchanged) and normalize a
measurement-less signal to None in the load envelope, so the markdown table,
compact summary, and serialized snapshot all report not_measured at one point.
A zero (0% lines / 0 survivors) is a real measurement and is preserved.
sumithr
force-pushed
the
feat/issue-151-readiness-scorecard
branch
from
June 11, 2026 09:32
b7457bc to
7353c94
Compare
7 tasks done
sumithr
added a commit
that referenced
this pull request
Jun 11, 2026
🤖 I have created a release *beep* *boop* --- ## [0.43.0](v0.42.0...v0.43.0) (2026-06-11) ### Features * **scorecard:** add evidence-based QA readiness scorecard ([#151](#151)) ([#392](#392)) ([ad561d7](ad561d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
4 tasks done
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.
Closes #151.
What this adds
A QA readiness scorecard that composes already-produced artifacts — the #144 risk-to-test ledger, the #149 issue/PR context bundle, and optional coverage/mutation signals — and derives a single readiness recommendation. It is an evidence summary, not a predictive quality score: it invents no numeric score, reports absent coverage/mutation as
not measured(never assumed passing), and refuses a ready state whenever a risk is an uncovered blocker or evidence is stale — that guarantee is structural (the recommendation is computed; the caller cannot assert "ready").scorecard_models.py(the derivation + per-dimension statuses),scorecard_format.py(markdown + compact summary + a JSON-ableserializedsnapshot for the [Task]: Add a polished local QA report or dashboard #157 report),scorecard_validation.py(delegates to the ledger/bundle loaders so their typed errors propagate).sumo_qa_format_qa_scorecard.blocked→insufficient_evidence→ready_with_accepted_residuals→ready, first-match-wins.sumo-qa-reviewing-before-merge(agrees with the SAFE gate by construction),sumo-qa-finishing-qa-work, andsumo-qa-creating-test-plan— omitted from short answers (AC build(deps): bump actions/checkout from 4 to 6 #4).docs/SCORECARD.md,docs/TOOLS.md,docs/ARCHITECTURE.md, README index, and a turn in worked-example 02 show good and bad scorecard states.Acceptance criteria
compact_summary+ skill guidance)skill-reviewing-before-merge-scorecard.yaml, 2 seeds)docs/SCORECARD.md— factual ("an evidence summary, not a predictive quality score"), consistent with #86, marketing no unsupported automation. Broader README/demo repositioning remains #86's scope.The #154 scope-comment requirements are honored: scorecard fields are serializable for
.sumo-qa/qa-report.html(#157), and the states distinguish not-measured / stale / blocked / ready-with-accepted-residuals / ready.Evidence
test_scorecard_models.py,test_scorecard_format.py,test_scorecard_validation.py,test_server_format_qa_scorecard_tool.py; registry tests (installer count, server tool-set, tools-list snapshot) updated; per-skill token budgets updated for the appendix additions.skill-reviewing-before-merge-scorecard.yaml2/2 (uncovered-risk seed → blocked; stale-evidence seed → insufficient_evidence — both refuse ready). Regression:reviewing-before-merge1/1,finishing-qa-work1/1,creating-test-plan1/1. The follow-up fix below touches only the Python measurement-normalization guard (no skill prose / eval seed / router), so these results stand.stale_evidencelist) — all fixed with discriminating tests, then re-reviewed clean.7353c94): a codex P2 found that a coverage/mutation payload which validates but carries no actual measurement (an empty{}, orfreshness/detailmetadata with noline_percent/survivors/killed) was reported as a measured dimension and dropped fromnot_measured— contradicting the "absent ⇒ not_measured, never assumed green" guarantee. Fixed by addinghas_measurement()to the signal models (shared_MeasurementSignalbase +MEASUREMENT_FIELDSclassvar; fields/JSON-schema unchanged) and normalizing a measurement-less signal toNonein the load envelope — closing the path across the markdown table, compact summary, and serialized snapshot in one place. A zero (0% lines / 0 survivors) is preserved as a real measurement. Discriminating tests added; codex re-review of the fix: PASS. A per-filesumo-qa-reviewing-before-mergepass over the other source files (server, schemas, installer, formatter): SAFE, 0 material findings.sumo_qa_format_qa_scorecard): uncovered high-impact risk →blocked; stale test evidence →insufficient_evidence;coverage={"freshness":"fresh"}(no number) →readywith Coverage reported asnot measured(the fix, proven end-to-end); fresh passing evidence →ready.CI green on the rebased head; new tool is additive (existing tool surface and the
using_sumo_qarouter unchanged).