Skip to content
16 changes: 9 additions & 7 deletions generated/dogfood/DOGFOOD_REPORT_v2.2.3-dev.44e8146.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,20 @@ All exports verified present and correct type:

## 9. Suggestions for Improvement

### 9.1 Add `--json` flag to `search` command
### 9.1 Add `--json` flag to `search` command — RESOLVED in v2.4.0
The `search` command lacks `--json` output. Every other query command supports it, so this inconsistency is surprising for programmatic users.

### 9.2 Vitest should exclude worktree directories
### 9.2 Vitest should exclude worktree directories — RESOLVED in v2.4.0
`npm test` picks up test files from `.claude/worktrees/`, causing failures in worktree copies that lack WASM grammars. The vitest config should exclude `.claude/**` from test discovery.

### 9.3 `search --file` should support glob patterns
### 9.3 `search --file` should support glob patterns — RESOLVED in v2.4.0
`search --file "src/*.js"` returned 0 results while `search --file "builder"` worked. The `--file` flag is substring-only, but glob patterns would be more intuitive and consistent with other tools.

### 9.4 Consider adding `--exclude-worktrees` or similar to `registry prune`
### 9.4 Consider adding `--exclude-worktrees` or similar to `registry prune` — RESOLVED in v2.4.0 / v2.5.1
`registry prune --ttl 0` removes all entries including the main project, which can be surprising. A flag to preserve specific entries would help.

> `--exclude` flag added in v2.4.0; `--dry-run` flag added in v2.5.1.

---

## 10. Testing Plan
Expand Down Expand Up @@ -367,6 +369,6 @@ Positives:

