Repository navigation
Conversation
…count metric unavailable instead of raising out of build (scout S-C4) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nkc8NxkTXYuNnPUXqcTUb9
dhagell
marked this pull request as ready for review
November 4, 2026 08:46
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.
Bug (scout round 3, proposal S-C4, not yet a numbered card).
PackEngine._retention_metrics(services/attestation-reporter/src/attestation_reporter/engine.py) sorted and indexedoffendingandunresolvablefrom the ledger's/retention/checkwitho.get(...)on whatever it was given. A list of non-objects, a dict, a string or a number raisedAttributeError(orTypeError) out ofbuild(), so one odd ledger answer lost the whole board pack; the other metrics already fail one metric closed for wrong shapes (C-247). Reproduced by the new tests (17 red).Fix (engine.py only): after the existing guards,
offendingandunresolvablemust each be a list whose elements are all records (dicts), using the file's own_non_recordshelper; otherwise the count metric is unavailable with a fixed note ("not a list of records; figure not published") and the policy figure is still published. Well-formed lists, empty lists, missing keys andNonebehave exactly as before; canary filtering is unchanged. The note does not echo the wrong value.New tests/test_retention_wrong_shape_sc4.py (19): 8 wrong shapes for each of the two fields, the note never echoing the value, well-formed records still counted, empty/missing/None still zero. Failing first, then green.
Ran (cloud, no GX10, so UNVERIFIED): attestation-reporter suite 274 passed;
environment_anchors.py --check0 wrong rows. One mutant (drop the shape guard): 17 red; restored. Not run: other suites. Note for the reviewer:False,0and""for these keys are still read as "empty" by the existingor [], as before; I did not change that.Generated by Claude Code