fix(publish): pin extension source to its release tag before screenshotting - #95
Merged
Merged
Conversation
…otting GenerateScreenshotSpec had Claude read packages/web-app-<id> off whatever the default branch currently looks like, while PreparePlaywrightRun serves the OLD release's built dist/ to Playwright. For any release the source has moved past since (a renamed class, a component swapped for a design-system one), every selector Claude wrote targeted markup that release never had — unwinnable no matter how many inner or outer fix-and-rerun cycles it spent chasing it, which is also why a stuck run could burn through its full retry budget (~2 hours) without ever converging. pinExtensionSourceToRelease now switches packages/web-app-<appID> to the exact tree at the release tag via `git checkout <tag> -- <path>` before capture, and restores it back to HEAD afterward — scoped to that one path, everything else in the checkout stays put. Signed-off-by: Lukas Hirt <info@hirt.cz>
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.
Summary
GenerateScreenshotSpechad Claude readpackages/web-app-<id>off whatever the default branch currently looks like, whilePreparePlaywrightRunserves that OLD release's builtdist/to Playwright. For any release the source moved past since, every selector Claude wrote targeted markup the release never had — a version-skew bug that's unwinnable no matter how many fix-and-rerun cycles it burns (this is also why a stuck run could exhaust its full retry budget, ~2 hours, without ever converging).pinExtensionSourceToRelease(internal/marketplace/pin_release.go) now switchespackages/web-app-<appID>to the exact tree at the release tag viagit checkout <tag> -- <path>before capture, and restores it back toHEADafterward — scoped to that one path only.FetchTag,CheckoutPath) tointernal/gitto support this.Test plan
go build ./...go vet ./...go test ./...(full suite passes)TestPinExtensionSourceToRelease_SwitchesThenRestoresreproduces the bug directly: source differs between a tag and later commits, pin picks up the tag's content, restore puts back the later content.