Commit 853c275
Integration tests for annotation, audit, cache, and CallGraphFromTo tools (#170)
* feat: SqliteStore backend with annotation, audit, and cache tools
Replace lowdb with sql.js (asm.js build) for zero-dependency SQLite persistence.
Bundle inline with esbuild — no native modules, no external deps at runtime.
SqliteStore provides three tables:
- sessions: session tracking (migrated from lowdb)
- annotations: key-value annotation store with categories and metadata
- query_result_cache: BQRS/SARIF result caching with subset retrieval
New tools (gated by ENABLE_ANNOTATION_TOOLS env var):
- annotation_create, annotation_list, annotation_search, annotation_delete
- audit_store_findings, audit_list_findings, audit_add_notes, audit_clear_repo
- query_results_cache_lookup, query_results_cache_retrieve,
query_results_cache_clear, query_results_cache_compare
Code refactoring for maintainability:
- Extract database-resolver.ts from cli-tool-registry.ts
- Extract query-resolver.ts from cli-tool-registry.ts
- Extract result-processor.ts from cli-tool-registry.ts
- Extract codeql-version.ts from cli-executor.ts
Bug fixes:
- Fix params.output not propagated to proce- Fix params.output not propagated to proce- Fix params.output not propagated txternal predicate conditions for direct query paths
Closes #165
* Add integration tests for annotation, audit, cache, and CallGraphFromTo tools
Client integration test fixtures:
- annotation_create, annotation_delete, annotation_list, annotation_search
- audit_store_findings, audit_list_findings, audit_add_notes, audit_clear_repo
- query_results_cache_lookup, query_results_cache_retrieve,
query_results_cache_clear, query_results_cache_compare
- codeql_query_run CallGraphFromTo for cpp, javascript, python
Workflow integration test:
- mrva_finding_triage end-to-end workflow
Extension integration tests:
- mcp-tool-e2e: tool availability and MRVA workflow validation
Updated client/scripts/run-integration-tests.sh with annotation mode support.
Closes #166
* Fix server build
* Remove grep from cache tools; fix annotation_search API to FTS semantics; always apply SARIF path for SARIF format
Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/219712ee-4c28-4b51-9da5-961020112e6e
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
* Sync server src/test/dist to dd/sqlite-annotation-cache tip
Brings in all review feedback fixes (FTS safety, offset-only LIMIT,
cache limit param, int/positive Zod schemas, store lifecycle fix)
and the rebuilt dist.
* Fix extension integration tests
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent e8ef061 commit 853c275
File tree
50 files changed
+809
-5
lines changed- client
- integration-tests
- primitives/tools
- annotation_create/basic_create
- after
- before
- annotation_delete/delete_by_prefix
- after
- before
- annotation_list/filter_by_category_and_prefix
- after
- before
- annotation_search/full_text_search
- after
- before
- audit_add_notes/mrva_triage_notes
- after
- before
- audit_clear_repo/clear_single_repo
- after
- before
- audit_list_findings/mrva_findings_for_repo
- after
- before
- audit_store_findings/mrva_findings_across_repos
- after
- before
- codeql_query_run
- cpp_call_graph_from_to_example1
- after
- before
- javascript_call_graph_from_to_example1
- after
- before
- python_call_graph_from_to_example1
- after
- before
- query_results_cache_clear/clear_all
- after
- before
- query_results_cache_compare/compare_across_databases
- after
- before
- query_results_cache_lookup/lookup_by_query_name
- after
- before
- query_results_cache_retrieve/retrieve_with_subset
- after
- before
- workflows/mrva_finding_triage/mrva_triage_workflow
- after
- before
- scripts
- extensions/vscode
- test/suite
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+809
-5
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments