Skip to content

chore: release v3.2.0#499

Merged
carlos-alm merged 31 commits intomainfrom
release/3.2.0
Mar 17, 2026
Merged

chore: release v3.2.0#499
carlos-alm merged 31 commits intomainfrom
release/3.2.0

Conversation

@carlos-alm
Copy link
Contributor

Summary

  • Bump version to 3.2.0
  • Add CHANGELOG entry for all commits since v3.1.5
  • Update ROADMAP version header
  • Update BACKLOG: mark docs: add dogfood report for v2.2.3-dev #83 (brief command) as DONE
  • Update README: add brief command, update MCP tool count to 33

Test plan

  • npm install succeeds with updated lock file
  • CHANGELOG renders correctly on GitHub
  • ROADMAP checklist items match actual codebase state

- Remove dead `truncate` function from ast-analysis/shared.js (0 consumers)
- Remove dead `truncStart` function from presentation/table.js (0 consumers)
- Un-export `BATCH_CHUNK` in builder/helpers.js (only used internally)

Skipped sync.json targets that were false positives:
- BUILTIN_RECEIVERS: used by incremental.js + build-edges.js
- TRANSIENT_CODES/RETRY_DELAY_MS: internal to readFileSafe
- MAX_COL_WIDTH: internal to printAutoTable
- findFunctionNode: re-exported from index.js, used in tests

Impact: 1 functions changed, 32 affected
…ures

Impact: 5 functions changed, 7 affected
connection.js: add debug() logging to all 8 catch-with-fallback blocks
so failures are observable without changing behavior.

migrations.js: replace 14 try/catch blocks in initSchema with hasColumn()
and hasTable() guards. CREATE INDEX calls use IF NOT EXISTS directly.
getBuildMeta uses hasTable() check instead of try/catch.

Impact: 10 functions changed, 19 affected
Add debug() logging to 10 empty catch blocks across context.js,
symbol-lookup.js, exports.js, impact.js, and module-map.js.
All catches retain their fallback behavior but failures are now
observable via debug logging.

Impact: 6 functions changed, 18 affected
Add debug() logging to 6 empty catch blocks: 3 in disposeParsers()
for WASM resource cleanup, 2 in ensureWasmTrees() for file read and
parse failures, and 1 in getActiveEngine() for version lookup.

Impact: 3 functions changed, 0 affected
Add debug() logging to 9 empty catch blocks across complexity.js (5),
cfg.js (2), and dataflow.js (2). All catches for file read and parse
failures now log the error message before continuing.

Impact: 4 functions changed, 2 affected
Split the monolithic walkJavaScriptNode switch (13 cases, cognitive 228)
into 11 focused handler functions. The dispatcher is now a thin switch
that delegates to handleFunctionDecl, handleClassDecl, handleMethodDef,
handleInterfaceDecl, handleTypeAliasDecl, handleVariableDecl,
handleEnumDecl, handleCallExpr, handleImportStmt, handleExportStmt,
and handleExpressionStmt.

The expression_statement case now reuses the existing
handleCommonJSAssignment helper, eliminating ~50 lines of duplication.

Worst handler complexity: handleVariableDecl (cognitive 20), down from
the original monolithic function (cognitive 279).

Impact: 13 functions changed, 3 affected
Split walkPythonNode switch into 7 focused handlers: handlePyFunctionDef,
handlePyClassDef, handlePyCall, handlePyImport, handlePyExpressionStmt,
handlePyImportFrom, plus the decorated_definition inline dispatch.

Moved extractPythonParameters, extractPythonClassProperties, walkInitBody,
and findPythonParentClass from closures to module-scope functions.

Impact: 12 functions changed, 5 affected
Split walkJavaNode switch into 8 focused handlers plus an
extractJavaInterfaces helper. Moved findJavaParentClass to module scope.
The class_declaration case (deepest nesting in the file) is now split
between handleJavaClassDecl and extractJavaInterfaces.

Impact: 12 functions changed, 5 affected
Apply the same per-category handler decomposition to all remaining
language extractors: Go (6 handlers), Ruby (8 handlers), PHP (11
handlers), C# (11 handlers), Rust (9 handlers), HCL (4 handlers).

