status-hostile-non-status-file.test.js fails locally when Claude Code is attached: the test reads the real HOME

Abierto Apto para principiantes
#2,987 1 comentario 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, nodejs
Área
devtools, testing

Línea de trabajo

Empieza en test/core/status-hostile-non-status-file.test.js, donde el helper env() (alrededor de la línea 49) construye su entorno a partir de process.env sin sobrescribir HOME. Establece HOME en el directorio home temporal allí y comprueba si CODEX_HOME también necesita redirigirse. Reproduce primero el problema ejecutando el test en una máquina con Claude Code conectado y luego con HOME establecido en un directorio temporal vacío. Está listo cuando el test pasa con el HOME real conectado y se han revisado los demás tests de status que construyen el entorno desde process.env por la misma fuga.

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

Descripción

test/core/status-hostile-non-status-file.test.js fails on any machine where Claude Code is attached to HypAware. CI is green, so only local full runs see it.

Failure (master 46e109d7):

test/core/status-hostile-non-status-file.test.js:384
'two repair entries stay two lines, whatever they carry'
actual: 3, expected: 2

Cause: the test's env() helper (line 49) is { ...process.env, HYP_HOME: hypHome, HYP_CONFIG: '' }, so HOME is the developer's real one. collectHypAwareStatus then reads the real ~/.claude/settings.json, finds the _hypaware attach marker, and adds a client_attached_not_configured diagnostic (src/core/daemon/status.js:1447) because the temp config has no claude client. Its repair: hyp client detach claude line is the third repair: line the assertion counts.

Reproduce:

  • On a machine with hyp client attach claude done, run node --test test/core/status-hostile-non-status-file.test.js: 11 pass, 1 fail.
  • The same run with HOME set to an empty temp directory: 12 pass, 0 fail.

Fix direction: have the test's env() also point HOME (and the Codex home, if read) at the temp home. Other status tests that build their env from process.env may have the same leak.

Found during the review of #2985 (unrelated to it). No fix is in flight.

Lenguaje dominante
JavaScript
Estrellas
11
Forks
0
Merge medio
1 h 14 min
PR fusionados (30 d)
262

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 hyparam/hypaware

Todos los issues de hyparam/hypaware

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.