Repository navigation
Studio tests: one Rust fake program from test-support, and the Windows research note (#813) - #816
Merged
Merged
Conversation
…s research note (#813) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACdL6QruKkvHdjdYPVr
…llback, and keeps its record (#813) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACdL6QruKkvHdjdYPVr
This was referenced Nov 28, 2026
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.
Closes #813 (spec #805).
Summary
A test fakes a program with one Rust call, not a
#!/bin/shscript. The fake is the test's own binary, hard-linked (or copied, across filesystems) under the program's name, with a behaviour file beside it; actorhook acts it out before the test harness'smain.The other 37 shell fakes stay until the Windows port (#805, Q5).
system-map.jsonis unchanged:test-support/anddocs/are already inignored.Evidence
test-support/tests/fake.rs, each run red (an assertion failure) before its fix:workbench/tests/run.rsread the fake's printedargs:/env:/stdin:lines from a#!/bin/shscript.After: the same three tests check the same facts (arguments,
GIT_TERMINAL_PROMPT/GH_PROMPT_DISABLED, stdin, folder) fromcalls().npm run checkpasses locally (macOS). Theubuntujob below is the Linux check ofcurrent_exethrough a hard link; the copy fallback has no test, since neither macOS nor the runner gives a temp folder on another filesystem by default.Tests removed or merged: none.
Correctness pass
A reviewer traced the fake under nextest and plain
cargo test, on macOS and Linux (docker), and reproduced each finding before the fix commit (aefc73902):fake()copied onto a hard link of its own source and truncated the running test binary; the copy fallback gave "Text file busy" (os error 26) on ~20% of spawns on Linux with a tmpfs temp folder; a rewrite mid-call let a call read half a behaviour file and abort; 40 concurrent recording calls left 26 entries; a rewrite cleared the record (story 24 wants both calls).readscript did too; the runner passesStdio::null()); a fake left from an older build never relinked (every caller uses a fresh temp folder).shorbash", false the day it landed (41 starts); it now binds new code and tests (story 28). Stalerun.rsdoc and deadlet _ = out;fixed.Outside review
skipped: no risk match
Merge Danger
Door: two-way
Test-only code and docs; nothing shipped links
test-support.Blast Radius: tests
The
ctorhook runs at the start of every test binary that linkstest-supportand returns at once unless a.fake.jsonsits beside it (50 harness starts: 0.23 s in all).🤖 Generated with Claude Code
https://claude.ai/code/session_01CVqACdL6QruKkvHdjdYPVr