Allow intentional blank governance SHA exceptions in validation#58
Merged
CAM-Initiative merged 4 commits intoMay 11, 2026
Merged
Conversation
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.
Motivation
SHA/JSONHASHas a hard error, which rejected intentionally blank/externally-anchored instruments.Description
.github/scripts/lib/ledger_sha_exceptions.pyexposingALLOWED_BLANK_SHA_IDSandallows_blank_sha(doc_id)containingCAM-BS2025-AEON-006-SCH-01andCAM-BS2025-AEON-006-SCH-03.lint_amendment_ledger.pyto importallows_blank_shaand treat an allowlisted document with an empty latest ledger SHA as an allowed exception that emits the warningAllowed blank SHA: <ID>instead of failing in strict mode.verify-ledger-sha-coverage.pyto importallows_blank_shaand apply the same allowlist for both latest ledger SHA checks and JSONHASHblank checks, emittingAllowed blank SHA: <ID>and skipping failure for allowlisted entries..github/scripts/tests/test_lint_amendment_ledger_sha_policy.pyand.github/scripts/tests/test_verify_ledger_sha_coverage.pyasserting that allowlisted blank latest SHAs pass strict validation and log the explicit message; no SHAs are populated or backfilled and validation logic is not globally weakened.Files modified:
.github/scripts/lib/ledger_sha_exceptions.py.github/scripts/lint_amendment_ledger.py,.github/scripts/verify-ledger-sha-coverage.py,.github/scripts/tests/test_lint_amendment_ledger_sha_policy.py, and.github/scripts/tests/test_verify_ledger_sha_coverage.py.Exact reason Step 2 was failing:
SHAas a hard error for all instruments, so intentionally blank entries were indistinguishable from unintended/missing SHAs and caused the step to fail.Confirmation about other failures:
SHA/HASHvalues continue to fail validation in both the lint and coverage stages (failure branches remain unchanged whenallows_blank_sha(doc_id)is false).Testing
pytest -q .github/scripts/tests/test_lint_amendment_ledger_sha_policy.py .github/scripts/tests/test_verify_ledger_sha_coverage.pywhich returned15 passed(all tests passed).SHApasses strict validation and that the log containsAllowed blank SHA: CAM-BS2025-AEON-006-SCH-01.Codex Task