codecortex 0.26.0__tar.gz → 0.28.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codecortex-0.26.0/src/codecortex.egg-info → codecortex-0.28.0}/PKG-INFO +2 -2
- {codecortex-0.26.0 → codecortex-0.28.0}/README.md +1 -1
- {codecortex-0.26.0 → codecortex-0.28.0/src/codecortex.egg-info}/PKG-INFO +2 -2
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codecortex.egg-info/SOURCES.txt +4 -0
- codecortex-0.28.0/src/codeintel/__init__.py +1 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/changed_range.py +5 -1
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/gateway.py +41 -2
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_answer.py +315 -39
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_changed.py +60 -3
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_confidence.py +67 -6
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_dispatch.py +50 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_edges.py +7 -1
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_ops.py +5 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/provider.py +6 -4
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/providers/graph.py +10 -0
- codecortex-0.28.0/src/codeintel/qualifier_scan.py +388 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/server.py +97 -23
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/symbol_diff.py +182 -10
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_bench_graphify.py +11 -2
- codecortex-0.28.0/tests/test_bench_qualified.py +157 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_changed_range.py +275 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_dispatch_callers.py +105 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_docs_trust_claims.py +87 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_edge_confidence.py +656 -2
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_gateway.py +66 -0
- codecortex-0.28.0/tests/test_mcp_answer_size.py +94 -0
- codecortex-0.28.0/tests/test_qualifier_scan.py +596 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_summary_integrity.py +69 -3
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_symbol_diff.py +108 -0
- codecortex-0.26.0/src/codeintel/__init__.py +0 -1
- {codecortex-0.26.0 → codecortex-0.28.0}/LICENSE +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/pyproject.toml +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/setup.cfg +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codecortex.egg-info/dependency_links.txt +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codecortex.egg-info/entry_points.txt +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codecortex.egg-info/requires.txt +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codecortex.egg-info/top_level.txt +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/__main__.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/agent_prompt.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/auth.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/c4.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/c4_check.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/c4_layers.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/cache.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/__init__.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/_common.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/c4.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/doctor.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/gen_token.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/graph.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/index.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/install.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/map.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/prompt.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/query.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/reset.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/serve.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/serve_http.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/setup.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/status.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/commands/uninstall.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/config.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/containment.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/doctor.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/filelock.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_backend.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_render.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_resolution.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/graph_targets.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/grapher.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/http_server.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/indexer.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/injector.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/installer.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/lang_config.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/loc.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/logconfig.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/mapper.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/metrics.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/onboarding.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/outcome.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/paths.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/per_thread.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/policy.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/progress.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/providers/__init__.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/providers/lsp.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/providers/none.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/providers/semantic.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/py.typed +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/query_ops.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/redact.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/reindexer.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/reset.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/searcher.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/semantic_db.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/source_kind.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/term.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/verify.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/viewer/__init__.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/viewer/graph_template.html +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/src/codeintel/wire_text.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_agent_prompt.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_backend_failure_detail.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_backend_reaper.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_background_index_failure.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_bench_corpus_typed.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_bench_gate.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_bench_oracle.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_bench_oracle_ts.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_c4.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_c4_check.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_c4_layers.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_c4_model.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_c4_output.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_cache.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_chunking.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_cli_commands.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_cli_help.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_cli_install_dry_run.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_cli_install_offer_injection.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_cold_process.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_config.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_corpus.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_could_not_ask_semantic.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_docs_ci_claims.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_docs_deadcode_withdrawal.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_doctor.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_e2e.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_edge_endpoint_cap.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_engine_adoption.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_enterprise.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_graph_failure_population.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_graph_provider.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_graph_real.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_graph_stdin.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_grapher.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_hard_exit.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_hardening.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_http_auth.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_http_server.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_incompleteness.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_index_failure_reason.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_index_incompleteness.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_index_progress.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_indexer_binary.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_installer.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_integration.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_lang_config.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_loc_census.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_lsp_language_coverage.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_lsp_provider.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_lsp_real.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_mapper.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_mcp_handshake.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_mcp_server.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_missing_target.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_model_dimension.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_never_raise.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_null_reason_and_ripple.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_onboarding.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_per_thread.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_query_budget.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_rbac.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_redaction_boundary.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_reindex_lock.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_reindexer.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_rerank.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_reset.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_semantic_provider.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_source_kind.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_staleness.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_symbol_context.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_term.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_treesitter.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_uninstall.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_upgrade_path.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_verify.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_verify_call.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_version_skew.py +0 -0
- {codecortex-0.26.0 → codecortex-0.28.0}/tests/test_wire_text.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codecortex
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.28.0
|
|
4
4
|
Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
|
|
5
5
|
Author: Shammai Hamilton
|
|
6
6
|
License-Expression: MIT
|
|
@@ -540,7 +540,7 @@ Register codeintel as an MCP server (`codeintel install`) and the agent gets fou
|
|
|
540
540
|
| MCP tool | HTTP equivalent | Purpose |
|
|
541
541
|
|---|---|---|
|
|
542
542
|
| `code.query` | `POST /code/query` | The main call — search, trace, understand (the `op` table above) |
|
|
543
|
-
| `code.status` | `GET /code/status` | Per-engine `installed` / `runnable` / `repo_indexed` (plus `model_cached` for semantic), probed against the live engines a query actually hits, plus `degraded`: engines that are installed but not working — see [docs/doctor.md](docs/doctor.md) |
|
|
543
|
+
| `code.status` | `GET /code/status` | Per-engine `installed` / `runnable` / `repo_indexed` (plus `model_cached` for semantic), probed against the live engines a query actually hits, plus `indexed` (true when graph or semantic has indexed this repo; `indexed_by` names which) and `degraded`: engines that are installed but not working — see [docs/doctor.md](docs/doctor.md) |
|
|
544
544
|
| `code.doctor` | `POST /code/doctor` | Per-engine health + repo index status, with a fix for each gap |
|
|
545
545
|
| `code.map` | — | Generate/refresh `CODE_INTEL.md`, a static orientation file for hosts without MCP |
|
|
546
546
|
|
|
@@ -499,7 +499,7 @@ Register codeintel as an MCP server (`codeintel install`) and the agent gets fou
|
|
|
499
499
|
| MCP tool | HTTP equivalent | Purpose |
|
|
500
500
|
|---|---|---|
|
|
501
501
|
| `code.query` | `POST /code/query` | The main call — search, trace, understand (the `op` table above) |
|
|
502
|
-
| `code.status` | `GET /code/status` | Per-engine `installed` / `runnable` / `repo_indexed` (plus `model_cached` for semantic), probed against the live engines a query actually hits, plus `degraded`: engines that are installed but not working — see [docs/doctor.md](docs/doctor.md) |
|
|
502
|
+
| `code.status` | `GET /code/status` | Per-engine `installed` / `runnable` / `repo_indexed` (plus `model_cached` for semantic), probed against the live engines a query actually hits, plus `indexed` (true when graph or semantic has indexed this repo; `indexed_by` names which) and `degraded`: engines that are installed but not working — see [docs/doctor.md](docs/doctor.md) |
|
|
503
503
|
| `code.doctor` | `POST /code/doctor` | Per-engine health + repo index status, with a fix for each gap |
|
|
504
504
|
| `code.map` | — | Generate/refresh `CODE_INTEL.md`, a static orientation file for hosts without MCP |
|
|
505
505
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codecortex
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.28.0
|
|
4
4
|
Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
|
|
5
5
|
Author: Shammai Hamilton
|
|
6
6
|
License-Expression: MIT
|
|
@@ -540,7 +540,7 @@ Register codeintel as an MCP server (`codeintel install`) and the agent gets fou
|
|
|
540
540
|
| MCP tool | HTTP equivalent | Purpose |
|
|
541
541
|
|---|---|---|
|
|
542
542
|
| `code.query` | `POST /code/query` | The main call — search, trace, understand (the `op` table above) |
|
|
543
|
-
| `code.status` | `GET /code/status` | Per-engine `installed` / `runnable` / `repo_indexed` (plus `model_cached` for semantic), probed against the live engines a query actually hits, plus `degraded`: engines that are installed but not working — see [docs/doctor.md](docs/doctor.md) |
|
|
543
|
+
| `code.status` | `GET /code/status` | Per-engine `installed` / `runnable` / `repo_indexed` (plus `model_cached` for semantic), probed against the live engines a query actually hits, plus `indexed` (true when graph or semantic has indexed this repo; `indexed_by` names which) and `degraded`: engines that are installed but not working — see [docs/doctor.md](docs/doctor.md) |
|
|
544
544
|
| `code.doctor` | `POST /code/doctor` | Per-engine health + repo index status, with a fix for each gap |
|
|
545
545
|
| `code.map` | — | Generate/refresh `CODE_INTEL.md`, a static orientation file for hosts without MCP |
|
|
546
546
|
|
|
@@ -49,6 +49,7 @@ src/codeintel/policy.py
|
|
|
49
49
|
src/codeintel/progress.py
|
|
50
50
|
src/codeintel/provider.py
|
|
51
51
|
src/codeintel/py.typed
|
|
52
|
+
src/codeintel/qualifier_scan.py
|
|
52
53
|
src/codeintel/query_ops.py
|
|
53
54
|
src/codeintel/redact.py
|
|
54
55
|
src/codeintel/reindexer.py
|
|
@@ -94,6 +95,7 @@ tests/test_bench_gate.py
|
|
|
94
95
|
tests/test_bench_graphify.py
|
|
95
96
|
tests/test_bench_oracle.py
|
|
96
97
|
tests/test_bench_oracle_ts.py
|
|
98
|
+
tests/test_bench_qualified.py
|
|
97
99
|
tests/test_c4.py
|
|
98
100
|
tests/test_c4_check.py
|
|
99
101
|
tests/test_c4_layers.py
|
|
@@ -143,6 +145,7 @@ tests/test_lsp_language_coverage.py
|
|
|
143
145
|
tests/test_lsp_provider.py
|
|
144
146
|
tests/test_lsp_real.py
|
|
145
147
|
tests/test_mapper.py
|
|
148
|
+
tests/test_mcp_answer_size.py
|
|
146
149
|
tests/test_mcp_handshake.py
|
|
147
150
|
tests/test_mcp_server.py
|
|
148
151
|
tests/test_missing_target.py
|
|
@@ -151,6 +154,7 @@ tests/test_never_raise.py
|
|
|
151
154
|
tests/test_null_reason_and_ripple.py
|
|
152
155
|
tests/test_onboarding.py
|
|
153
156
|
tests/test_per_thread.py
|
|
157
|
+
tests/test_qualifier_scan.py
|
|
154
158
|
tests/test_query_budget.py
|
|
155
159
|
tests/test_rbac.py
|
|
156
160
|
tests/test_redaction_boundary.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.28.0"
|
|
@@ -28,6 +28,7 @@ from __future__ import annotations
|
|
|
28
28
|
|
|
29
29
|
import os
|
|
30
30
|
import re
|
|
31
|
+
import stat
|
|
31
32
|
import subprocess
|
|
32
33
|
import tempfile
|
|
33
34
|
import threading
|
|
@@ -323,7 +324,10 @@ def read_new(root: str, path: str) -> str | None:
|
|
|
323
324
|
if safe is None:
|
|
324
325
|
return None
|
|
325
326
|
try:
|
|
326
|
-
|
|
327
|
+
info = os.stat(safe)
|
|
328
|
+
# A regular file only. A FIFO planted at a tracked path has one link and a size of zero, passes
|
|
329
|
+
# containment, and blocks `open` forever — which would hang the whole answer.
|
|
330
|
+
if not stat.S_ISREG(info.st_mode) or info.st_size > MAX_SOURCE_BYTES:
|
|
327
331
|
return None
|
|
328
332
|
with open(safe, "rb") as fh:
|
|
329
333
|
return fh.read().decode("utf-8", "replace")
|
|
@@ -83,6 +83,41 @@ def _is_retryable(result: Result) -> bool:
|
|
|
83
83
|
)
|
|
84
84
|
|
|
85
85
|
|
|
86
|
+
def _states_live_file_contents(result: Result | dict[str, Result]) -> bool:
|
|
87
|
+
"""Whether the answer states something read from the files on disk as it was asked — the qualifier
|
|
88
|
+
scan's verdicts (`qualifier_seen` on a row, or the `qualifier_absent` / `qualifier_present`
|
|
89
|
+
counts).
|
|
90
|
+
|
|
91
|
+
The cache is keyed by the target string and the index's freshness generation, and neither moves
|
|
92
|
+
when a caller file starts or stops writing the qualifier — only a reindex does. Caching such an
|
|
93
|
+
answer would serve a verdict about the files as they WERE, in prose that says "as they are on
|
|
94
|
+
disk": the reason `changed` is never cached, met by a narrower population. An answer whose scan
|
|
95
|
+
judged nothing printed only the command — but if it was eligible and judged nothing because a
|
|
96
|
+
call stalled, the budget ran out or a lookup timed out (`qualifier_checked`), caching that would
|
|
97
|
+
keep the check switched off for the symbol until the next reindex, long after the filesystem
|
|
98
|
+
recovered. So an answer whose check was attempted at all is not cached either.
|
|
99
|
+
Walks the whole answer, because a fan-out answer nests each engine's envelope."""
|
|
100
|
+
def walk(node: object, depth: int) -> bool:
|
|
101
|
+
if depth > 8:
|
|
102
|
+
return False
|
|
103
|
+
if isinstance(node, dict):
|
|
104
|
+
evidence = node.get("evidence")
|
|
105
|
+
if isinstance(evidence, dict) and (evidence.get("qualifier_absent")
|
|
106
|
+
or evidence.get("qualifier_present")
|
|
107
|
+
or evidence.get("qualifier_checked")):
|
|
108
|
+
return True
|
|
109
|
+
rows = node.get("rows")
|
|
110
|
+
if isinstance(rows, list) and any(
|
|
111
|
+
isinstance(r, dict) and r.get("qualifier_seen") is not None for r in rows):
|
|
112
|
+
return True
|
|
113
|
+
return any(walk(v, depth + 1) for v in node.values() if isinstance(v, (dict, list)))
|
|
114
|
+
if isinstance(node, list):
|
|
115
|
+
return any(walk(v, depth + 1) for v in node)
|
|
116
|
+
return False
|
|
117
|
+
|
|
118
|
+
return walk(result, 0)
|
|
119
|
+
|
|
120
|
+
|
|
86
121
|
class Gateway:
|
|
87
122
|
def __init__(self, graph=None, lsp=None, semantic=None, policy: TieringPolicy | None = None,
|
|
88
123
|
reindexer: Reindexer | None = None, oneshot: bool = False):
|
|
@@ -682,7 +717,10 @@ class Gateway:
|
|
|
682
717
|
engines = ["graph", "lsp"] if engine_str == "both" else ["graph", "lsp", "semantic"]
|
|
683
718
|
fan_results = self._fan_out(engines, op_str, target_str, budget, project_root)
|
|
684
719
|
result = self._merge(fan_results, op_str, target_str, engine_str)
|
|
685
|
-
|
|
720
|
+
# The merged answer drops each engine's `rows` and `evidence` but keeps their prose,
|
|
721
|
+
# so whether it states what the files hold now is read from the engines' own answers.
|
|
722
|
+
if (not uncacheable and not _is_retryable(result)
|
|
723
|
+
and not _states_live_file_contents(fan_results)):
|
|
686
724
|
self._cache.put(op_str, target_str, cache_engine, root_str, result, freshness)
|
|
687
725
|
return _mark_reindexing(result, reindexing)
|
|
688
726
|
|
|
@@ -721,7 +759,8 @@ class Gateway:
|
|
|
721
759
|
result = self._cross_check_name_resolved(
|
|
722
760
|
result, op_str, target_str, budget, project_root, was_auto)
|
|
723
761
|
|
|
724
|
-
if not uncacheable and not _is_retryable(result)
|
|
762
|
+
if (not uncacheable and not _is_retryable(result)
|
|
763
|
+
and not _states_live_file_contents(result)):
|
|
725
764
|
self._cache.put(op_str, target_str, cache_engine, root_str, result, freshness)
|
|
726
765
|
return _mark_reindexing(result, reindexing)
|
|
727
766
|
|