| Type | Number | Title | Status |
|------|--------|-------|--------|
| Issue | [#77](https://github.com/optave/codegraph/issues/77) | bug: cycles, export, embed crash without graph.db | Openfix in PR #79 |
| Issue | [#78](https://github.com/optave/codegraph/issues/78) | bug: package.json not in exports map | Openfix in PR #79 |
| PR | [#79](https://github.com/optave/codegraph/pull/79) | fix(cli): graceful error for cycles, export, embed when no graph.db exists | Open |
| Issue | [#77](https://github.com/optave/codegraph/issues/77) | bug: cycles, export, embed crash without graph.db | Closedfixed in v2.3.0 |
| Issue | [#78](https://github.com/optave/codegraph/issues/78) | bug: package.json not in exports map | Closedfixed in v2.3.0 |
| PR | [#79](https://github.com/optave/codegraph/pull/79) | fix(cli): graceful error for cycles, export, embed when no graph.db exists | Merged |
22 changes: 14 additions & 8 deletions generated/dogfood/DOGFOOD_REPORT_v2.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ MCP initializes via JSON-RPC, responds to `tools/list`, correct tool schemas.
- **Root cause:** `buildStructure()` unconditionally clears ALL `contains` edges and directory nodes (`DELETE FROM edges WHERE kind = 'contains'`), then only rebuilds for files in `fileSymbols` — which during incremental builds only contains changed files.
- **Fix applied:** Before calling `buildStructure`, load all existing file nodes from the DB into `fileSymbols` and `lineCountMap` so the complete file set is available for structure rebuild. 37 lines added to `builder.js`. All 491 tests pass.

### Enhancement: `search` command missing `--json` flag (Low)
### Enhancement: `search` command missing `--json` flag (Low) — RESOLVED in v2.4.0
- **Issue:** [#90](https://github.com/optave/codegraph/issues/90)
- **PR:** N/A — enhancement, not a bug fix
- **Description:** All other query commands support `-j/--json` but `search` does not. Running `search -j` returns "unknown option '-j'".
Expand All @@ -323,20 +323,26 @@ MCP initializes via JSON-RPC, responds to `tools/list`, correct tool schemas.

## 9. Suggestions for Improvement

### 9.1 Add `--json` to `search` command
### 9.1 Add `--json` to `search` command — RESOLVED in v2.4.0
Every other query command supports JSON output. `search` is the only holdout, which breaks automation workflows.

### 9.2 Document `excludeTests` config nesting
### 9.2 Document `excludeTests` config nesting — RESOLVED in v2.5.0
The CHANGELOG and CLI help say "excludeTests config option" but don't mention it must be nested under `query`. A top-level `{ "excludeTests": true }` silently does nothing. Either:
- Document as `query.excludeTests` in the README/CHANGELOG
- Or accept it at both top-level and nested

### 9.3 Warn on engine mismatch during incremental builds
> v2.5.0 added `excludeTests` as a top-level config shorthand via `build.excludeTests`.

### 9.3 Warn on engine mismatch during incremental builds — RESOLVED in v2.6.0
Store the engine used for the last full build in DB metadata. When an incremental build uses a different engine, warn the user and suggest `--no-incremental`.

### 9.4 Add `--no-incremental` recommendation after version upgrades
> v2.5.0 added build metadata tracking; v2.6.0 added drift detection warnings.

### 9.4 Add `--no-incremental` recommendation after version upgrades — RESOLVED in v2.6.0
When `codegraph info` detects the installed version differs from the version that built the graph, suggest a full rebuild.

> v2.6.0 drift detection warns when counts diverge >20% and suggests `--no-incremental`.

---

## 10. Testing Plan
Expand Down Expand Up @@ -409,6 +415,6 @@ Deductions:

| Type | Number | Title | Status |
|------|--------|-------|--------|
| Issue | [#89](https://github.com/optave/codegraph/issues/89) | bug: mixed-engine incremental build corrupts structure/contains edges | open |
| Issue | [#90](https://github.com/optave/codegraph/issues/90) | enhancement: add --json flag to search command | open |
| PR | [#91](https://github.com/optave/codegraph/pull/91) | fix(builder): preserve structure data during incremental builds | open |
| Issue | [#89](https://github.com/optave/codegraph/issues/89) | bug: mixed-engine incremental build corrupts structure/contains edges | Closed — fixed in v2.4.0 |
| Issue | [#90](https://github.com/optave/codegraph/issues/90) | enhancement: add --json flag to search command | Closed — resolved in v2.4.0 |
| PR | [#91](https://github.com/optave/codegraph/pull/91) | fix(builder): preserve structure data during incremental builds | Merged |
12 changes: 9 additions & 3 deletions generated/dogfood/DOGFOOD_REPORT_v2.3.1-dev.1aeea34.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,21 @@ The `roles --role dead` crash observed earlier was caused by querying a stale DB

## 10. Suggestions for Improvement

### 10.1 Add --db flag to embed and search
### 10.1 Add --db flag to embed and search — RESOLVED in v2.5.0
The `embed` and `search` commands lack a `--db <path>` option, unlike most other query commands. This makes them harder to use from external directories. Users must `cd` into the repo or use `npx --prefix`.

### 10.2 Warn on concurrent DB access
> `embed` gained `-d, --db <path>` in v2.5.0.

### 10.2 Warn on concurrent DB access — RESOLVED in v2.6.0
The shared graph.db can cause FK constraint failures when concurrent sessions build/embed simultaneously. Consider adding advisory file locking or a warning when another process holds the DB.

### 10.3 Update notification for dev versions
> Fixed: `src/db.js` now implements advisory lock files at `.codegraph/graph.db.lock` (stores PID) with `acquireAdvisoryLock()`/`releaseAdvisoryLock()` on every `openDb()`/`closeDb()` call, warning when another live process holds the lock.

### 10.3 Update notification for dev versions — RESOLVED in v2.5.0
The update notification feature (`update-check.js`) should suppress notifications for dev/prerelease versions to avoid false positives.

> v2.5.0 moved dev builds to GitHub pre-releases instead of npm, sidestepping the notification issue.

### 10.4 Consistent file counts across builds
File counts fluctuated slightly (99-106) across builds due to concurrent repo modifications. While not a bug, logging which files were added/removed between builds would help diagnose discrepancies.

Expand Down
4 changes: 3 additions & 1 deletion generated/dogfood/DOGFOOD_REPORT_v2.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,11 @@ Appended `// test comment` to `src/logger.js`:
### 9.3 ~~Incremental rebuild needs reverse-dep edge cascade~~ — DONE
~~The most impactful fix would be making incremental rebuilds re-resolve edges for files that import changed files.~~ Implemented at `builder.js:444` — reverse-dependency cascade detects files that import changed files and re-resolves their outgoing edges, fixing Bug #4.

### 9.4 Update notification testing — Open (low priority)
### 9.4 Update notification testing — RESOLVED in v2.5.0
The update notification feature was not observable during testing. Consider adding a `--check-update` flag for manual testing, or document when the notification appears.

> v2.5.0 moved dev builds to GitHub pre-releases, resolving false-positive notification issues. The notification works correctly on stable npm releases.

---

## 10. Testing Plan
Expand Down
12 changes: 8 additions & 4 deletions generated/dogfood/DOGFOOD_REPORT_v2.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,22 @@ The initial dogfood run flagged `branch-compare` as a missing-implementation bug

## 10. Suggestions for Improvement

### 10.1 Guard against missing module imports in index.js
### 10.1 Guard against missing module imports in index.js — RESOLVED in v2.5.1
Add a CI check or test that validates all re-exports in `index.js` resolve to existing files. A simple `node --input-type=module -e "import('./src/index.js')"` in CI would catch missing modules before release. (The branch-compare issue was a lost stash, not a missing implementation, but the guard is still valuable.)

> v2.5.1 added `index-exports` unit test that validates all re-exports in index.js resolve without `ERR_MODULE_NOT_FOUND`.

### 10.2 ~~Native complexity performance~~ (resolved)
~~Native complexity computation appeared slower than WASM.~~ This was caused by running benchmarks with a stale v2.4.0 native binary. With the correct v2.5.0 binary, native complexity is 47x faster (5.1ms vs 240.7ms) since Rust computes all metrics during parsing and the complexity phase is just DB inserts.

### 10.3 Add a `--full` flag documentation hint to structure
The structure command shows "N files omitted. Use --full to show all files" but `--full` is not listed in `--help`. Consider adding it to the help text.

### 10.4 Registry prune UX
### 10.4 Registry prune UX — RESOLVED in v2.5.1
`registry prune --ttl 0` removes ALL entries including actively-used repos. Consider adding a `--dry-run` flag or confirmation prompt for aggressive TTL values.

> v2.5.1 added `--dry-run` flag to `registry prune` — preview what would be removed without deleting entries.

---

## 11. Testing Plan
Expand Down Expand Up @@ -390,5 +394,5 @@ All 28 commands work correctly in both cold-start and post-build scenarios. Edge

| Type | Number | Title | Status |
|------|--------|-------|--------|
| Issue | [#166](https://github.com/optave/codegraph/issues/166) | bug: branch-compare command and programmatic API crash — missing branch-compare.js | resolved (recovered from stash) |
| PR | (pending push) | fix: recover branch-compare implementation from lost stash | open |
| Issue | [#166](https://github.com/optave/codegraph/issues/166) | bug: branch-compare command and programmatic API crash — missing branch-compare.js | Closed — fixed in v2.5.1 |
| PR | [v2.5.1](https://github.com/optave/codegraph/releases/tag/v2.5.1) | fix: recover branch-compare implementation from lost stash | Merged |
40 changes: 27 additions & 13 deletions generated/dogfood/DOGFOOD_REPORT_v2.5.35-dev.26434e2.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,46 +286,60 @@ This dev build includes all v2.6.0 features.

## 8. Bugs Found

### BUG 1: EISDIR warning during incremental rebuild (Medium)
### BUG 1: EISDIR warning during incremental rebuild (Medium) — RESOLVED in v2.6.0
- **Issue:** [#235](https://github.com/optave/codegraph/issues/235)
- **PR:** Open — not fixed in this session
- **PR:** [#241](https://github.com/optave/codegraph/pull/241)
- **Symptoms:** `[codegraph WARN] Skipping src: EISDIR: illegal operation on a directory, read` during incremental rebuild after modifying a single source file
- **Root cause:** The `src` directory node leaks into the re-parse file set during reverse-dep computation
- **Impact:** Cosmetic warning; the directory is skipped and build completes. One fewer file is parsed than expected.

### BUG 2: Incremental rebuild edge count mismatch (High)
> Fixed in v2.6.0: filter directory nodes from reverse-deps query to prevent EISDIR on incremental rebuilds.

### BUG 2: Incremental rebuild edge count mismatch (High) — RESOLVED in v2.6.0
- **Issue:** [#236](https://github.com/optave/codegraph/issues/236)
- **PR:** Open — needs investigation
- **PR:** [#241](https://github.com/optave/codegraph/pull/241)
- **Symptoms:** After a 1-file incremental rebuild, `stats` reports a different edge count than a full rebuild of the same codebase. Full build: 1671 edges. Incremental: varies (676 in one test, 2660 in another)
- **Root cause:** The incremental path re-parses only changed files + reverse-deps. Edge cleanup/insertion may not preserve edges from unchanged files correctly.
- **Impact:** Queries after incremental rebuilds may return incomplete results.

### BUG 3: Dev build native binary tarball install fails via npm (Medium)
> Fixed in v2.6.0: load unchanged barrel files into reexportMap, add drift detection, barrel-project fixture and incremental-parity test.

### BUG 3: Dev build native binary tarball install fails via npm (Medium) — RESOLVED in v2.6.0
- **Issue:** [#237](https://github.com/optave/codegraph/issues/237)
- **PR:** Open — needs investigation
- **PR:** [#241](https://github.com/optave/codegraph/pull/241)
- **Symptoms:** `npm install <tarball-url>` fails with `TypeError: Invalid Version:` in npm's arborist
- **Root cause:** npm's semver parser may not handle the `2.5.35-dev.26434e2` version format during deduplication
- **Impact:** Dev build users must manually extract the native binary tarball

> Fixed in v2.6.0: `--strip` flag in `sync-native-versions.js` removes platform optionalDependencies in dev builds.

### MINOR: Native addon version string is `0.1.0`
- Not filed as issue — cosmetic. The Rust addon's internal version string hasn't been updated to match the package version. `codegraph info` shows `Native version: 0.1.0`.

---

## 9. Suggestions for Improvement

### 9.1 Incremental rebuild verification
### 9.1 Incremental rebuild verification — RESOLVED in v2.6.0
Add an assertion or warning in the build process that compares the post-incremental edge/node count against the previous full-build count. If they diverge significantly, suggest `--no-incremental`.

### 9.2 Embedding benchmark should declare `@huggingface/transformers` as a devDependency
> v2.6.0 added node/edge count drift detection after incremental builds — warns when counts drift >20% and suggests `--no-incremental`. Threshold is configurable via `build.driftThreshold`.

### 9.2 Embedding benchmark should declare `@huggingface/transformers` as a devDependency — SUPERSEDED in v2.5.0
The embedding benchmark script fails because `@huggingface/transformers` is an optional dep that doesn't auto-install. Consider making it a devDependency so benchmark scripts work out of the box.

### 9.3 `complexity` should warn when data is missing
> Superseded: v2.5.0 added an interactive install prompt in `embedder.js` when the package is missing, and the optional-dep design is intentional to avoid bloating installs for contributors who don't need ML models.

### 9.3 `complexity` should warn when data is missing — RESOLVED in v2.6.0
When `complexity` returns "No complexity data found" but a graph exists, it should suggest `build --no-incremental` to populate the data, rather than implying no graph exists.

### 9.4 Dev build install documentation
> v2.6.0 improved the missing-data message — now suggests `--no-incremental` rebuild instead of implying no graph exists.

### 9.4 Dev build install documentation — RESOLVED in v2.6.0
The SKILL.md documents the manual tarball installation, but a note in the README or release notes about the `npm install <url>` failure would help users.

> v2.6.0 fixed the underlying `npm install` failure with `--strip` flag in `sync-native-versions.js`, making manual extraction unnecessary.

---

## 10. Testing Plan
Expand Down Expand Up @@ -392,9 +406,9 @@ The incremental edge count bug (#236) is the most impactful finding and should b

| Type | Number | Title | Status |
|------|--------|-------|--------|
| Issue | [#235](https://github.com/optave/codegraph/issues/235) | bug: EISDIR warning during incremental rebuild | open |
| Issue | [#236](https://github.com/optave/codegraph/issues/236) | bug: incremental rebuild produces different edge count than full rebuild | open |
| Issue | [#237](https://github.com/optave/codegraph/issues/237) | bug: dev build native binary tarball cannot be installed via npm | open |
| Issue | [#235](https://github.com/optave/codegraph/issues/235) | bug: EISDIR warning during incremental rebuild | Closed — fixed in v2.6.0 |
| Issue | [#236](https://github.com/optave/codegraph/issues/236) | bug: incremental rebuild produces different edge count than full rebuild | Closed — fixed in v2.6.0 |
| Issue | [#237](https://github.com/optave/codegraph/issues/237) | bug: dev build native binary tarball cannot be installed via npm | Closed — fixed in v2.6.0 |

## 13. Performance Benchmarks

Expand Down
Loading