Flake: composer oracle test races the COMPOSER_VENDOR_DIR EnvGuard added in #2064
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Start in crates/socket-patch-core/src/crawlers/composer_crawler.rs: the failing randomized_vendor_trees_match_the_async_oracle test is near line 2504, and the injected var("COMPOSER_VENDOR_DIR") closure is near line 723. Read test_env.rs for how guarded_var_os and EnvGuard interact, and the vendor_dir_lookups_ignore_the_hosts_composer_env test that holds the guard. Done means the equivalence test passes reliably when run alongside the guard test, with the chosen fix documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
New race on main since #2064 (7c5240e, merged 2026-11-13 15:13 UTC). It already failed one coverage shard.
Evidence
- PR #2071 (a CI-only change, unrelated to composer),
coverage (1), run https://github.com/SocketDev/socket-patch/actions/runs/43499592420/job/132141704760:
crawlers::composer_crawler::tests::equivalence::randomized_vendor_trees_match_the_async_oraclepanicked atcrates/socket-patch-core/src/crawlers/composer_crawler.rs:2504:
seed 3: crawl_all left: [("b", "3.5.0", …"/proj/web/plugins/p0"), ("plugin", "3.5.0", …"/proj/vendor/wp/plugin")] right: []
The fixture is deterministic (seeded), so one of the two crawlers saw a different vendor dir partway through the test.
Root cause
Under cfg(test), the composer crawler reads COMPOSER_VENDOR_DIR through test_env::guarded_var_os, which returns the real value whenever any live EnvGuard holds the key. #2064 added vendor_dir_lookups_ignore_the_hosts_composer_env, which ends with EnvGuard::set("COMPOSER_VENDOR_DIR", "held"). That test is #[serial], but the readers (randomized_vendor_trees_match_the_async_oracle and the other composer crawl tests) are not. serial only excludes other serial tests, so a parallel reader can see vendor-dir = held (a directory that doesn't exist) for the guard's lifetime. The new crawler resolved before the guard and the legacy one during it, or the other way round, and the results diverged.
The same pattern can hit any env that guarded_var gates (ruby_crawler's Bundler vars, utils::go_env) wherever a guard-holding test runs beside non-serial readers.
Fix options
- Test the "a held value is honoured" half through the injected-
varresolver (thevar("COMPOSER_VENDOR_DIR")closure path at ~L723) instead of a process-wide guard, and keep only the "host value hidden" half on the real env. This is the smallest fix. - Or mark the env readers in that module
#[serial_test::parallel], which excludes them from running beside#[serial]tests, and document the rule intest_env.rs("every user must also be serial" covers writers but not readers).
Frequency: 1 hit so far (needs the two tests to overlap). It's in the gating coverage leg, so in the merge queue one hit evicts an entry.
Filed by the hourly CI janitor.
Generated by Claude Code
- Ngôn ngữ chính
- Rust
- Star
- 9
- Fork
- 2
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 309
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SocketDev/socket-patch
-
Windows unit tests fail on main: pnpm-registry-overrides fixtures are checked out as CRLF (mixes CRLF and LF line endings)Có thể đã có người làm @mikolalysenko đã nhận hôm nay. Đang mởagent:claimed agent:triaged ci-janitor priority:p1
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
SocketDev/socket-patch#2238 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit priority:p3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
SocketDev/socket-patch#1860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit priority:p3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SocketDev/socket-patch#1838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Nightly: pnpm11_registry_route_is_cleaned_up_when_a_patch_is_not_needed fails on Windows (pnpm records the RUNNER~1 short path as a second importer)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởagent:triaged ci-janitor priority:p1
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 42/100
SocketDev/socket-patch#2235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Agent mode reports a gem whose installed file was edited as "not installed on this host" / "not found on disk", `apply --check` says to run `apply`, and `rollback` exits 1 with "modified after patching" on every runCó thể đã có người làm @mikolalysenko đã nhận hôm nay. Đang mởagent:claimed agent:triaged bug bughunt pm:bundler priority:p1 ux
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
SocketDev/socket-patch#2231 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SocketDev/socket-patch
Issue tương tự
-
area: cli good first issue type: feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
renaming a provider to a taken name fails with a raw sql errorCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea:storage kind:bug priority:p3 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bugfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
storytold/photocraft#16975 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
expo/exact#1716 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày