Let a re-render replace its own assets - #287
Merged
Merged
Conversation
Uploads refused to overwrite, so re-rendering a revision failed after a full encode with "The resource already exists". That made a RENDERER_VERSION bump unusable for its entire purpose: the version exists to say the renderer changed while the design did not, and applying it means writing new bytes to the same revision's path. The object path is owner/campaign/creative/revision, so nothing but this creative's own revision can be addressed by this write. An overwrite can only replace bytes this pipeline produced for this revision, which is the case we want to allow and the only one reachable. Objects stay immutable to the edge. Replacing them is a deliberate and rare act — a renderer change — and the alternative is a cache-busting query string on every ad URL forever. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan48 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 31 | LOW: 15
Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
Uploads refused to overwrite (
upsert: false), so re-rendering a revision failed after a full encode:That makes a
RENDERER_VERSIONbump unusable for its entire purpose. The version exists to say the renderer changed while the design did not — and applying it means writing new bytes to the same revision's path.Why this is safe
The object path is
owner/campaign/creative/revision. Nothing but this creative's own revision can be addressed by this write, so an overwrite can only replace bytes this pipeline produced for this revision — the case we want to allow, and the only one reachable.Objects stay
immutableto the edge. Replacing them is a deliberate and rare act; the alternative is a cache-busting query string on every ad URL forever.Verification
2565 passed / 1 failed repo-wide — the pre-existing
tracker-geofailure. Typechecks clean.Fifth in this chain, and like the others it was only findable by queueing a real render and reading the worker log. The encode itself is now getting all the way through — this was the last step before storage.