Skip to content

Commit 467f62a

Browse files
Copilotdata-douser
andcommitted
[UPDATE PRIMITIVE] codeql_query_compile enables --dump-dil by default with .dil file persistence (#235)
* Initial plan * feat: enable --dump-dil by default for codeql_query_compile tool Add dump-dil parameter to the codeql_query_compile tool inputSchema and inject --dump-dil by default in registerCLITool handler unless explicitly disabled via dump-dil: false or --no-dump-dil in additionalArgs. Includes server unit tests and client integration test improvements. Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/7a489b70-8f73-406f-9a75-e8a15951cde2 Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> * feat: persist DIL output to a .dil file for codeql_query_compile After successful compilation with --dump-dil, extract the DIL content from stdout and save it to a dedicated .dil file in a log directory. The file path is appended to the tool response. - Add logDir parameter to codeql_query_compile tool - Create log directory and write .dil file post-execution - Add server unit tests for DIL file persistence - Update integration test assertions to verify DIL file output Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/7ba868e5-1215-4130-bc06-10dfb15ebf14 Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> * Address PR #234 review feedback * Fix compile_query client integration test * Address PR #235 review feedback Address PR #235 review comments for codeql_query_compile DIL persistence: - Reorder path imports alphabetically (basename, delimiter, dirname, ...) - Update logDir description to match pattern used by query-run, test-run, and database-analyze (mentions CODEQL_QUERY_LOG_DIR and default path) - Defer compile log directory creation to post-execution so failed compilations do not leave empty directories behind - Make DIL file test hermetic by controlling CODEQL_QUERY_LOG_DIR via a test-scoped temp directory and restoring it in a finally block - Add test verifying no empty log directory on compilation failure - Add test verifying logDir description matches other CLI tools * Regenerate package-lock.json after rebase --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> Co-authored-by: Nathan Randall <data-douser@github.com>
1 parent e3d2041 commit 467f62a

File tree

11 files changed

+1662
-695
lines changed

11 files changed

+1662
-695
lines changed

client/integration-tests/primitives/tools/codeql_query_compile/compile_query/after/test_query.ql

Lines changed: 0 additions & 8 deletions
This file was deleted.

client/integration-tests/primitives/tools/codeql_query_compile/compile_query/before/codeql-pack.lock.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

client/integration-tests/primitives/tools/codeql_query_compile/compile_query/before/test_query.ql

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"toolName": "codeql_query_compile",
3+
"arguments": {
4+
"query": "server/ql/javascript/examples/src/ExampleQuery1/ExampleQuery1.ql"
5+
},
6+
"assertions": {
7+
"responseContains": ["DIL file:", ".dil"]
8+
}
9+
}

0 commit comments

Comments
 (0)