Repository navigation
test(param-transform): isolate per-test scratch paths to kill the shared-probe race - #4275
Merged
Merged
Conversation
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.
Refs #4270
parameter_transform_tests的 18 个测试里,prompt_identity()的探针文件target/rubash-param-transform-identity-probe.txt被 4 个测试共用:并行运行时一个测试的清理remove_file会删掉另一个测试刚写下、还没读的探针输出,受害测试逐轮漂移(已观测arrays::test_parameter_transform_expands_prompt_array_elements、test_parameter_transform_expands_prompt_escapes、test_indirect_parameter_transform_applies_to_target_value)。修复:新增单一 helper
scratch_dir(test),本测试目标内所有文件(每个测试的 output 文件 + identity 探针)统一放进 per-test 唯一目录target/rubash-param-transform-<slug>-<pid>/,测试结束整目录删除;prompt_identity改为接收调用方测试的目录。本 PR 删除了什么
删除全部 19 处固定路径字面量(18 个 per-test output 路径 + 1 个共享 identity-probe 路径)及对应的
remove_file(output_path)清理走法,不保留两套路径逻辑。无生产代码改动。净行 delta:+20(85 insertions / 65 deletions,git-diff 口径;新增行全部出自
scratch_dirhelper 的文档注释与函数体)。验证(captain-verified on devin-mac; CI pending)
prompt_identity()调用方内,与 census 漂移名吻合;串行对照 3/3 全绿——并行是必要条件。18 passed; 0 failed),断言失败清零;cargo test --lib1341 passed / 0 failed,失败名集为空,无新红。prompt_identity()调用方并行时高频进程 abort(fatal runtime error: IO Safety violation: owned file descriptor already closed),指向引擎并行 Executor 的 fd 所有权竞态,已另立 [observation] 并行 in-process ${PS@P} 探针高频 abort:IO Safety violation: owned file descriptor already closed(macOS) #4274 跟踪。本 PR 不声称修该面;补丁后未跑完的轮次均死于该 abort,非本文件竞态残留。