Repository navigation
plugin: answer at once from the last graph with stale rows marked; watch what each parser reads (#1594, #1595) - #1614
Merged
Conversation
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 28, 2026 07:32
…tch what each parser reads (#1594, #1595) A query no longer spends a fixed 10 s wait that no measured rebuild fits in. It answers from the last good graph and marks every row that lies in a file edited, added or removed since, "(may be out of date)" in text and "stale": true in --json (MCP gets the text). It waits, up to AXIOMCODE_FRESH_WAIT (30 s), only when the answer or the name asked about touches an edited file and the last build of the repository says the refresh will finish within that; never on a compile of the engine's rules. --fresh (MCP fresh=true) waits for the refresh with progress lines and answers from the new graph; SKILL.md says to use it before a delete or a rename. axiomcode-build records how long each build took (build-seconds). The file table now prunes, per language, exactly the directories that language's parser skips, so an edit under out/, build/, target/ or coverage/ where the parser reads it makes the graph stale.
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.
Fixes #1594
Fixes #1595
What was wrong
out,build,target,coverage, ...) in every language. The Python and C# parsers read those directories (Java readscoverage), so an edit there never made the graph stale andindexsaid "up to date".The change (plugin only; no engine or parser change)
ax_fresh.py queryrunscontext,pathandimpactstale-while-revalidate. The answer comes from the last good graph at once. Every row that lies in a file edited, added or removed since the graph was built ends with(may be out of date); rows from untouched files carry nothing.--jsonrows get"stale": trueplus a top-levelfreshnessobject. MCP returns the marked text.AXIOMCODE_FRESH_WAIT, now 30 s) only when the answer or the name asked about touches an edited file, the rebuild is not compiling rules, and the last build of this repository (build-seconds, now written byaxiomcode-build) says the refresh will finish within the budget. Otherwise it answers immediately. The never-block rule from Query latency: do once what every query repeated; first build reports its stage instead of blocking #1576 and the safe swaps from Refresh after edit: one engine lookup, no silent fallback, safe swaps, .gitignore honoured #1565 are unchanged.--fresh(CLI) andfresh=true(MCPcontext,path,impact) wait for the refresh, print progress every 10 s, and answer from the new graph. SKILL.md tells agents to use it before a delete or a rename.SKIPinax_fresh.py, taken from the parser's own constants).tests/freshness.pyreads those constants back fromparser/src, so the two lists cannot drift apart unnoticed.Tests
tests/freshness.py, 24/24 (no engine). Covers: prune lists equal to the parser's, per language; marks in text and--json, with near-miss controls (a same-named file in another directory, quoted code lines,next:lines, an edit the answer never names); the wait decision in each direction, including one control per case where it must not wait;--fresh; MCPfresh.tests/refresh.pygets two new checks (marked rows,--fresh). Results: python, java and csharp all pass.tests/latency.pypasses (27).tests/mcp.pypasses.tests/refresh_races.pyhas 2 failures here ("query mid-build", "no rules"). The same 2 checks fail on unmodified 0.1.4 at a3f0fa3 (the commit this branch is on) on this machine, so they are not caused by this change.Repros (before = 0.1.4 at f71faef, one merge behind a3f0fa3 that only changes the JavaScript engine; after = this branch)
Deep scan deferred: no held-out corpus measurement or regression gate was run for this change.