Repository navigation
feat: vector-resolve visibility, complexity CI gate, dead-code confidence, diagram export - #1650
Merged
Merged
Conversation
… visible (#1597) ENABLE_VECTOR_RESOLVE=true with no embedding backend used to fail inside swallowed excepts at log levels that are off by default — 123k functions, 0 embeddings, no error anywhere. Now: - probe_embedding_backend() checks importability (and OPENAI_API_KEY for the openai spec) without loading any model - cgc config set ENABLE_VECTOR_RESOLVE true warns at the moment of intent - the index summary prints an always-visible '⚠ … embeddings were NOT generated' line, independent of the log level, and real pipeline failures log at ERROR instead of INFO - the watcher probes once per handler instead of re-attempting the failed import on every file event End-to-end tests use CGC_EMBEDDING_MODEL=openai without a key so the probe fails deterministically in any environment.
…ty (#1333) - --format json|csv emits the documented schema on a CLEAN stdout: the service-init chatter is rerouted to stderr before anything initializes, so 'cgc analyze complexity --format json | jq .' works - --fail-on-violations exits 1 when any function exceeds the threshold; without it the exit code stays 0 so exploratory use and existing scripts keep working (the config-default threshold means most codebases have some violation — failing every casual invocation would break innocent chains) - enforcement/export operate on the FULL violation set: both finders accept limit=None so the interactive page size cannot truncate a CI verdict - the synthetic <module> frame is excluded from violations - docs/CI_INTEGRATION.md documents the GitHub Actions pattern Hermetic end-to-end tests cover json purity, csv shape, both gate outcomes and format validation.
…ence categories (#1332) Every dead-code row now carries confidence + reason: - low: dunders, test hooks/prefixes, entry-point names, overrides, test-tree files — the categories the finder already hard-excluded are reintroduced as visible low-confidence rows via --show-all instead of being silently invisible - medium: decorated functions (decorators often register implicit callers) - high: no excluding signal — very likely genuinely dead The CLI table gains a Confidence column and a 'N high, N medium, N low' summary; find_dead_code returns confidence_counts for MCP consumers. Verified on a real embedded graph with one function per category.
…1287) 'cgc diagram .' emits a file→module import diagram that pastes straight into GitHub Markdown; --level call switches to the function call graph and --format dot renders via graphviz. stdout carries only the diagram (init chatter is rerouted to stderr), -o writes a file, and the edge cap is reported inside the diagram as a comment — never a silent truncation. Addressing the staleness concern raised in the issue thread, the help text frames the output as a generated artifact to regenerate after refactors, not documentation to commit.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
Contributor
🔍 PR Code Graph Analysisfeat: vector-resolve visibility, complexity CI gate, dead-code confidence, diagram export (#1650) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
Shashankss1205
pushed a commit
that referenced
this pull request
Sep 24, 2026
) `main.py` had a single module-level `Console(stderr=True)`, so every `analyze` command rendered its result table to stderr while init chatter went to stdout — the split was inverted for exactly the commands whose job is emitting data. `cgc analyze callers X > out.txt` captured a banner and no table. Adds a separate `analyze_result_console = Console()` and routes the result prints across the ten `analyze_*` commands through it. Empty-result notices move with the tables (a script reading stdout still needs to see that the query ran); argument-validation errors stay on stderr. Leaves the #1650/#1655 `_file` save/restore mechanism untouched — verified no `.file` materialization leak via the unmodified CliRunner and complexity-CI suites. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four features/fixes, each with hermetic end-to-end tests. Unit suite 1382 passed / 7 skipped; the new integration tests (10) all pass.
ENABLE_VECTOR_RESOLVE=truewith no embedding backend is now loudly visible — probe at config-set time, an always-visible '⚠ embeddings were NOT generated' line in the index summary independent of log level, ERROR-level logging, and the watcher probes once instead of re-failing per file event.codegraphcontext analyze complexitythreshold flag has no documented output format and no machine-readable export — CI integration is impossible without parseable output #1333:cgc analyze complexity --format json|csv --fail-on-violations— clean stdout (chatter → stderr,| jqworks), full violation set regardless of display limit, opt-in exit 1 for CI gates, docs/CI_INTEGRATION.md with the GitHub Actions pattern.codegraphcontext analyze dead-codehas no confidence scoring — it reports all unreferenced symbols equally, producing high false-positive rates on Python dunder methods, public API entry points, and test fixtures #1332: dead-code confidence scoring (high/medium/low + reason); the hard-excluded false-positive categories (dunders, test hooks, entry points, overrides) become visible low-confidence rows via--show-allinstead of being silently invisible;confidence_countsin the tool result.cgc diagramexports Mermaid (paste into GitHub Markdown) or Graphviz DOT, file→module or call-graph level, edge cap reported inside the diagram, never silent.Fixes #1597, fixes #1333, fixes #1332, fixes #1287