feat(supply-chain): tool-backed logical diff report for skill/pack candidates#117
Merged
1 commit merged intoJun 2, 2026
Merged
feat(supply-chain): tool-backed logical diff report for skill/pack candidates#1171 commit merged into
1 commit merged into
Conversation
…ndidates Add the logical-diff stage of the x.klickd skill/pack supply chain: a deterministic, offline CLI that compares a previous candidate (--before) against a new one (--after) and classifies governance/guardrail/memory/ evidence/claim/public-boundary changes rather than raw JSON lines. Hard-fails (exit 1) on guardrail lowering, claim-boundary violations, or public/private-boundary violations; exit 0 when no blocking finding. The deterministic_diff_id is a sha256 over input hashes + sorted findings, clock- and host-independent. Stdlib only, no network. Adds 10 before/after fixtures and 17 tests covering each blocking and non-blocking class plus determinism and CLI exit codes. Operator README under .internal-skills/supply-chain/diff/. No claim of full end-to-end automation; downstream stages remain planned. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Jun 2, 2026
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.
Summary
Adds the logical diff stage of the x.klickd skill/pack supply chain as real tooling. Given a previous candidate (
--before) and a new one (--after),scripts/generate_supply_chain_diff.pyclassifies the changes that matter — governance, guardrails, memory policy, evidence, claims, public/private boundary — instead of diffing raw JSON lines, and emits a deterministic JSON report to help a reviewer decide: accept / premium-pass / reject / rollback.Independent of PRs #115 and #116 (both still OPEN, not merged). Based on
main— no dependency on their branches; the SUPPLY_CHAIN spec doc from #115 is not onmain, so this stage stands alone. #115/#116 were not touched or merged.What is now tool-backed vs. planned
No claim of full end-to-end automation. This is one stage.
Change classification
added,removed,changed,unchanged,risk_raised,guardrail_lowered,evidence_changed,governance_changed,memory_policy_changed,public_boundary_changed,claim_boundary_changed.Exit codes
0— no blocking finding1— at least one blocking finding (guardrail lowered, claim-boundary, or public/private-boundary violation)2— usage / input errorAny lowering of a non-lowerable safeguard is a hard fail, not a silent change (per the supply-chain rules).
Files added (13, +2020; nothing edited or deleted)
scripts/generate_supply_chain_diff.py— stdlib-only offline CLI..internal-skills/supply-chain/diff/README.md— operator doc (usage, blocking conditions, determinism, tool-vs-planned matrix). Internal codename path not referenced.tests/test_supply_chain_diff.py— 17 tests.tests/fixtures/supply_chain_diff/— 1before.json+ 9after_*.json(unchanged, benign, and one per blocking/non-blocking class).Determinism
deterministic_diff_id = sha256:over before/after input hashes + sorted normalized findings. Clock-/host-/run-order independent; verified identical across two runs. Any clock marker a caller adds lives innon_deterministic_zone, excluded from the hash.Example detected blocking cases (from fixtures)
blockgate weakened toconfirm; anon_lowerable_floorentry removed;raise_onlydisabled;evidence_policy.required_for_claimsturned off;final_decision_ownermoved offhuman_carrier. → exit 1.claims_v41_gaflipped true, banned claims ("universal standard", "automatic GDPR compliance") introduced. → exit 1.contains_real_piiflipped true, aforbidden_fieldsentry removed. → exit 1.Validation results
pytest tests/test_supply_chain_diff.pypython scripts/verify_xklickd_skill_packs.py verifypython scripts/validate_v4_1_candidate_mapping.pypytest test_rfc009_scaffold.py test_v4_1_candidate_mapping.py test_starter_pack_validator.pygenerate×2deterministic_diff_idchimeraREADME.md/docs/publiccleanpytest tests/ -qFull-suite note (not masked): the 6 failed + 36 errors are pre-existing
ModuleNotFoundError: No module named 'klickd'env issues intest_xai_grok_adapter.py,test_llamaindex_adapter.py,test_post_v4_demos.py(optional/non-installed package). Unchanged by this PR — zero regressions.Limitations / non-claim boundaries
changedrather than mapped to a semantic class.No release / publish / tag / DOI / merge / communication. Private repo
klickd-aiuntouched. This agent does not approve PRs.