Repository navigation
graph: draw the existing graph, and every rebuild keeps the languages the index chose (#1480) - #1642
Merged
Merged
Conversation
… the index chose `axiomcode graph` ran axiomcode-build with no flags, which detects every language in the tree. On a repository indexed with --lang it rebuilt the whole graph on every call, started JavaScript/TypeScript compiles for stray files, left a graph for each, and recorded the detected languages as the index's choice, so every later refresh solved them too. - graph draws from graph.sqlite when the file table says it is current, and otherwise rebuilds with the recorded --lang/--src/--library (ax_fresh.rebuild_env, shared with the background refresh) - axiomcode-build: a build that names no language keeps an explicit --lang (and --src) recorded in the file table (ax_fresh.py chosen), so the refresh, a broken-graph repair, a bare index and graph never solve a language the index left out; detected languages are still detected again - the page draws every language graph the repository has - prose counts, the page's absolute path, and `axiomcode index --library` as the advice; help, SKILL.md, the MCP description and README agree - tests/graph_verb.py: 21 checks with a detected-languages control
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 28, 2026 10:29
This was referenced Sep 28, 2026
Merged
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.
Refs #1480. A broken graph is repaired on the path that issue describes (
ax_contract.ensure_graph). After this change the repair keeps the index's languages. It does not fix that issue's silent wait.What was wrong
axiomcode graphand the MCPaxiomcode_graphtool always ranaxiomcode-graph build. That ranaxiomcode-buildwith no flags, so it detected every language in the tree.--lang python(or with--src/--library), that request never matched the recorded graph. So every call rebuilt the whole graph, in every language present..jsor.tsfiles were enough to start a JavaScript or TypeScript Souffle compile.contextanswers.../../../page path, relative to the caller's working directoryaxiomcode-graph build . --library, a command agents do not haveaxiomcode help graphdocumentedaxiomcode-graph build/export. The dispatcher help said the verb was "current by construction".lang_auto: truein the file table). After onegraph, every background refresh re-detected them too: on a C# project indexed with--lang csharp, an edit plus a commit then solved csharp, typescript and javascript. Other paths reachedaxiomcode-buildwith no language in the same way: a bareindexre-run "to make sure", and a query repairing a broken graph pointer (ax_contract.ensure_graph).The change
axiomcode graphnow reads the file table the index recorded: its languages,--srcand--library.ax_fresh.rebuild_env, moved out ofworker), so the two cannot drift. Only the languages the index chose are solved, and no graph appears for a language it left out.axiomcode-build. When a build names no language and the graph there was indexed with an explicit--lang(lang_auto: false), the build keeps that--lang, and its--srcunless one is given.ax_fresh.py chosenreads them from the file table. This covers the refresh,--fresh, a broken-graph repair, a bareindexandgraph. A bareindexprints that it kept them, and--langorAXIOMCODE_REINDEX=1chooses again. A graph whose languages were detected is still detected again, so a language added later still gets its graph..axiomcode/lang/<lang>beside the main graph. Their ids carry the language, so none collide.axiomcode index … --libraryadvice, when it appliesaxiomcode help graphdocstring,axiomcode help index, the dispatcher help, SKILL.md (and its copy), the MCPaxiomcode_graphdescription, and the README row.buildandexportare still accepted as older spellings.Tests
tests/graph_verb.pyhas 21 checks, all passing locally. It builds real graphs.app/with a stray.jsfile, indexed with--lang python --src app.graphleaves the graph file untouched (same file, same mtime), writes no.axiomcode/langand prints prose with the absolute page path. The page holds nothing from outside--langor--src.--lang python --src app, the page shows the new function, and no JavaScript graph appears.--lang.graphdraws both languages on one page, keeps both graphs and rebuilds neither. Its detected languages are not pinned (chosenprints nothing), so a rebuild still detects them.--lang csharp. Each of these solves C# alone, with no TypeScript graph and acsharpstamp:index(which says it kept--lang csharp)axiomcode help graphand the MCP description say the same.Other suites run locally:
tests/refresh.pypasses for--lang csharpand--lang java, and for--lang pythonon its first run. Moving the refresher's rebuild environment intorebuild_envdid not change its behaviour. A second Python run failed one timing check: it expects the rebuild reason "found by the timer", but under load the MCP server's own start-up kick saw the edit first. The rebuild itself ran.tests/surfaces.py,tests/manifests.pyandpackaging/copies.py --checkpass.Smoke
One project per language, each indexed fresh with
--langon 9d626cc.graphwas then run with the installed build ("before") and with this branch ("after"). JavaScript and TypeScript compiles were capped at 150 s locally, so each "before" run that started one was stopped there.lang/typescriptgraphCommit on the C# project: an edit plus a commit, then the background refresh.
graphhad run on, the refresh solved csharp + typescript + javascript (JavaScript was stopped).The file table after
graph:csharp,typescript,javascript,lang_auto: true(Python project:python,javascript).csharp,lang_auto: false.A table already rewritten by the old
graphstill reads as detected, and is not repaired by this change. Re-indexing with--langfixes it.Not yet measured on the full corpus or on held-out projects; the smoke numbers above are the only corpus numbers.