Repository navigation
Description
Problem
- Nothing deletes old versions of the service, runner and mcp-server packages. About 14 releases a day each add a version tag and an attestation tag (
sha256-...) to each package. On 2026-11-19 GHCR listed: service 717 tags (358 v*, 358 sha256-), runner 597 (298 v, 298 sha256-), mcp-server 263 (131 v, 131 sha256-), devcontainer 736 (385 v, 349 sha256-*, latest, buildcache). The compressed amd64 sizes oflatestare service 455 MB, runner 727 MB, mcp-server 765 MB and devcontainer 2524 MB. .github/workflows/cleanup-devcontainer.ymlcovers the devcontainer package only. Its pr-* tag code (about 50 lines of bash at :40-89) has no target, because no workflow pushes those tags since fix(devcontainer): the published image applies the devcontainer features again, so remoteUser vscode exists #1895. Its useful part isdelete-untaggedfor one package.- After ci(release): push each image once, then verify and tag that digest #6407 (push once by digest), a failed verify leaves an untagged digest in the public package.
Change
Owner decision of 2026-11-19: GHCR retention keeps the release tags and deletes untagged images and sha256-* attestation tags older than 30 days. This replaces the earlier plan of this issue (delete the workflow).
- Change cleanup-devcontainer.yml into one GHCR retention workflow for the four packages with
dataaxiom/ghcr-cleanup-action(already pinned at cleanup-devcontainer.yml:92):packages: devops-cli/devcontainer,devops-cli/service,devops-cli/runner,devops-cli/mcp-server,delete-untagged: true,delete-tags: sha256-*,older-than: 30 days,exclude-tags: latest,buildcache,v*,delete-orphaned-images: trueanddelete-ghost-images: true. Keep the daily schedule and thedry_runinput. - Delete the pr-* tag resolution and the open-PR query (:40-89).
- The
:buildcachetags of perf(ci): keep the image build cache in GHCR #6404 stay. - Update the workflow permission test and the documents that name the old workflow.
- The agent token has no read:packages scope, so a person runs the workflow once with
dry_run: trueand checks the list before the first real run.
Renovate. The action stays SHA-pinned. The github-actions manager updates it.
Risk. A deleted sha256-* tag removes the attestation manifest of that image from the registry. Check in the PR that uv run devops gh attestation verify of a v* tag older than 30 days still passes, because it reads the GitHub attestation store. If it fails, keep the sha256-* tags of the release tags and ask the owner.
Proof
- The dry run lists only untagged images and
sha256-*tags older than 30 days. It lists no v*, latest or buildcache tag. - After the first real run, the tag counts of the four packages go down and then stay bounded.
Depends on: none
Proposed design
Problem statement
GHCR keeps every release of the service, runner and mcp-server packages. Each release adds a version tag and a sha256-* attestation tag. About 14 releases a day grow each package without bound. The only cleanup workflow covers the devcontainer package only. Its pr-* tag code has no target because no workflow pushes those tags. The owner decided on 2026-11-19 to keep the release tags and to delete untagged images and sha256-* tags older than 30 days.
Acceptance criteria
Requirement: Retention workflow replaces the devcontainer cleanup workflow
The repository SHALL hold the GHCR retention workflow at .github/workflows/ghcr-retention.yml with the name GHCR Retention, and SHALL hold no workflow file at .github/workflows/cleanup-devcontainer.yml.
Scenario: Merged default branch lists the retention workflow
- WHEN
uv run devops gh workflow list --all --json name,pathruns on the merged default branch - THEN It lists
GHCR Retentionat.github/workflows/ghcr-retention.ymland no entry with the path.github/workflows/cleanup-devcontainer.yml.
Requirement: Four-package retention target
The cleanup step SHALL pass devops-cli/devcontainer, devops-cli/service, devops-cli/runner and devops-cli/mcp-server to the packages input of dataaxiom/ghcr-cleanup-action.
Scenario: Merged workflow names the four packages
- WHEN
uv run devops gh workflow view ghcr-retention.yml --yamlruns on the merged default branch - THEN It prints
packages: devops-cli/devcontainer,devops-cli/service,devops-cli/runner,devops-cli/mcp-serverunder the step that usesdataaxiom/ghcr-cleanup-action.
Requirement: Action stays pinned
The cleanup step MUST use dataaxiom/ghcr-cleanup-action at a 40-character commit SHA.
Scenario: Merged workflow pins the action
- WHEN
uv run devops gh workflow view ghcr-retention.yml --yamlruns on the merged default branch - THEN It prints
uses: dataaxiom/ghcr-cleanup-action@with a 40-character commit SHA.
Requirement: Untagged and old attestation deletion
The cleanup step MUST set delete-untagged: true, delete-tags: sha256-*, older-than: 30 days, delete-orphaned-images: true and delete-ghost-images: true.
Scenario: Merged workflow names the deletion inputs
- WHEN
uv run devops gh workflow view ghcr-retention.yml --yamlruns on the merged default branch - THEN It prints those five inputs with those values under the cleanup step.
Requirement: Release and cache tag exclusions
The cleanup step MUST set exclude-tags: latest,buildcache,v* so that no run deletes a release tag or a build cache tag.
Scenario: Merged workflow names the exclusions
- WHEN
uv run devops gh workflow view ghcr-retention.yml --yamlruns on the merged default branch - THEN It prints
exclude-tags: latest,buildcache,v*.
Requirement: PR tag code and its inputs removed
The workflow MUST have no pr-* tag resolution, no gh pr list query, no pull-requests: read permission, and no pr_number or tag dispatch input.
Scenario: Merged workflow has no PR cleanup
- WHEN
uv run devops gh workflow view ghcr-retention.yml --yamlruns on the merged default branch - THEN It prints no
pr-*pattern, nogh pr listcommand, nopull-requests: readand nopr_numberortaginput.
Requirement: Daily schedule and dry run kept
The workflow MUST keep the 0 4 * * * schedule and the boolean dry_run dispatch input with the default false.
Scenario: Merged workflow keeps the schedule and the input
- WHEN
uv run devops gh workflow view ghcr-retention.yml --yamlruns on the merged default branch - THEN It prints the
0 4 * * *cron and adry_runinput of type boolean with defaultfalse.
Requirement: Workflow linters pass
The new workflow MUST pass actionlint and zizmor with the reduced permission set.
Scenario: The workflow linters pass on the PR
- WHEN
uv run devops ci --check --only actionlint,zizmorruns on the PR - THEN It exits 0 and prints no finding for
.github/workflows/ghcr-retention.yml.
Requirement: Stale cleanup comment updated
The comment in .github/workflows/devcontainer-image.yml that names the 04:00 cleanup MUST name the retention workflow.
Scenario: The devcontainer image workflow names the retention workflow
- WHEN
uv run devops gh workflow view devcontainer-image.yml --yamlruns on the merged default branch - THEN It prints the 04:00 UTC cleanup comment with the name
ghcr-retention.yml.
Requirement: Attestation store serves an old release
The PR MUST show that the GitHub attestation store returns the attestations of a v* release older than 30 days before the first real run deletes its sha256-* tag.
Scenario: The attestation of an old release is readable
- WHEN
uv run devops gh attestation verify oci://ghcr.io/dan-petty/devops-cli/service:<v-tag> --repo dan-petty/devops-cliruns for av*tag older than 30 days of the service package - THEN It exits 0 and prints the verified attestation for the image digest.
Requirement: Pending a person after the merge
After the merge, a person SHALL run the retention workflow once with dry_run: true, confirm the list, and run it with dry_run: false; the tag counts of the four packages SHALL go down and stay bounded.
Scenario: A person runs the first dry run and the first real run
- WHEN
uv run devops gh workflow run ghcr-retention.yml -f dry_run=trueand thenuv run devops gh workflow run ghcr-retention.yml -f dry_run=falserun, and the runs end - THEN The dry run log lists no
v*,latestorbuildcachetag, and the tag counts of the four packages go down and stay bounded.
Existing Tool Considered
No alternatives check has run on this issue. The open, maintained dataaxiom/ghcr-cleanup-action covers the retention. The workflow already pins it at .github/workflows/cleanup-devcontainer.yml:92. Its packages, delete-untagged, delete-tags, older-than, exclude-tags, dry-run, delete-ghost-images and delete-orphaned-images inputs cover each deletion rule, so the plan writes no own code. The action lacks a rule that keeps a sha256-* tag because a v* tag shares its digest. It does not read the GitHub attestation store. The PR's attestation check covers that gap.
Key questions
- Which retention policy does the workflow apply?: Keep every
v*,latestandbuildcachetag. Delete untagged images andsha256-*tags older than 30 days. The owner decision of 2026-11-19 in the issue sets this policy. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:70, .github/workflows/cleanup-devcontainer.yml:97-100]- Chosen: Keep the release tags and delete untagged and old
sha256-*versions after 30 days. The owner decision sets it, and the current step already deletes untagged versions. - Rejected: Delete every version older than 30 days. It deletes the release tags and the release history.
- Rejected: Keep every version. Each package grows by about 14 versions a day.
- Chosen: Keep the release tags and delete untagged and old
- Which tool does the retention?: Use
dataaxiom/ghcr-cleanup-action, pinned at.github/workflows/cleanup-devcontainer.yml:92. Itspackages,delete-untagged,delete-tags,older-than,exclude-tags,dry-run,delete-ghost-imagesanddelete-orphaned-imagesinputs cover the change. The plan writes no own code. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:92, .github/workflows/cleanup-devcontainer.yml:93-104]- Chosen: Extend the pinned
dataaxiom/ghcr-cleanup-action. The workflow already pins it, and its inputs cover each part of the change. - Rejected: Write a
devops gh apipruner of our own. It adds code to build, keep and test for deletion that the action already does. - Rejected: Delete the cleanup workflow. It leaves the four packages with no retention.
- Chosen: Extend the pinned
- Does the workflow keep the daily schedule and the
dry_runinput?: Yes. The0 4 * * *cron and the booleandry_runinput with defaultfalsestay. A run withdry_run: truelists the versions before a real run deletes them. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:5-7, .github/workflows/cleanup-devcontainer.yml:19-23]- Chosen: Keep the schedule and
dry_run. A daily run bounds each package, and a dry run lets a person check the list first. - Rejected: Dispatch only. No run deletes old versions on a schedule.
- Rejected: Remove
dry_run. A person cannot check the list before a real run.
- Chosen: Keep the schedule and
- Which tag patterns does
exclude-tagshold?: Uselatest,buildcache,v*. No package holds amaintag. Themainentry of the current exclusion list protects nothing. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:70, .github/workflows/devcontainer-image.yml]- Chosen:
latest,buildcache,v*. It protects the release tags and the build cache tag, the two kinds that must stay. - Rejected: Keep
mainin the list too. No package holds amaintag, so the entry protects nothing. - Rejected:
v*only. It deletes thelatestandbuildcachetags.
- Chosen:
- Which code leaves the workflow?: Remove the
pr-*tag resolution, thegh pr listquery, thepull-requests: readpermission and thepr_numberandtagdispatch inputs. The file header says that no workflow pushes apr-<n>tag since perf(ci): cancel superseded CodeQL runs and idle triggers #4651. The code has no target and the permission has no reader. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:3, .github/workflows/cleanup-devcontainer.yml:10-18, .github/workflows/cleanup-devcontainer.yml:37, .github/workflows/cleanup-devcontainer.yml:40-89]- Chosen: Remove the code and its inputs. No workflow pushes a
pr-*tag, so the code has no target and the permission has no reader. - Rejected: Keep the code and add a
pr-*tag. It adds a tag that no workflow writes. - Rejected: Move the code to a second workflow. It keeps dead code and adds a workflow.
- Chosen: Remove the code and its inputs. No workflow pushes a
- Does the PR rename the file, the name and the concurrency group?: Yes. The file becomes
.github/workflows/ghcr-retention.yml, the name becomesGHCR Retentionand the concurrency group becomesghcr-retention-${{ github.repository }}. The workflow covers four packages now. The PR also updates the comment at.github/workflows/devcontainer-image.ymlthat names the 04:00 cleanup. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:1, .github/workflows/cleanup-devcontainer.yml:26, .github/workflows/devcontainer-image.yml]- Chosen: Rename the file, the name and the concurrency group. The workflow covers four packages now, and the old names name one package and a tag that no workflow pushes.
- Rejected: Keep the file name and change the name. A file named for one package holds a four-package workflow.
- Rejected: Keep both names. The name stays wrong, and a reader cannot find the retention workflow.
- Does the GitHub attestation store keep an attestation after its
sha256-*registry tag is deleted?: Yes. The release workflow attests each image to the GitHub attestation store. The store keys the record by subject digest. Thesha256-*tag is a registry tag, so the deletion removes the registry copy only. [sources: .github/workflows/release.yml] - What does the PR do when the attestation check finds no record?: Add
sha256-*toexclude-tags, keep the untagged deletion, and comment on the issue for the owner. The registry copies of the attestations stay until the owner decides. (best practice) [sources: .github/workflows/cleanup-devcontainer.yml:70, .github/workflows/cleanup-devcontainer.yml:97-100]- Chosen: Keep
sha256-*tags and ask the owner. It keeps the registry copies of the attestations until the owner decides. - Rejected: Delete the
sha256-*tags anyway. It removes the registry copies of attestations that the store check did not confirm. - Rejected: Stop the PR. The untagged deletion still bounds the packages.
- Chosen: Keep
- Which test or document names the removed
pull-requests: readpermission?: Thezizmorcheck validates the workflow permission set. The live reference to the old workflow is the comment at.github/workflows/devcontainer-image.yml. The PR updates that comment. (best practice) [sources: .github/workflows/devcontainer-image.yml, .github/workflows/cleanup-devcontainer.yml:34-37]- Chosen: Use the actionlint and zizmor checks and update the devcontainer comment. The checks validate the workflow, and the comment is the live reference to the old workflow.
- Rejected: Add a test that reads the workflow file. A test asserts no value of a manifest or a config file.
- Rejected: Change no document. The comment would name a workflow that no longer exists.
- Does Renovate keep the pinned action current?: Yes. The action stays a 40-character SHA pin. The
github-actionsmanager of the Renovate preset updates it. The release-concurrency-and-renovate spec pins the digest of each github-actions dependency. [sources: openspec/specs/release-concurrency-and-renovate/spec.md, .github/workflows/cleanup-devcontainer.yml:92]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
ciprefix of the title gives the type.cleanup, and .github/labels.yml declares no scope/cleanup label. Add the label to the file to give the scope to this item.The workflow holds packages: write, but a person must audit tags before the removal.The removal reduces write permissions and workflow clutter, but it affects only tag cleanup.A person must audit GHCR tags and record the deletion decision before the change.Both items concern the devcontainer tag cleanup workflow, but #39 adds the workflow and the candidate removes it after an audit.[-]ci(cleanup): remove the devcontainer tag cleanup workflow after a tag audit[/-][+]ci(cleanup): Remove the devcontainer tag cleanup workflow[/+]devops-cli-service commentedon Nov 11, 2026
The job shortened the title of this item. The summary had 62 characters, and the limit is 60. The type and the scope stay.
ci(cleanup): remove the devcontainer tag cleanup workflow after a tag auditci(cleanup): Remove the devcontainer tag cleanup workflowdevops-cli-service commentedon Nov 15, 2026
Owner question: Do any
pr-*tags remain indevops-cli/devcontainerin GHCR? (a person decides)Options
Recommendation: Decide the question: only a person can answer it.
Evidence
[-]ci(cleanup): Remove the devcontainer tag cleanup workflow[/-][+]ci(cleanup): prune untagged GHCR images and old attestation tags[/+]devops-cli-service commentedon Nov 19, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.