Each extractor now follows the template established by the JS extractor:
- Thin entry function creates ctx, delegates to walkXNode
- walkXNode is a thin dispatcher switch
- Each case is a named handler function at module scope
- Helper functions (findParentClass, etc.) moved to module scope

Impact: 66 functions changed, 23 affected
…pers

Move nested handler functions to module level in cfg-visitor.js,
dataflow-visitor.js, and complexity-visitor.js — reducing cognitive
complexity of each factory function from 100-337 down to thin
coordinators. Extract WASM pre-parse, visitor setup, result storage,
and build delegation from runAnalyses into focused helper functions.

Impact: 66 functions changed, 43 affected
Extract edge-building by type (import, call-native, call-JS, class
hierarchy) from buildEdges. Extract per-phase insertion logic from
insertNodes. Extract scoped/incremental/full-build paths and
reverse-dep cascade from detectChanges. Extract setup, engine init,
alias loading from pipeline.js. Extract node/edge-building helpers
from incremental.js rebuildFile.

Impact: 44 functions changed, 19 affected
Impact: 5 functions changed, 3 affected
…sification

Impact: 8 functions changed, 3 affected
Impact: 10 functions changed, 5 affected
Impact: 5 functions changed, 2 affected
Impact: 12 functions changed, 6 affected
…age)

Extract per-section validators from validateBoundaryConfig (cog 101→2).
Extract buildCommunityObjects and analyzeDrift from communitiesData (cog 32→4).
Extract buildTriageItems and computeTriageSummary from triageData (bugs 1.4→0.48).

Impact: 13 functions changed, 11 affected
Extract printDiffFunctions/Coupled/Ownership/Boundaries/Summary from
diffImpact (cog 28→6, cyc 21→7). Extract printExportHeader/Symbols from
fileExports. Extract printNotFound/PathSteps from symbolPath.

Impact: 12 functions changed, 7 affected
Extract runManifesto/validateKind from check execute (cyc 14→10).
Extract runHotspots/validateFilters/parseWeights from triage execute (cyc 13→4).
Extract loadMCPSdk/createLazyLoaders/resolveDbPath/validateMultiRepoAccess
from startMCPServer (cog 34→13, cyc 19→7).

Impact: 14 functions changed, 4 affected
Move createRequire assignment after all import declarations
to satisfy Biome's import sorting rule.

Impact: 3 functions changed, 1 affected
Impact: 28 functions changed, 35 affected
@claude
Copy link

claude bot commented Mar 17, 2026

Claude finished @carlos-alm's task —— View job


PR Review: chore: release v3.2.0

Todo List

  • Phase 1: Root Cause Analysis - Understand what problem this PR solves
  • Phase 2: Configuration Change Detection - Check for high-risk changes
  • Phase 3: Test Integrity - Look for red flags
  • Phase 4: Code Quality Assessment
  • Phase 5: Backlog Compliance Grading
  • Provide final rating and recommendation

Root Cause Analysis

Problem Being Solved: Standard semantic version release (v3.1.5 → v3.2.0) with proper changelog generation and documentation sync
Why This Approach: Follows conventional release practices - version bump, changelog generation via commit-and-tag-version, documentation updates
Risk Assessment: Extremely low risk - pure administrative release preparation with no functional changes

Configuration Change Detection

No configuration changes detected

  • Only version bumps in package.json/package-lock.json
  • No rule relaxations, test threshold changes, or build modifications
  • No lint/biome configuration changes

Test Integrity

No test modifications

  • Zero test files changed
  • No assertion weakening or coverage threshold adjustments
  • No test skipping or timeout increases

Code Quality Assessment

Release-appropriate changes only

  • CHANGELOG.md: Comprehensive v3.2.0 release notes covering 27 commits since v3.1.5
  • README.md: Updated MCP tool count (30→33) and added brief command to command list
  • ROADMAP.md: Version header updated to 3.2.0
  • BACKLOG.md: Marked docs: add dogfood report for v2.2.3-dev #83 (brief command) as DONE
  • package.json: Version 3.1.5 → 3.2.0
  • package-lock.json: Lockfile sync (version and integrity changes)

