Spike: async Rust and async-process for the git and gh process layer

Abierto
#24 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
git, github, rust
Área
devtools

Línea de trabajo

Start with crates/review-core/src/review/github.rs, where the gh pull-request lookup runs with a deadline and reader threads, and read CLAUDE.md for the synchronous-core rule. This is a spike: the outcome is a comparison of async-process against a tokio alternative on the gh lookup, not a merged rewrite. Done means a written result on line count, API spread and binary-size cost, with an ADR if the core is to become async.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

deferred

A spike, for later: try async Rust for the process and I/O layer, and adopt it only if the code gets simpler or gains something concrete.

Why

The engine spawns git and gh and waits on them. Some of that code is hand-rolled around blocking calls: the pull-request lookup runs gh with a deadline and threads that read its pipes (crates/review-core/src/review/github.rs), and a capture that is out of date runs its git commands to the end because nothing can cancel them. Async processes give timeouts, pipe draining and cancellation by dropping a future.

The design work for #19 concluded that async does not fix its refusals or blocking, so this is separate from it.

Try

  • async-process (runtime-agnostic, so it runs on gpui's executor in review-gui) with a lightweight executor such as smol in review-tui and the CLI, and tokio as the alternative to compare.
  • Start with the gh lookup, then a capture's git commands with cancellation of a superseded capture.
  • Keep CPU work (analysis, diffing, tree-sitter) and the event log's lock and appends synchronous; an append must run to a known outcome.

Decide

  • Lines and concepts removed or added, and how readable the result is.
  • Whether async spreads into review-core's public API; CLAUDE.md requires a synchronous core, so making it async needs an ADR that revisits that rule.
  • Dependency and binary size cost, and whether embedders would inherit a runtime.
Lenguaje dominante
Rust
Estrellas
1
Forks
0
Merge medio
2 h 16 min
PR fusionados (30 d)
54

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de romnn/code-review

Todos los issues de romnn/code-review

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.