Gradle --global-prefix e2e tests pass without --global-prefix: the harness always sets GRADLE_USER_HOME, and no test asserts gradle_user_home_differs fires
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with global_prefix_scan_says_nothing_about_the_user_home in crates/socket-patch-cli/tests/e2e_gradle_discovery_build.rs, then isolate_cli in tests/common/jvm_env.rs, which always sets GRADLE_USER_HOME. Remove that variable after prepare_command, add a positive control asserting gradle_user_home_differs appears without --global-prefix, and then assert it is absent with the flag. The same pattern applies to gradle_agent_global_prefix in e2e_gradle_agent_build.rs. Done means both tests fail when --global-prefix handling is stubbed out.
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: bug (fake tests). Register ID: T67.
Problem
Two Gradle tests claim to prove --global-prefix behavior, but the harness makes the flag irrelevant to their assertions.
e2e_gradle_discovery_build.rs. global_prefix_scan_says_nothing_about_the_user_home`` asserts that gradle_user_home_differs is absent. The warning can't appear in this harness, because:
- the scan goes through
jvm_env::isolate_cli, which always setsGRADLE_USER_HOME(jvm_env.rs L106-L109); - the core check returns
NonewheneverGRADLE_USER_HOMEis set (gradle_cache.rs L551-L566).```
Executed on cbbbdb9 with a scratch build, running scan --json in a Gradle project with HOME ≠ passwd home:
| Case | warnings[] codes |
|---|---|
GRADLE_USER_HOME unset |
["gradle_user_home_differs"] |
GRADLE_USER_HOME set (the harness) |
[] |
--global-prefix, GRADLE_USER_HOME unset |
[] |
So the assertion holds whether or not --global-prefix suppresses the warning. The suite's scan doc at L111 says None means "no GRADLE_USER_HOME", which is false. No CLI test anywhere asserts that gradle_user_home_differs fires.
e2e_gradle_agent_build.rs. gradle_agent_global_prefix runs through socket(), which sets GRADLE_USER_HOME to the same cache (L333).````` A plain apply --offline already patches that cache (L468), so a CLI that ignored `--global-prefix` would still pass. This one comes from reading the code and was not executed.
Proposed change
For the discovery test:
- Remove
GRADLE_USER_HOMEafterprepare_command. - Add a positive control: the same scan without
--global-prefixassertsgradle_user_home_differsis present. - Then assert it is absent with the flag.
- Fix the L111 doc.
For the agent test:
- Remove
GRADLE_USER_HOME, or point it at an empty dir, so only--global-prefixnames the cache. - Assert the jar is patched there and untouched under the default home.
Size
2 test files. About +30/−10 lines.
Acceptance criteria
- Each test fails when
--global-prefixhandling is stubbed out. Show this once by mutation in the PR description. - The new positive control passes on
main.
- 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à 4/5 3-5 giorni Idoneità per principianti 54/100
SocketDev/socket-patch#1993 ·
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
Tutte le issue di SocketDev/socket-patch
Issue simili
-
parity priority: low
Difficoltà 2/5 Mezza giornata Idoneità per principianti 65/100
storytold/vectorcraft#5421 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug enchantments Java Edition protocol
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
Pumpkin-MC/Pumpkin#4465 ·
I maintainer di solito rispondono entro 1 giorno
-
docs(metrics): replace stale src/metrics.rs line anchors in dashboard-metrics.md with symbol namesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
vfarcic/dot-agent-deck#2079 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
fraiseql/fraisier-core#148 ·
I maintainer di solito rispondono entro 1 giorno