e2e_hosted_production and e2e_vendored_production are a near-fork: 11 identical helpers, a copied PURL/UUID catalog and hand-rolled VEX checkers beside vex_e2e_common
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by diffing the duplicated helpers (pm_command, published_uuids, urlencode, site_packages, assert_pristine/assert_patched) between crates/socket-patch-cli/tests/e2e_hosted_production.rs and e2e_vendored_production.rs, and compare them with tests/vex_e2e_common/mod.rs. Done means both suites still compile with cargo test --no-run and the hosted and vendored production CI legs run and skip the same set under the *_STRICT=1 variants. The drifted helpers need a maintainer decision on which variant to keep before you change them.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register.
Kind: refactor. Register ID: T68.
Problem
The two #[ignore]d production suites (2,718 and 2,711 lines) share most of their harness by copy.
Identical copies (md5). 11 helpers are identical in e2e_hosted_production.rs and e2e_vendored_production.rs:
| Helper | Hosted | Vendored |
|---|---|---|
pm_command |
L447 | L513 |
published_uuids |
L559 | L687 |
urlencode |
L752 | L716 |
minimist_entry |
L1003 | L639 |
berry_skip_code |
L1585 | L1470 |
site_packages |
L1833 | L644 |
urllib3_patched |
L1852 | L663 |
pypi_manifestless_vex |
L1874 | L1793 |
The other three identical helpers are ok, dump and read. The PURL/UUID catalog is also copied, including all 6 gem UUIDs.
Drifted copies. 8 more have drifted:
strictandhas_command;tool,assert_pristineandassert_patched;yarn_berry_vex,bun_manifestless_vex_production(38 lines differ) andgem_manifestless_vex(40 lines differ).
UNPUBLISHED_ECOSYSTEMS has drifted too: hosted probes 16 purls, vendored fewer.
Helpers rewritten inside the same binary. These shared helpers are already compiled into the hosted suite, which rewrites them anyway:
hosted_pin_countL421 duplicatescommon::envelope::hosted_pins(..).len().urlencodeduplicatesvlt_e2e_common::urlencode.site_packagesduplicatesuv_vex::site_packages.berry_skip_codeand the bunskipclosure duplicatevex_e2e_common::skipped_reason.- The
redirect-state.jsonabsence check is hand-written 6× (L343, L1288, L1617, L1794, L2410, L2685) besidevex_e2e_common::assert_no_hosted_ledger. - 4 attestation checkers (pnpm L1274, berry L1551, bun L1766, gem L2385) duplicate
assert_attested. - 2 VEX runners duplicate
run_vex. Only the bun runner setsSOCKET_NO_API_TOKEN, so the copies have drifted.
Same-file duplication. GET + status + JSON parse is written 5× (L351, L559, L589, L626, L663).
Proposed change
- Add a
tests/production_common/mod.rsholding:- the catalog (PURLs, UUIDs,
UNPUBLISHED_ECOSYSTEMSas one list with per-mode filters); - one
get_json(url)probe; pm_command/tool/strict;assert_pristine/assert_patched(drop themarkerparameter: it is alwaysPATCH_MARKER).
- the catalog (PURLs, UUIDs,
- Include it from both suites and delete the local copies.
- Replace the hand-rolled VEX runners and checkers, ledger checks and pin counts with the
vex_e2e_common/envelopehelpers already in the binary. - The
strictenv-var names stay per suite, as a parameter.
Size
2 suites plus 1 new module. Roughly −600 lines.
Acceptance criteria
- Both suites still compile (
--no-run). - The CI "hosted production" and "vendored production" jobs pass under
*_STRICT=1with the same set of legs run and skipped. Compare the leg logs before and after. - The drifted helpers settle on the stricter variant, which the PR names.
- Ngôn ngữ chính
- Rust
- Star
- 9
- Fork
- 2
- Merge trung bình
- 18 giờ 47 phút
- Pull request đã merge (30 ngày)
- 637
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
-
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
-
arch-audit refactor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
SocketDev/socket-patch#1987 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit bug priority:p3
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
SocketDev/socket-patch#1982 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:triaged arch-audit bug priority:p3
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
SocketDev/socket-patch#1981 · 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ự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
limitlessprojects/Go-Hybrid#3342 ·
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 72/100
librespeed/speedtest-rust#52 · 1 bình luận ·
-
enhancement needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
bherbruck/solvecraft#11246 · 1 bình luận · 1 reaction ·
-
example
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rust-lang-nursery/rust-cookbook#954 ·
Maintainer thường phản hồi trong vòng 1 ngày