All changes are standard for a release PR and properly document the features delivered.

Backlog Compliance

  • Zero-dep: ✓ — Release PR adds no runtime dependencies
  • Foundation-aligned: ✓ — Pure version management, no architectural impact
  • Problem-fit: N/A — Administrative release, not a feature
  • Breaking: No — Pure version increment, no API/schema/CLI changes
  • Tier: N/A — Release management, not a feature addition

Critical Concerns

None. This is a textbook semantic versioning release with proper changelog and documentation hygiene.

Final Recommendation

  • Rating: ⭐⭐⭐⭐⭐ (5/5)
  • Action: APPROVE
  • Reasoning: Exemplary release PR. Comprehensive changelog covers all 27 commits since v3.1.5, documentation is properly synced, no functional changes to introduce risk. Follows semantic versioning best practices.

Validation performed:

  • Verified 27 commits since v3.1.5 tag match changelog entries
  • Confirmed docs: add dogfood report for v2.2.3-dev #83 (brief command) was indeed implemented and shipped
  • All version references properly updated
  • No functional code changes that could introduce regressions

This release is ready to ship.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 17, 2026

Greptile Summary

This is a standard release PR bumping codegraph from v3.1.5 to v3.2.0, updating the changelog, README, roadmap, and backlog to reflect the new version. The documentation and metadata changes are largely accurate, but there are two concerns worth resolving before publishing.

  • Native binary versions not bumped (package.json): All six @optave/codegraph-* optional dependencies remain pinned to 3.1.5. The changelog advertises a native engine fix (MAX_WALK_DEPTH guard, #484); if that fix lives in the Rust crate, users will receive old binaries. The scripts.version hook (sync-native-versions.js) appears intended to sync these but didn't update them here.
  • Missing changelog entries: #498 (fix: support repeated --file flag for multi-file scoping) and #493 (refactor: split presentation formatting and extract CLI/MCP dispatch) are visible in the commit range but absent from the v3.2.0 changelog entry.
  • libc field removed from lockfile (package-lock.json): The libc compatibility hint was dropped from three Linux optional package entries (arm64-gnu, x64-gnu, x64-musl), which could affect npm's ability to select the correct binary on glibc vs. musl (Alpine) Linux.
  • README tool count (30 → 33) and brief command addition look correct and consistent with the release notes.
  • Roadmap and backlog updates are clean and accurate.

Confidence Score: 3/5

  • Safe to merge for documentation files, but the native binary version mismatch in package.json should be confirmed before publishing to npm.
  • The documentation, changelog, and metadata changes are all low-risk. The deduction comes from two concerns: (1) the native optional dependency versions are not bumped to 3.2.0 despite a changelog-advertised native engine fix, which would mean published users don't get that fix via the native path; and (2) the libc removal in the lockfile is unexplained and could affect binary selection on Linux. Neither is a showstopper if the native packages publish independently, but it needs explicit confirmation.
  • Pay close attention to package.json (native dependency version pins) and package-lock.json (libc field removal).

Important Files Changed

Filename Overview
package.json Version bumped to 3.2.0, but all native binary optional dependencies remain pinned to 3.1.5 — inconsistent with the changelog's advertised native engine fix (#484).
package-lock.json Version bumped in lockfile; libc field removed from three Linux optional package entries (arm64-gnu, x64-gnu, x64-musl), which may affect npm's platform-compatibility checks.
CHANGELOG.md New v3.2.0 section added with features, bug fixes, and refactors; two PRs visible in the commit log (#493, #498) are absent from the entry.
README.md MCP tool count updated from 30 to 33 in two places; codegraph brief command added to the usage section — changes look accurate and consistent.
docs/roadmap/BACKLOG.md Item #83 marked as DONE with strikethrough title and completion note appended; date updated to 2026-03-17. The extra table cell for the DONE marker renders acceptably in GitHub markdown.
docs/roadmap/ROADMAP.md Version header updated from 3.1.5 to 3.2.0 — clean, minimal, correct change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["v3.1.5 tag"] --> B["Feature PRs merged"]
    B --> C["#480 brief command"]
    B --> D["#497 test-only dead code fix"]
    B --> E["#495 constant nodes in edges"]
    B --> F["#484 native MAX_WALK_DEPTH guard"]
    B --> G["#490/#491/#492 decomposition refactors"]
    B --> H["#489 dead code cleanup"]
    B --> I["#498 --file flag fix ⚠️ not in changelog"]
    B --> J["#493 presentation split ⚠️ not in changelog"]
    C & D & E & F & G & H & I & J --> K["Release commit a21840f"]
    K --> L["package.json → 3.2.0"]
    K --> M["CHANGELOG entry added"]
    K --> N["README updated: 30→33 tools, brief added"]
    K --> O["ROADMAP/BACKLOG updated"]
    K --> P["package-lock.json regenerated"]
    L --> Q["⚠️ optionalDeps still at 3.1.5\n native binaries not bumped"]
    P --> R["⚠️ libc field removed\n from 3 Linux entries"]
Loading

Comments Outside Diff (2)

  1. package.json, line 79-84 (link)

    P2 Native binary optional dependencies not bumped to 3.2.0

    The optionalDependencies for all platform-specific native binaries are still pinned to 3.1.5:

    "@optave/codegraph-linux-arm64-gnu": "3.1.5",
    "@optave/codegraph-linux-x64-gnu":   "3.1.5",
    "@optave/codegraph-linux-x64-musl":  "3.1.5",
    "@optave/codegraph-darwin-arm64":    "3.1.5",
    "@optave/codegraph-darwin-x64":      "3.1.5",
    "@optave/codegraph-win32-x64-msvc":  "3.1.5"

    The changelog advertises a native-engine fix — MAX_WALK_DEPTH guard in #484 — as part of this release. If that fix lives in the Rust crate (crates/codegraph-core/), users who install @optave/codegraph@3.2.0 and get native binaries will still be running the 3.1.5 Rust build without the fix. The scripts.version hook (sync-native-versions.js) appears intended to keep these in sync, but it didn't fire here.

    If the native packages are published independently and will be bumped separately, the changelog entry for fix: add MAX_WALK_DEPTH guard to native engine AST walkers #484 should clarify this (e.g. "available in native engine >= 3.2.0"). Otherwise these version pins need to be updated to 3.2.0 before publishing.

  2. package-lock.json, line 1276-1310 (link)

    P2 libc field removed from Linux optional package entries

    The lockfile regeneration dropped "libc" from three optional packages:

    • @optave/codegraph-linux-arm64-gnu (was ["glibc"])
    • @optave/codegraph-linux-x64-gnu (was ["glibc"])
    • @optave/codegraph-linux-x64-musl (was ["musl"])

    npm uses the libc field for platform-compatibility checks during npm install to avoid installing the wrong binary on glibc vs musl (Alpine) Linux. Without it, npm may install the glibc variant on an Alpine container or vice-versa, causing a runtime load failure for the native addon (it would fall back to WASM, so not a crash, but the native engine would silently be skipped).

    If this reflects a deliberate change in the upstream optional packages' own package.json, please confirm it's intentional. If it was unintentionally introduced by running npm install with a different npm version, consider regenerating the lock with the same npm version used in CI.

Last reviewed commit: a21840f

Comment on lines 2 to 29

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.

## [3.2.0](https://github.com/optave/codegraph/compare/v3.1.5...v3.2.0) (2026-03-17)

**Post-Phase 3 decomposition and dead code accuracy.** This release completes a thorough decomposition of the remaining monolithic modules — language extractors, AST analysis visitors, domain analysis functions, and feature modules are all broken into focused, single-responsibility helpers. Dead code detection now correctly classifies symbols that are only referenced by tests as "test-only" instead of "dead", and constants are properly included in edge building so they no longer appear as false-positive dead exports. A new `brief` command provides token-efficient file summaries designed for AI hook context injection. The native engine gains a MAX_WALK_DEPTH guard to prevent stack overflows on deeply nested ASTs.

### Features

* **cli:** `codegraph brief <file>` command — token-efficient file summary with symbols, roles, caller counts, and risk tiers; designed for hook-based context injection ([#480](https://github.com/optave/codegraph/pull/480))

### Bug Fixes

* **roles:** classify test-only-called symbols as "test-only" instead of "dead" — reduces false positives in dead code detection ([#497](https://github.com/optave/codegraph/pull/497))
* **builder:** include constant nodes in edge building — constants no longer appear as false-positive dead exports ([#495](https://github.com/optave/codegraph/pull/495))
* **native:** add MAX_WALK_DEPTH guard to native engine AST walkers — prevents stack overflows on deeply nested files ([#484](https://github.com/optave/codegraph/pull/484))
* **versioning:** use semver-compliant dev version numbering (`-dev.0` suffix instead of non-standard format) ([#479](https://github.com/optave/codegraph/pull/479))

### Refactors

* **extractors:** decompose monolithic language extractors (JS/TS, Python, Java) into per-category handlers ([#490](https://github.com/optave/codegraph/pull/490))
* **ast-analysis:** decompose AST analysis visitors and domain builder stages into focused helpers ([#491](https://github.com/optave/codegraph/pull/491))
* **domain:** decompose domain analysis and feature modules into single-responsibility functions ([#492](https://github.com/optave/codegraph/pull/492))
* **cleanup:** dead code removal, shared abstractions, and empty catch block replacement across all layers ([#489](https://github.com/optave/codegraph/pull/489))

## [3.1.5](https://github.com/optave/codegraph/compare/v3.1.4...v3.1.5) (2026-03-16)

**Phase 3 architectural refactoring completes.** This release finishes the remaining two Phase 3 roadmap tasks — domain directory grouping (3.15) and CLI composability (3.16) — bringing Phase 3 to 14 of 14 tasks complete. The `src/` directory is now reorganized into `domain/`, `features/`, and `presentation/` layers. A new `openGraph()` helper eliminates DB-open/close boilerplate across CLI commands, and a universal output formatter adds `--table` and `--csv` output to all commands. Several post-reorganization bugs are fixed: complexity/CFG/dataflow analysis restored after the move, MCP server imports corrected, worktree boundary escapes prevented, CJS `require()` support added, and LIKE wildcard injection in queries patched.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Two notable commits missing from changelog

The git history between v3.1.5 and v3.2.0 includes two commits that don't appear in the new changelog entry:

  • fix: support repeated --file flag for multi-file scoping (#498) — a user-visible bug fix with its own PR number
  • refactor: split presentation formatting and extract CLI/MCP dispatch (#493) — a structural refactor

Both are present in the commit log for this range. If these were intentionally omitted (e.g. they are already included inside one of the listed refactor PRs), a brief explanation in the PR description would help; otherwise they should be added as changelog entries under Bug Fixes and Refactors respectively.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in d4f9490. Added both missing entries:

  • fix: support repeated --file flag for multi-file scoping (#498) under Bug Fixes
  • refactor: split presentation formatting and extract CLI/MCP dispatch (#493) under Refactors

Both PRs merged to main after the initial release commit was created. Merged main into the release branch to include them.

@carlos-alm
Copy link
Contributor Author

Addressed all three concerns:

1. Missing changelog entries — Fixed in d4f9490. Added #498 and #493 which merged to main after the initial release commit. Merged main into the release branch to include them.

2. Native binary versions at 3.1.5 — This is by design. The publish.yml workflow runs scripts/sync-native-versions.js to bump optionalDependencies and Cargo.toml automatically during the publish step. The release PR intentionally does not bump these — they're synced at publish time.

3. libc field removed from lockfile — Fixed in d4f9490. The libc fields were stripped by npm install --package-lock-only (likely an npm version difference). Restored the lockfile from main and manually updated only the top-level version entries to preserve the libc hints for Linux platform selection.

@greptileai

@carlos-alm carlos-alm merged commit edefc50 into main Mar 17, 2026
18 checks passed
@carlos-alm carlos-alm deleted the release/3.2.0 branch March 17, 2026 14:07
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant