Move the cargo e2e fixture helpers into cargo_e2e_matrix: cargo(), sparse_index_rel, find_registry_crate, locked_version and package_block are copied in 3-4 suites that already include it
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Read crates/socket-patch-cli/tests/cargo_e2e_matrix/mod.rs and the four named Cargo e2e suites: e2e_redirect_cargo_build.rs, e2e_redirect_cargo_shapes.rs, e2e_vendor_cargo_build.rs, and mode_migration_cargo.rs. Compare the duplicated helpers with the existing parse_lock API, then consolidate the specified helpers and remove local copies. Run the cargo e2e CI jobs with SOCKET_PATCH_CARGO_E2E_REQUIRED=1; done means the same tests pass and only one find_registry_crate and sparse_index_rel remain.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register.
Kind: refactor. Register ID: T71.
Problem: the four cargo build suites all mod cargo_e2e_matrix;, yet each one re-writes the same fixture helpers. md5 is of the fn body with comments and whitespace stripped:
| fn | e2e_redirect_cargo_build | e2e_redirect_cargo_shapes | e2e_vendor_cargo_build | mode_migration_cargo | md5 |
|---|---|---|---|---|---|
cargo |
L128 | L165 | L232 | L111 | f9f7f391 (all identical) |
sparse_index_rel |
L207 | L185 | — | L209 | c5573a49 |
find_registry_crate |
L182 | L176 (drifted) | L344 | L198 | 07d0421e / fbb0ccc2 |
locked_version |
L153 | — | L315 | L171 | b933fd5b |
package_block |
L173 | — | L335 | L190 | 312981d4 |
build_patched_crate |
L220 | build_crate L228 |
— | L218 | drifted (expect vs unwrap, leaf param) |
- The
find_registry_cratedrift: on a bad dir entry, the shapes copy (L176-L183)`` skips it, while the others (redirect_cargo_build L182-L191) returnNone. - Lock parsing written twice:
locked_versionandpackage_blockhand-parseCargo.locktext (L152-L179,```` mode_migration_cargo L171-L196).````` Yetcargo_e2e_matrix::parse_lockalready returns `name`/`version`/`source`/`checksum`, and the same file uses it at L620-L623. - Another hand-kept copy:
stage_fixtureis near-copied between redirect_cargo_build L252-L295 and mode_migration_cargo L242-L279.
Proposed change:
- Move
cargo,sparse_index_rel,find_registry_crate(iterator form),build_patched_crate(leaf, …)andstage_fixtureintotests/cargo_e2e_matrix/mod.rs. - Replace
locked_version/package_blockwithparse_locklookups. - Delete the local copies.
- The
copy_dir_recursivecopies in the same files are left to #1979 (T64).
Size: 4 test files plus cargo_e2e_matrix/mod.rs. About −250/+80 lines.
Acceptance criteria:
- No product code changes.
- The four suites list the same tests and pass in the cargo e2e CI jobs with
SOCKET_PATCH_CARGO_E2E_REQUIRED=1. - Exactly one
fn find_registry_crateand onefn sparse_index_relundercrates/socket-patch-cli/tests.
- Lingua principale
- Rust
- Stelle
- 9
- Fork
- 2
- Merge medio
- 20h 47m
- PR unite (30g)
- 681
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SocketDev/socket-patch
-
agent:triaged arch-audit priority:p3 refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
SocketDev/socket-patch#1860 ·
I maintainer di solito rispondono entro 1 giorno
-
agent:triaged arch-audit priority:p3 refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SocketDev/socket-patch#1838 ·
I maintainer di solito rispondono entro 1 giorno
-
arch-audit refactor
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
SocketDev/socket-patch#1992 ·
I maintainer di solito rispondono entro 1 giorno
-
agent:triaged arch-audit priority:p3 refactor
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
SocketDev/socket-patch#1987 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent:triaged arch-audit priority:p3 refactor
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
SocketDev/socket-patch#1983 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SocketDev/socket-patch
Issue simili
-
A-linter
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
oxc-project/oxc#28783 ·
I maintainer di solito rispondono entro 1 giorno
-
Substrait consumer doesn't recognise `shift_left` / `shift_right` from functions_arithmetic.yamlApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/datafusion#27059 ·
I maintainer di solito rispondono entro 1 giorno
-
Bump calamine to 0.38: RUSTSEC-2026-0436 (CFB/OLE2 panic and unbounded allocation) fails cargo auditAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
docling-project/docling.rs#979 ·
I maintainer di solito rispondono entro 1 giorno
-
llm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno