feat(supply-chain): tool-backed audit-trail index + determinism record#116
Merged
1 commit merged intoJun 2, 2026
Merged
Conversation
…ecord First real automation stage of the x.klickd supply-chain protocol. Adds a stdlib-only, offline generator that collects the 42 verifiable v4.1 candidate skill packs (+ manifest), enforces the loaded+sha256_matches_manifest gate, and writes two re-checkable artefacts: - .internal-skills/supply-chain/audit/audit_trail_index.json - .internal-skills/supply-chain/audit/determinism_record.json deterministic_run_id is derived only from inputs (timestamps quarantined in a non_deterministic_zone, excluded from every hash), so identical inputs yield an identical id across runs and hosts. A `check` subcommand verifies on-disk artefacts are in sync and exits non-zero on drift or on banned-claim/secret content. validation_results is left empty by design: the generator records but does not run the validation commands, so it asserts no outcomes it did not observe (anti-mirage). Only stages labelled `tool` are automated; everything else stays `planned` / `partial` / `manual` per the stage_automation map. Not a v4.1 GA release. No publish/deploy/merge/tag. 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
First tool-backed automation stage of the x.klickd supply-chain protocol. Two traceability elements move from spec to real, re-checkable artefacts produced by a script. This does not automate the full pipeline.
Added:
scripts/generate_supply_chain_audit.py— stdlib-only, offline CLI (generate/check). Collects the 42 NON-NORMATIVE v4.1 candidate skill packs + manifest (43 inputs), enforces theartifact_loaded+sha256_matches_manifestgate, and writes the two artefacts. Exits non-zero on a missing/changed input, manifest hash mismatch, banned-claim string, or obvious secret/PII in its own output..internal-skills/supply-chain/audit/audit_trail_index.json— consultable index: repo, source commit, checked-artifact count + hash summary, declared validation commands, append-style event list, and a per-stagestage_automationmap (tool/partial/planned/manual)..internal-skills/supply-chain/audit/determinism_record.json— input/output file hashes +deterministic_run_idderived only from inputs..internal-skills/supply-chain/audit/README.md— operator doc.tests/test_supply_chain_audit.py— 10 tests (generability, JSON parse, required fields, run_id stability across two runs, timestamp-is-the-only-non-deterministic-field, no secret/PII, no banned claim,checkin-sync + tamper/injection detection).What is now actually automated vs. planned
checksubcommand)validation_resultsin the index is intentionally empty: the generator records the declared commands but does not run them, so it asserts no outcome it did not observe. Pre-filled "pass" values would be a mirage.Determinism
deterministic_run_id=sha256:over sorted(relative_path, sha256)pairs — independent of clock, host, run order. The only non-deterministic field,generated_at, is quarantined undernon_deterministic_zoneand excluded from every hash. Two consecutivegenerateruns produce an identicalrun_id(sha256:10fa77ec…); onlygenerated_atdiffers.Validations run
python scripts/verify_xklickd_skill_packs.py verifypython scripts/validate_v4_1_candidate_mapping.pypytest tests/test_supply_chain_audit.pypytest tests/test_rfc009_scaffold.py tests/test_v4_1_candidate_mapping.py tests/test_starter_pack_validator.pypython scripts/generate_supply_chain_audit.py generate×2 thencheckrun_id, in-sync (exit 0)pytest tests/ -qtest_xai_grok_adapter.py/test_llamaindex_adapter.py/test_post_v4_demos.py, unchanged by this PRREADME.md,docs/public/)Boundaries (non-claims)
klickd-aiuntouched. This agent does not approve PRs.Relationship to #115
Branched from
main, independent of #115 (docs-only spec, still open/unmerged). The audit README references the supply-chain RFC without naming internal paths in public-facing copy. #115 is not touched or merged.Limitations / next step
planned; this PR adds only the two traceability stages + a reproducibility check. Not end-to-end executable.plannedstage (logical diff report or license/source-freshness check) as real tooling, and optionally wiregenerate_supply_chain_audit.py checkinto CI.🤖 Generated with Claude Code