From 2d6d6ed7bdedba87c23a09360358814d13404ef4 Mon Sep 17 00:00:00 2001 From: krypticmouse Date: Sat, 23 May 2026 15:17:12 +0000 Subject: [PATCH] fix(packaging): anchor `traces/` gitignore pattern so hatch ships it in the wheel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #372. The `.gitignore` had `traces/` (unanchored), which matches any directory named `traces/` anywhere in the tree — including the runtime module at `src/openjarvis/traces/`. hatchling honors `.gitignore` when building the wheel, so it silently dropped the entire `openjarvis/traces/` package. Effect: every fresh `pip install openjarvis==1.0.1` failed at import time with `ModuleNotFoundError: No module named 'openjarvis.traces'` the moment the user touched `jarvis ask`, learning, or the server. Confirmed by @gilbert-barajas with a clean repro on macOS Apple Silicon. Reproduced locally by running `uv build --wheel` on a clean checkout of `main`: - Before this change: `openjarvis/traces/` absent from the wheel. - After this change: all 4 expected files present (`__init__.py`, `analyzer.py`, `collector.py`, `store.py`). Anchored the pattern to `/traces/` so it only matches a top-level `traces/` directory (where ad-hoc trace dumps may live during development), not any nested `traces/` subdir. Added a comment in the gitignore explaining the gotcha so it doesn't recur. The other unanchored directory patterns in the file (`results/`, `logs/`, `htmlcov/`, `site/`, `build/`, `dist/`, `venv/`, `env/`) were audited — none collide with any directory currently under `src/openjarvis/`. Left them unanchored to keep the diff minimal. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4b7e2a7a..b405d1de 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,11 @@ Thumbs.db *.log results/ logs/ -traces/ +# Anchored to repo root — DO NOT use the unanchored form `traces/`. +# hatchling honors .gitignore when building the wheel; an unanchored +# `traces/` pattern matches src/openjarvis/traces/ and silently drops +# the runtime module from the wheel (issue #372). +/traces/ coding_task_* get-pip.py # Junk from mocked-path tests that write to their mock's __repr__ as a path