[Bug]: `fw fabric register .gitignore` writes `.fabric/components/.yaml` (the T-1659 empty slug, for root dotfiles)

Abierto Apto para principiantes
#109 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
69/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
shell
Área
cli

Línea de trabajo

Empieza en agents/fabric/lib/register.sh en la línea 199 y luego lee la comprobación de colisiones en las líneas 201-217. Reprodúcelo con fw fabric register .gitignore en un proyecto recién creado con fw init y comprueba .fabric/components/; verifica que los archivos dot de la raíz reciban slugs distintos y no vacíos, incluido .framework.yaml frente a framework.yaml.

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

Descripción

area:fabric bug severity:medium status:received triaged
Bug Description

agents/fabric/lib/register.sh:199 builds the slug with:

slug=$(echo "$rel_path" | sed 's|/|-|g; s|\.[^./-]*$||; s|^\.||')

For a root dotfile with no other dot, the "trailing extension" is the whole name: .gitignore gives an empty slug, so the card is .fabric/components/.yaml. The comment just above (T-1659, bug 2) names this exact file as the bug being fixed; the fix covers paths with a dot before the basename, not a basename that starts with a dot.

Same line, two more effects:

  • A second such dotfile (.dockerignore, .editorconfig, .env) also gets the empty slug; the collision guard (lines 201-217) then names it -dockerignore.yaml, so card names depend on registration order.
  • .framework.yaml gives framework (extension stripped, then leading dot stripped), the slug of a real framework.yaml.
Steps to Reproduce
  1. In a fresh fw init project: touch .gitignore && fw fabric register .gitignore
  2. ls -A .fabric/components/: the card is named .yaml.
Expected Behavior

A non-empty slug that keeps the name, e.g. gitignore.yaml (or dot-gitignore.yaml), and distinct slugs for .framework.yaml and framework.yaml.

Actual Behavior

.fabric/components/.yaml, a hidden file that ls does not show by default.

fw doctor output

AI Agent

Claude Code

Operating System

Linux

Additional Context

Seen on 1.8.14 in a real project, reproduced on 1.8.15 in a throwaway container (fresh fw init project, non-root, no network). register.sh is unchanged on bleeding-edge (0c3b8b6c3).

Lenguaje dominante
Shell
Estrellas
16
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

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 DimitriGeelen/agentic-engineering-framework

Todos los issues de DimitriGeelen/agentic-engineering-framework

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.