Carry hosted stale-install and takeover warnings as RunWarning, not serde_json::Value round-tripped through run_warning_of
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
Línea de trabajo
Read scan/hosted.rs first, especially run_warning_of and run_redirect_selected_untracked, then trace the warning fields and constructors in scan/hosted/python.rs, scan/hosted/nuget.rs, scan/hosted/takeover.rs, and vlt_heal.rs. Convert these paths to carry RunWarning, mapping RewriteWarning once. Run the named hosted and redirect end to end suites; done when their human and JSON warning output is unchanged and no listed file contains a json! warning literal.
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 comment.
Kind: refactor. Register ID: T27 (part of T21, the warning sink).
Problem
Several hosted helpers build their warnings as untyped serde_json::json!({"code": .., "detail": ..}) values:
- the gem probe: scan/hosted.rs L300, L309;
- scan/hosted/python.rs L201;``
- scan/hosted/nuget.rs L75;````
- vlt_heal.rs L373, L417;
- scan/hosted/takeover.rs L161, L238, L286, L382, L492, L609, L623. takeover even converts typed core
RewriteWarnings into JSON values.
The caller then parses them back with run_warning_of, scan/hosted.rs L162-L167:`````
RunWarning::new(
w["code"].as_str().unwrap_or_default(),
w["detail"].as_str().unwrap_or_default(),
)
A typo in a key silently becomes an empty code. The fold in run_redirect_selected_untracked (hosted.rs L1863-L1898) juggles four warning shapes at once: RewriteWarning, Value, the go audit's (String, String), and RunWarning.
Proposed change
- Make
StaleInstallOutcome.warningsandtakeover::Finished.warnings(and the vlt heal outcome) aVec<RunWarning>. - Build those warnings with
RunWarning::newat each site. - Map
RewriteWarning→RunWarningonce with aFromimpl. - Delete
run_warning_of.
Size
5 files (scan/hosted.rs, scan/hosted/{python,nuget,takeover}.rs, vlt_heal.rs). Roughly −40 / +20.
Acceptance criteria
--jsonwarnings[]and the human output are unchanged. The e2e hosted suites (e2e_hosted_production.rs,e2e_redirect_*) guard them.- No
json!({"code"warning literal remains in these files.
- Lenguaje dominante
- Rust
- Estrellas
- 9
- Forks
- 2
- Merge medio
- 20 h 47 min
- PR fusionados (30 d)
- 681
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 54/100
SocketDev/socket-patch#1993 ·
Los mantenedores suelen responder en 1 día
-
arch-audit refactor
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
SocketDev/socket-patch#1992 ·
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#1987 · 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 78/100
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 66/100
riverqueue/river#1576 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
stadelmanma/fitparse-rs#64 ·