fix(design): give tar relative paths so the whiteboard unpacks under GNU tar on Windows - #213
Merged
Merged
Conversation
…GNU tar on Windows The six whiteboard installer tests failed on the Windows CI runner with tar exiting 2 before any assertion ran: the fixture built its tarball with an absolute `C:\...` path, which GNU tar (first on PATH under Git for Windows) parses as `host:file` and tries to reach over rsh. The production extractor had the same shape and would fail the same way on such a machine. Run tar with `cwd` set to the release directory and pass only relative names, in both the installer and the test fixture. The fixture also surfaces tar's stderr when it fails instead of a bare exit code. Claude-Session: https://claude.ai/code/session_01KAcoL6wpgVEs2ebUrUGpHS
…R override CI exports REDCODE_WHITEBOARD_DIR for every test job, and the loader read it straight from the environment ahead of the configured checkout and release, so the release-path tests silently served the built checkout on Windows and asserted against the wrong bundle. The override is now a `Source` field seeded from the environment; the suite clears it with `configure`. Claude-Session: https://claude.ai/code/session_01KAcoL6wpgVEs2ebUrUGpHS
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.
Problem
On the version PR #212,
workspace (windows)failed: all six whiteboard installer tests from #204 exit before their first assertion becausetar -czf C:\...\bundle.tar.gzreturns 2. GNU tar, which Git for Windows puts first on PATH, parses a drive letter ashost:file. The production extractor inwhiteboard.tsused the same absolute-path shape and would fail identically on such a machine.A second Windows-only failure followed: CI exports
REDCODE_WHITEBOARD_DIR, which the loader read ahead of the configured release, so the tests served the built checkout and asserted against the wrong bundle.Fix
packages/core/src/design/whiteboard.ts: runtarwithcwd= release directory and pass only relative names; the directory override is now aSource.directoryfield seeded from the environment.packages/core/test/design-whiteboard.test.ts: relative tar paths, surface tar's stderr on failure, andconfigure({ directory: undefined })so the suite exercises the release path.Test
bun test test/design-whiteboard.test.tsinpackages/core: 8/8 pass on Linux, and the six release-path tests pass withREDCODE_WHITEBOARD_DIR=/nonexistentset as in CI.tsgo --noEmitclean inpackages/coreandpackages/redcode. Theworkspace (windows)check on this PR is the Windows validation.https://claude.ai/code/session_01KAcoL6wpgVEs2ebUrUGpHS