diff --git a/gemini-extension.json b/gemini-extension.json index 61a14197f..9cfece080 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "axiomcode", - "version": "0.2.3", + "version": "0.2.4", "description": "Ask your repository how its code connects: who calls this, what breaks if I change it, which tests an edit reaches, how A reaches B. Answers come from a resolved call graph and are verified against it; nothing is guessed.", "contextFileName": "plugins/axiomcode/AGENTS.md", "mcpServers": { diff --git a/package.json b/package.json index c1fd43e95..144dabe85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@axiomcode/code-graph", - "version": "0.2.3", + "version": "0.2.4", "description": "AxiomCode Graph: a resolved call graph of your codebase grounded in formal methods, so you and your coding agents can see who calls what, what a change breaks, and which tests it reaches.", "repository": { "type": "git", @@ -31,11 +31,11 @@ ], "license": "FSL-1.1-Apache-2.0", "optionalDependencies": { - "@axiomcode/engine-darwin-arm64": "0.2.3", - "@axiomcode/engine-darwin-x64": "0.2.3", - "@axiomcode/engine-linux-x64": "0.2.3", - "@axiomcode/engine-linux-arm64": "0.2.3", - "@axiomcode/engine-win32-x64": "0.2.3" + "@axiomcode/engine-darwin-arm64": "0.2.4", + "@axiomcode/engine-darwin-x64": "0.2.4", + "@axiomcode/engine-linux-x64": "0.2.4", + "@axiomcode/engine-linux-arm64": "0.2.4", + "@axiomcode/engine-win32-x64": "0.2.4" }, "bin": { "axiomcode": "bin/axiomcode.js" diff --git a/plugins/axiomcode/.claude-plugin/plugin.json b/plugins/axiomcode/.claude-plugin/plugin.json index a45810eee..55c135b5e 100644 --- a/plugins/axiomcode/.claude-plugin/plugin.json +++ b/plugins/axiomcode/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "axiomcode", "description": "Ask your repository how its code connects: who calls this, what breaks if I change it, which tests an edit reaches, how A reaches B. Answers come from a resolved call graph and are verified against it; nothing is guessed.", - "version": "0.2.3", + "version": "0.2.4", "author": { "name": "AxiomCode" } diff --git a/plugins/axiomcode/.codex-plugin/plugin.json b/plugins/axiomcode/.codex-plugin/plugin.json index 29c2ba521..c5a0c074c 100644 --- a/plugins/axiomcode/.codex-plugin/plugin.json +++ b/plugins/axiomcode/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "axiomcode", - "version": "0.2.3", + "version": "0.2.4", "description": "Ask your repository how its code connects: who calls this, what breaks if I change it, which tests an edit reaches, how A reaches B. Answers come from a resolved call graph and are verified against it; nothing is guessed.", "author": { "name": "AxiomCode", "url": "https://github.com/AxiomCodeAI/axiomcodegraph" }, "homepage": "https://github.com/AxiomCodeAI/axiomcodegraph", diff --git a/plugins/axiomcode/.cursor-plugin/plugin.json b/plugins/axiomcode/.cursor-plugin/plugin.json index fadd636d0..a797bda89 100644 --- a/plugins/axiomcode/.cursor-plugin/plugin.json +++ b/plugins/axiomcode/.cursor-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "axiomcode", - "version": "0.2.3", + "version": "0.2.4", "description": "Ask your repository how its code connects: who calls this, what breaks if I change it, which tests an edit reaches, how A reaches B. Answers come from a resolved call graph and are verified against it; nothing is guessed. Java, TypeScript, Python, JavaScript.", "author": { "name": "AxiomCode" }, "homepage": "https://github.com/AxiomCodeAI/axiomcodegraph", diff --git a/plugins/axiomcode/skills/axiomcode/scripts/axiomcode-test-impact b/plugins/axiomcode/skills/axiomcode/scripts/axiomcode-test-impact index 6f9de3ff0..085db63ad 100755 --- a/plugins/axiomcode/skills/axiomcode/scripts/axiomcode-test-impact +++ b/plugins/axiomcode/skills/axiomcode/scripts/axiomcode-test-impact @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""axiomcode test-impact [] […] [--range .. | --staged] [--in ] [--limit N] [--json] [--why] [--no-refresh] +"""axiomcode test-impact [] [[--files] …] [--range .. | --staged] [--in ] [--limit N] [--json] [--why] [--no-refresh] --no-refresh (MCP refresh=false; AXIOMCODE_NO_REFRESH=1 for a whole shell) is a read-only query: it answers from the graph as it is and never starts a rebuild; rows in files edited since are still marked. Without it, a query on a graph @@ -1873,7 +1873,9 @@ def main(argv): limit = 40 if '--limit' in argv: i = argv.index('--limit'); limit = int(argv[i + 1]) - passthru = [a for a in argv if a not in ('--json', '--why')] + # --files is a spelling of the named-file list, not a file: `test-impact --files a b` passed it on to `changed`, + # which read it as one more named file (#1832) + passthru = [a for a in argv if a not in ('--json', '--why', '--files')] if '--limit' in passthru: i = passthru.index('--limit'); del passthru[i:i + 2] if '-h' in argv or '--help' in argv: diff --git a/tests/test_command.py b/tests/test_command.py index 7d90a3151..0bd9eb266 100644 --- a/tests/test_command.py +++ b/tests/test_command.py @@ -446,5 +446,20 @@ def tree(files): ax_pages.next_test_impact("\n (cd p && npx tsx a.ts)\n (cd p && npx tsx b.ts)\n").startswith('next: run the 2 commands above'), True) +# #1832: `test-impact --files a b` names a and b; `--files` is not a file, and never reaches `changed` as one +seen = [] +_run = ti.run +ti.run = lambda *a: (seen.append(a[1]), (0, json.dumps({'refused': 'stop'}), ''))[1] +try: + with open(os.devnull, 'w') as null: + _out, sys.stdout = sys.stdout, null + try: ti.main(['--files', 'a.py', 'b.py']) + finally: sys.stdout = _out +finally: + ti.run = _run +check("--files: the named files reach changed, the flag does not", + [x for x in (seen[0] if seen else []) if x not in ('--whole', '--json', '--suggest')], ['a.py', 'b.py']) +check("--files: the named files count whole", '--whole' in (seen[0] if seen else []), True) + print('\n' + ('all passed' if not fails else f"{fails} FAILED")) sys.exit(1 if fails else 0)