원클릭으로
test-isolation
Rules for test isolation — preventing global state leakage from @eval monkeypatching
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Rules for test isolation — preventing global state leakage from @eval monkeypatching
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | test-isolation |
| description | Rules for test isolation — preventing global state leakage from @eval monkeypatching |
Mycelia's test suite runs all files in a single Julia process via
include_all_tests. Global state mutations persist across files.
NEVER use @eval Mycelia to redefine module functions in test files unless
both of the following are true:
zz_ prefix (e.g., zz_simulation_wrappers.jl) so it runs
last in alphabetical include orderMycelia.CONDA_RUNNER path (see with_fake_conda_runner pattern)MYCELIA_RUN_EXTERNAL=false@eval is unavoidable:Test.@testset "Guarded monkeypatch" begin
original = Mycelia.some_function
try
@eval Mycelia function some_function(args...)
# stub
end
# ... test code ...
finally
@eval Mycelia some_function = $original
end
end
@eval Mycelia permanently replaces methods in the module's method table for
the entire process lifetime. Files sorted alphabetically after the patching file
will silently get the stub instead of the real function. This was found in ~12
of 34 PRs during a comprehensive audit (2026-04-04), causing:
MYCELIA_RUN_EXTERNAL=true@eval Mycelia in files without zz_ prefix@eval is used, a save/restore pattern is in placesimulate_*, add_bioconda_env,
concatenate_fastq_files)Mycelia-specific test coverage expansion workflow
Staged test organization and testing guidelines for Mycelia
Diagnose and fix Lustre scratch "disk full" errors on /global/scratch when filesystem space appears available. Use for failed downloads/writes in scratch, TMPDIR issues, OST/MDT saturation, quota checks, and re-striping temp paths to healthy pools.
External tool integration and citation requirements for Mycelia
SLURM and HPC guidance for Mycelia benchmarks and large-scale analysis
Julia coding style and import rules for Mycelia package