Prune images and inspect Build Grants on the Machine#1664

merged1
rpc-simplify/r2-upgrade
rpc-simplify/r3-images
openedOct 12, 2026byNNick
View on GitHubGitHub import enabledPR last imported 21d ago

Third PR of the Machine RPC catalog simplification. Image cleanup and Build Grant reads move onto the Machine. RemoveImages and EndBuildGrant go.

What changes

  • PruneImages replaces RemoveImages. The Machine runs the list, superseded() and remove steps itself, so a caller sends repositories, not image references. The SDK's image cleanup checks the Machine's contract first and reports Unsupported when it lacks ployz.image.prune.v1.
  • InspectBuildGrant replaces EndBuildGrant. Reading a grant reports what it pushed and how long it has left. It never ends or spends the grant. A push still spends it, and a spent grant refuses further registry calls.
  • The GitHub build finish step reads the grant with InspectBuildGrant. A Machine that refuses the verb fails the build with a sentence that names ployz.build.grant.inspect.v1. A grant the Machine no longer holds reads as nothing pushed.
  • Cancelling a Deployment fails its GitHub builds and cancels their runs. It no longer ends their grants, which expire on their own after 3 h.
  • Cloud skips starting a GitHub build when a Server's record lists capabilities without ployz.build.grant.inspect.v1, and says "GitHub builds need a newer Ployz on ". A Server that lists no capabilities is attempted.
  • docs/user/troubleshooting/builds.md lists the new skip and says to upgrade Ployz on that server.
  • daemon-compat.ts gains pruneImages and buildGrantInspect, and serversLacking().
  • core/DESIGN.md appends RemoveImages and EndBuildGrant to the removed-verbs paragraph.

Who notices

Servers on the current release until they upgrade. Their GitHub builds fail at the finish step, after the runner has built and pushed. Their automatic image cleanup reports Unsupported, and old images stay on disk until the upgrade.

Draft until the top of the stack is verified end to end.

Checks

16 successful · 1 skipped
All checks passed
eb3b4fb
Synced from GitHub

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

yaml
1reviews:
2 auto_review:
3 drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Added 1 commit

  • Prune images and inspect Build Grants on the Machineeb3b4fb