Skip to content

fix(bridge-opencode): --unlink compara rutas canónicas (CI de main rojo en macOS) - #9

Merged
DannyBaanks merged 1 commit into
mainfrom
claude/nifty-ramanujan-daxt74-unlink
Sep 25, 2026
Merged

DannyBaanks merged 1 commit into
mainfrom
claude/nifty-ramanujan-daxt74-unlink

Conversation

@DannyBaanks

@DannyBaanks DannyBaanks commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

What & why

El job Tests de main está en rojo desde el merge de #3. Es el primer run en el que CI corre la suite de tests. El único fallo es test/bridge-opencode.test.cjs, en el caso "--unlink removes bridge links and keeps foreign files" (mensaje: bridge link gone).

Causa: do_unlink compara readlink -f "$dest" (ruta canónica) contra "$STORE/<sub>/<archivo>", que no está canonizada. En macOS os.tmpdir() es /var/folders/..., y /var es un symlink a /private/var, así que las dos rutas nunca coinciden: --unlink sale con 0 sin quitar ningún enlace. En Linux pasa porque /tmp no es un symlink. Lo mismo le pasaría a cualquier usuario cuyo store esté detrás de un symlink.

Arreglo: el lado del store también se canoniza (pwd -P). Es un cambio de 5 líneas en tools/bridge-opencode-privado.sh.

Una vez que entre, conviene mezclar main en los PRs abiertos (#4 a #8) para que les corra CI en verde.

Type of change

  • Bug fix
  • Build / CI

Evidence

Before

Log del job Tests en main (2be6fb9):

not ok 13 - test/bridge-opencode.test.cjs
#   ✗ --unlink removes bridge links and keeps foreign files
#      bridge link gone

Reproducido en Linux con un store detrás de un symlink: --unlink → exit=0 y el enlace a.md -> …/alias/store/agent/a.md sigue ahí. El test nuevo, contra el script anterior, sale ✗ … 1 FAILURE(S).

After

  ✓ --unlink removes bridge links and keeps foreign files
  ✓ --unlink also works when the store sits under a symlinked dir (macOS /var -> /private/var)
bridge-opencode: all green

How I tested it

  • OS: Linux (contenedor), Node 22
  • Steps: node test/bridge-opencode.test.cjs con el script anterior (rojo) y con el nuevo (verde); el caso de macOS se simula con un store alcanzado a través de un symlink.

Checklist

  • Before/after arriba.
  • Tests del cambio pasan.
  • Leí el diff.

🤖 Generated with Claude Code


Generated by Claude Code

…jo en macOS)

do_unlink comparaba `readlink -f "$dest"` (ruta canónica) contra "$STORE/..."
sin canonizar. En macOS el tmpdir es /var/folders -> /private/var, así que
nunca coincidían: --unlink salía 0 sin quitar ningún enlace, y
test/bridge-opencode.test.cjs dejaba en rojo el job Tests de main.
Ahora el lado del store también se canoniza (pwd -P). Test nuevo que lo
reproduce en Linux con un store detrás de un symlink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141jpRihLcQWr34jq6mvC7b
@github-actions

Copy link
Copy Markdown
Contributor

🚫 This PR is missing its before/after evidence

Every pull request here has to show its work. Screenshots or a short screen recording, before the change and after it.

  • Before — no image or video under that heading
  • After — no image or video under that heading

How to fix it: edit the description, keep the ### Before and ### After headings from the template, and drag an image or video under each. GitHub uploads it inline. This check re-runs the moment you save.

A bug fix with no visible surface still needs it: show the failing behaviour, then the same steps passing. A terminal recording is fine.

Genuinely nothing to show — a CI tweak, a typo, a dependency bump? A maintainer can apply the no-visual-change label. Please don't ask unless it truly has no observable effect.

📖 CONTRIBUTING.md → Evidence is mandatory

Copy link
Copy Markdown
Owner Author

Estado del CI en este PR:

  1. Tests: este PR es el arreglo. El run está en curso.
  2. Typecheck → "Release links consistent": también está rojo en main y no tiene relación con este cambio. tools/check-release-links.cjs solo acepta versiones x.y.z y el fork usa 0.5.2-ISyCo.1. Todavía no hay arreglo; es una decisión sobre cómo publicas los releases.
  3. Before / after evidence: exige imágenes y yo no puedo subirlas. La evidencia está en texto en la descripción: el log rojo de main, la reproducción en Linux y el test que pasa de rojo a verde. Si te parece suficiente, ponle la etiqueta no-visual-change.

Generated by Claude Code

@DannyBaanks
DannyBaanks merged commit e01d369 into main Sep 25, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants