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
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 55/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
[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.
- Lenguaje dominante
- Rust
- Estrellas
- 9
- Forks
- 2
- Merge medio
- 18 h 47 min
- PR fusionados (30 d)
- 637
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SocketDev/socket-patch
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
SocketDev/socket-patch#1860 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SocketDev/socket-patch#1838 ·
Los mantenedores suelen responder en 1 día
-
arch-audit refactor
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
SocketDev/socket-patch#1987 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
SocketDev/socket-patch#1983 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit bug priority:p3
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
SocketDev/socket-patch#1981 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de SocketDev/socket-patch
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Rename SerVtdExt to ServtdExtAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
Android visitors are offered the Linux .deb on cap.so's homepage and download pagePosiblemente ocupada @patrickballard la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CapSoftware/Cap#3677 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DioxusLabs/blitz#1371 ·
Los mantenedores suelen responder en 1 día