Skip to content

fix: count a packs/ folder only when it holds a pack - #2

Merged
billlyzhaoyh merged 1 commit into
mainfrom
fix/root-needs-real-packs
Nov 30, 2026
Merged

billlyzhaoyh merged 1 commit into
mainfrom
fix/root-needs-real-packs

Conversation

@billlyzhaoyh

Copy link
Copy Markdown
Contributor

What and why

Any folder called packs/ made its parent the project folder. So analects init, run below an unrelated packs/ folder (of CSVs, say), put graph.db in the folder above, and that folder joined the pack search path. A newcomer's first run on 29 November hit exactly this.

A packs/ folder now counts only when it holds a pack, a <name>@<version>/pack.yaml, both when finding the project folder and when choosing where packs are read from. docs/getting-started/configure.md says so.

How I tested it

  • New test test_a_packs_folder_without_packs_does_not_move_the_graph runs analects init below a packs/ folder that holds only a CSV. Before the fix graph.db landed in the folder above; now it stays where init was run.
  • uv run pytest: 1224 passed, 1 skipped. uv run analects schema test and uv run python scripts/release_check.py: clean.

Tools that helped

Claude Code.

Any folder called packs/ made its parent the project folder, so analects
init could put graph.db above the folder it was run in, next to an
unrelated packs/ folder of CSVs, and add that folder to the pack search
path. A packs/ folder now counts only when it holds a <name>@<version>/
pack.yaml.
@billlyzhaoyh
billlyzhaoyh merged commit 6223f37 into main Nov 30, 2026
4 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.

1 participant