fix(scorecard): a required artifact nobody delivered stops being invisible - #130
Merged
Merged
Conversation
…sible Closes CP-02 criterion 3, and with it CP-02. The scorecard's facts came ONLY from what was delivered (`artefacto.Items`), so an artifact the standard requires and nobody delivered did not appear at all. A phase with an empty record did not score badly -- it scored `null`, "nothing demandable yet", while the tenant's catalogue asked for three things. The dashboard said there was nothing to answer for exactly when everything was missing. `ScorecardProjection` now folds in the required artifacts from the SAME tenant-aware catalogue that governs the phase record, the read-only endpoint and the payload sent to the Core. Four surfaces, one catalogue. WHAT WAS NOT TOUCHED, AND IS RIGHT: a required-but-undelivered artifact still sits at `pendiente` while it is within its deadline, not red. Penalising before the due date would be punishing in advance, and that rule was already well reasoned. My first version of the test asserted the score moves immediately -- it was the assertion that was wrong, not the rule. The test now pins the moment it must hurt: overdue and undelivered. It scores against the catalogue WITH the overlay, not the bare standard. Punishing a tenant for not delivering what they themselves marked not-applicable would be the exact opposite of what CP-02 criterion 2 just allowed them to do. Verified: 4 new tests; full suite 1278 passed / 10 failed, the same environment-dependent set that fails on a clean worktree at HEAD. Zero new. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 CP-02 criterion 3 — and with it, CP-02.
The false green
The scorecard's facts came only from what was delivered (
artefacto.Items), so an artifact the standard requires and nobody delivered did not appear at all.A phase with an empty record did not score badly — it scored
null, "nothing demandable yet", while the tenant's catalogue asked for three things. The dashboard said there was nothing to answer for exactly when everything was missing.The fix
ScorecardProjectionfolds in the required artifacts from the same tenant-aware catalogue that governs the phase record, the read-only endpoint and the payload sent to the Core. Four surfaces, one catalogue.It scores against the catalogue with the overlay, not the bare standard: punishing a tenant for not delivering what they themselves marked
not-applicablewould be the exact opposite of what CP-02 criterion 2 just allowed them to do.What was not touched, and is right
A required-but-undelivered artifact still sits at
pendientewhile it is within its deadline, not red. Penalising before the due date would be punishing in advance, and that rule was already well reasoned.My first version of the test asserted the score moves immediately — the assertion was wrong, not the rule. The test now pins the moment it must hurt: overdue and undelivered, where it turns
missingand drags the score to 0.Verification
4 new tests. Full suite: 1278 passed / 10 failed — the same environment-dependent set that fails on a clean worktree at HEAD, compared set-by-set.
🤖 Generated with Claude Code