Skip to content

Call documented REST endpoint for retired package deletion - #54

Merged
xnoto merged 1 commit into
mainfrom
fix/delete-retired-sms-package-rest
Sep 20, 2026
Merged

xnoto merged 1 commit into
mainfrom
fix/delete-retired-sms-package-rest

Conversation

@xnoto

@xnoto xnoto commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace unavailable Octokit deletePackageForOrganization helper with documented whole-package REST DELETE and require204. Previous approved run verified exact package/repository metadata and13versions, then failed before any DELETE.

Fixes: N/A — completes approved temporary cleanup from #52/#53.

Type of change

  • Bug fix
  • CI / reusable workflow

Validation

  • Required PR checks pass — pending.
  • No generated files hand-edited.

Adversarial/security/delivery reviewers ADVANCE. Only DELETE invocation changes; fixed target, action pin, permissions, zero-input manual-main guards, metadata validation, once-encoding check and bounded post-delete404 verification unchanged.

Impact and rollout

Owner-approved merge/dispatch targets only opencode-sms-bridge. Require metadata success, DELETE204, then GET404. No other API permissions or package targets. Delete temporary workflow immediately after verified success. No source/image publication involved.

Safety and secrets

  • No credentials, state, or sensitive plans
  • No local OpenTofu/state operations
  • Fixed scope and mandatory disarm preserved

AI-assisted; no upstream communications.

The dispatched run 35492786770 verified the target (metadata
id=14842106, repository association makeitworkcloud/images, 13
versions) but failed before any HTTP DELETE because the pinned
github-script runtime exposes no
github.rest.packages.deletePackageForOrganization helper ("is not a
function"). No alias is guessed: replace only that call with
github.request('DELETE /orgs/{org}/packages/{package_type}/{package_name}',
{org, package_type, package_name}) using raw parameters. github.request
is the same stable pinned-runtime API already exercised in this script
through github.request.endpoint, and the step 0 pre-request check
already verified this exact route template encodes the parameters
exactly once. The official REST packages reference documents this
route and its 204 No Content success response.

Capture the response and require status 204 before logging the
deletion as accepted and starting the post-delete verification loop;
any other status fails. All identity checks, exact repository and
refs/heads/main guards, zero-input manual dispatch, permissions, pin,
timeout, concurrency, error handling, and bounded verification are
unchanged.

No dispatch, merge, or live API execution happens in this commit.
@xnoto
xnoto requested a review from a team as a code owner September 20, 2026 06:02
@github-actions

Copy link
Copy Markdown

Image CI passed

Pre-commit validation passed. View the workflow run.

@xnoto
xnoto merged commit a9e89c3 into main Sep 20, 2026
5 checks passed
@xnoto
xnoto deleted the fix/delete-retired-sms-package-rest branch September 20, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant