Skip to content

fix(design): give tar relative paths so the whiteboard unpacks under GNU tar on Windows - #213

Merged
filipeforattini merged 2 commits into
mainfrom
whiteboard-tar-paths
Sep 11, 2026
Merged

fix(design): give tar relative paths so the whiteboard unpacks under GNU tar on Windows#213
filipeforattini merged 2 commits into
mainfrom
whiteboard-tar-paths

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Sep 11, 2026

Copy link
Copy Markdown

Problem

On the version PR #212, workspace (windows) failed: all six whiteboard installer tests from #204 exit before their first assertion because tar -czf C:\...\bundle.tar.gz returns 2. GNU tar, which Git for Windows puts first on PATH, parses a drive letter as host:file. The production extractor in whiteboard.ts used 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: run tar with cwd = release directory and pass only relative names; the directory override is now a Source.directory field seeded from the environment.
  • packages/core/test/design-whiteboard.test.ts: relative tar paths, surface tar's stderr on failure, and configure({ directory: undefined }) so the suite exercises the release path.

Test

bun test test/design-whiteboard.test.ts in packages/core: 8/8 pass on Linux, and the six release-path tests pass with REDCODE_WHITEBOARD_DIR=/nonexistent set as in CI. tsgo --noEmit clean in packages/core and packages/redcode. The workspace (windows) check on this PR is the Windows validation.

https://claude.ai/code/session_01KAcoL6wpgVEs2ebUrUGpHS

…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
@filipeforattini
filipeforattini merged commit d6f972a into main Sep 11, 2026
13 of 15 checks passed
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