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

Aperta Adatta ai principianti
#109 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
69/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
shell
Ambito
cli

Direzione di ricerca

Inizia in agents/fabric/lib/register.sh alla riga 199, poi leggi il controllo delle collisioni alle righe 201-217. Riproduci il caso con fw fabric register .gitignore in un progetto appena creato con fw init e controlla .fabric/components/; verifica che i dotfile nella root ricevano slug distinti e non vuoti, incluso .framework.yaml rispetto a framework.yaml.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Shell
Stelle
16
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DimitriGeelen/agentic-engineering-framework

Tutte le issue di DimitriGeelen/agentic-engineering-framework

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.