Skip to content

Commit 69cb331

Browse files
Merge remote-tracking branch 'origin/main' into chore/cleanup-dependencies
Impact: 21 functions changed, 38 affected
2 parents cee85a8 + b90ce30 commit 69cb331

30 files changed

Lines changed: 1348 additions & 459 deletions

.github/workflows/benchmark.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
name: Benchmark
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_run:
5+
workflows: ["Publish"]
6+
types: [completed]
67
workflow_dispatch:
78

89
permissions: {}
910

1011
jobs:
1112
benchmark:
1213
runs-on: ubuntu-latest
14+
if: >-
15+
github.event_name == 'workflow_dispatch' ||
16+
github.event.workflow_run.conclusion == 'success'
1317
permissions:
1418
contents: write
1519
pull-requests: write

.github/workflows/publish.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
preflight:
2323
name: Preflight checks
2424
runs-on: ubuntu-latest
25-
# Skip dev publish when the push is a stable release version bump
26-
if: "${{ github.event_name != 'push' || !startsWith(github.event.head_commit.message, 'chore: release v') }}"
25+
# Skip dev publish when the push is a stable release version bump (direct push or merged PR)
26+
if: "${{ github.event_name != 'push' || (!startsWith(github.event.head_commit.message, 'chore: release v') && !contains(github.event.head_commit.message, 'release/v')) }}"
2727
permissions:
2828
contents: read
2929
steps:
@@ -66,9 +66,25 @@ jobs:
6666
echo "Stable release (manual retry): $VERSION"
6767
else
6868
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
69-
NEXT_PATCH=$((PATCH + 1))
69+
BASE_PATCH=$((PATCH + 1))
7070
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
71-
VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}-dev.${SHORT_SHA}"
71+
72+
# Query npm for the highest dev patch number published so far
73+
LATEST_DEV=$(npm view "@optave/codegraph" versions --json 2>/dev/null \
74+
| node -e "
75+
const versions = JSON.parse(require('fs').readFileSync(0,'utf8'));
76+
const prefix = '${MAJOR}.${MINOR}.';
77+
let maxPatch = ${BASE_PATCH} - 1;
78+
for (const v of (Array.isArray(versions) ? versions : [versions])) {
79+
if (v.startsWith(prefix) && v.includes('-dev.')) {
80+
const patch = parseInt(v.split('.')[2], 10);
81+
if (patch > maxPatch) maxPatch = patch;
82+
}
83+
}
84+
console.log(maxPatch + 1);
85+
" 2>/dev/null) || LATEST_DEV="$BASE_PATCH"
86+
87+
VERSION="${MAJOR}.${MINOR}.${LATEST_DEV}-dev.${SHORT_SHA}"
7288
NPM_TAG="dev"
7389
echo "Dev release: $VERSION"
7490
fi

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,49 @@
22

33
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
44

5+
## [2.2.0](https://github.com/optave/codegraph/compare/v2.1.0...v2.2.0) (2026-02-23)
6+
7+
**New query commands, smarter call resolution, and full `--no-tests` coverage.** This release adds `explain`, `where`, and `context` commands for richer code exploration, introduces three-tier incremental change detection, improves call resolution accuracy, and extends the `--no-tests` flag to every query command.
8+
9+
### Features
10+
11+
* **cli:** add `codegraph explain <file|function>` command — structural summary without an LLM ([ff72655](https://github.com/optave/codegraph/commit/ff72655))
12+
* **cli:** add `codegraph where <name>` command — fast symbol lookup for definition and usage ([7fafbaa](https://github.com/optave/codegraph/commit/7fafbaa))
13+
* **cli:** add `codegraph context <name>` command — full function context (source, deps, callers) in one call ([3fa88b4](https://github.com/optave/codegraph/commit/3fa88b4))
14+
* **cli:** add graph quality score to `stats` command ([130a52a](https://github.com/optave/codegraph/commit/130a52a))
15+
* **cli:** add `--no-tests` flag to all remaining query commands for consistent test file filtering ([937b60f](https://github.com/optave/codegraph/commit/937b60f))
16+
* **parser:** extract symbols from Commander/Express/Event callback patterns ([2ac24ef](https://github.com/optave/codegraph/commit/2ac24ef))
17+
* **builder:** three-tier incremental change detection — skip unchanged, reparse modified, clean removed ([4b50af1](https://github.com/optave/codegraph/commit/4b50af1))
18+
* **hooks:** add remind-codegraph hook to nudge agents before editing ([e6ddeea](https://github.com/optave/codegraph/commit/e6ddeea))
19+
* **ci:** automated performance benchmarks per release ([f79d6f2](https://github.com/optave/codegraph/commit/f79d6f2))
20+
* **ci:** add `workflow_dispatch` trigger for retrying failed stable releases ([8d4f0cb](https://github.com/optave/codegraph/commit/8d4f0cb))
21+
22+
### Bug Fixes
23+
24+
* **resolve:** improve call resolution accuracy with scoped fallback, dedup, and built-in skip ([3a11191](https://github.com/optave/codegraph/commit/3a11191))
25+
* **parser:** add receiver field to call sites to eliminate false positive edges ([b08c2b2](https://github.com/optave/codegraph/commit/b08c2b2))
26+
* **queries:** `statsData` fully filters test nodes and edges when `--no-tests` is set ([2f9730a](https://github.com/optave/codegraph/commit/2f9730a))
27+
* **mcp:** fix file/kind parameter handling in MCP handlers ([d5af194](https://github.com/optave/codegraph/commit/d5af194))
28+
* **mcp:** use schema objects for `setRequestHandler` instead of string literals ([fa0d358](https://github.com/optave/codegraph/commit/fa0d358))
29+
* **security:** add path traversal guard and debug logging to file read helpers ([93a9bcf](https://github.com/optave/codegraph/commit/93a9bcf))
30+
* **hooks:** fix Claude Code hooks for Windows and add branch name validation ([631e27a](https://github.com/optave/codegraph/commit/631e27a))
31+
* **hooks:** add required `hookSpecificOutput` fields for context injection ([d51a3a4](https://github.com/optave/codegraph/commit/d51a3a4))
32+
* **hooks:** guard-git hook validates branch name on `gh pr create` ([c9426fa](https://github.com/optave/codegraph/commit/c9426fa))
33+
* **ci:** rewrite Claude Code workflow for working automated PR reviews ([1ed4121](https://github.com/optave/codegraph/commit/1ed4121))
34+
* **ci:** move publish artifacts to `$RUNNER_TEMP` to prevent repo contamination ([d9849fa](https://github.com/optave/codegraph/commit/d9849fa))
35+
* **ci:** make publish workflow resilient to partial failures ([5dd5b00](https://github.com/optave/codegraph/commit/5dd5b00))
36+
* **ci:** validate version input in `workflow_dispatch` ([73a1e6b](https://github.com/optave/codegraph/commit/73a1e6b))
37+
* fix default embedding model in README and enforce LF line endings ([c852707](https://github.com/optave/codegraph/commit/c852707))
38+
* exclude dev dependencies from DEPENDENCIES.md ([63c6923](https://github.com/optave/codegraph/commit/63c6923))
39+
40+
### Documentation
41+
42+
* add AI Agent Guide with 6-step workflow, command reference, and MCP mapping ([5965fb4](https://github.com/optave/codegraph/commit/5965fb4))
43+
* rewrite adding-a-language guide for LANGUAGE_REGISTRY architecture ([8504702](https://github.com/optave/codegraph/commit/8504702))
44+
* add Codegraph vs Narsil-MCP and GitNexus comparison sections to README ([aac963c](https://github.com/optave/codegraph/commit/aac963c))
45+
* update CLAUDE.md dogfooding section to follow recommended practices ([04dbfe6](https://github.com/optave/codegraph/commit/04dbfe6))
46+
* update Claude Code hooks section with enrichment pattern and Windows notes ([4987de9](https://github.com/optave/codegraph/commit/4987de9))
47+
548
## [2.1.0](https://github.com/optave/codegraph/compare/v2.0.0...v2.1.0) (2026-02-23)
649

750
**Parser refactor, unified publish pipeline, and quality-of-life improvements.** This release splits the monolithic parser into per-language extractor files, consolidates the dev and stable publish workflows into a single pipeline, adds the `codegraph stats` command, and hardens native engine path handling and registry management.

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ Multiple Claude Code instances run concurrently in this repo. **Every session mu
150150
- Never add AI co-authorship lines (`Co-Authored-By` or similar) to commit messages.
151151
- Never add "Built with Claude Code", "Generated with Claude Code", or any variation referencing Claude Code or Anthropic to commit messages, PR descriptions, code comments, or any other output.
152152

153+
## PR Reviews (Greptile)
154+
155+
This repo uses [Greptile](https://greptile.com) for automated PR reviews. After pushing fixes that address review feedback, trigger a re-review by commenting `@greptileai` on the PR. Do **not** use the GitHub "re-request review" API — Greptile only responds to the comment trigger.
156+
153157
## Node Version
154158

155159
Requires Node >= 20.

0 commit comments

Comments
 (0)