Skip to content

bug: bare 'dewey' pattern in .gitignore silently ignores all .uf/dewey/ knowledge artifacts #131

Closed

Description

@jflowers

Summary

.gitignore:2 contains the bare pattern dewey (added in commit 82e7445, clearly intended for the compiled Go binary at the repo root). Gitignore patterns without a slash match at any depth, so this line silently ignores the entire .uf/dewey/ directory — all knowledge artifacts (learnings/, compiled/, knowledge/) and user-owned config (sources.yaml, knowledge-stores.yaml).

Impact

  • Learnings are never committed. 30 learning files currently sit in .uf/dewey/learnings/, all invisible to git: git check-ignore -v .uf/dewey/learnings/<any>.md → .gitignore:2:dewey; git ls-files .uf/dewey/ returns nothing.
  • /uf.finale artifact staging is a silent no-op. uf.finale.md runs git add .uf/dewey/learnings/ .uf/dewey/compiled/ 2>/dev/null — the 2>/dev/null swallows git's "ignored paths" warning, so feature PRs are created believing knowledge artifacts were included when none were.
  • Contradicts the intended ignore policy. The uf-managed block (.gitignore:53-72) deliberately ignores only runtime data — .uf/dewey/config.yaml, graph.db, graph.db-shm, graph.db-wal, *.lock, cache/, dewey.log — implying learnings/, compiled/, knowledge/, and sources.yaml are meant to be committable. Line 2 defeats the entire block.
  • Agent knowledge work is lost on clone, clean, or machine switch — the durability guarantee of file-backed learnings (closed feat: persist learnings as markdown files for backup and portability #50) never actually reaches git.

Evidence

$ git check-ignore -v .uf/dewey/learnings/release-workflow-20260616T104240-jay-flowers.md
.gitignore:2:dewey	.uf/dewey/learnings/release-workflow-20260616T104240-jay-flowers.md

$ ls .uf/dewey/learnings/ | wc -l
30
$ git ls-files .uf/dewey/ | wc -l
0

.gitignore line 1-2:

# Binary
dewey

Proposed fix

Anchor the pattern to the repo root so it only matches the built binary:

 # Binary
-dewey
+/dewey

Acceptance criteria

  • git check-ignore .uf/dewey/learnings/<file>.md exits non-zero (no longer ignored)
  • git status shows .uf/dewey/learnings/, .uf/dewey/compiled/, .uf/dewey/knowledge/, and .uf/dewey/sources.yaml as untracked when present
  • Runtime artifacts remain ignored: git check-ignore .uf/dewey/graph.db .uf/dewey/config.yaml .uf/dewey/dewey.log all still match
  • The repo-root dewey binary is still ignored

Notes

  • Precedent: bug: .gitignore blanket-ignores .dewey/ directory, preventing sources.yaml and config.yaml from being version-controlled #23 — identical bug class for the legacy .dewey/ layout (blanket directory ignore hiding committable config); that fix enumerated runtime artifacts instead of ignoring the directory. This is the same mistake re-introduced for the .uf/dewey/ layout.
  • Trivial one-line fix — exempt from the spec-first workflow per AGENTS.md. It may also land inside the /dewey-publish chore PR (companion issue, filed separately) if that work gets there first; whichever picks it up first, the other should rebase on it rather than double-fix.
  • After the fix lands, previously-ignored artifacts show up as untracked — committing them is the job of the /dewey-publish command (companion issue), not this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions