fix(prune): Make prune workflow delete initdata - #37
Open
shariqahmed-cohere wants to merge 1 commit into
Open
Conversation
shariqahmed-cohere
requested review from
alhassankhedr-cohere,
cohere-renovate-approve and
yousef-cohere
August 25, 2026 17:55
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.
Generating pr description
Note
Medium Risk
The workflow can delete attestation initdata files on disk; behavior is scoped to unreferenced orphans after prune, but mistakes in retire SHAs or manifest logic could remove policy artifacts.
Overview
Blobheart prune now removes initdata TOMLs that no longer appear on any surviving manifest target, not just entries in
policy-manifest.yaml.prune.pyaddsprune_initdata, which runs after the manifest is rewritten and unlinksattestation-policy/initdata/*.tomlfiles whose basenames are not referenced by remaining targets. The Prune from Blobheart workflow is updated to treat the wholeattestation-policytree as the change surface: it validates each retire SHA as a 40-character hex commit, passes space-separated refs correctly into--retire, stages and uploads both the manifest andinitdata/, and fixes PR stats to use${{ steps.prune.outputs.* }}instead of broken shell variables.A new test asserts that retiring a source drops orphaned initdata while keeping files still tied to surviving targets.
Reviewed by Cursor Bugbot for commit 76fff4c. Bugbot is set up for automated code reviews on this repo. Configure here.