Repository navigation
test(native): move pinned-tool snapshots to a new version without a native build - #1719
Draft
Martin Torp (mtorp) wants to merge 1 commit into
Draft
Martin Torp (mtorp) wants to merge 1 commit into
Martin Torp (mtorp) wants to merge 1 commit into
Conversation
…ative build The Coana help snapshots show the pinned Coana version, so every Coana bump needs them refreshed. `pnpm snapshots:update:dep coana` needs a full native build, which Coana's release automation can't run. `scripts/test/swap-snapshot-version.mts --dep coana --from <old>` edits the version text instead. It keeps each row's width, so the rendered pixels match a real capture. It edits nothing if a snapshot lacks the old version or a row has no room, and then points at snapshots:update:dep. /bump-coana now runs it as a step.
This branch has not been deployed
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.
LLM Description written by Claude Code:claude-opus-5-5
Every Coana bump needs the three Coana help snapshots refreshed, because they show the pinned Coana version and native CI fails until they match.
pnpm snapshots:update:dep coanadoes that with a full native build. The automation that opens the Coana bump PRs here can't run that build.This adds
scripts/test/swap-snapshot-version.mts:It reads the new version from the pin and swaps the old version for it in the dependency's snapshots. It keeps each 140-column row its width by taking or giving spaces from the row's padding. The native test compares rendered pixels, so the result matches a real capture. It edits nothing when a snapshot doesn't show the old version or a row has no room. It finishes with the existing staleness check, which points at
snapshots:update:depon failure.Also:
readPinnedVersionis pulled out offindStaleSnapshotDependenciesso both use it./bump-coanaruns the script as a step and stages the snapshots.The automated Coana bump PRs will run the script too.
Ran: the unit tests in
test/unit/scripts/test/(29 tests),pnpm check:tscandpnpm lint. Lint's biome lane fails on 12 files that are already unformatted on v1.x. None of them are new here. I also ran the script on a checkout with the pin at 15.16.0. It moved all three snapshots and passed the staleness check. I did not run the native screenshot test locally. This PR's native CI covers the unchanged snapshots, and the next Coana bump PR will cover the swap.Expected reviewer effort: High-level design decisions