Skip to content

fix(publish): pin extension source to its release tag before screenshotting - #95

Merged
LukasHirt merged 1 commit into
mainfrom
fix/publish-pin-extension-source-to-release-tag
Jul 23, 2026
Merged

fix(publish): pin extension source to its release tag before screenshotting#95
LukasHirt merged 1 commit into
mainfrom
fix/publish-pin-extension-source-to-release-tag

Conversation

@LukasHirt

Copy link
Copy Markdown
Owner

Summary

  • GenerateScreenshotSpec had Claude read packages/web-app-<id> off whatever the default branch currently looks like, while PreparePlaywrightRun serves that OLD release's built dist/ 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 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 only.
  • Adds two small git primitives (FetchTag, CheckoutPath) to internal/git to support this.

Test plan

  • go build ./...
  • go vet ./...
  • go test ./... (full suite passes)
  • New test TestPinExtensionSourceToRelease_SwitchesThenRestores reproduces the bug directly: source differs between a tag and later commits, pin picks up the tag's content, restore puts back the later content.

…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>
@LukasHirt
LukasHirt enabled auto-merge (squash) July 23, 2026 18:04
@LukasHirt
LukasHirt merged commit eaf3c90 into main Jul 23, 2026
3 checks passed
@LukasHirt
LukasHirt deleted the fix/publish-pin-extension-source-to-release-tag branch July 23, 2026 18:04
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