@ngocsangairvds/vsaf 3.2.14 → 3.2.15

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.
Files changed (1441) hide show
  1. package/bin/vsaf.js +13 -0
  2. package/package.json +1 -1
  3. package/src/config.js +167 -0
  4. package/src/global.js +1 -48
  5. package/src/utils.js +44 -1
  6. package/tools/vds-scripts/Makefile +9 -31
  7. package/tools/vds-scripts/docker/docker-compose.cli.yml +1 -117
  8. package/tools/vds-scripts/docker/docker-compose.services.yml +1 -40
  9. package/tools/vds-scripts/docker/infrastructure/init-schemas.sql +0 -34
  10. package/tools/vds-scripts/docker/infrastructure/pgbouncer/pgbouncer.ini +2 -6
  11. package/tools/vds-scripts/pyproject.toml +1 -33
  12. package/tools/vds-scripts/uv.lock +80 -1651
  13. package/tools/vds-scripts/vds_cli/pyproject.toml +3 -0
  14. package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +1 -127
  15. package/tools/vds-scripts/vds_cli/src/vds_cli/commands/lint_cli.py +1 -20
  16. package/tools/vds-scripts/vds_cli/src/vds_cli/router.py +0 -100
  17. package/tools/vds-scripts/vds_cli/tests/conftest.py +0 -2
  18. package/tools/vds-scripts/vds_cli/tests/unit/test_cli.py +0 -25
  19. package/tools/vds-scripts/vds_cli/tests/unit/test_lint_cli.py +2 -2
  20. package/tools/vds-scripts/vds_cli/tests/unit/test_router.py +0 -2
  21. package/tools/vds-scripts/CLOSURE.md +0 -340
  22. package/tools/vds-scripts/ECOSYSTEM-CHANGELOG.md +0 -52
  23. package/tools/vds-scripts/ECOSYSTEM-DOCS.md +0 -602
  24. package/tools/vds-scripts/ECOSYSTEM_ALIGNMENT.md +0 -133
  25. package/tools/vds-scripts/ENV-HYGIENE-OPS-NOTE.md +0 -65
  26. package/tools/vds-scripts/INVESTIGATION-cloud-401.md +0 -103
  27. package/tools/vds-scripts/MEM0_2.0_API_REFERENCE.md +0 -238
  28. package/tools/vds-scripts/PACKAGE_P125B_IMPLEMENTATION_SUMMARY.md +0 -131
  29. package/tools/vds-scripts/PHASE-MERGE-SUMMARY.md +0 -121
  30. package/tools/vds-scripts/PHASES-3-ARCHIVE.md +0 -59
  31. package/tools/vds-scripts/PROJECT_COMPLETION_SUMMARY.md +0 -45
  32. package/tools/vds-scripts/SEARCH-CRASH-REPRO.md +0 -51
  33. package/tools/vds-scripts/analyze_hexagonal.py +0 -217
  34. package/tools/vds-scripts/analyze_profiles.py +0 -60
  35. package/tools/vds-scripts/audit-checklist.xlsx +0 -0
  36. package/tools/vds-scripts/audit_orchestrator/.audit_approvals/approvals_index.json +0 -1
  37. package/tools/vds-scripts/audit_orchestrator/.env.example +0 -85
  38. package/tools/vds-scripts/audit_orchestrator/.github/workflows/audit.yml +0 -47
  39. package/tools/vds-scripts/audit_orchestrator/Dockerfile +0 -92
  40. package/tools/vds-scripts/audit_orchestrator/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +0 -218
  41. package/tools/vds-scripts/audit_orchestrator/PHASE3_INTEGRATION_SUMMARY.md +0 -268
  42. package/tools/vds-scripts/audit_orchestrator/PHASE7-MERGE-SUMMARY.md +0 -174
  43. package/tools/vds-scripts/audit_orchestrator/README.md +0 -1573
  44. package/tools/vds-scripts/audit_orchestrator/TSK-168-IMPLEMENTATION-SUMMARY.md +0 -191
  45. package/tools/vds-scripts/audit_orchestrator/TSK-196-IMPLEMENTATION-SUMMARY.md +0 -201
  46. package/tools/vds-scripts/audit_orchestrator/alembic/env.py +0 -37
  47. package/tools/vds-scripts/audit_orchestrator/alembic/script.py.mako +0 -28
  48. package/tools/vds-scripts/audit_orchestrator/alembic/versions/0001_initial_audit_state_schema.py +0 -1260
  49. package/tools/vds-scripts/audit_orchestrator/alembic.ini +0 -68
  50. package/tools/vds-scripts/audit_orchestrator/config/category-mapping.json +0 -81
  51. package/tools/vds-scripts/audit_orchestrator/config/profile-timeouts.yaml +0 -17
  52. package/tools/vds-scripts/audit_orchestrator/create_sample.py +0 -55
  53. package/tools/vds-scripts/audit_orchestrator/data/corpus_accuracy_report.json +0 -17
  54. package/tools/vds-scripts/audit_orchestrator/data/exemplar_quality_report.json +0 -1606
  55. package/tools/vds-scripts/audit_orchestrator/data/instruction_plan_fixtures.json +0 -163
  56. package/tools/vds-scripts/audit_orchestrator/data/requirement_exemplars.json +0 -3443
  57. package/tools/vds-scripts/audit_orchestrator/data/requirement_scope_fixtures.json +0 -172
  58. package/tools/vds-scripts/audit_orchestrator/debug_rg.py +0 -46
  59. package/tools/vds-scripts/audit_orchestrator/demo_code_pack.py +0 -127
  60. package/tools/vds-scripts/audit_orchestrator/docs/AGENT_SDK_SELECTION_SPEC.md +0 -720
  61. package/tools/vds-scripts/audit_orchestrator/docs/API.md +0 -804
  62. package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_ANALYSIS_APPROACH.md +0 -1041
  63. package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_SCORING_EVOLUTION_SPEC.md +0 -868
  64. package/tools/vds-scripts/audit_orchestrator/docs/DEPLOYMENT.md +0 -778
  65. package/tools/vds-scripts/audit_orchestrator/docs/LLM_AGENT_AUDIT_SPEC.md +0 -721
  66. package/tools/vds-scripts/audit_orchestrator/docs/LLM_CONTENT_ANALYSIS_SPEC.md +0 -1143
  67. package/tools/vds-scripts/audit_orchestrator/docs/LSP_SETUP_GUIDE.md +0 -221
  68. package/tools/vds-scripts/audit_orchestrator/docs/MULTI_REPO_AUDIT_SPEC.md +0 -951
  69. package/tools/vds-scripts/audit_orchestrator/docs/OLLAMA_EMBEDDINGS_SETUP.md +0 -119
  70. package/tools/vds-scripts/audit_orchestrator/docs/PHASE32_REAL_BENCHMARK_2026-02-08.md +0 -66
  71. package/tools/vds-scripts/audit_orchestrator/docs/PHASE_64_TO_92_HISTORICAL_SPEC.md +0 -1772
  72. package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-flow-trace.md +0 -201
  73. package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-verification.md +0 -124
  74. package/tools/vds-scripts/audit_orchestrator/docs/phase152-hierarchical-query-surface.md +0 -46
  75. package/tools/vds-scripts/audit_orchestrator/examples/bitbucket_metadata_example.json +0 -50
  76. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/README.md +0 -68
  77. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase117_phase118_shared_state.sql +0 -64
  78. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase154_published_pages.sql +0 -28
  79. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_dispatch_tables.sql +0 -94
  80. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_events.sql +0 -91
  81. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_scope_snapshots.sql +0 -24
  82. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_status_view.sql +0 -22
  83. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase169_dispatch_observability.sql +0 -55
  84. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/state_repair_hardening.sql +0 -24
  85. package/tools/vds-scripts/audit_orchestrator/pyproject.toml +0 -211
  86. package/tools/vds-scripts/audit_orchestrator/pyrightconfig.json +0 -51
  87. package/tools/vds-scripts/audit_orchestrator/pytest.ini +0 -37
  88. package/tools/vds-scripts/audit_orchestrator/reproduce_scanner.py +0 -40
  89. package/tools/vds-scripts/audit_orchestrator/scripts/README.md +0 -116
  90. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_crawl_modes.py +0 -455
  91. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_dspy.py +0 -513
  92. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_nlp_accuracy.py +0 -138
  93. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_retrieval_modes.py +0 -176
  94. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_upload_update_mode.py +0 -167
  95. package/tools/vds-scripts/audit_orchestrator/scripts/build_check.py +0 -76
  96. package/tools/vds-scripts/audit_orchestrator/scripts/check_live_progress.py +0 -61
  97. package/tools/vds-scripts/audit_orchestrator/scripts/cli_integration_test.py +0 -400
  98. package/tools/vds-scripts/audit_orchestrator/scripts/index_workspace.py +0 -178
  99. package/tools/vds-scripts/audit_orchestrator/scripts/inspect_route_conformance.py +0 -196
  100. package/tools/vds-scripts/audit_orchestrator/scripts/monitor_postgres.py +0 -145
  101. package/tools/vds-scripts/audit_orchestrator/scripts/optimize_audit.py +0 -462
  102. package/tools/vds-scripts/audit_orchestrator/scripts/verify.py +0 -673
  103. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase111_requirement_analysis.py +0 -375
  104. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase117_cross_repo_evidence.py +0 -77
  105. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase121_short_circuit.py +0 -680
  106. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase122_instruction_handling.py +0 -478
  107. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase125_skill_integration.py +0 -832
  108. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_36.py +0 -394
  109. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_37.py +0 -58
  110. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/__init__.py +0 -17
  111. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/__init__.py +0 -29
  112. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/_langchain_warnings.py +0 -17
  113. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/agentic_investigator.py +0 -4130
  114. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/approval.py +0 -490
  115. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_loop_hooks.py +0 -107
  116. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_state.py +0 -50
  117. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/base.py +0 -4035
  118. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_agent.py +0 -667
  119. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_helpers.py +0 -236
  120. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_prompts.py +0 -146
  121. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/docs_agent.py +0 -1234
  122. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/langgraph_workflow.py +0 -2002
  123. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/pydantic_base.py +0 -1227
  124. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/requirement_analysis_agent.py +0 -593
  125. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_agent.py +0 -1829
  126. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_scanner.py +0 -686
  127. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/skill_tools.py +0 -204
  128. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/synthesis_agent.py +0 -1463
  129. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_efficiency_guard.py +0 -609
  130. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_registry.py +0 -3822
  131. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/__init__.py +0 -52
  132. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/evidence_corpus.py +0 -385
  133. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/filesystem.py +0 -1134
  134. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/lsp.py +0 -458
  135. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/mcp_toolset.py +0 -491
  136. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/skills_toolset.py +0 -997
  137. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/vector_evidence.py +0 -842
  138. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/usage_tracker.py +0 -682
  139. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/visualization.py +0 -303
  140. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/analyze_cmds.py +0 -892
  141. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/__init__.py +0 -15
  142. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/service.py +0 -171
  143. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/__init__.py +0 -20
  144. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/base.py +0 -60
  145. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/__init__.py +0 -6
  146. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/checks.py +0 -257
  147. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/__init__.py +0 -10
  148. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/checks.py +0 -78
  149. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/__init__.py +0 -6
  150. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/file_checks.py +0 -133
  151. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/__init__.py +0 -17
  152. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/api_docs_check.py +0 -80
  153. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/readme_check.py +0 -76
  154. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/security_docs_check.py +0 -78
  155. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/registry.py +0 -402
  156. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/__init__.py +0 -10
  157. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/checks.py +0 -276
  158. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli.py +0 -12
  159. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_common.py +0 -128
  160. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_impl.py +0 -9826
  161. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/bitbucket_cli_client.py +0 -187
  162. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/confluence_cli_client.py +0 -977
  163. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/sonarqube_cli_client.py +0 -28
  164. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/__init__.py +0 -21
  165. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/base.py +0 -25
  166. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_downloader.py +0 -644
  167. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_metadata.py +0 -133
  168. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/checklist_parser.py +0 -180
  169. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/__init__.py +0 -31
  170. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/bitbucket_probe.py +0 -443
  171. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/confluence_probe.py +0 -365
  172. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/freshness_evaluator.py +0 -330
  173. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/material_completeness_service.py +0 -1079
  174. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/confluence_collector.py +0 -259
  175. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/diagram_extractor.py +0 -280
  176. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/enrichment_extractor.py +0 -200
  177. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/evidence_cache.py +0 -35
  178. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/git_collector.py +0 -148
  179. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/graphify_collector.py +0 -171
  180. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/image_extractor.py +0 -359
  181. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/linked_page_tracker.py +0 -120
  182. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/markdown_converter.py +0 -344
  183. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_cache.py +0 -1252
  184. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_downloader.py +0 -1165
  185. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/orchestrator.py +0 -168
  186. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/registry_parser.py +0 -3063
  187. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/requirements.py +0 -70
  188. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/runner.py +0 -119
  189. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/sonarqube_collector.py +0 -113
  190. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config.py +0 -1943
  191. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/__init__.py +0 -23
  192. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/discovery.py +0 -90
  193. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/environment_resolver.py +0 -56
  194. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/evidence.py +0 -78
  195. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/models.py +0 -73
  196. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/precedence.py +0 -10
  197. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/redaction.py +0 -20
  198. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/confluence_connectivity.py +0 -140
  199. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/corpus_cmds.py +0 -278
  200. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/__init__.py +0 -7
  201. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/alembic_filters.py +0 -57
  202. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/__init__.py +0 -29
  203. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/diataxis_validator.py +0 -687
  204. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/doctor_cmds.py +0 -3295
  205. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/__init__.py +0 -5
  206. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/evaluation.py +0 -301
  207. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/modules.py +0 -172
  208. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/runtime.py +0 -836
  209. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/signatures.py +0 -406
  210. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/__init__.py +0 -192
  211. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/ad_hoc_analyzer.py +0 -399
  212. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/aggregator.py +0 -220
  213. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/auditor.py +0 -504
  214. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_evidence_cache.py +0 -111
  215. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_processor.py +0 -4776
  216. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/calibration.py +0 -217
  217. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_generator.py +0 -1201
  218. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_projection.py +0 -192
  219. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_scoping.py +0 -221
  220. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checkpoint.py +0 -159
  221. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cl003_shared_lib_guard.py +0 -194
  222. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/companion_context_service.py +0 -445
  223. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/confluence_checklist_contract.py +0 -7425
  224. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cross_check_rules.py +0 -213
  225. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/deterministic_evaluator.py +0 -237
  226. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/drift_detector.py +0 -157
  227. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/dspy_requirement_classifier.py +0 -640
  228. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_assembler.py +0 -407
  229. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_collector.py +0 -119
  230. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_diversity.py +0 -101
  231. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/gap_analyzer.py +0 -549
  232. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/graduated.py +0 -185
  233. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/grounding_validator.py +0 -287
  234. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_analyzer.py +0 -882
  235. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_compliance.py +0 -172
  236. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/llm_row_evaluator.py +0 -9270
  237. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/loader.py +0 -1070
  238. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/manual_check_config.py +0 -136
  239. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/mapping.py +0 -269
  240. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/multi_judge.py +0 -65
  241. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/phase120_checklist_update.py +0 -416
  242. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/profile_scorer.py +0 -427
  243. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_evidence_context.py +0 -449
  244. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_query_service.py +0 -155
  245. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_store.py +0 -383
  246. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_topology.py +0 -1920
  247. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/provider_failure_classifier.py +0 -778
  248. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_cli_helpers.py +0 -341
  249. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_extractor.py +0 -303
  250. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_synthesizer.py +0 -730
  251. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/regression_guard.py +0 -138
  252. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/repo_type_classifier.py +0 -297
  253. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_analysis.py +0 -1433
  254. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_classification.py +0 -1725
  255. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/result_merger.py +0 -814
  256. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/route_matrix.py +0 -267
  257. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator.py +0 -9437
  258. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_runtime.py +0 -1270
  259. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_types.py +0 -2102
  260. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/rubric.py +0 -592
  261. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/scorer.py +0 -1239
  262. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/section_packs.py +0 -645
  263. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/skill_recommendation.py +0 -1183
  264. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/stability_harness.py +0 -207
  265. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/target_selector.py +0 -841
  266. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/telemetry.py +0 -347
  267. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/template_analyzer.py +0 -469
  268. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/token_tracker.py +0 -111
  269. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/tool_first_planner.py +0 -7905
  270. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/topology_query_service.py +0 -80
  271. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/validator.py +0 -449
  272. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/weight_policy.py +0 -464
  273. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/errors.py +0 -430
  274. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/extract_cmds.py +0 -4887
  275. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/identity.py +0 -146
  276. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/__init__.py +0 -52
  277. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/baseline.py +0 -378
  278. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/change_analyzer.py +0 -407
  279. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/delta_report.py +0 -189
  280. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/diff_detector.py +0 -301
  281. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/integrations/__init__.py +0 -3
  282. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/__init__.py +0 -50
  283. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/audit_schemas.py +0 -459
  284. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/codex_oauth.py +0 -340
  285. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/cost_tracker.py +0 -288
  286. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/engine.py +0 -751
  287. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/evaluator.py +0 -245
  288. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/__init__.py +0 -32
  289. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/api_docs_evaluation.py +0 -25
  290. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/gap_analysis.py +0 -31
  291. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/instruction_templates.py +0 -634
  292. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/readme_evaluation.py +0 -25
  293. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/row_evaluation.py +0 -247
  294. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/security_docs_evaluation.py +0 -25
  295. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/template_analysis.py +0 -25
  296. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts.py +0 -0
  297. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/provider.py +0 -626
  298. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/logging_config.py +0 -577
  299. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/__init__.py +0 -58
  300. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/default_checklist_mapping.json +0 -18
  301. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/vietnamese_checklist_mapping.json +0 -38
  302. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/misc_cmds.py +0 -4689
  303. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/__init__.py +0 -153
  304. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/calibration.py +0 -98
  305. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/checklist.py +0 -921
  306. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/completeness.py +0 -309
  307. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enrichment.py +0 -58
  308. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enums.py +0 -97
  309. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/evidence.py +0 -351
  310. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/findings.py +0 -381
  311. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/gaps.py +0 -299
  312. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/graph.py +0 -42
  313. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/multi_judge.py +0 -50
  314. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/readiness.py +0 -309
  315. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/registry.py +0 -386
  316. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/reporting.py +0 -32
  317. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/task.py +0 -549
  318. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/template.py +0 -477
  319. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/__init__.py +0 -31
  320. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/metrics.py +0 -404
  321. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/parse_cmds.py +0 -608
  322. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/pdf_cmds.py +0 -208
  323. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/performance_gates.py +0 -224
  324. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/phase151_projection.py +0 -84
  325. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/__init__.py +0 -65
  326. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/detection.py +0 -842
  327. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/models.py +0 -474
  328. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/__init__.py +0 -1
  329. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_confluence_macros.py +0 -145
  330. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_field_sanitizer.py +0 -25
  331. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_table_builder.py +0 -63
  332. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_vietnamese_templates.py +0 -103
  333. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/bitbucket_link_resolver.py +0 -34
  334. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/checklist_renderer.py +0 -483
  335. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/confluence_publisher.py +0 -3048
  336. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/hierarchy_publisher.py +0 -213
  337. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/live_data_injector.py +0 -152
  338. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/macro_builder.py +0 -101
  339. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/markdown_converter.py +0 -154
  340. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/priority_renderer.py +0 -133
  341. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/project_aggregate_renderer.py +0 -423
  342. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/readiness_renderer.py +0 -186
  343. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_hierarchy_renderer.py +0 -382
  344. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_renderer.py +0 -683
  345. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/report_cmds.py +0 -788
  346. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/__init__.py +0 -13
  347. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/aggregation_report.py +0 -86
  348. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/checklist_generator.py +0 -425
  349. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/excel_generator.py +0 -599
  350. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/gap_report.py +0 -131
  351. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/json_generator.py +0 -188
  352. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/markdown_generator.py +0 -595
  353. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/__init__.py +0 -154
  354. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/collector.py +0 -61
  355. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/department_builder.py +0 -77
  356. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/errors.py +0 -9
  357. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/md_renderer.py +0 -386
  358. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_models.py +0 -95
  359. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_writer.py +0 -27
  360. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/repo_project_builders.py +0 -274
  361. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/readiness_report.py +0 -447
  362. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/reporting.py +0 -94
  363. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/sarif_generator.py +0 -519
  364. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/runtime_profiles.py +0 -98
  365. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/__init__.py +0 -29
  366. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/seed_loader.py +0 -561
  367. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/__init__.py +0 -5
  368. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/skill_routing.py +0 -312
  369. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/__init__.py +0 -0
  370. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/base.py +0 -110
  371. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/bitbucket.py +0 -129
  372. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/git_url.py +0 -60
  373. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/github.py +0 -75
  374. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/local.py +0 -58
  375. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/spec_sync_validator.py +0 -15
  376. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/__init__.py +0 -6285
  377. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/readiness_helpers.py +0 -74
  378. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/skill_readiness.py +0 -487
  379. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/store.py +0 -12927
  380. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state_cmds.py +0 -1868
  381. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/__init__.py +0 -0
  382. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/repo_sync.py +0 -409
  383. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync_cmds.py +0 -1247
  384. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/__init__.py +0 -3
  385. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/debug_bundle.py +0 -214
  386. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/validators/checklist_validator.py +0 -342
  387. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflow_cmds.py +0 -19147
  388. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/__init__.py +0 -9
  389. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/_test_audit_daily_batch.py +0 -192
  390. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_daily_batch.py +0 -308
  391. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_deep_monthly.py +0 -193
  392. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_drift_scan.py +0 -178
  393. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_security_daily.py +0 -183
  394. package/tools/vds-scripts/audit_orchestrator/templates/sample_audit_template.xlsx +0 -0
  395. package/tools/vds-scripts/audit_orchestrator/tests/__init__.py +0 -0
  396. package/tools/vds-scripts/audit_orchestrator/tests/_helpers.py +0 -32
  397. package/tools/vds-scripts/audit_orchestrator/tests/collectors/__init__.py +0 -0
  398. package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/__init__.py +0 -0
  399. package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_bitbucket_probe.py +0 -403
  400. package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_confluence_probe.py +0 -423
  401. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_bitbucket_downloader.py +0 -289
  402. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_image_extractor.py +0 -260
  403. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_markdown_converter.py +0 -57
  404. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_cache.py +0 -197
  405. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_downloader.py +0 -550
  406. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser.py +0 -3514
  407. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_department_entry.py +0 -214
  408. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_flow.py +0 -200
  409. package/tools/vds-scripts/audit_orchestrator/tests/conftest.py +0 -988
  410. package/tools/vds-scripts/audit_orchestrator/tests/engine/__init__.py +0 -0
  411. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_calibration.py +0 -48
  412. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_confluence_checklist_phase22_helpers.py +0 -6065
  413. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_multi_judge.py +0 -62
  414. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_stability_harness.py +0 -61
  415. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_structured_metadata.py +0 -419
  416. package/tools/vds-scripts/audit_orchestrator/tests/factories/__init__.py +0 -0
  417. package/tools/vds-scripts/audit_orchestrator/tests/factories/models.py +0 -534
  418. package/tools/vds-scripts/audit_orchestrator/tests/factories/templates.py +0 -241
  419. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/__init__.py +0 -0
  420. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/__init__.py +0 -0
  421. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/compressed.drawio +0 -2
  422. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/mockup.bmpr +0 -0
  423. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/simple.drawio +0 -26
  424. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/__init__.py +0 -0
  425. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/__init__.py +0 -0
  426. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_cli.json +0 -26
  427. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_direct.json +0 -24
  428. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_cli.json +0 -14
  429. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_direct.json +0 -12
  430. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/__init__.py +0 -0
  431. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_cli.json +0 -7
  432. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_direct.json +0 -7
  433. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_cli.json +0 -11
  434. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_direct.json +0 -7
  435. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/__init__.py +0 -0
  436. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_cli.json +0 -12
  437. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_direct.json +0 -12
  438. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/requirement_strategy_phase115.json +0 -118
  439. package/tools/vds-scripts/audit_orchestrator/tests/integration/__init__.py +0 -0
  440. package/tools/vds-scripts/audit_orchestrator/tests/integration/conftest.py +0 -107
  441. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/__init__.py +0 -0
  442. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/expected_outcomes.md +0 -50
  443. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/__init__.py +0 -0
  444. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/auth.py +0 -27
  445. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/config.py +0 -16
  446. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/db.py +0 -24
  447. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/main.py +0 -18
  448. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/__init__.py +0 -1
  449. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/utils.py +0 -22
  450. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_checklist_template.json +0 -110
  451. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/__init__.py +0 -0
  452. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/code_evidence_pack.json +0 -40
  453. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/manifest.json +0 -49
  454. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/__init__.py +0 -0
  455. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/__init__.py +0 -0
  456. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/brd.md +0 -19
  457. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/design.md +0 -32
  458. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/security.md +0 -23
  459. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/srs.md +0 -25
  460. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/test.md +0 -30
  461. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_checkpoint_merge.py +0 -1371
  462. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_decoupling_route_p149.py +0 -176
  463. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_gap_analyzer_batch_p149.py +0 -151
  464. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_hybrid_search.py +0 -799
  465. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_mcp_integration.py +0 -741
  466. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_merge_ranking_p149.py +0 -98
  467. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_modality_mismatch_p149.py +0 -171
  468. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase117_118_storage.py +0 -350
  469. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase121_short_circuit.py +0 -732
  470. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase18_workflow.py +0 -223
  471. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase48_e2e_verification.py +0 -763
  472. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase81_doc_anchor_regression.py +0 -252
  473. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_provider_failure_finding_p149.py +0 -339
  474. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_readiness_e2e.py +0 -430
  475. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_refined_workflow.py +0 -1180
  476. package/tools/vds-scripts/audit_orchestrator/tests/pdf/__init__.py +0 -0
  477. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/__init__.py +0 -0
  478. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/department_renderer.md +0 -24
  479. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/project_renderer.md +0 -8
  480. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/repo_renderer.md +0 -10
  481. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_department_pdf.py +0 -112
  482. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_e2e_pdf.py +0 -135
  483. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_idempotency.py +0 -45
  484. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_md_renderer.py +0 -46
  485. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_cmds.py +0 -97
  486. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_snapshot.py +0 -77
  487. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_writer.py +0 -65
  488. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_project_builder.py +0 -199
  489. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_public_api.py +0 -135
  490. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_repo_builder.py +0 -246
  491. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_workflow_pdf_flags.py +0 -36
  492. package/tools/vds-scripts/audit_orchestrator/tests/property/__init__.py +0 -0
  493. package/tools/vds-scripts/audit_orchestrator/tests/property/test_properties.py +0 -807
  494. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/__init__.py +0 -0
  495. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agent_error_compat.py +0 -38
  496. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agentic_skill_policy_skip.py +0 -234
  497. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_event_stream_logging.py +0 -785
  498. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_timeout_policy.py +0 -277
  499. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_trace_payload_sanitization.py +0 -92
  500. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent.py +0 -2311
  501. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent_re_exports.py +0 -25
  502. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_analysis_helpers.py +0 -94
  503. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_create_audit_agent_reasoning_effort.py +0 -69
  504. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_docs_agent.py +0 -2044
  505. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_langgraph_workflow_efficiency_metrics.py +0 -71
  506. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_output_validators.py +0 -317
  507. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_phase41_toolsets.py +0 -6427
  508. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_ai_models.py +0 -1219
  509. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_base_url_resolution.py +0 -84
  510. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_security_agent.py +0 -2069
  511. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_skill_manager_focus.py +0 -439
  512. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_synthesis_agent.py +0 -1195
  513. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_tool_efficiency_guard_fr120.py +0 -683
  514. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_toolsets.py +0 -716
  515. package/tools/vds-scripts/audit_orchestrator/tests/test_aggregator_p149.py +0 -171
  516. package/tools/vds-scripts/audit_orchestrator/tests/test_alembic_migrations.py +0 -287
  517. package/tools/vds-scripts/audit_orchestrator/tests/test_anchor_allowlist_p149.py +0 -273
  518. package/tools/vds-scripts/audit_orchestrator/tests/test_audit_otel.py +0 -283
  519. package/tools/vds-scripts/audit_orchestrator/tests/test_checklist_models.py +0 -583
  520. package/tools/vds-scripts/audit_orchestrator/tests/test_checks/__init__.py +0 -0
  521. package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_base_check.py +0 -211
  522. package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_llm_checks.py +0 -126
  523. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/__init__.py +0 -0
  524. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_analyze_command.py +0 -400
  525. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_archive_stale_page_cli.py +0 -217
  526. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_bitbucket_metadata_cli.py +0 -354
  527. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_cli_impl_profile_availability.py +0 -114
  528. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_codex_profile.py +0 -174
  529. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_compare_backends_cli.py +0 -449
  530. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_confluence_parent_auto_resolve.py +0 -451
  531. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_corpus_purge_cli.py +0 -290
  532. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_credentials_preflight.py +0 -106
  533. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_debug_bundle.py +0 -37
  534. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_deprecation_phase157.py +0 -484
  535. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_dispatch_concurrency_diagnostics.py +0 -758
  536. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_check_confluence_cli.py +0 -320
  537. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_codex.py +0 -187
  538. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_corpus_status_cli.py +0 -236
  539. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_correlation_cli.py +0 -128
  540. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_crawl_status_cli.py +0 -192
  541. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_credentials_cli.py +0 -86
  542. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_dispatch_status_cli.py +0 -421
  543. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_heartbeat_phase169.py +0 -173
  544. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_hierarchy_status_cli.py +0 -199
  545. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_locks_cli.py +0 -134
  546. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_logs_follow_cli.py +0 -305
  547. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_migration.py +0 -333
  548. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_profile_availability_cli.py +0 -151
  549. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_skills_policy_cli.py +0 -153
  550. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_evidence_quality_cli.py +0 -307
  551. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_debug_bundle_phase36.py +0 -60
  552. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_git_manifest_cli.py +0 -172
  553. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_file_removal_phase157e.py +0 -770
  554. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_grounding_classifier.py +0 -226
  555. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_logging.py +0 -49
  556. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_materials_cli.py +0 -9127
  557. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_metadata_completeness_phase92.py +0 -364
  558. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parent_dispatch_finalization_phase168f.py +0 -111
  559. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parse_cli.py +0 -590
  560. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase117_118_feature_flags.py +0 -219
  561. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase164_control_plane.py +0 -718
  562. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase165_runner_scripts.py +0 -230
  563. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_preparation_classifications.py +0 -146
  564. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_prepare_cli.py +0 -398
  565. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publication_quality_gate.py +0 -126
  566. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publish_system_doc_cli.py +0 -158
  567. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_query_checklist_cli.py +0 -219
  568. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli.py +0 -673
  569. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli_integration.py +0 -689
  570. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_removed_flags_phase92.py +0 -36
  571. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_report_cmds.py +0 -1317
  572. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_history_index.py +0 -57
  573. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_management.py +0 -1194
  574. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_runtime_profiles_cli.py +0 -1658
  575. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_smart_run_selection.py +0 -1562
  576. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_cli.py +0 -2467
  577. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_migration.py +0 -339
  578. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_sync_repos_debug_artifacts.py +0 -1109
  579. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_upload_results_cli.py +0 -809
  580. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist.py +0 -178
  581. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist_cli.py +0 -110
  582. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_spec_sync_cli.py +0 -519
  583. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_default_parameters_baseline.py +0 -101
  584. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_options.py +0 -7896
  585. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_db_modes.py +0 -6516
  586. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_project_scope.py +0 -831
  587. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_target.py +0 -611
  588. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_lifecycle.py +0 -2488
  589. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_scaffolding.py +0 -96
  590. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_row_key_guard.py +0 -78
  591. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_summary_artifacts.py +0 -1872
  592. package/tools/vds-scripts/audit_orchestrator/tests/test_cli_paths_phase2.py +0 -45
  593. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/__init__.py +0 -0
  594. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_bitbucket_cli_client.py +0 -124
  595. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_cli_parity.py +0 -110
  596. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_confluence_cli_client.py +0 -1149
  597. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_sonarqube_cli_client.py +0 -19
  598. package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/__init__.py +0 -0
  599. package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/test_linked_page_tracker.py +0 -118
  600. package/tools/vds-scripts/audit_orchestrator/tests/test_companion_context_service.py +0 -230
  601. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/__init__.py +0 -0
  602. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/conftest.py +0 -11
  603. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_compile_artifact.py +0 -465
  604. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique.py +0 -120
  605. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique_e2e.py +0 -75
  606. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_evaluation.py +0 -515
  607. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_runtime_loader.py +0 -537
  608. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_signatures_normalization.py +0 -172
  609. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/__init__.py +0 -0
  610. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_auditor_applicability.py +0 -68
  611. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_generator.py +0 -1252
  612. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_projection.py +0 -54
  613. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_confluence_checklist_projection_consistency.py +0 -1696
  614. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_critique_merger_matrix.py +0 -120
  615. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_check_rules.py +0 -459
  616. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_provider_critique.py +0 -55
  617. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_doc_loader.py +0 -73
  618. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_drift_detector.py +0 -34
  619. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_evidence_collectors.py +0 -93
  620. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_lease_timeout.py +0 -114
  621. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader.py +0 -350
  622. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader_parity.py +0 -179
  623. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_low_confidence_reeval.py +0 -691
  624. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase145a_completion.py +0 -209
  625. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase31_row_consistency_retry_benchmark.py +0 -150
  626. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_profile_detector.py +0 -286
  627. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_regression_guard.py +0 -53
  628. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_result_merger.py +0 -619
  629. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_evaluator.py +0 -15783
  630. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_failover.py +0 -215
  631. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_scorer.py +0 -597
  632. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_skill_breakdown_telemetry_fr137.py +0 -421
  633. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_targeted_auto_merge.py +0 -229
  634. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_failover.py +0 -488
  635. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_telemetry.py +0 -73
  636. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_validator.py +0 -419
  637. package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/__init__.py +0 -0
  638. package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/test_diff_detector.py +0 -111
  639. package/tools/vds-scripts/audit_orchestrator/tests/test_infra_persistence.py +0 -291
  640. package/tools/vds-scripts/audit_orchestrator/tests/test_integration/__init__.py +0 -0
  641. package/tools/vds-scripts/audit_orchestrator/tests/test_integration/test_phase3_integration.py +0 -516
  642. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/__init__.py +0 -0
  643. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cache.py +0 -670
  644. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_model_builder.py +0 -281
  645. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_oauth.py +0 -330
  646. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_streaming.py +0 -433
  647. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cost_tracker.py +0 -27
  648. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_engine.py +0 -876
  649. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_evaluator.py +0 -212
  650. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_instruction_templates.py +0 -639
  651. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompt_metadata.py +0 -97
  652. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompts.py +0 -660
  653. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider.py +0 -330
  654. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider_contract_sync.py +0 -18
  655. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_reasoning_effort_validation.py +0 -565
  656. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_schemas.py +0 -827
  657. package/tools/vds-scripts/audit_orchestrator/tests/test_logging_config.py +0 -297
  658. package/tools/vds-scripts/audit_orchestrator/tests/test_models/__init__.py +0 -0
  659. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_enums.py +0 -185
  660. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_findings.py +0 -1159
  661. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_project_profile.py +0 -307
  662. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_registry.py +0 -532
  663. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_template.py +0 -708
  664. package/tools/vds-scripts/audit_orchestrator/tests/test_observability/__init__.py +0 -0
  665. package/tools/vds-scripts/audit_orchestrator/tests/test_observability/test_metrics.py +0 -60
  666. package/tools/vds-scripts/audit_orchestrator/tests/test_paths_config_phase2.py +0 -21
  667. package/tools/vds-scripts/audit_orchestrator/tests/test_performance/__init__.py +0 -0
  668. package/tools/vds-scripts/audit_orchestrator/tests/test_performance/test_fr79_performance_guardrails.py +0 -199
  669. package/tools/vds-scripts/audit_orchestrator/tests/test_phase156_hardening.py +0 -498
  670. package/tools/vds-scripts/audit_orchestrator/tests/test_phase93_regression_guards.py +0 -123
  671. package/tools/vds-scripts/audit_orchestrator/tests/test_pipeline_integration.py +0 -517
  672. package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/__init__.py +0 -0
  673. package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/test_detection.py +0 -146
  674. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/__init__.py +0 -0
  675. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_bitbucket_link_resolver.py +0 -55
  676. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer.py +0 -84
  677. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer_projection.py +0 -97
  678. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_macros.py +0 -58
  679. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_publisher.py +0 -2171
  680. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_evidence_links.py +0 -129
  681. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_field_sanitizer.py +0 -108
  682. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_hierarchy_publisher.py +0 -134
  683. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_incremental_plan_parser.py +0 -62
  684. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_live_data_injector.py +0 -48
  685. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_macro_builder.py +0 -22
  686. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_p161_confluence_optimization.py +0 -168
  687. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_priority_renderer.py +0 -96
  688. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_project_aggregate_renderer.py +0 -364
  689. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_storage_validation.py +0 -273
  690. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_summary_refactor.py +0 -118
  691. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_system_doc_hierarchy.py +0 -50
  692. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_table_builder.py +0 -23
  693. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_vietnamese_templates.py +0 -37
  694. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_wiring_integration.py +0 -290
  695. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/__init__.py +0 -0
  696. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_aggregation_report.py +0 -181
  697. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_checklist_generator.py +0 -258
  698. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_gap_report.py +0 -73
  699. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_json_generator.py +0 -317
  700. package/tools/vds-scripts/audit_orchestrator/tests/test_result_merger_p149.py +0 -347
  701. package/tools/vds-scripts/audit_orchestrator/tests/test_route_mode_p149.py +0 -178
  702. package/tools/vds-scripts/audit_orchestrator/tests/test_rubric_parser.py +0 -179
  703. package/tools/vds-scripts/audit_orchestrator/tests/test_scorer.py +0 -110
  704. package/tools/vds-scripts/audit_orchestrator/tests/test_state/__init__.py +0 -0
  705. package/tools/vds-scripts/audit_orchestrator/tests/test_state/test_sparse_coverage.py +0 -117
  706. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/__init__.py +0 -0
  707. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_langgraph_workflow.py +0 -2072
  708. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_p161_runtime_hardening.py +0 -341
  709. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p149.py +0 -112
  710. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p172.py +0 -126
  711. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_guidance_p150.py +0 -95
  712. package/tools/vds-scripts/audit_orchestrator/tests/unit/__init__.py +0 -0
  713. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/__init__.py +0 -0
  714. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_agentic_investigator_phase115.py +0 -42
  715. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_requirement_analysis_agent.py +0 -412
  716. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_agent_updates.py +0 -131
  717. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_scanner.py +0 -397
  718. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_executor.py +0 -316
  719. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_fallback.py +0 -299
  720. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_policy.py +0 -520
  721. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_telemetry.py +0 -306
  722. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_synthesis_fixes.py +0 -761
  723. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_argument_robustness.py +0 -272
  724. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry.py +0 -2548
  725. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_ast_grep.py +0 -87
  726. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase123_scoping.py +0 -353
  727. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase94_ff.py +0 -445
  728. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_vector_search_phase115.py +0 -35
  729. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_utils.py +0 -1007
  730. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_vector_evidence_toolset.py +0 -622
  731. package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/__init__.py +0 -0
  732. package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/test_workflow_cli.py +0 -123
  733. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/__init__.py +0 -0
  734. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_cache_guard.py +0 -479
  735. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_checklist_parser_phase120.py +0 -55
  736. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_diagram_extractor.py +0 -467
  737. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_enrichment_extractor.py +0 -59
  738. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_graphify_collector.py +0 -158
  739. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/__init__.py +0 -0
  740. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_completeness.py +0 -563
  741. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_freshness_evaluator.py +0 -493
  742. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_cache_metrics.py +0 -365
  743. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_completeness_service.py +0 -2736
  744. package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/__init__.py +0 -0
  745. package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_discovery.py +0 -47
  746. package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_redaction.py +0 -15
  747. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/__init__.py +0 -0
  748. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_ad_hoc_analyzer.py +0 -576
  749. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_agent_loop.py +0 -1896
  750. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_anchor_filter_cl003.py +0 -181
  751. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_evidence_cache.py +0 -155
  752. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_processor.py +0 -3608
  753. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_contract.py +0 -55
  754. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_scoping.py +0 -371
  755. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_companion_phase123.py +0 -142
  756. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_evidence_phase123.py +0 -249
  757. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_confluence_checklist_contract_export_parity.py +0 -813
  758. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_cross_repo_config_phase122.py +0 -613
  759. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_dspy_requirement_classifier.py +0 -517
  760. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_diversity.py +0 -144
  761. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_truncation.py +0 -108
  762. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_grounding_validator.py +0 -127
  763. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_guidance_injection_phase120.py +0 -105
  764. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_analysis_phase122.py +0 -761
  765. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_pre_filter_phase167.py +0 -334
  766. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_llm_row_evaluator_retries.py +0 -3684
  767. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_loader_phase123.py +0 -345
  768. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_manual_check_gating_phase122.py +0 -474
  769. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_parallel_eval.py +0 -263
  770. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase122_verifier_phase122.py +0 -169
  771. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase166_route_failover.py +0 -437
  772. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_post_eval_cl003_shared_lib.py +0 -267
  773. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_postproc_streaming.py +0 -194
  774. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_pre_eval_gating_phase122.py +0 -362
  775. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_prepare_topology_coverage.py +0 -247
  776. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_private_dns_sanitization_phase104.py +0 -397
  777. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_evidence_context.py +0 -450
  778. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_knowledge_store.py +0 -487
  779. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_topology.py +0 -1142
  780. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_provider_failure_classifier.py +0 -195
  781. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_extractor.py +0 -496
  782. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_synthesizer.py +0 -653
  783. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_repo_type_classifier.py +0 -303
  784. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis.py +0 -508
  785. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_execution_scope.py +0 -239
  786. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase114.py +0 -919
  787. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase115.py +0 -97
  788. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_shared_lib.py +0 -340
  789. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_drift.py +0 -729
  790. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_nlp.py +0 -670
  791. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_scope_phase122.py +0 -615
  792. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_matrix.py +0 -258
  793. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_override.py +0 -141
  794. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_routing_precision.py +0 -650
  795. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_dual_evidence.py +0 -2987
  796. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_instruction_runtime_phase122.py +0 -365
  797. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_runtime.py +0 -830
  798. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_runtime_hardening_phase122.py +0 -225
  799. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoped_na_skip.py +0 -107
  800. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoring_enhancements.py +0 -404
  801. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_retrieval_phase123.py +0 -441
  802. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_routing_phase123.py +0 -279
  803. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_resource_indexing_phase122.py +0 -188
  804. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_recommendation.py +0 -225
  805. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_routing_cl003_shared_lib.py +0 -338
  806. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skills_toolset.py +0 -319
  807. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_stability_metric.py +0 -60
  808. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_target_selector.py +0 -958
  809. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_tracker.py +0 -121
  810. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_wiring.py +0 -119
  811. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_tool_first_planner.py +0 -7103
  812. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_knowledge_persistence.py +0 -332
  813. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_query_service.py +0 -55
  814. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_unverified_ref_retry.py +0 -909
  815. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/__init__.py +0 -0
  816. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_evidence.py +0 -515
  817. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_gaps.py +0 -422
  818. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_readiness.py +0 -428
  819. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/__init__.py +0 -0
  820. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_confluence_hierarchy.py +0 -227
  821. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_project_title_generation.py +0 -335
  822. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_helpers.py +0 -290
  823. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_integration.py +0 -557
  824. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_readiness_renderer.py +0 -381
  825. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_repo_title_consistency.py +0 -266
  826. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_upload_hierarchy_integration.py +0 -470
  827. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/__init__.py +0 -0
  828. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_dspy.py +0 -177
  829. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_nlp_accuracy.py +0 -72
  830. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_retrieval_modes.py +0 -123
  831. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_verify_phase111_requirement_analysis.py +0 -409
  832. package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/__init__.py +0 -0
  833. package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_chain_cli.py +0 -277
  834. package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_loader.py +0 -502
  835. package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/__init__.py +0 -0
  836. package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/test_skill_routing.py +0 -209
  837. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/__init__.py +0 -0
  838. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_bitbucket_source.py +0 -66
  839. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_non_retryable_markers.py +0 -88
  840. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_repo_info.py +0 -212
  841. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/__init__.py +0 -0
  842. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_completeness.py +0 -598
  843. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_events_contract_phase169.py +0 -100
  844. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_hardening_phase158.py +0 -392
  845. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_persistence_phase157.py +0 -914
  846. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_embedding_client.py +0 -64
  847. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_get_latest_completed_run.py +0 -313
  848. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_heartbeat_phase169.py +0 -109
  849. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_hybrid_search.py +0 -398
  850. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_normalize_url.py +0 -262
  851. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase152_query_surface.py +0 -59
  852. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase98_confluence_document_model.py +0 -202
  853. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_published_pages.py +0 -754
  854. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_readiness_helpers.py +0 -193
  855. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_ledger.py +0 -522
  856. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_management.py +0 -378
  857. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_schema_contract_phase170.py +0 -755
  858. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_cmds.py +0 -231
  859. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_loaders.py +0 -2151
  860. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_run_api.py +0 -2226
  861. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store.py +0 -1435
  862. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch.py +0 -646
  863. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch_status_view.py +0 -181
  864. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_scope.py +0 -213
  865. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_utilization_persist_phase169.py +0 -77
  866. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vds_search.py +0 -263
  867. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_api.py +0 -319
  868. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_runtime.py +0 -175
  869. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_store.py +0 -1756
  870. package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/__init__.py +0 -0
  871. package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/test_repo_sync.py +0 -257
  872. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_artifact_exclusion.py +0 -119
  873. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_auto_promote_phase158.py +0 -337
  874. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_carry_forward_artifact_filtering.py +0 -317
  875. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_checklist_precache_p160a.py +0 -416
  876. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_cli_decomposition_fr219.py +0 -269
  877. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_code_chunk_carry_forward.py +0 -203
  878. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_coherence.py +0 -180
  879. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_secret_policy.py +0 -522
  880. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_project_id_migration.py +0 -318
  881. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_status_diagnostics.py +0 -239
  882. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_department_priority_ordering.py +0 -131
  883. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_coordinator_phase158.py +0 -402
  884. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_job_identity_p167a.py +0 -238
  885. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_ramp_up_phase171.py +0 -434
  886. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatcher.py +0 -911
  887. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_doc_type_en_inference.py +0 -246
  888. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_early_exit_unchunked_repos.py +0 -111
  889. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors.py +0 -237
  890. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors_taxonomy.py +0 -83
  891. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_chunking_config_phase98.py +0 -73
  892. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_cmds_state_helpers.py +0 -33
  893. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_docs_code_chunking.py +0 -260
  894. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_finalize_dispatch_run_phase168.py +0 -341
  895. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_identity.py +0 -221
  896. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_infrastructure_detection.py +0 -441
  897. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_junction_table_phase95.py +0 -259
  898. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_late_binding_assignment_p167c.py +0 -286
  899. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_misc_cmds_fr224_225_hardening.py +0 -194
  900. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_p172_integration.py +0 -306
  901. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_parent_provider_preflight.py +0 -118
  902. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase92.py +0 -141
  903. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase93.py +0 -50
  904. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase115_search_strategy.py +0 -106
  905. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase154_title_consistency.py +0 -117
  906. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase155_param_forwarding.py +0 -304
  907. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase158_concurrency_defaults.py +0 -207
  908. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_doctor_schema.py +0 -319
  909. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_regression.py +0 -334
  910. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase94_corpus_lifecycle.py +0 -307
  911. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase96_repo_key_migration.py +0 -305
  912. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_pipelined_scheduling.py +0 -130
  913. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_availability_probe.py +0 -616
  914. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_aware_row_timeout.py +0 -102
  915. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_timeout_stagger_p160cd.py +0 -205
  916. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_progress_summary_phase169.py +0 -96
  917. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_registry_checklist_diagnostics.py +0 -124
  918. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_resume_manifest_p167b.py +0 -268
  919. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_risk_mitigations_p160e1.py +0 -348
  920. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_single_row_shards_p160b.py +0 -357
  921. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_state_repo_discovery.py +0 -504
  922. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_sync_metadata_entries.py +0 -57
  923. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_task_models.py +0 -1796
  924. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_utilization_telemetry_p167e.py +0 -259
  925. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_vietnamese_fts_hardening.py +0 -160
  926. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_phase98_enrichment.py +0 -92
  927. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_project_merge_materialization.py +0 -322
  928. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_row_key_migration_guard.py +0 -88
  929. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_short_circuit_phase121.py +0 -564
  930. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_single_target_row_context.py +0 -49
  931. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_zero_result_messaging.py +0 -76
  932. package/tools/vds-scripts/bandit-report.json +0 -2974
  933. package/tools/vds-scripts/brd_orchestrator/README.md +0 -29
  934. package/tools/vds-scripts/brd_orchestrator/pyproject.toml +0 -63
  935. package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/__init__.py +0 -17
  936. package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/cli.py +0 -187
  937. package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/validator.py +0 -121
  938. package/tools/vds-scripts/brd_orchestrator/tests/__init__.py +0 -0
  939. package/tools/vds-scripts/brd_orchestrator/tests/test_cli.py +0 -62
  940. package/tools/vds-scripts/brd_orchestrator/tests/test_validator.py +0 -33
  941. package/tools/vds-scripts/circular_dependency_orchestrator/README.md +0 -30
  942. package/tools/vds-scripts/circular_dependency_orchestrator/pyproject.toml +0 -43
  943. package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/__init__.py +0 -16
  944. package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/cli.py +0 -904
  945. package/tools/vds-scripts/circular_dependency_orchestrator/tests/__init__.py +0 -0
  946. package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/__init__.py +0 -0
  947. package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/test_cli.py +0 -354
  948. package/tools/vds-scripts/coverage.json +0 -1
  949. package/tools/vds-scripts/create_pr.py +0 -57
  950. package/tools/vds-scripts/diagram_generator/README.md +0 -663
  951. package/tools/vds-scripts/diagram_generator/ci_validate.sh +0 -16
  952. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.png +0 -0
  953. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.puml +0 -23
  954. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.png +0 -0
  955. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.puml +0 -21
  956. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.png +0 -0
  957. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.puml +0 -14
  958. package/tools/vds-scripts/diagram_generator/examples/github-actions-validate.yml +0 -39
  959. package/tools/vds-scripts/diagram_generator/generate_all_diagrams.py +0 -827
  960. package/tools/vds-scripts/diagram_generator/generate_insurance_c4_diagrams.py +0 -261
  961. package/tools/vds-scripts/diagram_generator/generate_insurance_c4_quick.py +0 -486
  962. package/tools/vds-scripts/diagram_generator/pyproject.toml +0 -28
  963. package/tools/vds-scripts/diagram_generator/render_png.py +0 -59
  964. package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/__init__.py +0 -3
  965. package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/cli.py +0 -50
  966. package/tools/vds-scripts/diagram_generator/test_c4_hierarchical.py +0 -142
  967. package/tools/vds-scripts/diagram_generator/test_c4_quick.py +0 -131
  968. package/tools/vds-scripts/diagram_generator/tests/__init__.py +0 -0
  969. package/tools/vds-scripts/diagram_generator/tests/test_analyzer_completeness.py +0 -260
  970. package/tools/vds-scripts/diagram_generator/tests/test_c4_syntax_correctness.py +0 -138
  971. package/tools/vds-scripts/diagram_generator/tests/test_component_coverage.py +0 -182
  972. package/tools/vds-scripts/diagram_generator/tests/test_mermaid_output.py +0 -80
  973. package/tools/vds-scripts/diagram_generator/tests/test_png_generation.py +0 -112
  974. package/tools/vds-scripts/diagram_generator/tests/test_scenario_templates.py +0 -15
  975. package/tools/vds-scripts/diagram_generator/tests/test_sequence_accuracy.py +0 -93
  976. package/tools/vds-scripts/diagram_generator/tests/test_structurizr_export.py +0 -177
  977. package/tools/vds-scripts/diagram_generator/tests/test_style_consistency.py +0 -174
  978. package/tools/vds-scripts/diagram_generator/tests/test_usecase_generator.py +0 -201
  979. package/tools/vds-scripts/diagram_generator/tests/test_usecase_integration.py +0 -124
  980. package/tools/vds-scripts/docker/compose.phase2-verification.yml +0 -31
  981. package/tools/vds-scripts/docker-compose.openapi-validator.yml +0 -14
  982. package/tools/vds-scripts/excel_orchestrator/README.md +0 -288
  983. package/tools/vds-scripts/excel_orchestrator/RESEARCH_BASED_UPDATES_REPORT.md +0 -261
  984. package/tools/vds-scripts/excel_orchestrator/add_essential_missing_effort.py +0 -255
  985. package/tools/vds-scripts/excel_orchestrator/adjust_effort_complexity.py +0 -184
  986. package/tools/vds-scripts/excel_orchestrator/brd_analysis_and_task_breakdown.py +0 -632
  987. package/tools/vds-scripts/excel_orchestrator/brd_analysis_comprehensive.py +0 -1029
  988. package/tools/vds-scripts/excel_orchestrator/check_overlaps_and_brd_coverage.py +0 -570
  989. package/tools/vds-scripts/excel_orchestrator/clean_remarks_column.py +0 -127
  990. package/tools/vds-scripts/excel_orchestrator/comprehensive_brd_check.py +0 -322
  991. package/tools/vds-scripts/excel_orchestrator/create_buffered_summary.py +0 -119
  992. package/tools/vds-scripts/excel_orchestrator/create_service_totals_sheet.py +0 -118
  993. package/tools/vds-scripts/excel_orchestrator/examples/basic_operations.py +0 -85
  994. package/tools/vds-scripts/excel_orchestrator/expand_all_tasks.py +0 -341
  995. package/tools/vds-scripts/excel_orchestrator/expand_tasks.py +0 -304
  996. package/tools/vds-scripts/excel_orchestrator/fill_brd_references.py +0 -347
  997. package/tools/vds-scripts/excel_orchestrator/fill_remarks_and_colors.py +0 -132
  998. package/tools/vds-scripts/excel_orchestrator/finalize_brd_and_cleanup.py +0 -295
  999. package/tools/vds-scripts/excel_orchestrator/finalize_brd_coverage.py +0 -327
  1000. package/tools/vds-scripts/excel_orchestrator/fix_all_formulas.py +0 -99
  1001. package/tools/vds-scripts/excel_orchestrator/fix_detail_presentation.py +0 -113
  1002. package/tools/vds-scripts/excel_orchestrator/fix_presentation_and_effort.py +0 -116
  1003. package/tools/vds-scripts/excel_orchestrator/fix_presentation_consistency.py +0 -231
  1004. package/tools/vds-scripts/excel_orchestrator/fix_remarks_matching.py +0 -179
  1005. package/tools/vds-scripts/excel_orchestrator/group_tasks_by_service_id.py +0 -210
  1006. package/tools/vds-scripts/excel_orchestrator/increase_brd_coverage.py +0 -497
  1007. package/tools/vds-scripts/excel_orchestrator/increase_effort_complexity.py +0 -155
  1008. package/tools/vds-scripts/excel_orchestrator/organize_and_deduplicate.py +0 -273
  1009. package/tools/vds-scripts/excel_orchestrator/pyproject.toml +0 -64
  1010. package/tools/vds-scripts/excel_orchestrator/rebuild_all_formulas.py +0 -146
  1011. package/tools/vds-scripts/excel_orchestrator/remove_base_multiplier_and_check_duplicates.py +0 -310
  1012. package/tools/vds-scripts/excel_orchestrator/remove_duplicate_brd_tasks.py +0 -137
  1013. package/tools/vds-scripts/excel_orchestrator/research_based_updates.py +0 -457
  1014. package/tools/vds-scripts/excel_orchestrator/restore_e_values.py +0 -172
  1015. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/__init__.py +0 -5
  1016. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/cli.py +0 -746
  1017. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/config.py +0 -74
  1018. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/converters.py +0 -226
  1019. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/errors.py +0 -88
  1020. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/excel_client.py +0 -443
  1021. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/formatters.py +0 -211
  1022. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/logging.py +0 -57
  1023. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/source_contract.py +0 -29
  1024. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/target_state_status.py +0 -837
  1025. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/ulnc_alignment.py +0 -1291
  1026. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/validators.py +0 -164
  1027. package/tools/vds-scripts/excel_orchestrator/sync_detail_and_total_sheets.py +0 -211
  1028. package/tools/vds-scripts/excel_orchestrator/tests/__init__.py +0 -1
  1029. package/tools/vds-scripts/excel_orchestrator/tests/conftest.py +0 -36
  1030. package/tools/vds-scripts/excel_orchestrator/tests/test_cli.py +0 -383
  1031. package/tools/vds-scripts/excel_orchestrator/tests/test_excel_client.py +0 -129
  1032. package/tools/vds-scripts/excel_orchestrator/tests/test_ulnc_alignment.py +0 -373
  1033. package/tools/vds-scripts/excel_orchestrator/tests/test_validators.py +0 -64
  1034. package/tools/vds-scripts/excel_orchestrator/update_api_database_effort.py +0 -261
  1035. package/tools/vds-scripts/excel_orchestrator/update_buffers_inline.py +0 -115
  1036. package/tools/vds-scripts/excel_orchestrator/update_complex_services_and_add_new.py +0 -336
  1037. package/tools/vds-scripts/excel_orchestrator/update_responsibility_and_fix_rows.py +0 -208
  1038. package/tools/vds-scripts/excel_orchestrator/update_task_breakdown_vietnamese.py +0 -309
  1039. package/tools/vds-scripts/excel_orchestrator/update_vietnamese_and_responsibility.py +0 -415
  1040. package/tools/vds-scripts/excel_orchestrator/verify_brd_coverage_comprehensive.py +0 -401
  1041. package/tools/vds-scripts/hexagonal_orchestrator/README.md +0 -530
  1042. package/tools/vds-scripts/hexagonal_orchestrator/pyproject.toml +0 -48
  1043. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/__init__.py +0 -39
  1044. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/__init__.py +0 -19
  1045. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/base.py +0 -95
  1046. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/fallback.py +0 -614
  1047. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/java.py +0 -372
  1048. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/python.py +0 -437
  1049. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cache.py +0 -331
  1050. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/classifier.py +0 -263
  1051. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cli.py +0 -554
  1052. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/config.py +0 -577
  1053. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/models.py +0 -159
  1054. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/profiler.py +0 -451
  1055. package/tools/vds-scripts/hexagonal_orchestrator/test-config.yaml +0 -38
  1056. package/tools/vds-scripts/hexagonal_orchestrator/tests/__init__.py +0 -1
  1057. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/__init__.py +0 -1
  1058. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driven/persistence/InMemoryUserRepository.java +0 -62
  1059. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driving/api/UserController.java +0 -101
  1060. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/EmailService.java +0 -33
  1061. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/UserRepository.java +0 -45
  1062. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/usecase/CreateUser.java +0 -58
  1063. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/Email.java +0 -80
  1064. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/User.java +0 -98
  1065. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-noncompliant/domain/User.java +0 -64
  1066. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Menu.java +0 -13
  1067. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Product.java +0 -16
  1068. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/__init__.py +0 -1
  1069. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/__init__.py +0 -1
  1070. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/__init__.py +0 -1
  1071. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/email_service.py +0 -60
  1072. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/user_repository.py +0 -78
  1073. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/__init__.py +0 -1
  1074. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/__init__.py +0 -1
  1075. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/user.py +0 -56
  1076. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/__init__.py +0 -1
  1077. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/email.py +0 -63
  1078. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/application/user_service.py +0 -1837
  1079. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/domain/user.py +0 -43
  1080. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cache.py +0 -458
  1081. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_integration.py +0 -942
  1082. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_unit.py +0 -557
  1083. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cross_repo_pollution.py +0 -275
  1084. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_foundation.py +0 -129
  1085. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_integration.py +0 -1524
  1086. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_java_analyzer.py +0 -642
  1087. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_timing_unit.py +0 -60
  1088. package/tools/vds-scripts/intellij_orchestrator/README.md +0 -55
  1089. package/tools/vds-scripts/intellij_orchestrator/pyproject.toml +0 -64
  1090. package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/__init__.py +0 -17
  1091. package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/cli.py +0 -210
  1092. package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/core.py +0 -260
  1093. package/tools/vds-scripts/intellij_orchestrator/tests/__init__.py +0 -1
  1094. package/tools/vds-scripts/intellij_orchestrator/tests/test_cli.py +0 -112
  1095. package/tools/vds-scripts/intellij_orchestrator/tests/test_core.py +0 -83
  1096. package/tools/vds-scripts/links_orchestrator/README.md +0 -63
  1097. package/tools/vds-scripts/links_orchestrator/pyproject.toml +0 -64
  1098. package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/__init__.py +0 -10
  1099. package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/cli.py +0 -254
  1100. package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/validator.py +0 -244
  1101. package/tools/vds-scripts/links_orchestrator/tests/__init__.py +0 -0
  1102. package/tools/vds-scripts/links_orchestrator/tests/test_cli.py +0 -128
  1103. package/tools/vds-scripts/links_orchestrator/tests/test_validator.py +0 -76
  1104. package/tools/vds-scripts/lsp_orchestrator/.dockerignore +0 -69
  1105. package/tools/vds-scripts/lsp_orchestrator/ARCHITECTURE.md +0 -383
  1106. package/tools/vds-scripts/lsp_orchestrator/CODE_QUALITY_IMPROVEMENTS.md +0 -196
  1107. package/tools/vds-scripts/lsp_orchestrator/COMMANDS.md +0 -870
  1108. package/tools/vds-scripts/lsp_orchestrator/Dockerfile +0 -59
  1109. package/tools/vds-scripts/lsp_orchestrator/IMPLEMENTATION_SUMMARY.md +0 -490
  1110. package/tools/vds-scripts/lsp_orchestrator/LSP_ISSUES_AND_FINDINGS.md +0 -380
  1111. package/tools/vds-scripts/lsp_orchestrator/README.md +0 -616
  1112. package/tools/vds-scripts/lsp_orchestrator/SETUP.md +0 -143
  1113. package/tools/vds-scripts/lsp_orchestrator/TEST_COVERAGE_SUMMARY.md +0 -255
  1114. package/tools/vds-scripts/lsp_orchestrator/VERIFICATION_CHECKLIST.md +0 -814
  1115. package/tools/vds-scripts/lsp_orchestrator/docker-compose.yml +0 -102
  1116. package/tools/vds-scripts/lsp_orchestrator/docs/FOR_LLMS.md +0 -401
  1117. package/tools/vds-scripts/lsp_orchestrator/docs/explanation/lsp-response-matching.md +0 -79
  1118. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/automate-with-json.md +0 -159
  1119. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/docker-mode.md +0 -256
  1120. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/navigate-code.md +0 -116
  1121. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/parallel-processing.md +0 -179
  1122. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/project-tool-detection.md +0 -320
  1123. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/type-check-code.md +0 -46
  1124. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/use-daemon-mode.md +0 -78
  1125. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/wsl2-optimization.md +0 -227
  1126. package/tools/vds-scripts/lsp_orchestrator/docs/index.md +0 -88
  1127. package/tools/vds-scripts/lsp_orchestrator/docs/operator-hover-definition.md +0 -143
  1128. package/tools/vds-scripts/lsp_orchestrator/docs/reference/commands.md +0 -581
  1129. package/tools/vds-scripts/lsp_orchestrator/docs/reference/configuration.md +0 -422
  1130. package/tools/vds-scripts/lsp_orchestrator/docs/tutorials/00-quick-start.md +0 -169
  1131. package/tools/vds-scripts/lsp_orchestrator/pyproject.toml +0 -63
  1132. package/tools/vds-scripts/lsp_orchestrator/src/test_file.py +0 -5
  1133. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/__init__.py +0 -3
  1134. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/aggregator.py +0 -340
  1135. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/basedpyright_runner.py +0 -167
  1136. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/cli.py +0 -3370
  1137. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/code_actions.py +0 -79
  1138. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/core.py +0 -3295
  1139. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_client.py +0 -672
  1140. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_manager.py +0 -577
  1141. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_server.py +0 -1040
  1142. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/__init__.py +0 -9
  1143. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/project_detector.py +0 -537
  1144. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/formatters.py +0 -141
  1145. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ipc_protocol.py +0 -225
  1146. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_client.py +0 -957
  1147. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_router.py +0 -335
  1148. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mcp_server.py +0 -181
  1149. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/__init__.py +0 -201
  1150. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_detector.py +0 -646
  1151. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_tools.py +0 -114
  1152. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models.py +0 -399
  1153. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mypy_runner.py +0 -209
  1154. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/protocols.py +0 -52
  1155. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_lsp_client.py +0 -109
  1156. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_runner.py +0 -44
  1157. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/utils.py +0 -959
  1158. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/workspace_indexer.py +0 -1037
  1159. package/tools/vds-scripts/lsp_orchestrator/test_workspace_lsp.py +0 -6
  1160. package/tools/vds-scripts/lsp_orchestrator/tests/__init__.py +0 -1
  1161. package/tools/vds-scripts/lsp_orchestrator/tests/conftest.py +0 -6
  1162. package/tools/vds-scripts/lsp_orchestrator/tests/test_aggregator.py +0 -59
  1163. package/tools/vds-scripts/lsp_orchestrator/tests/test_cli.py +0 -111
  1164. package/tools/vds-scripts/lsp_orchestrator/tests/test_detect_tools_command.py +0 -186
  1165. package/tools/vds-scripts/lsp_orchestrator/tests/test_formatter_linter_detection.py +0 -519
  1166. package/tools/vds-scripts/lsp_orchestrator/tests/test_integration_phase9_10_11.py +0 -367
  1167. package/tools/vds-scripts/lsp_orchestrator/tests/test_mypy_runner.py +0 -482
  1168. package/tools/vds-scripts/lsp_orchestrator/tests/test_package_manager_detection.py +0 -399
  1169. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase10.py +0 -389
  1170. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase11.py +0 -327
  1171. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase12_integration.py +0 -634
  1172. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase9.py +0 -196
  1173. package/tools/vds-scripts/lsp_orchestrator/tests/test_project_detector.py +0 -377
  1174. package/tools/vds-scripts/lsp_orchestrator/tests/test_test_runner_detection.py +0 -549
  1175. package/tools/vds-scripts/lsp_orchestrator/tests/test_type_checker_routing.py +0 -362
  1176. package/tools/vds-scripts/lsp_orchestrator/tests/test_workspace_indexer.py +0 -144
  1177. package/tools/vds-scripts/markdown_orchestrator/README.md +0 -72
  1178. package/tools/vds-scripts/markdown_orchestrator/pyproject.toml +0 -39
  1179. package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/__init__.py +0 -5
  1180. package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/cli.py +0 -102
  1181. package/tools/vds-scripts/multi_agent_orchestrator/Dockerfile +0 -65
  1182. package/tools/vds-scripts/multi_agent_orchestrator/README.md +0 -306
  1183. package/tools/vds-scripts/multi_agent_orchestrator/postman/README.md +0 -264
  1184. package/tools/vds-scripts/multi_agent_orchestrator/postman/TEST_RESULTS_SUMMARY.md +0 -197
  1185. package/tools/vds-scripts/multi_agent_orchestrator/postman/VDS-Multi-Agent-Orchestrator-API.postman_collection.json +0 -1010
  1186. package/tools/vds-scripts/multi_agent_orchestrator/postman/environments/local-development.postman_environment.json +0 -55
  1187. package/tools/vds-scripts/multi_agent_orchestrator/postman/test-results.json +0 -24146
  1188. package/tools/vds-scripts/multi_agent_orchestrator/pyproject.toml +0 -63
  1189. package/tools/vds-scripts/multi_agent_orchestrator/run_api.py +0 -9
  1190. package/tools/vds-scripts/multi_agent_orchestrator/run_mock_api.py +0 -9
  1191. package/tools/vds-scripts/multi_agent_orchestrator/simple_test.py +0 -53
  1192. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/__init__.py +0 -25
  1193. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/agent_pool.py +0 -433
  1194. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/__init__.py +0 -5
  1195. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/main.py +0 -722
  1196. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/mock_main.py +0 -812
  1197. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/change_log.py +0 -515
  1198. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/cli.py +0 -424
  1199. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/config.py +0 -220
  1200. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/conflict_resolver.py +0 -462
  1201. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/coordinator.py +0 -627
  1202. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/models.py +0 -389
  1203. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/progress_dashboard.py +0 -380
  1204. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/redis_client.py +0 -245
  1205. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/scheduler_subscriber.py +0 -272
  1206. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_manager.py +0 -536
  1207. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_tracking.py +0 -550
  1208. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/vds_ai_memory_client.py +0 -352
  1209. package/tools/vds-scripts/multi_agent_orchestrator/test_complete_system.py +0 -149
  1210. package/tools/vds-scripts/multi_agent_orchestrator/test_infrastructure_only.py +0 -194
  1211. package/tools/vds-scripts/multi_agent_orchestrator/test_integration.py +0 -108
  1212. package/tools/vds-scripts/multi_agent_orchestrator/tests/__init__.py +0 -1
  1213. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_agent_registration_credential_validator.py +0 -223
  1214. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_config.py +0 -210
  1215. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_models.py +0 -195
  1216. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_w9_agent_routes.py +0 -321
  1217. package/tools/vds-scripts/openapi_orchestrator/README.md +0 -197
  1218. package/tools/vds-scripts/openapi_orchestrator/pyproject.toml +0 -106
  1219. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/__init__.py +0 -29
  1220. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/cli.py +0 -345
  1221. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/full_validator.py +0 -183
  1222. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/spec_validator.py +0 -197
  1223. package/tools/vds-scripts/openapi_orchestrator/tests/__init__.py +0 -1
  1224. package/tools/vds-scripts/openapi_orchestrator/tests/test_cli.py +0 -234
  1225. package/tools/vds-scripts/openapi_orchestrator/tests/test_full_validator.py +0 -203
  1226. package/tools/vds-scripts/openapi_orchestrator/tests/test_spec_validator.py +0 -295
  1227. package/tools/vds-scripts/pdf_orchestrator/.dockerignore +0 -93
  1228. package/tools/vds-scripts/pdf_orchestrator/.env.example +0 -40
  1229. package/tools/vds-scripts/pdf_orchestrator/.ruff_rules.py +0 -350
  1230. package/tools/vds-scripts/pdf_orchestrator/.yamllint.yml +0 -43
  1231. package/tools/vds-scripts/pdf_orchestrator/DEVELOPMENT_PLAN.md +0 -80
  1232. package/tools/vds-scripts/pdf_orchestrator/Dockerfile +0 -87
  1233. package/tools/vds-scripts/pdf_orchestrator/README.md +0 -608
  1234. package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.md +0 -6
  1235. package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.pdf +0 -0
  1236. package/tools/vds-scripts/pdf_orchestrator/config/alertmanager.yml +0 -83
  1237. package/tools/vds-scripts/pdf_orchestrator/config/prometheus.prod.yml +0 -98
  1238. package/tools/vds-scripts/pdf_orchestrator/config/prometheus.yml +0 -40
  1239. package/tools/vds-scripts/pdf_orchestrator/config/redis.conf +0 -78
  1240. package/tools/vds-scripts/pdf_orchestrator/docs/COMPETITIVE_ANALYSIS_REPORT.md +0 -309
  1241. package/tools/vds-scripts/pdf_orchestrator/docs/FEATURES_GUIDE.md +0 -518
  1242. package/tools/vds-scripts/pdf_orchestrator/docs/MULTI_USER_DEPLOYMENT_GUIDE.md +0 -615
  1243. package/tools/vds-scripts/pdf_orchestrator/docs/USER_GUIDE.md +0 -829
  1244. package/tools/vds-scripts/pdf_orchestrator/pyproject.toml +0 -87
  1245. package/tools/vds-scripts/pdf_orchestrator/pytest.ini +0 -71
  1246. package/tools/vds-scripts/pdf_orchestrator/ruff.toml +0 -6
  1247. package/tools/vds-scripts/pdf_orchestrator/scripts/debug_security_report.py +0 -59
  1248. package/tools/vds-scripts/pdf_orchestrator/scripts/demo_library_selector.py +0 -109
  1249. package/tools/vds-scripts/pdf_orchestrator/scripts/generate_project_stats.py +0 -52
  1250. package/tools/vds-scripts/pdf_orchestrator/scripts/generate_styled_pdf.py +0 -95
  1251. package/tools/vds-scripts/pdf_orchestrator/scripts/migrate_render_pdfs.py +0 -285
  1252. package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.bat +0 -283
  1253. package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.sh +0 -324
  1254. package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/__init__.py +0 -5
  1255. package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/cli.py +0 -542
  1256. package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/config.py +0 -33
  1257. package/tools/vds-scripts/pdf_orchestrator/tests/README.md +0 -650
  1258. package/tools/vds-scripts/pdf_orchestrator/tests/__init__.py +0 -0
  1259. package/tools/vds-scripts/pdf_orchestrator/tests/conftest.py +0 -520
  1260. package/tools/vds-scripts/pdf_orchestrator/tests/requirements.txt +0 -51
  1261. package/tools/vds-scripts/pdf_orchestrator/tests/run_tests.py +0 -659
  1262. package/tools/vds-scripts/pdf_orchestrator/tests/test_config.py +0 -36
  1263. package/tools/vds-scripts/progress_report_orchestrator/Dockerfile +0 -77
  1264. package/tools/vds-scripts/progress_report_orchestrator/README.md +0 -39
  1265. package/tools/vds-scripts/progress_report_orchestrator/alembic/env.py +0 -42
  1266. package/tools/vds-scripts/progress_report_orchestrator/alembic/script.py.mako +0 -28
  1267. package/tools/vds-scripts/progress_report_orchestrator/alembic/versions/0001_initial_progress_schema.py +0 -180
  1268. package/tools/vds-scripts/progress_report_orchestrator/alembic.ini +0 -67
  1269. package/tools/vds-scripts/progress_report_orchestrator/pyproject.toml +0 -67
  1270. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/__init__.py +0 -3
  1271. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/__init__.py +0 -1
  1272. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/endpoint_scanner.py +0 -238
  1273. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/git_activity.py +0 -159
  1274. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/hexagonal.py +0 -100
  1275. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/test_scanner.py +0 -136
  1276. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/cli.py +0 -743
  1277. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/config.py +0 -50
  1278. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/__init__.py +0 -12
  1279. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/alembic_filters.py +0 -64
  1280. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/memory.py +0 -82
  1281. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/__init__.py +0 -1
  1282. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/analysis.py +0 -84
  1283. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/report.py +0 -117
  1284. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/topology.py +0 -101
  1285. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/__init__.py +0 -1
  1286. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/kg_parser.py +0 -252
  1287. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/uc_reader.py +0 -159
  1288. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/__init__.py +0 -1
  1289. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/concurrency.py +0 -39
  1290. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/llm_eval.py +0 -570
  1291. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/report.py +0 -1256
  1292. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/structural.py +0 -384
  1293. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/sync.py +0 -143
  1294. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/__init__.py +0 -5
  1295. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/engine.py +0 -105
  1296. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/templates.py +0 -236
  1297. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/scheduler_subscriber.py +0 -238
  1298. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/README.md +0 -56
  1299. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/__init__.py +0 -1
  1300. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-architecture-reviewer/SKILL.md +0 -67
  1301. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-endpoint-matcher/SKILL.md +0 -67
  1302. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/__init__.py +0 -1
  1303. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/schema.py +0 -625
  1304. package/tools/vds-scripts/progress_report_orchestrator/tests/__init__.py +0 -0
  1305. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/__init__.py +0 -0
  1306. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/.gitkeep +0 -0
  1307. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/__init__.py +0 -0
  1308. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/doc-dependencies.yaml +0 -79
  1309. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-docs.yaml +0 -478
  1310. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-services.yaml +0 -18
  1311. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/registry.yaml +0 -346
  1312. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/phase3_baseline_standard.md +0 -564
  1313. package/tools/vds-scripts/progress_report_orchestrator/tests/integration/__init__.py +0 -0
  1314. package/tools/vds-scripts/progress_report_orchestrator/tests/integration/test_checkpoint.py +0 -276
  1315. package/tools/vds-scripts/progress_report_orchestrator/tests/test_alembic_migrations.py +0 -265
  1316. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/__init__.py +0 -0
  1317. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_analyzers.py +0 -267
  1318. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_bounded_gather.py +0 -176
  1319. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_cli_phase_report.py +0 -119
  1320. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_delta.py +0 -169
  1321. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_error_handling.py +0 -150
  1322. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_gate_exit_codes.py +0 -230
  1323. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_git_activity.py +0 -215
  1324. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_kg_parser.py +0 -267
  1325. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_autodetect.py +0 -183
  1326. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_eval.py +0 -529
  1327. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_memory_integration.py +0 -151
  1328. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_migration_contract.py +0 -254
  1329. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_mode_rendering.py +0 -576
  1330. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_models.py +0 -251
  1331. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_progress_llm_config.py +0 -67
  1332. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_recommendations.py +0 -480
  1333. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_report_enhancements.py +0 -415
  1334. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_resume_reload.py +0 -343
  1335. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_trend_regression.py +0 -294
  1336. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_uc_reader.py +0 -169
  1337. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_valence_gap.py +0 -293
  1338. package/tools/vds-scripts/project-cycle-report.json +0 -14
  1339. package/tools/vds-scripts/project-dependency-graph.json +0 -11361
  1340. package/tools/vds-scripts/project-topology.json +0 -99
  1341. package/tools/vds-scripts/public_interface_boundary_orchestrator/pyproject.toml +0 -18
  1342. package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/__init__.py +0 -0
  1343. package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/cli.py +0 -232
  1344. package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/__init__.py +0 -0
  1345. package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/test_cli.py +0 -108
  1346. package/tools/vds-scripts/research_orchestrator/README.md +0 -68
  1347. package/tools/vds-scripts/research_orchestrator/py.typed +0 -0
  1348. package/tools/vds-scripts/research_orchestrator/pyproject.toml +0 -95
  1349. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/__init__.py +0 -3
  1350. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/_env.py +0 -11
  1351. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/cli.py +0 -335
  1352. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/config.py +0 -43
  1353. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/__init__.py +0 -0
  1354. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/models.py +0 -89
  1355. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/scoring.py +0 -102
  1356. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/exceptions.py +0 -78
  1357. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/http_client.py +0 -160
  1358. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/logging.py +0 -49
  1359. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/__init__.py +0 -0
  1360. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/formatters.py +0 -93
  1361. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/py.typed +0 -1
  1362. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/__init__.py +0 -0
  1363. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/build.py +0 -156
  1364. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/format.py +0 -147
  1365. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/__init__.py +0 -0
  1366. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health.py +0 -66
  1367. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health_graph.py +0 -52
  1368. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/registry.py +0 -127
  1369. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/search.py +0 -230
  1370. package/tools/vds-scripts/research_orchestrator/tests/__init__.py +0 -0
  1371. package/tools/vds-scripts/research_orchestrator/tests/conftest.py +0 -53
  1372. package/tools/vds-scripts/research_orchestrator/tests/test_cli.py +0 -222
  1373. package/tools/vds-scripts/research_orchestrator/tests/test_config.py +0 -23
  1374. package/tools/vds-scripts/research_orchestrator/tests/test_exceptions.py +0 -62
  1375. package/tools/vds-scripts/research_orchestrator/tests/test_formatters.py +0 -89
  1376. package/tools/vds-scripts/research_orchestrator/tests/test_graph_integration.py +0 -149
  1377. package/tools/vds-scripts/research_orchestrator/tests/test_http_client.py +0 -134
  1378. package/tools/vds-scripts/research_orchestrator/tests/test_report_build.py +0 -128
  1379. package/tools/vds-scripts/research_orchestrator/tests/test_report_format.py +0 -91
  1380. package/tools/vds-scripts/research_orchestrator/tests/test_scoring.py +0 -95
  1381. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/__init__.py +0 -1
  1382. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_health.py +0 -139
  1383. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_registry.py +0 -135
  1384. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_search.py +0 -238
  1385. package/tools/vds-scripts/run-history.json +0 -26
  1386. package/tools/vds-scripts/schema_converter/README.md +0 -109
  1387. package/tools/vds-scripts/schema_converter/pyproject.toml +0 -37
  1388. package/tools/vds-scripts/schema_converter/src/vds_schema_converter/__init__.py +0 -3
  1389. package/tools/vds-scripts/schema_converter/src/vds_schema_converter/cli.py +0 -50
  1390. package/tools/vds-scripts/schema_converter/tests/__init__.py +0 -0
  1391. package/tools/vds-scripts/schema_converter/tests/test_json_schema_generator.py +0 -115
  1392. package/tools/vds-scripts/schema_converter/tests/test_mermaid_generator.py +0 -112
  1393. package/tools/vds-scripts/schema_converter/tests/test_parser.py +0 -111
  1394. package/tools/vds-scripts/schema_converter/tests/test_plantuml_generator.py +0 -112
  1395. package/tools/vds-scripts/schema_converter/tests/test_plantuml_validator.py +0 -69
  1396. package/tools/vds-scripts/schema_converter/tests/test_prisma_generator.py +0 -113
  1397. package/tools/vds-scripts/schema_converter/tests/test_sql_generator.py +0 -138
  1398. package/tools/vds-scripts/schema_converter/tests/test_typeorm_generator.py +0 -110
  1399. package/tools/vds-scripts/schema_converter/tests/test_validators.py +0 -96
  1400. package/tools/vds-scripts/spec_orchestrator/README.md +0 -13
  1401. package/tools/vds-scripts/spec_orchestrator/pyproject.toml +0 -40
  1402. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/__init__.py +0 -5
  1403. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/cli.py +0 -162
  1404. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/core.py +0 -575
  1405. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/sync.py +0 -306
  1406. package/tools/vds-scripts/spec_orchestrator/tests/__init__.py +0 -0
  1407. package/tools/vds-scripts/spec_orchestrator/tests/test_frontmatter_drift.py +0 -243
  1408. package/tools/vds-scripts/spec_orchestrator/tests/test_sync.py +0 -342
  1409. package/tools/vds-scripts/structure_orchestrator/README.md +0 -60
  1410. package/tools/vds-scripts/structure_orchestrator/pyproject.toml +0 -103
  1411. package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/__init__.py +0 -13
  1412. package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/cli.py +0 -308
  1413. package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/validator.py +0 -257
  1414. package/tools/vds-scripts/structure_orchestrator/tests/__init__.py +0 -0
  1415. package/tools/vds-scripts/structure_orchestrator/tests/test_cli.py +0 -161
  1416. package/tools/vds-scripts/structure_orchestrator/tests/test_helpers.py +0 -115
  1417. package/tools/vds-scripts/structure_orchestrator/tests/test_validator.py +0 -104
  1418. package/tools/vds-scripts/task_orchestrator/README.md +0 -50
  1419. package/tools/vds-scripts/task_orchestrator/__init__.py +0 -18
  1420. package/tools/vds-scripts/task_orchestrator/pyproject.toml +0 -43
  1421. package/tools/vds-scripts/task_orchestrator/scripts/run_excel_sync.py +0 -36
  1422. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/__init__.py +0 -13
  1423. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/audit.py +0 -134
  1424. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/cli.py +0 -127
  1425. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/debug.py +0 -133
  1426. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/normalize.py +0 -113
  1427. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/refine.py +0 -201
  1428. package/tools/vds-scripts/task_orchestrator/tests/__init__.py +0 -0
  1429. package/tools/vds-scripts/task_orchestrator/tests/test_task_orchestrator.py +0 -84
  1430. package/tools/vds-scripts/temp_query_projects.py +0 -2
  1431. package/tools/vds-scripts/test_small.md +0 -1
  1432. package/tools/vds-scripts/text_utils_orchestrator/pyproject.toml +0 -20
  1433. package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/__init__.py +0 -7
  1434. package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/i18n.py +0 -143
  1435. package/tools/vds-scripts/text_utils_orchestrator/tests/__init__.py +0 -0
  1436. package/tools/vds-scripts/text_utils_orchestrator/tests/test_i18n.py +0 -53
  1437. package/tools/vds-scripts/upgrade_major.py +0 -61
  1438. package/tools/vds-scripts/upgrade_major_v2.py +0 -64
  1439. package/tools/vds-scripts/verify_violations.py +0 -57
  1440. package/tools/vds-scripts/workflow-summary.json +0 -325
  1441. package/tools/vds-scripts/workflow-summary.md +0 -8
@@ -1,2548 +0,0 @@
1
- """Tests for tool registry strict schema validation (Phase 61)."""
2
-
3
- from __future__ import annotations
4
-
5
- import json
6
- import subprocess
7
- from pathlib import Path
8
- from types import SimpleNamespace
9
- from typing import Any
10
- from unittest.mock import Mock
11
-
12
- import pytest
13
- from pydantic import ValidationError
14
- from vds_audit_orchestrator.agents.tool_registry import (
15
- ToolExecutionError,
16
- ToolName,
17
- ToolRegistry,
18
- )
19
-
20
-
21
- class TestToolRegistrySchemas:
22
- """Validate strict typed tool schemas and wrapper behavior."""
23
-
24
- def test_search_docs_rejects_invalid_payload_type(self) -> None:
25
- registry = ToolRegistry()
26
-
27
- with pytest.raises(ValidationError):
28
- registry.invoke(ToolName.SEARCH_DOCS, {"query": 123, "limit": 2})
29
-
30
- def test_read_code_file_rejects_extra_fields(self) -> None:
31
- registry = ToolRegistry()
32
-
33
- with pytest.raises(ValidationError):
34
- registry.invoke(
35
- ToolName.READ_CODE_FILE,
36
- {
37
- "path": "src/main.py",
38
- "start_line": 1,
39
- "unknown": "not-allowed",
40
- },
41
- )
42
-
43
- def test_search_code_requires_repo_path(self) -> None:
44
- registry = ToolRegistry()
45
-
46
- with pytest.raises(ToolExecutionError, match="missing_runtime_context"):
47
- registry.invoke(ToolName.SEARCH_CODE, {"query": "auth flow", "limit": 3})
48
-
49
- def test_run_code_search_query_decodes_with_replacement(self, monkeypatch, tmp_path: Path) -> None:
50
- registry = ToolRegistry(repo_path=str(tmp_path))
51
- captured: dict[str, object] = {}
52
-
53
- def fake_run(*args, **kwargs):
54
- captured.update(kwargs)
55
- return subprocess.CompletedProcess(args[0], 1, "", "")
56
-
57
- monkeypatch.setattr(subprocess, "run", fake_run)
58
-
59
- registry._run_code_search_query(query="auth", search_root=tmp_path)
60
-
61
- assert captured["text"] is True
62
- assert captured["encoding"] == "utf-8"
63
- assert captured["errors"] == "replace"
64
-
65
- def test_skills_runtime_policy_falls_back_to_default_catalog_when_configured_dirs_missing(
66
- self,
67
- monkeypatch: pytest.MonkeyPatch,
68
- tmp_path: Path,
69
- ) -> None:
70
- skill_dir = tmp_path / "skills" / "hexagonal-compliance-skill"
71
- skill_dir.mkdir(parents=True)
72
-
73
- from vds_audit_orchestrator.agents.toolsets import skills_toolset
74
-
75
- monkeypatch.setattr(skills_toolset, "DEFAULT_AUDIT_SKILLS", [str(tmp_path / "skills")])
76
-
77
- class FakeLLM:
78
- skills_toolset_enabled = True
79
- skills_directories = [str(tmp_path / "missing-skills")]
80
- skills_allowlist: list[str] = []
81
- skills_allowed_trust_tiers = ["internal", "external-verified", "external-unverified"]
82
- skills_trust_tiers: dict[str, str] = {}
83
- skills_default_trust_tier = "internal"
84
- skills_allow_script_execution = False
85
-
86
- class FakeConfig:
87
- llm = FakeLLM()
88
-
89
- import vds_audit_orchestrator.config as config_module
90
-
91
- monkeypatch.setattr(config_module, "get_config", FakeConfig)
92
-
93
- registry = ToolRegistry()
94
- policy = registry._resolve_skills_runtime_policy()
95
-
96
- assert policy["directories"] == [str((tmp_path / "skills").resolve())]
97
-
98
- def test_record_evidence_refs_deduplicates_refs(self) -> None:
99
- registry = ToolRegistry()
100
-
101
- first = registry.invoke(
102
- ToolName.RECORD_EVIDENCE_REFS,
103
- {
104
- "row_id": "row_1",
105
- "refs": [
106
- {"ref_type": "path", "ref_value": "docs/readme.md", "verified": True},
107
- {"ref_type": "path", "ref_value": "docs/readme.md", "verified": True},
108
- ],
109
- },
110
- )
111
-
112
- second = registry.invoke(
113
- ToolName.RECORD_EVIDENCE_REFS,
114
- {
115
- "row_id": "row_1",
116
- "refs": [
117
- {"ref_type": "url", "ref_value": "https://example.test", "verified": False},
118
- ],
119
- },
120
- )
121
-
122
- assert first.payload["accepted_count"] == 1
123
- assert second.payload["accepted_count"] == 2
124
- assert {ref["ref_value"] for ref in second.payload["refs"]} == {
125
- "docs/readme.md",
126
- "https://example.test",
127
- }
128
-
129
- def test_record_evidence_refs_accepts_list_line_range_from_runtime_payload(self) -> None:
130
- registry = ToolRegistry()
131
-
132
- result = registry.invoke(
133
- ToolName.RECORD_EVIDENCE_REFS,
134
- {
135
- "row_id": "row_1",
136
- "refs": [
137
- {
138
- "ref_type": "code_chunk",
139
- "ref_value": "src/main.py",
140
- "verified": True,
141
- "line_range": [1, 220],
142
- }
143
- ],
144
- },
145
- )
146
-
147
- assert result.payload["accepted_count"] == 1
148
- assert result.payload["refs"][0]["line_range"] == (1, 220)
149
-
150
- def test_record_evidence_refs_accepts_string_line_range_and_source_uri_alias(self) -> None:
151
- registry = ToolRegistry()
152
-
153
- result = registry.invoke(
154
- ToolName.RECORD_EVIDENCE_REFS,
155
- {
156
- "row_id": "row_1",
157
- "refs": [
158
- {
159
- "ref_type": "confluence_page",
160
- "ref_value": "https://confluence.example/pages/viewpage.action?pageId=123",
161
- "verified": True,
162
- "line_range": "1:220",
163
- "source_uri": "https://confluence.example/pages/viewpage.action?pageId=123",
164
- "chunk_id": "chunk-001",
165
- "excerpt": "Authentication policy mandates token validation.",
166
- "verification_reason": "excerpt_verified_in_context",
167
- "ref_hash": "abc123hash",
168
- }
169
- ],
170
- },
171
- )
172
-
173
- assert result.payload["accepted_count"] == 1
174
- ref = result.payload["refs"][0]
175
- assert ref["line_range"] == (1, 220)
176
- assert ref["source_url"] == "https://confluence.example/pages/viewpage.action?pageId=123"
177
- assert ref["chunk_id"] == "chunk-001"
178
- assert ref["excerpt"] == "Authentication policy mandates token validation."
179
- assert ref["verification_reason"] == "excerpt_verified_in_context"
180
- assert ref["ref_hash"] == "abc123hash"
181
-
182
- def test_search_docs_delegates_to_state_backed_adapter(self) -> None:
183
- registry = ToolRegistry(
184
- state_dsn="postgresql://user:pass@host/db",
185
- project_key="project_a",
186
- repo_key="repo_a",
187
- )
188
- fake_response = SimpleNamespace(
189
- meta=SimpleNamespace(status="ok", reason=None),
190
- results=[
191
- SimpleNamespace(
192
- chunk_id="chunk-001",
193
- source_uri="https://docs.example/doc",
194
- document_id="doc-001",
195
- lexical_rank=3.0,
196
- content_text="auth matched content",
197
- ),
198
- ],
199
- )
200
- adapter = Mock()
201
- adapter.query_with_meta.return_value = fake_response
202
- registry._doc_query_adapter = adapter
203
-
204
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "auth", "limit": 5})
205
-
206
- adapter.query_with_meta.assert_called_once_with(
207
- query_text="auth",
208
- project_key="project_a",
209
- repo_key="repo_a",
210
- top_k=25,
211
- )
212
- assert result.payload["hits"] == [
213
- {
214
- "ref": "chunk:chunk-001",
215
- "read_ref": "chunk:chunk-001",
216
- "title": "https://docs.example/doc",
217
- "score": 0.75,
218
- "excerpt": "auth matched content",
219
- "chunk_id": "chunk-001",
220
- "document_id": "doc-001",
221
- "page_id": None,
222
- "page_title": None,
223
- "space_key": None,
224
- "source_url": "https://docs.example/doc",
225
- "source_type": None,
226
- "doc_class": None,
227
- },
228
- ]
229
-
230
- def test_search_docs_raises_machine_readable_when_provider_not_ready(self) -> None:
231
- registry = ToolRegistry(
232
- state_dsn="postgresql://user:pass@host/db",
233
- project_key="project_a",
234
- )
235
- adapter = Mock()
236
- adapter.query_with_meta.return_value = SimpleNamespace(
237
- meta=SimpleNamespace(status="not_ready", reason="snapshot_not_found"),
238
- results=[],
239
- )
240
- registry._doc_query_adapter = adapter
241
-
242
- with pytest.raises(ToolExecutionError) as exc_info:
243
- registry.invoke(ToolName.SEARCH_DOCS, {"query": "x", "limit": 1})
244
-
245
- payload = json.loads(str(exc_info.value))
246
- assert payload["error"]["code"] == "provider_not_ready"
247
- assert payload["error"]["details"]["reason"] == "snapshot_not_found"
248
-
249
- def test_search_docs_does_not_retry_without_repo_scope_when_repo_scoped_result_empty(self) -> None:
250
- registry = ToolRegistry(
251
- state_dsn="postgresql://user:pass@host/db",
252
- project_key="project_a",
253
- repo_key="repo_a",
254
- )
255
- adapter = Mock()
256
- adapter.query_with_meta.side_effect = [
257
- SimpleNamespace(meta=SimpleNamespace(status="ok", reason=None), results=[]),
258
- ]
259
- registry._doc_query_adapter = adapter
260
-
261
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "architecture", "limit": 3})
262
-
263
- assert adapter.query_with_meta.call_count == 1
264
- first_call = adapter.query_with_meta.call_args_list[0].kwargs
265
- assert first_call["repo_key"] == "repo_a"
266
- assert result.payload["hits"] == []
267
-
268
- def test_search_docs_retries_project_scope_when_repo_scope_is_excluded_only(self) -> None:
269
- registry = ToolRegistry(
270
- state_dsn="postgresql://user:pass@host/db",
271
- project_key="project_a",
272
- repo_key="repo_a",
273
- )
274
- adapter = Mock()
275
- adapter.query_with_meta.side_effect = [
276
- SimpleNamespace(
277
- meta=SimpleNamespace(status="ok", reason=None),
278
- results=[
279
- SimpleNamespace(
280
- chunk_id="chunk-artifact",
281
- source_uri=None,
282
- document_id="doc-artifact",
283
- lexical_rank=5.0,
284
- content_text="architecture checklist export",
285
- document_metadata={
286
- "source_type": "code_file",
287
- "doc_class": "canonical_code",
288
- "file_path": "reports/verification/live_eval/run-1/audit-checklist.json",
289
- },
290
- ),
291
- ],
292
- ),
293
- SimpleNamespace(
294
- meta=SimpleNamespace(status="ok", reason=None),
295
- results=[
296
- SimpleNamespace(
297
- chunk_id="chunk-doc",
298
- source_uri="https://confluence.example/architecture",
299
- document_id="74014721",
300
- lexical_rank=2.0,
301
- content_text="architecture interface boundaries",
302
- document_metadata={
303
- "source_type": "confluence_page",
304
- "doc_class": "canonical_doc",
305
- },
306
- ),
307
- ],
308
- ),
309
- ]
310
- registry._doc_query_adapter = adapter
311
-
312
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "architecture", "limit": 5})
313
-
314
- assert adapter.query_with_meta.call_count == 2
315
- assert adapter.query_with_meta.call_args_list[0].kwargs["repo_key"] == "repo_a"
316
- assert adapter.query_with_meta.call_args_list[1].kwargs["repo_key"] is None
317
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-doc"]
318
-
319
- def test_search_docs_deduplicates_hits_by_ref(self) -> None:
320
- registry = ToolRegistry(
321
- state_dsn="postgresql://user:pass@host/db",
322
- project_key="project_a",
323
- repo_key="repo_a",
324
- )
325
- adapter = Mock()
326
- adapter.query_with_meta.return_value = SimpleNamespace(
327
- meta=SimpleNamespace(status="ok", reason=None),
328
- results=[
329
- SimpleNamespace(
330
- chunk_id="chunk-1",
331
- source_uri=None,
332
- document_id="127700065",
333
- lexical_rank=4.0,
334
- content_text="postman first hit",
335
- ),
336
- SimpleNamespace(
337
- chunk_id="chunk-2",
338
- source_uri=None,
339
- document_id="127700065",
340
- lexical_rank=3.0,
341
- content_text="postman duplicate hit",
342
- ),
343
- SimpleNamespace(
344
- chunk_id="chunk-3",
345
- source_uri=None,
346
- document_id="92200507",
347
- lexical_rank=2.0,
348
- content_text="postman second doc",
349
- ),
350
- ],
351
- )
352
- registry._doc_query_adapter = adapter
353
-
354
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "postman", "limit": 5})
355
-
356
- refs = [hit["ref"] for hit in result.payload["hits"]]
357
- assert refs == ["chunk:chunk-1", "chunk:chunk-2", "chunk:chunk-3"]
358
-
359
- def test_search_docs_prefers_metadata_title_when_source_uri_missing(self) -> None:
360
- registry = ToolRegistry(
361
- state_dsn="postgresql://user:pass@host/db",
362
- project_key="project_a",
363
- repo_key="repo_a",
364
- )
365
- adapter = Mock()
366
- adapter.query_with_meta.return_value = SimpleNamespace(
367
- meta=SimpleNamespace(status="ok", reason=None),
368
- results=[
369
- SimpleNamespace(
370
- chunk_id="chunk-1",
371
- source_uri=None,
372
- document_id="74014721",
373
- lexical_rank=4.0,
374
- content_text="KBNV App Center integration flow",
375
- document_metadata={
376
- "title": "MINIAPP.02.04.02 KBNV cho App Center",
377
- "source_type": "confluence_page",
378
- "doc_class": "canonical_doc",
379
- },
380
- )
381
- ],
382
- )
383
- registry._doc_query_adapter = adapter
384
-
385
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "KBNV App Center", "limit": 5})
386
-
387
- assert len(result.payload["hits"]) == 1
388
- assert result.payload["hits"][0]["ref"] == "chunk:chunk-1"
389
- assert result.payload["hits"][0]["title"] == "MINIAPP.02.04.02 KBNV cho App Center"
390
-
391
- def test_search_docs_prefers_source_page_title_for_attachment_metadata(self) -> None:
392
- registry = ToolRegistry(
393
- state_dsn="postgresql://user:pass@host/db",
394
- project_key="project_a",
395
- repo_key="repo_a",
396
- )
397
- adapter = Mock()
398
- adapter.query_with_meta.return_value = SimpleNamespace(
399
- meta=SimpleNamespace(status="ok", reason=None),
400
- results=[
401
- SimpleNamespace(
402
- chunk_id="chunk-1",
403
- source_uri=None,
404
- document_id="87410482",
405
- lexical_rank=4.0,
406
- content_text="mini app test cases",
407
- document_metadata={
408
- "title": "KBKTCN_SUPPERAPP_App Center.xlsx",
409
- "source_page_title": "MINIAPP.05. Test",
410
- "source_type": "confluence_attachment",
411
- },
412
- )
413
- ],
414
- )
415
- registry._doc_query_adapter = adapter
416
-
417
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "mini app test cases", "limit": 5})
418
-
419
- assert len(result.payload["hits"]) == 1
420
- assert result.payload["hits"][0]["title"] == "MINIAPP.05. Test"
421
-
422
- def test_search_docs_prioritizes_confluence_page_over_attachment_on_tie(self) -> None:
423
- registry = ToolRegistry(
424
- state_dsn="postgresql://user:pass@host/db",
425
- project_key="project_a",
426
- repo_key="repo_a",
427
- )
428
- adapter = Mock()
429
- adapter.query_with_meta.return_value = SimpleNamespace(
430
- meta=SimpleNamespace(status="ok", reason=None),
431
- results=[
432
- SimpleNamespace(
433
- chunk_id="chunk-attachment",
434
- source_uri=None,
435
- document_id="87410482",
436
- lexical_rank=3.0,
437
- content_text="quy trình release mini app",
438
- document_metadata={
439
- "source_type": "confluence_attachment",
440
- "title": "Release checklist.xlsx",
441
- },
442
- ),
443
- SimpleNamespace(
444
- chunk_id="chunk-page",
445
- source_uri=None,
446
- document_id="84283962",
447
- lexical_rank=3.0,
448
- content_text="quy trình release mini app",
449
- document_metadata={
450
- "source_type": "confluence_page",
451
- "title": "MINIAPP.03 Quy trình phát triển",
452
- },
453
- ),
454
- ],
455
- )
456
- registry._doc_query_adapter = adapter
457
-
458
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "quy trình release mini app", "limit": 5})
459
-
460
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-page", "chunk:chunk-attachment"]
461
-
462
- def test_search_docs_derives_title_from_excerpt_when_metadata_missing(self) -> None:
463
- registry = ToolRegistry(
464
- state_dsn="postgresql://user:pass@host/db",
465
- project_key="project_a",
466
- repo_key="repo_a",
467
- )
468
- adapter = Mock()
469
- adapter.query_with_meta.return_value = SimpleNamespace(
470
- meta=SimpleNamespace(status="ok", reason=None),
471
- results=[
472
- SimpleNamespace(
473
- chunk_id="chunk-2",
474
- source_uri=None,
475
- document_id="87410475",
476
- lexical_rank=4.0,
477
- content_text="# MINIAPP.03.2. Thiết kế CSDL\n\nNội dung thiết kế chi tiết",
478
- document_metadata={},
479
- )
480
- ],
481
- )
482
- registry._doc_query_adapter = adapter
483
-
484
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "thiết kế CSDL", "limit": 5})
485
-
486
- assert len(result.payload["hits"]) == 1
487
- assert result.payload["hits"][0]["ref"] == "chunk:chunk-2"
488
- assert result.payload["hits"][0]["title"] == "MINIAPP.03.2. Thiết kế CSDL"
489
-
490
- def test_search_docs_refines_low_quality_title_using_lookup_row(self) -> None:
491
- registry = ToolRegistry(
492
- state_dsn="postgresql://user:pass@host/db",
493
- project_key="project_a",
494
- repo_key="repo_a",
495
- )
496
- adapter = Mock()
497
- adapter.query_with_meta.return_value = SimpleNamespace(
498
- meta=SimpleNamespace(status="ok", reason=None),
499
- results=[
500
- SimpleNamespace(
501
- chunk_id="chunk-2",
502
- source_uri=None,
503
- document_id="87410482",
504
- lexical_rank=4.0,
505
- content_text="release | mini | app | rollout |",
506
- document_metadata={},
507
- )
508
- ],
509
- )
510
- registry._doc_query_adapter = adapter
511
-
512
- def _lookup(*, chunk_id, source_uri, document_id, repo_key):
513
- _ = chunk_id, source_uri, repo_key
514
- if chunk_id == "chunk-2":
515
- return {
516
- "chunk_id": "seed-chunk",
517
- "source_uri": None,
518
- "document_id": "87410482",
519
- "source_type": "confluence_page",
520
- "document_metadata": {},
521
- "content_text": "## MINIAPP.04 Release và Deployment\n\nMô tả quy trình release",
522
- }
523
- return None
524
-
525
- registry._lookup_doc_chunk = _lookup # type: ignore[method-assign]
526
-
527
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "release mini app", "limit": 5})
528
-
529
- assert len(result.payload["hits"]) == 1
530
- assert result.payload["hits"][0]["title"] == "MINIAPP.04 Release và Deployment"
531
-
532
- def test_search_docs_fallback_title_uses_confluence_page_label_for_numeric_doc_id(self) -> None:
533
- registry = ToolRegistry(
534
- state_dsn="postgresql://user:pass@host/db",
535
- project_key="project_a",
536
- repo_key="repo_a",
537
- )
538
- adapter = Mock()
539
- adapter.query_with_meta.return_value = SimpleNamespace(
540
- meta=SimpleNamespace(status="ok", reason=None),
541
- results=[
542
- SimpleNamespace(
543
- chunk_id="chunk-3",
544
- source_uri=None,
545
- document_id="87410482",
546
- lexical_rank=4.0,
547
- content_text="| Col 1 | Col 2 | Col 3 |",
548
- document_metadata={},
549
- )
550
- ],
551
- )
552
- registry._doc_query_adapter = adapter
553
-
554
- def _lookup(*, chunk_id, source_uri, document_id, repo_key):
555
- _ = chunk_id, source_uri, repo_key
556
- if chunk_id == "chunk-3":
557
- return {
558
- "chunk_id": "seed-chunk",
559
- "source_uri": None,
560
- "document_id": "87410482",
561
- "source_type": "confluence_page",
562
- "document_metadata": {},
563
- "content_text": "| Col 1 | Col 2 | Col 3 | Col 4 |",
564
- }
565
- return None
566
-
567
- registry._lookup_doc_chunk = _lookup # type: ignore[method-assign]
568
-
569
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "col", "limit": 5})
570
-
571
- assert len(result.payload["hits"]) == 1
572
- assert result.payload["hits"][0]["title"] == "Confluence page 87410482"
573
-
574
- def test_search_docs_filters_hash_only_document_ids_without_source_uri(self) -> None:
575
- registry = ToolRegistry(
576
- state_dsn="postgresql://user:pass@host/db",
577
- project_key="project_a",
578
- repo_key="repo_a",
579
- )
580
- adapter = Mock()
581
- adapter.query_with_meta.return_value = SimpleNamespace(
582
- meta=SimpleNamespace(status="ok", reason=None),
583
- results=[
584
- SimpleNamespace(
585
- chunk_id="chunk-hash",
586
- source_uri=None,
587
- document_id="898a59bb22e442e7",
588
- lexical_rank=5.0,
589
- content_text="synthetic artifact chunk",
590
- ),
591
- SimpleNamespace(
592
- chunk_id="chunk-doc",
593
- source_uri=None,
594
- document_id="92200507",
595
- lexical_rank=3.0,
596
- content_text="support workflow confluence document chunk",
597
- ),
598
- ],
599
- )
600
- registry._doc_query_adapter = adapter
601
-
602
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "support workflow", "limit": 5})
603
-
604
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-doc"]
605
-
606
- def test_search_docs_filters_hits_not_readable_under_scope_exclusion(self) -> None:
607
- registry = ToolRegistry(
608
- state_dsn="postgresql://user:pass@host/db",
609
- project_key="project_a",
610
- repo_key="repo_a",
611
- )
612
- adapter = Mock()
613
- adapter.query_with_meta.return_value = SimpleNamespace(
614
- meta=SimpleNamespace(status="ok", reason=None),
615
- results=[
616
- SimpleNamespace(
617
- chunk_id="chunk-excluded",
618
- source_uri=None,
619
- document_id="92200507",
620
- lexical_rank=4.0,
621
- content_text="support workflow handbook",
622
- ),
623
- SimpleNamespace(
624
- chunk_id="chunk-readable",
625
- source_uri=None,
626
- document_id="92200508",
627
- lexical_rank=3.0,
628
- content_text="support workflow runbook",
629
- ),
630
- ],
631
- )
632
- registry._doc_query_adapter = adapter
633
-
634
- def _lookup(*, chunk_id, source_uri, document_id, repo_key):
635
- _ = chunk_id, source_uri, repo_key
636
- if chunk_id == "chunk-excluded":
637
- return {
638
- "chunk_id": "chunk-excluded",
639
- "source_uri": "",
640
- "document_id": "92200507",
641
- "source_type": "generated",
642
- "document_metadata": {"doc_class": "generated_artifact"},
643
- }
644
- if chunk_id == "chunk-readable":
645
- return {
646
- "chunk_id": "chunk-readable",
647
- "source_uri": "https://confluence.example/support",
648
- "document_id": "92200508",
649
- "source_type": "confluence_page",
650
- "document_metadata": {"doc_class": "canonical_doc"},
651
- }
652
- return None
653
-
654
- registry._lookup_doc_chunk = _lookup # type: ignore[method-assign]
655
-
656
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "support workflow", "limit": 5})
657
-
658
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-readable"]
659
-
660
- def test_search_docs_filters_metadata_marked_code_or_report_artifacts(self) -> None:
661
- registry = ToolRegistry(
662
- state_dsn="postgresql://user:pass@host/db",
663
- project_key="project_a",
664
- repo_key="repo_a",
665
- )
666
- adapter = Mock()
667
- adapter.query_with_meta.return_value = SimpleNamespace(
668
- meta=SimpleNamespace(status="ok", reason=None),
669
- results=[
670
- SimpleNamespace(
671
- chunk_id="chunk-artifact",
672
- source_uri=None,
673
- document_id="4ec4e588187e6771",
674
- lexical_rank=5.0,
675
- content_text="architecture quality summary from generated report",
676
- document_metadata={
677
- "source_type": "code_file",
678
- "doc_class": "canonical_code",
679
- "file_path": "reports/verification/live_eval/run-1/audit-checklist.json",
680
- },
681
- ),
682
- SimpleNamespace(
683
- chunk_id="chunk-doc",
684
- source_uri="https://confluence.example/architecture",
685
- document_id="74014721",
686
- lexical_rank=2.0,
687
- content_text="architecture interface boundaries and design decisions",
688
- document_metadata={
689
- "source_type": "confluence_page",
690
- "doc_class": "canonical_doc",
691
- "source_path": "docs/architecture.md",
692
- },
693
- ),
694
- ],
695
- )
696
- registry._doc_query_adapter = adapter
697
-
698
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "architecture", "limit": 5})
699
-
700
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-doc"]
701
-
702
- def test_search_docs_uses_docs_intent_recovery_query_when_scope_hits_are_excluded(self) -> None:
703
- registry = ToolRegistry(
704
- state_dsn="postgresql://user:pass@host/db",
705
- project_key="project_a",
706
- repo_key="repo_a",
707
- )
708
- adapter = Mock()
709
- adapter.query_with_meta.side_effect = [
710
- SimpleNamespace(
711
- meta=SimpleNamespace(status="ok", reason=None),
712
- results=[
713
- SimpleNamespace(
714
- chunk_id="chunk-artifact-1",
715
- source_uri=None,
716
- document_id="doc-artifact-1",
717
- lexical_rank=5.0,
718
- content_text="generated checklist output",
719
- document_metadata={
720
- "source_type": "code_file",
721
- "doc_class": "canonical_code",
722
- "file_path": "reports/verification/live_eval/run-1/audit-checklist.json",
723
- },
724
- ),
725
- ],
726
- ),
727
- SimpleNamespace(
728
- meta=SimpleNamespace(status="ok", reason=None),
729
- results=[
730
- SimpleNamespace(
731
- chunk_id="chunk-artifact-2",
732
- source_uri=None,
733
- document_id="doc-artifact-2",
734
- lexical_rank=4.0,
735
- content_text="generated checklist output",
736
- document_metadata={
737
- "source_type": "code_file",
738
- "doc_class": "canonical_code",
739
- "file_path": "reports/verification/live_eval/run-2/audit-checklist.json",
740
- },
741
- ),
742
- ],
743
- ),
744
- SimpleNamespace(
745
- meta=SimpleNamespace(status="ok", reason=None),
746
- results=[
747
- SimpleNamespace(
748
- chunk_id="chunk-doc",
749
- source_uri="https://confluence.example/version-doc",
750
- document_id="127700065",
751
- lexical_rank=2.0,
752
- content_text="Tài liệu Confluence version 1.0 cho quy trình tích hợp.",
753
- document_metadata={
754
- "source_type": "confluence_page",
755
- "doc_class": "canonical_doc",
756
- },
757
- ),
758
- ],
759
- ),
760
- ]
761
- registry._doc_query_adapter = adapter
762
-
763
- result = registry.invoke(
764
- ToolName.SEARCH_DOCS,
765
- {"query": "Tài liệu quản lý phiên bản (Wiki/Gitbook/Confluence) khớp với version của code.", "limit": 1},
766
- )
767
-
768
- assert adapter.query_with_meta.call_count == 3
769
- assert adapter.query_with_meta.call_args_list[0].kwargs["repo_key"] == "repo_a"
770
- assert adapter.query_with_meta.call_args_list[1].kwargs["repo_key"] is None
771
- assert adapter.query_with_meta.call_args_list[2].kwargs["repo_key"] == "repo_a"
772
- assert adapter.query_with_meta.call_args_list[2].kwargs["query_text"] == "tài liệu version confluence"
773
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-doc"]
774
-
775
- def test_search_docs_uses_docs_intent_recovery_query_when_hits_are_low_confidence(self) -> None:
776
- registry = ToolRegistry(
777
- state_dsn="postgresql://user:pass@host/db",
778
- project_key="project_a",
779
- repo_key="repo_a",
780
- )
781
- adapter = Mock()
782
- adapter.query_with_meta.side_effect = [
783
- SimpleNamespace(
784
- meta=SimpleNamespace(status="ok", reason=None),
785
- results=[
786
- SimpleNamespace(
787
- chunk_id="chunk-attachment",
788
- source_uri=None,
789
- document_id="87410482",
790
- lexical_rank=0.002,
791
- content_text="Bảng testcase mini app app center",
792
- document_metadata={
793
- "source_type": "confluence_attachment",
794
- "title": "VDS_VIS_SuperApp_KBKTCN_Webportal.v.1.xlsx",
795
- },
796
- ),
797
- ],
798
- ),
799
- SimpleNamespace(
800
- meta=SimpleNamespace(status="ok", reason=None),
801
- results=[
802
- SimpleNamespace(
803
- chunk_id="chunk-page",
804
- source_uri="https://confluence.example/miniapp-app-center",
805
- document_id="94667191",
806
- lexical_rank=0.2,
807
- content_text="Tài liệu tích hợp App Center cho MiniApp.",
808
- document_metadata={
809
- "source_type": "confluence_page",
810
- "title": "MINIAPP.02.04.02 KBNV cho App Center",
811
- "doc_class": "canonical_doc",
812
- },
813
- ),
814
- ],
815
- ),
816
- ]
817
- registry._doc_query_adapter = adapter
818
-
819
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "tài liệu tích hợp app center", "limit": 1})
820
-
821
- assert adapter.query_with_meta.call_count == 2
822
- assert adapter.query_with_meta.call_args_list[0].kwargs["repo_key"] == "repo_a"
823
- assert adapter.query_with_meta.call_args_list[1].kwargs["repo_key"] == "repo_a"
824
- assert adapter.query_with_meta.call_args_list[1].kwargs["query_text"] == "tài liệu confluence"
825
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-page"]
826
-
827
- def test_search_docs_docs_intent_prefers_page_hits_over_low_score_attachment_hits(self) -> None:
828
- registry = ToolRegistry(
829
- state_dsn="postgresql://user:pass@host/db",
830
- project_key="project_a",
831
- repo_key="repo_a",
832
- )
833
- adapter = Mock()
834
- adapter.query_with_meta.return_value = SimpleNamespace(
835
- meta=SimpleNamespace(status="ok", reason=None),
836
- results=[
837
- SimpleNamespace(
838
- chunk_id="chunk-attachment",
839
- source_uri=None,
840
- document_id="87410482",
841
- lexical_rank=0.002,
842
- content_text="Bảng testcase mini app app center",
843
- document_metadata={
844
- "source_type": "confluence_attachment",
845
- "title": "VDS_VIS_SuperApp_KBKTCN_Webportal.v.1.xlsx",
846
- },
847
- ),
848
- SimpleNamespace(
849
- chunk_id="chunk-page",
850
- source_uri=None,
851
- document_id="94667191",
852
- lexical_rank=0.2,
853
- content_text="Tài liệu tích hợp App Center cho MiniApp.",
854
- document_metadata={
855
- "source_type": "confluence_page",
856
- "title": "MINIAPP.02.04.02 KBNV cho App Center",
857
- },
858
- ),
859
- ],
860
- )
861
- registry._doc_query_adapter = adapter
862
-
863
- def _lookup(*, chunk_id, source_uri, document_id, repo_key):
864
- _ = chunk_id, source_uri, repo_key
865
- if chunk_id == "chunk-attachment":
866
- return {
867
- "chunk_id": "chunk-attachment",
868
- "source_uri": "",
869
- "document_id": "87410482",
870
- "source_type": "confluence_attachment",
871
- "document_metadata": {"source_type": "confluence_attachment"},
872
- }
873
- if chunk_id == "chunk-page":
874
- return {
875
- "chunk_id": "chunk-page",
876
- "source_uri": "",
877
- "document_id": "94667191",
878
- "source_type": "confluence_page",
879
- "document_metadata": {"source_type": "confluence_page"},
880
- }
881
- return None
882
-
883
- registry._lookup_doc_chunk = _lookup # type: ignore[method-assign]
884
-
885
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "tài liệu tích hợp app center", "limit": 3})
886
-
887
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-page"]
888
-
889
- def test_search_docs_docs_intent_reorders_low_confidence_hits_after_high_confidence_hits(self) -> None:
890
- registry = ToolRegistry(
891
- state_dsn="postgresql://user:pass@host/db",
892
- project_key="project_a",
893
- repo_key="repo_a",
894
- )
895
- adapter = Mock()
896
- adapter.query_with_meta.return_value = SimpleNamespace(
897
- meta=SimpleNamespace(status="ok", reason=None),
898
- results=[
899
- SimpleNamespace(
900
- chunk_id="chunk-low",
901
- source_uri=None,
902
- document_id="87410482",
903
- lexical_rank=0.002,
904
- content_text="tài liệu tích hợp app center và hướng dẫn mini app",
905
- document_metadata={
906
- "source_type": "confluence_page",
907
- "title": "MINIAPP.05. Test",
908
- },
909
- ),
910
- SimpleNamespace(
911
- chunk_id="chunk-high",
912
- source_uri=None,
913
- document_id="94667191",
914
- lexical_rank=0.4,
915
- content_text="tài liệu app center",
916
- document_metadata={
917
- "source_type": "confluence_page",
918
- "title": "MINIAPP.02.04.02 KBNV cho App Center",
919
- },
920
- ),
921
- ],
922
- )
923
- registry._doc_query_adapter = adapter
924
-
925
- def _lookup(*, chunk_id, source_uri, document_id, repo_key):
926
- _ = chunk_id, source_uri, repo_key
927
- return {
928
- "chunk_id": f"chunk-{document_id}",
929
- "source_uri": "",
930
- "document_id": document_id,
931
- "source_type": "confluence_page",
932
- "document_metadata": {"source_type": "confluence_page"},
933
- }
934
-
935
- registry._lookup_doc_chunk = _lookup # type: ignore[method-assign]
936
-
937
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "tài liệu tích hợp app center", "limit": 2})
938
-
939
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-high", "chunk:chunk-low"]
940
-
941
- def test_search_docs_uses_support_flow_recovery_query_when_log_requirement_is_excluded(self) -> None:
942
- registry = ToolRegistry(
943
- state_dsn="postgresql://user:pass@host/db",
944
- project_key="project_a",
945
- repo_key="repo_a",
946
- )
947
- adapter = Mock()
948
- adapter.query_with_meta.side_effect = [
949
- SimpleNamespace(
950
- meta=SimpleNamespace(status="ok", reason=None),
951
- results=[
952
- SimpleNamespace(
953
- chunk_id="chunk-artifact-1",
954
- source_uri=None,
955
- document_id="doc-artifact-1",
956
- lexical_rank=5.0,
957
- content_text="generated checklist output",
958
- document_metadata={
959
- "source_type": "code_file",
960
- "doc_class": "canonical_code",
961
- "file_path": "reports/verification/live_eval/run-1/audit-checklist.json",
962
- },
963
- ),
964
- ],
965
- ),
966
- SimpleNamespace(
967
- meta=SimpleNamespace(status="ok", reason=None),
968
- results=[
969
- SimpleNamespace(
970
- chunk_id="chunk-artifact-2",
971
- source_uri=None,
972
- document_id="doc-artifact-2",
973
- lexical_rank=4.0,
974
- content_text="generated checklist output",
975
- document_metadata={
976
- "source_type": "code_file",
977
- "doc_class": "canonical_code",
978
- "file_path": "reports/verification/live_eval/run-2/audit-checklist.json",
979
- },
980
- ),
981
- ],
982
- ),
983
- SimpleNamespace(
984
- meta=SimpleNamespace(status="ok", reason=None),
985
- results=[
986
- SimpleNamespace(
987
- chunk_id="chunk-doc",
988
- source_uri="https://confluence.example/l3-support-process",
989
- document_id="97400253",
990
- lexical_rank=2.0,
991
- content_text="Quy trình hỗ trợ L3 cho log đóng gói và data dump.",
992
- document_metadata={
993
- "source_type": "confluence_page",
994
- "doc_class": "canonical_doc",
995
- },
996
- ),
997
- ],
998
- ),
999
- ]
1000
- registry._doc_query_adapter = adapter
1001
-
1002
- result = registry.invoke(
1003
- ToolName.SEARCH_DOCS,
1004
- {
1005
- "query": "Có quy trình đóng gói Log và Data dump để gửi về đội L3 khi cần điều tra sâu.",
1006
- "limit": 1,
1007
- },
1008
- )
1009
-
1010
- assert adapter.query_with_meta.call_count == 3
1011
- assert adapter.query_with_meta.call_args_list[0].kwargs["repo_key"] == "repo_a"
1012
- assert adapter.query_with_meta.call_args_list[1].kwargs["repo_key"] is None
1013
- assert adapter.query_with_meta.call_args_list[2].kwargs["repo_key"] == "repo_a"
1014
- assert adapter.query_with_meta.call_args_list[2].kwargs["query_text"] == "quy trình hỗ trợ"
1015
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-doc"]
1016
-
1017
- def test_search_docs_requires_high_signal_term_when_present(self) -> None:
1018
- registry = ToolRegistry(
1019
- state_dsn="postgresql://user:pass@host/db",
1020
- project_key="project_a",
1021
- repo_key="repo_a",
1022
- )
1023
- adapter = Mock()
1024
- adapter.query_with_meta.return_value = SimpleNamespace(
1025
- meta=SimpleNamespace(status="ok", reason=None),
1026
- results=[
1027
- SimpleNamespace(
1028
- chunk_id="chunk-1",
1029
- source_uri=None,
1030
- document_id="doc-general",
1031
- lexical_rank=4.0,
1032
- content_text="Integration guide for partner onboarding only.",
1033
- ),
1034
- SimpleNamespace(
1035
- chunk_id="chunk-2",
1036
- source_uri=None,
1037
- document_id="doc-sandbox",
1038
- lexical_rank=3.0,
1039
- content_text="Sandbox simulation endpoint usage for integration tests.",
1040
- ),
1041
- ],
1042
- )
1043
- registry._doc_query_adapter = adapter
1044
-
1045
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "sandbox simulation", "limit": 5})
1046
-
1047
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-2"]
1048
-
1049
- def test_search_docs_keeps_high_confidence_hit_without_required_term_match(self) -> None:
1050
- registry = ToolRegistry(
1051
- state_dsn="postgresql://user:pass@host/db",
1052
- project_key="project_a",
1053
- repo_key="repo_a",
1054
- )
1055
- adapter = Mock()
1056
- adapter.query_with_meta.return_value = SimpleNamespace(
1057
- meta=SimpleNamespace(status="ok", reason=None),
1058
- results=[
1059
- SimpleNamespace(
1060
- chunk_id="chunk-1",
1061
- source_uri=None,
1062
- document_id="doc-governance",
1063
- lexical_rank=3.0,
1064
- content_text="Operational oversight process for partner integrations.",
1065
- ),
1066
- ],
1067
- )
1068
- registry._doc_query_adapter = adapter
1069
-
1070
- result = registry.invoke(ToolName.SEARCH_DOCS, {"query": "governance oversight", "limit": 5})
1071
-
1072
- assert [hit["ref"] for hit in result.payload["hits"]] == ["chunk:chunk-1"]
1073
-
1074
- def test_read_doc_chunk_uses_scoped_state_lookup(self) -> None:
1075
- registry = ToolRegistry(
1076
- state_dsn="postgresql://user:pass@host/db",
1077
- project_key="project_a",
1078
- repo_key="repo_a",
1079
- )
1080
-
1081
- captured: dict[str, Any] = {}
1082
- row = {
1083
- "document_id": "doc-001",
1084
- "source_uri": "https://docs.example/doc",
1085
- "chunk_id": "chunk-001",
1086
- "content_text": "hello from state",
1087
- }
1088
-
1089
- class _Cursor:
1090
- def __enter__(self) -> _Cursor:
1091
- return self
1092
-
1093
- def __exit__(self, exc_type, exc, tb) -> None: # type: ignore[no-untyped-def]
1094
- return None
1095
-
1096
- def execute(self, sql: str, params: tuple[Any, ...]) -> None:
1097
- captured["sql"] = sql
1098
- captured["params"] = params
1099
-
1100
- def fetchone(self) -> dict[str, Any]:
1101
- return row
1102
-
1103
- class _Conn:
1104
- def __init__(self) -> None:
1105
- self._cursor = _Cursor()
1106
-
1107
- def cursor(self) -> _Cursor:
1108
- return self._cursor
1109
-
1110
- registry._state_store = SimpleNamespace(_conn=_Conn())
1111
-
1112
- result = registry.invoke(
1113
- ToolName.READ_DOC_CHUNK,
1114
- {"ref": "source_uri:https://docs.example/doc"},
1115
- )
1116
-
1117
- assert "audit_state.corpus_documents" in captured["sql"]
1118
- assert captured["params"][0] == "project_a"
1119
- assert captured["params"][1] == "repo_a"
1120
- assert result.payload == {
1121
- "ref": "chunk:chunk-001",
1122
- "chunk_id": "chunk-001",
1123
- "content": "hello from state",
1124
- "page_id": None,
1125
- "page_title": None,
1126
- "source_url": "https://docs.example/doc",
1127
- "space_key": None,
1128
- "start_line": None,
1129
- "end_line": None,
1130
- }
1131
-
1132
- def test_read_doc_chunk_retries_without_repo_scope_when_repo_scoped_not_found(self) -> None:
1133
- registry = ToolRegistry(
1134
- state_dsn="postgresql://user:pass@host/db",
1135
- project_key="project_a",
1136
- repo_key="repo_a",
1137
- )
1138
-
1139
- params_history: list[tuple[Any, ...]] = []
1140
- responses: list[dict[str, Any] | None] = [None]
1141
- row = {
1142
- "document_id": "doc-010",
1143
- "source_uri": "https://docs.example/doc-fallback",
1144
- "chunk_id": "chunk-010",
1145
- "content_text": "fallback row",
1146
- }
1147
- responses.append(row)
1148
-
1149
- class _Cursor:
1150
- def __enter__(self) -> _Cursor:
1151
- return self
1152
-
1153
- def __exit__(self, exc_type, exc, tb) -> None: # type: ignore[no-untyped-def]
1154
- return None
1155
-
1156
- def execute(self, sql: str, params: tuple[Any, ...]) -> None:
1157
- del sql
1158
- params_history.append(params)
1159
-
1160
- def fetchone(self) -> dict[str, Any] | None:
1161
- return responses.pop(0) if responses else row
1162
-
1163
- class _Conn:
1164
- def cursor(self) -> _Cursor:
1165
- return _Cursor()
1166
-
1167
- registry._state_store = SimpleNamespace(_conn=_Conn())
1168
-
1169
- result = registry.invoke(
1170
- ToolName.READ_DOC_CHUNK,
1171
- {"ref": "source_uri:https://docs.example/doc-fallback"},
1172
- )
1173
-
1174
- assert len(params_history) == 2
1175
- assert params_history[0][1] == "repo_a"
1176
- assert params_history[1][1] is None
1177
- assert result.payload["chunk_id"] == "chunk-010"
1178
-
1179
- def test_read_doc_chunk_extracts_document_id_from_confluence_page_url(self) -> None:
1180
- registry = ToolRegistry(
1181
- state_dsn="postgresql://user:pass@host/db",
1182
- project_key="project_a",
1183
- repo_key="repo_a",
1184
- )
1185
-
1186
- captured: dict[str, Any] = {}
1187
- row = {
1188
- "document_id": "74014721",
1189
- "source_uri": None,
1190
- "chunk_id": "chunk-74014721-0",
1191
- "content_text": "confluence chunk",
1192
- }
1193
-
1194
- class _Cursor:
1195
- def __enter__(self) -> _Cursor:
1196
- return self
1197
-
1198
- def __exit__(self, exc_type, exc, tb) -> None: # type: ignore[no-untyped-def]
1199
- return None
1200
-
1201
- def execute(self, sql: str, params: tuple[Any, ...]) -> None:
1202
- captured["sql"] = sql
1203
- captured["params"] = params
1204
-
1205
- def fetchone(self) -> dict[str, Any]:
1206
- return row
1207
-
1208
- class _Conn:
1209
- def cursor(self) -> _Cursor:
1210
- return _Cursor()
1211
-
1212
- registry._state_store = SimpleNamespace(_conn=_Conn())
1213
-
1214
- result = registry.invoke(
1215
- ToolName.READ_DOC_CHUNK,
1216
- {"ref": "http://10.254.136.35:8090/pages/viewpage.action?pageId=74014721"},
1217
- )
1218
-
1219
- assert "audit_state.corpus_documents" in captured["sql"]
1220
- assert captured["params"][8] == "74014721"
1221
- assert captured["params"][9] == "74014721"
1222
- assert result.payload["ref"] == "chunk:chunk-74014721-0"
1223
- assert result.payload["chunk_id"] == "chunk-74014721-0"
1224
-
1225
- def test_read_doc_chunk_rejects_excluded_artifact_content(self) -> None:
1226
- registry = ToolRegistry(
1227
- state_dsn="postgresql://user:pass@host/db",
1228
- project_key="project_a",
1229
- repo_key="repo_a",
1230
- )
1231
- row = {
1232
- "document_id": "4ec4e588187e6771",
1233
- "source_uri": None,
1234
- "source_type": "confluence_page",
1235
- "document_metadata": {
1236
- "source_type": "code_file",
1237
- "doc_class": "canonical_code",
1238
- "file_path": "reports/verification/live_eval/run-1/audit-checklist.json",
1239
- },
1240
- "chunk_id": "chunk-artifact",
1241
- "content_text": "generated checklist output",
1242
- }
1243
-
1244
- class _Cursor:
1245
- def __enter__(self) -> _Cursor:
1246
- return self
1247
-
1248
- def __exit__(self, exc_type, exc, tb) -> None: # type: ignore[no-untyped-def]
1249
- return None
1250
-
1251
- def execute(self, sql: str, params: tuple[Any, ...]) -> None:
1252
- del sql, params
1253
-
1254
- def fetchone(self) -> dict[str, Any]:
1255
- return row
1256
-
1257
- class _Conn:
1258
- def cursor(self) -> _Cursor:
1259
- return _Cursor()
1260
-
1261
- registry._state_store = SimpleNamespace(_conn=_Conn())
1262
-
1263
- with pytest.raises(ToolExecutionError) as exc_info:
1264
- registry.invoke(
1265
- ToolName.READ_DOC_CHUNK,
1266
- {"ref": "document_id:4ec4e588187e6771"},
1267
- )
1268
-
1269
- payload = json.loads(str(exc_info.value))
1270
- assert payload["error"]["code"] == "doc_chunk_excluded"
1271
-
1272
- @pytest.mark.parametrize(
1273
- ("source_uri", "document_id", "title", "page_title", "expected"),
1274
- [
1275
- # Existing markers (regression)
1276
- ("document://attachment:audit-checklist.json", "abc123", "audit-checklist.json", None, True),
1277
- ("document://attachment:workflow-summary.json", "def456", "workflow-summary.json", None, True),
1278
- # New markers added for corpus hygiene
1279
- (
1280
- "document://attachment:audit-checklist.retrieval-trace.json",
1281
- "rt1",
1282
- "audit-checklist.retrieval-trace.json",
1283
- None,
1284
- True,
1285
- ),
1286
- (
1287
- "document://attachment:audit-checklist.security-evidence.preflight.json",
1288
- "se1",
1289
- "audit-checklist.security-evidence.preflight.json",
1290
- None,
1291
- True,
1292
- ),
1293
- ("document://attachment:run-history.json", "rh1", "run-history.json", None, True),
1294
- ("attachment://88730243/att88730245", "attachment:att88730245", "project-readiness.json", None, True),
1295
- (None, "audit results - miniapp-be", None, None, True),
1296
- (
1297
- "document://attachment:att88727031",
1298
- "attachment:att88727031",
1299
- None,
1300
- "code_evidence_pack.json",
1301
- True,
1302
- ),
1303
- # Negative cases — real docs must NOT be excluded
1304
- ("https://confluence/display/PROJ/API+Design", "page123", "API Design Guide", None, False),
1305
- ("https://confluence/display/PROJ/BRD", "brd456", "Business Requirements Document", None, False),
1306
- ],
1307
- )
1308
- def test_is_excluded_docs_artifact_catches_new_patterns(
1309
- self,
1310
- source_uri: str | None,
1311
- document_id: str | None,
1312
- title: str | None,
1313
- page_title: str | None,
1314
- expected: bool,
1315
- ) -> None:
1316
- metadata: dict[str, Any] = {}
1317
- if title:
1318
- metadata["title"] = title
1319
- if page_title:
1320
- metadata["page_title"] = page_title
1321
- result = ToolRegistry._is_excluded_docs_artifact(
1322
- source_uri=source_uri,
1323
- document_id=document_id,
1324
- metadata=metadata,
1325
- )
1326
- assert result is expected, (
1327
- f"Expected {expected} for source_uri={source_uri!r}, document_id={document_id!r}, title={title!r}"
1328
- )
1329
-
1330
- def test_search_code_maps_rg_output_deterministically(
1331
- self, monkeypatch: pytest.MonkeyPatch, tmp_path: Path
1332
- ) -> None:
1333
- repo_path = tmp_path / "repo"
1334
- repo_path.mkdir()
1335
-
1336
- registry = ToolRegistry(repo_path=str(repo_path))
1337
- stdout = "\n".join(
1338
- [
1339
- f"{repo_path / 'b.py'}:7:delta",
1340
- f"{repo_path / 'a.py'}:12:beta",
1341
- f"{repo_path / 'a.py'}:3:alpha",
1342
- ],
1343
- )
1344
-
1345
- monkeypatch.setattr(
1346
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1347
- lambda *args, **kwargs: SimpleNamespace(returncode=0, stdout=stdout, stderr=""),
1348
- )
1349
-
1350
- result = registry.invoke(ToolName.SEARCH_CODE, {"query": "x", "limit": 2})
1351
- assert [hit["ref"] for hit in result.payload["hits"]] == ["code:a.py:3", "code:a.py:12"]
1352
- assert [hit["excerpt"] for hit in result.payload["hits"]] == ["alpha", "beta"]
1353
- assert result.payload["hits"][0]["score"] >= result.payload["hits"][1]["score"]
1354
-
1355
- def test_search_code_runs_rg_in_ignore_case_mode(
1356
- self,
1357
- monkeypatch: pytest.MonkeyPatch,
1358
- tmp_path: Path,
1359
- ) -> None:
1360
- repo_path = tmp_path / "repo"
1361
- repo_path.mkdir()
1362
- registry = ToolRegistry(repo_path=str(repo_path))
1363
- captured: dict[str, Any] = {}
1364
-
1365
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1366
- captured["command"] = list(args[0])
1367
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1368
-
1369
- monkeypatch.setattr(
1370
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1371
- _fake_run,
1372
- )
1373
-
1374
- registry.invoke(ToolName.SEARCH_CODE, {"query": "Hexagonal", "limit": 3})
1375
-
1376
- command = captured.get("command") or []
1377
- assert "--ignore-case" in command
1378
-
1379
- def test_search_code_uses_code_scoped_globs_before_broad_fallback(
1380
- self,
1381
- monkeypatch: pytest.MonkeyPatch,
1382
- tmp_path: Path,
1383
- ) -> None:
1384
- repo_path = tmp_path / "repo"
1385
- repo_path.mkdir()
1386
- registry = ToolRegistry(repo_path=str(repo_path))
1387
- commands: list[list[str]] = []
1388
-
1389
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1390
- command = list(args[0])
1391
- commands.append(command)
1392
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1393
-
1394
- monkeypatch.setattr(
1395
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1396
- _fake_run,
1397
- )
1398
-
1399
- registry.invoke(ToolName.SEARCH_CODE, {"query": "Hexagonal", "limit": 3})
1400
-
1401
- assert commands
1402
- assert any("-g" in command for command in commands)
1403
- assert any("-g" not in command for command in commands)
1404
- assert any("*.py" in command for command in commands)
1405
-
1406
- def test_search_code_falls_back_to_broad_hits_when_code_scoped_is_empty(
1407
- self,
1408
- monkeypatch: pytest.MonkeyPatch,
1409
- tmp_path: Path,
1410
- ) -> None:
1411
- repo_path = tmp_path / "repo"
1412
- repo_path.mkdir()
1413
- registry = ToolRegistry(repo_path=str(repo_path))
1414
- docs_path = repo_path / "docs" / "DEPLOYMENT_GUIDE.md"
1415
- call_count = {"value": 0}
1416
-
1417
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1418
- command = list(args[0])
1419
- call_count["value"] += 1
1420
- if "-g" in command:
1421
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1422
- return SimpleNamespace(
1423
- returncode=0,
1424
- stdout=f"{docs_path}:32:offline deployment instructions",
1425
- stderr="",
1426
- )
1427
-
1428
- monkeypatch.setattr(
1429
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1430
- _fake_run,
1431
- )
1432
-
1433
- result = registry.invoke(ToolName.SEARCH_CODE, {"query": "offline deployment", "limit": 3})
1434
-
1435
- assert call_count["value"] >= 2
1436
- assert result.payload["hits"]
1437
- assert result.payload["hits"][0]["title"] == "docs/DEPLOYMENT_GUIDE.md"
1438
-
1439
- def test_search_code_prefers_observability_paths_for_logging_query(
1440
- self,
1441
- monkeypatch: pytest.MonkeyPatch,
1442
- tmp_path: Path,
1443
- ) -> None:
1444
- repo_path = tmp_path / "repo"
1445
- repo_path.mkdir()
1446
- registry = ToolRegistry(repo_path=str(repo_path))
1447
- logging_path = repo_path / "src" / "logging" / "request_logger.py"
1448
- constants_path = repo_path / "src" / "constants.py"
1449
-
1450
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1451
- query = str(args[0][-2])
1452
- if query == "structured logging format":
1453
- stdout = ""
1454
- elif query in {"structured", "logging"}:
1455
- stdout = "\n".join(
1456
- [
1457
- f"{constants_path}:4:STRUCTURED_EVENT = 'request'",
1458
- f"{logging_path}:22:def configure_structured_logging():",
1459
- ],
1460
- )
1461
- elif query == "format":
1462
- stdout = f"{logging_path}:30:formatter = JSONFormatter()"
1463
- else:
1464
- stdout = ""
1465
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1466
-
1467
- monkeypatch.setattr(
1468
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1469
- _fake_run,
1470
- )
1471
-
1472
- result = registry.invoke(ToolName.SEARCH_CODE, {"query": "structured logging format", "limit": 3})
1473
-
1474
- assert result.payload["hits"]
1475
- assert result.payload["hits"][0]["title"] == "src/logging/request_logger.py"
1476
- assert result.payload["hits"][0]["score"] > result.payload["hits"][-1]["score"]
1477
-
1478
- def test_search_code_alerting_query_filters_slack_time_false_positive(
1479
- self,
1480
- monkeypatch: pytest.MonkeyPatch,
1481
- tmp_path: Path,
1482
- ) -> None:
1483
- repo_path = tmp_path / "repo"
1484
- repo_path.mkdir()
1485
- registry = ToolRegistry(repo_path=str(repo_path))
1486
- false_positive_path = repo_path / "src" / "scheduler" / "timing.py"
1487
- test_fixture_path = repo_path / "tests" / "unit" / "alerting" / "test_alert_rules.py"
1488
- alerting_path = repo_path / "config" / "alerting" / "slack_alert_rules.yml"
1489
-
1490
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1491
- stdout = "\n".join(
1492
- [
1493
- f"{false_positive_path}:12:batch_overhead_ms: Slack time for formatting + bookkeeping",
1494
- f"{test_fixture_path}:19:slack alert receiver test fixture",
1495
- f"{alerting_path}:22:alertmanager receiver sends slack webhook notification",
1496
- ],
1497
- )
1498
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1499
-
1500
- monkeypatch.setattr(
1501
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1502
- _fake_run,
1503
- )
1504
-
1505
- result = registry.invoke(
1506
- ToolName.SEARCH_CODE,
1507
- {"query": "alerting rules via email slack telegram channels", "limit": 5},
1508
- )
1509
-
1510
- titles = [hit["title"] for hit in result.payload["hits"]]
1511
- assert "config/alerting/slack_alert_rules.yml" in titles
1512
- assert "src/scheduler/timing.py" not in titles
1513
- assert "tests/unit/alerting/test_alert_rules.py" not in titles
1514
-
1515
- def test_search_code_security_scan_query_filters_internal_and_test_paths(
1516
- self,
1517
- monkeypatch: pytest.MonkeyPatch,
1518
- tmp_path: Path,
1519
- ) -> None:
1520
- repo_path = tmp_path / "repo"
1521
- repo_path.mkdir()
1522
- registry = ToolRegistry(repo_path=str(repo_path))
1523
- internal_path = repo_path / "src" / "vds_audit_orchestrator" / "engine" / "row_evaluator_types.py"
1524
- internal_publisher_path = (
1525
- repo_path
1526
- / "audit_orchestrator"
1527
- / "src"
1528
- / "vds_audit_orchestrator"
1529
- / "publishers"
1530
- / "confluence_publisher.py"
1531
- )
1532
- test_path = repo_path / "tests" / "unit" / "security" / "test_scans.py"
1533
- false_positive_path = repo_path / "src" / "scheduler" / "timing.py"
1534
- pipeline_path = repo_path / ".github" / "workflows" / "security_scan.yml"
1535
-
1536
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1537
- stdout = "\n".join(
1538
- [
1539
- f"{internal_path}:44:high/critical vulnerability scoring constants",
1540
- f"{internal_publisher_path}:88:high critical fail severity mapping",
1541
- f"{test_path}:20:sast dast unit fixture",
1542
- f"{false_positive_path}:26:importance level high critical for queue jobs",
1543
- f"{pipeline_path}:12:name: SAST and DAST scan",
1544
- ],
1545
- )
1546
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1547
-
1548
- monkeypatch.setattr(
1549
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1550
- _fake_run,
1551
- )
1552
-
1553
- result = registry.invoke(
1554
- ToolName.SEARCH_CODE,
1555
- {"query": "SAST DAST vulnerability high critical security scan", "limit": 5},
1556
- )
1557
-
1558
- titles = [hit["title"] for hit in result.payload["hits"]]
1559
- assert ".github/workflows/security_scan.yml" in titles
1560
- assert "src/vds_audit_orchestrator/engine/row_evaluator_types.py" not in titles
1561
- assert "audit_orchestrator/src/vds_audit_orchestrator/publishers/confluence_publisher.py" not in titles
1562
- assert "tests/unit/security/test_scans.py" not in titles
1563
- assert "src/scheduler/timing.py" not in titles
1564
-
1565
- def test_build_code_search_queries_security_scan_omits_generic_severity_terms(self, tmp_path: Path) -> None:
1566
- repo_path = tmp_path / "repo"
1567
- repo_path.mkdir()
1568
- registry = ToolRegistry(repo_path=str(repo_path))
1569
-
1570
- queries = registry._build_code_search_queries("SAST DAST vulnerability high critical security scan")
1571
- lowered = [query.lower() for query in queries]
1572
-
1573
- assert "high" not in lowered
1574
- assert "critical" not in lowered
1575
- assert "sast" in lowered
1576
- assert "dast" in lowered
1577
-
1578
- def test_extract_query_terms_mixed_language_filters_low_signal_and_keeps_high_signal_short_terms(self) -> None:
1579
- terms = ToolRegistry._extract_query_terms("Kiểm tra phân tích SQL kết nối cơ sở dữ liệu repository")
1580
-
1581
- assert "sql" in terms
1582
- assert "repository" in terms
1583
- assert "kiem" not in terms
1584
- assert "tra" not in terms
1585
- assert "phan" not in terms
1586
- assert "tich" not in terms
1587
-
1588
- def test_is_db_decoupling_query_accepts_vietnamese_and_ascii_aliases(self) -> None:
1589
- assert ToolRegistry._is_db_decoupling_query("Kiểm tra kết nối cơ sở dữ liệu liên service")
1590
- assert ToolRegistry._is_db_decoupling_query("check datasource connection string and schema access")
1591
-
1592
- def test_build_code_search_queries_db_intent_adds_specialized_expansions(self, tmp_path: Path) -> None:
1593
- repo_path = tmp_path / "repo"
1594
- repo_path.mkdir()
1595
- registry = ToolRegistry(repo_path=str(repo_path))
1596
-
1597
- queries = registry._build_code_search_queries("Kiểm tra datasource và schema repository")
1598
- lowered = {query.lower() for query in queries}
1599
-
1600
- assert len(queries) <= 12
1601
- assert "datasource" in lowered
1602
- assert "entitymanager" in lowered
1603
- assert "@repository" in lowered
1604
- assert "datasource entitymanager nativequery" in lowered
1605
-
1606
- def test_build_code_search_queries_project_scope_dependency_adds_source_structure_expansions(
1607
- self, tmp_path: Path
1608
- ) -> None:
1609
- repo_path = tmp_path / "repo"
1610
- repo_path.mkdir()
1611
- registry = ToolRegistry(repo_path=str(repo_path))
1612
-
1613
- queries = registry._build_code_search_queries(
1614
- "No circular dependency in dependency graph between modules/services for clean architecture"
1615
- )
1616
- lowered = {query.lower() for query in queries}
1617
-
1618
- assert len(queries) <= 10
1619
- assert "module service import" in lowered
1620
- assert "client integration config" in lowered
1621
- assert "port adapter usecase" in lowered
1622
-
1623
- def test_search_code_db_intent_uses_adaptive_ripgrep_max_count(
1624
- self,
1625
- monkeypatch: pytest.MonkeyPatch,
1626
- tmp_path: Path,
1627
- ) -> None:
1628
- repo_path = tmp_path / "repo"
1629
- repo_path.mkdir()
1630
- registry = ToolRegistry(repo_path=str(repo_path))
1631
-
1632
- observed_max_counts: list[int] = []
1633
-
1634
- def _fake_run_code_search_query( # type: ignore[no-untyped-def]
1635
- *,
1636
- query: str,
1637
- search_root: Path,
1638
- scope_globs: tuple[str, ...] | None = None,
1639
- max_count: int = 5,
1640
- ) -> Any:
1641
- _ = query, search_root, scope_globs
1642
- observed_max_counts.append(int(max_count))
1643
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1644
-
1645
- monkeypatch.setattr(registry, "_run_code_search_query", _fake_run_code_search_query)
1646
-
1647
- registry.invoke(
1648
- ToolName.SEARCH_CODE,
1649
- {"query": "Kiểm tra datasource connection string schema repository", "limit": 3},
1650
- )
1651
- assert 12 in observed_max_counts
1652
- assert 20 in observed_max_counts
1653
-
1654
- observed_max_counts.clear()
1655
- registry.invoke(ToolName.SEARCH_CODE, {"query": "hexagonal architecture adapter", "limit": 3})
1656
- assert set(observed_max_counts) == {5}
1657
-
1658
- def test_code_path_relevance_bonus_for_db_query_demotes_service_impl_paths(self) -> None:
1659
- query = "database schema datasource native sql repository"
1660
- config_bonus = ToolRegistry._code_path_relevance_bonus(
1661
- path_value="src/main/java/com/example/config/database/CampaignDatabaseConfig.java",
1662
- query=query,
1663
- )
1664
- repository_bonus = ToolRegistry._code_path_relevance_bonus(
1665
- path_value="src/main/java/com/example/repository/campaign/ConfigurationRepository.java",
1666
- query=query,
1667
- )
1668
- service_bonus = ToolRegistry._code_path_relevance_bonus(
1669
- path_value="src/main/java/com/example/service/impl/ApprovalManagementServiceImpl.java",
1670
- query=query,
1671
- )
1672
-
1673
- assert config_bonus > service_bonus
1674
- assert repository_bonus > service_bonus
1675
- assert config_bonus > 0.0
1676
-
1677
- def test_search_code_scope_config_returns_config_only_hits(
1678
- self,
1679
- monkeypatch: pytest.MonkeyPatch,
1680
- tmp_path: Path,
1681
- ) -> None:
1682
- repo_path = tmp_path / "repo"
1683
- repo_path.mkdir()
1684
- config_root = repo_path / "config" / "service-a" / "staging"
1685
- config_root.mkdir(parents=True)
1686
-
1687
- registry = ToolRegistry(
1688
- repo_path=str(repo_path),
1689
- config_root=str(config_root),
1690
- )
1691
-
1692
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1693
- command = list(args[0])
1694
- search_root = Path(str(command[-1]))
1695
- if search_root == config_root:
1696
- stdout = f"{config_root / 'application.yml'}:12:needle-config-value"
1697
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1698
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1699
-
1700
- monkeypatch.setattr(
1701
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1702
- _fake_run,
1703
- )
1704
-
1705
- result = registry.invoke(
1706
- ToolName.SEARCH_CODE,
1707
- {"query": "needle-config-value", "scope": "config", "limit": 5},
1708
- )
1709
-
1710
- assert len(result.payload["hits"]) == 1
1711
- hit = result.payload["hits"][0]
1712
- assert hit["ref"] == "config:application.yml:12"
1713
- assert hit["title"] == "application.yml"
1714
- assert hit["excerpt"] == "needle-config-value"
1715
- assert hit["source"] == "config"
1716
-
1717
- def test_search_code_scope_all_emits_source_tags_for_code_config_and_lib(
1718
- self,
1719
- monkeypatch: pytest.MonkeyPatch,
1720
- tmp_path: Path,
1721
- ) -> None:
1722
- repo_path = tmp_path / "repo"
1723
- repo_path.mkdir()
1724
- config_root = repo_path / "config" / "service-a"
1725
- config_root.mkdir(parents=True)
1726
- lib_root = repo_path / "libs" / "shared-core"
1727
- lib_root.mkdir(parents=True)
1728
-
1729
- registry = ToolRegistry(
1730
- repo_path=str(repo_path),
1731
- config_root=str(config_root),
1732
- lib_roots=[str(lib_root)],
1733
- )
1734
-
1735
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1736
- command = list(args[0])
1737
- search_root = Path(str(command[-1]))
1738
- if search_root == repo_path:
1739
- stdout = f"{repo_path / 'src' / 'main.py'}:5:needle"
1740
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1741
- if search_root == config_root:
1742
- stdout = f"{config_root / 'production.yml'}:8:needle"
1743
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1744
- if search_root == lib_root:
1745
- stdout = f"{lib_root / 'src' / 'helper.py'}:4:needle"
1746
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1747
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1748
-
1749
- monkeypatch.setattr(
1750
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1751
- _fake_run,
1752
- )
1753
-
1754
- result = registry.invoke(ToolName.SEARCH_CODE, {"query": "needle", "scope": "all", "limit": 10})
1755
- hits = result.payload["hits"]
1756
-
1757
- assert hits
1758
- assert {"code", "config", "lib"} == {item["source"] for item in hits}
1759
- assert any(item["ref"].startswith("code:") for item in hits)
1760
- assert any(item["ref"].startswith("config:") for item in hits)
1761
- assert any(item["ref"].startswith("lib:") for item in hits)
1762
-
1763
- def test_search_code_scope_config_resolves_env_app_config_root(
1764
- self,
1765
- monkeypatch: pytest.MonkeyPatch,
1766
- tmp_path: Path,
1767
- ) -> None:
1768
- # VDS_AUDIT_APP_CONFIG_PATH is treated as a trusted external root.
1769
- # When the app-config tree contains a subdirectory matching the repo
1770
- # name, _resolve_env_config_root resolves it and the config scope
1771
- # search includes it.
1772
- repo_path = tmp_path / "service-a"
1773
- repo_path.mkdir()
1774
- app_config_root = tmp_path / "app-config"
1775
- (app_config_root / "service-a" / "staging").mkdir(parents=True)
1776
-
1777
- registry = ToolRegistry(repo_path=str(repo_path))
1778
- observed_roots: list[Path] = []
1779
-
1780
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1781
- command = list(args[0])
1782
- observed_roots.append(Path(str(command[-1])))
1783
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1784
-
1785
- monkeypatch.setenv("VDS_AUDIT_APP_CONFIG_PATH", str(app_config_root))
1786
- monkeypatch.delenv("VDS_AUDIT_CONFIG_ROOT", raising=False)
1787
- monkeypatch.setattr(
1788
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1789
- _fake_run,
1790
- )
1791
-
1792
- registry.invoke(ToolName.SEARCH_CODE, {"query": "needle", "scope": "config", "limit": 3})
1793
-
1794
- # The resolved config root (app-config/service-a) is trusted and searched.
1795
- assert len(observed_roots) >= 1
1796
- assert any("service-a" in str(root) for root in observed_roots)
1797
-
1798
- def test_search_code_scope_config_resolves_env_config_root(
1799
- self,
1800
- monkeypatch: pytest.MonkeyPatch,
1801
- tmp_path: Path,
1802
- ) -> None:
1803
- # VDS_AUDIT_CONFIG_ROOT is treated as a trusted external root.
1804
- # The config scope search includes it even though it lives outside
1805
- # the active repository directory.
1806
- repo_path = tmp_path / "service-a"
1807
- repo_path.mkdir()
1808
- external_config_root = tmp_path / "external-config"
1809
- external_config_root.mkdir()
1810
-
1811
- registry = ToolRegistry(repo_path=str(repo_path))
1812
- observed_roots: list[Path] = []
1813
-
1814
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1815
- command = list(args[0])
1816
- observed_roots.append(Path(str(command[-1])))
1817
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1818
-
1819
- monkeypatch.setenv("VDS_AUDIT_CONFIG_ROOT", str(external_config_root))
1820
- monkeypatch.delenv("VDS_AUDIT_APP_CONFIG_PATH", raising=False)
1821
- monkeypatch.setattr(
1822
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1823
- _fake_run,
1824
- )
1825
-
1826
- registry.invoke(ToolName.SEARCH_CODE, {"query": "needle", "scope": "config", "limit": 3})
1827
-
1828
- # The env-specified config root is trusted and searched.
1829
- assert len(observed_roots) >= 1
1830
- assert any("external-config" in str(root) for root in observed_roots)
1831
-
1832
- def test_search_code_scope_all_ignores_external_env_lib_roots(
1833
- self,
1834
- monkeypatch: pytest.MonkeyPatch,
1835
- tmp_path: Path,
1836
- ) -> None:
1837
- repo_path = tmp_path / "repo"
1838
- repo_path.mkdir()
1839
- external_lib_root = tmp_path / "shared-libs" / "common"
1840
- external_lib_root.mkdir(parents=True)
1841
- registry = ToolRegistry(repo_path=str(repo_path))
1842
- observed_roots: list[Path] = []
1843
-
1844
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1845
- command = list(args[0])
1846
- observed_roots.append(Path(str(command[-1])))
1847
- return SimpleNamespace(returncode=1, stdout="", stderr="")
1848
-
1849
- monkeypatch.setenv("VDS_AUDIT_LIB_ROOTS", str(external_lib_root))
1850
- monkeypatch.setattr(
1851
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1852
- _fake_run,
1853
- )
1854
-
1855
- registry.invoke(ToolName.SEARCH_CODE, {"query": "needle", "scope": "all", "limit": 3})
1856
-
1857
- assert external_lib_root not in observed_roots
1858
- assert observed_roots
1859
- assert set(observed_roots) == {repo_path}
1860
-
1861
- def test_code_path_relevance_bonus_applies_business_control_domain_weighting_and_penalties(self) -> None:
1862
- query = "pricing sla support security compliance controls"
1863
-
1864
- domain_path_bonus = ToolRegistry._code_path_relevance_bonus(
1865
- path_value="src/billing/pricing_sla_support_security_compliance_service.py",
1866
- query=query,
1867
- )
1868
- internal_path_bonus = ToolRegistry._code_path_relevance_bonus(
1869
- path_value="src/vds_audit_orchestrator/agents/helpers/config_loader.py",
1870
- query=query,
1871
- )
1872
- test_path_bonus = ToolRegistry._code_path_relevance_bonus(
1873
- path_value="tests/unit/billing/test_controls.py",
1874
- query=query,
1875
- )
1876
- dotfile_path_bonus = ToolRegistry._code_path_relevance_bonus(
1877
- path_value=".github/workflows/ci.yml",
1878
- query=query,
1879
- )
1880
-
1881
- assert domain_path_bonus > 0.0
1882
- assert internal_path_bonus < 0.0
1883
- assert test_path_bonus < 0.0
1884
- assert dotfile_path_bonus < 0.0
1885
- assert domain_path_bonus > internal_path_bonus
1886
-
1887
- def test_search_code_business_control_query_demotes_internal_test_and_dotfile_paths(
1888
- self,
1889
- monkeypatch: pytest.MonkeyPatch,
1890
- tmp_path: Path,
1891
- ) -> None:
1892
- repo_path = tmp_path / "repo"
1893
- repo_path.mkdir()
1894
- registry = ToolRegistry(repo_path=str(repo_path))
1895
- domain_path = repo_path / "src" / "billing" / "pricing_sla_support_security_compliance_service.py"
1896
- internal_path = repo_path / "src" / "vds_audit_orchestrator" / "agents" / "helpers" / "config_loader.py"
1897
- test_path = repo_path / "tests" / "unit" / "billing" / "test_controls.py"
1898
- dotfile_path = repo_path / ".github" / "workflows" / "ci.yml"
1899
- excerpt = "pricing sla support security compliance controls workflow"
1900
-
1901
- def _fake_run(*args, **kwargs): # type: ignore[no-untyped-def]
1902
- query = str(args[0][-2])
1903
- if query == "pricing sla support security compliance controls":
1904
- stdout = ""
1905
- else:
1906
- stdout = "\n".join(
1907
- [
1908
- f"{internal_path}:5:{excerpt}",
1909
- f"{dotfile_path}:9:{excerpt}",
1910
- f"{test_path}:14:{excerpt}",
1911
- f"{domain_path}:28:{excerpt}",
1912
- ],
1913
- )
1914
- return SimpleNamespace(returncode=0, stdout=stdout, stderr="")
1915
-
1916
- monkeypatch.setattr(
1917
- "vds_audit_orchestrator.agents.tool_registry.subprocess.run",
1918
- _fake_run,
1919
- )
1920
-
1921
- result = registry.invoke(
1922
- ToolName.SEARCH_CODE, {"query": "pricing sla support security compliance controls", "limit": 4}
1923
- )
1924
-
1925
- titles = [hit["title"] for hit in result.payload["hits"]]
1926
- assert titles[0] == "src/billing/pricing_sla_support_security_compliance_service.py"
1927
- assert titles.index("src/billing/pricing_sla_support_security_compliance_service.py") < titles.index(
1928
- "src/vds_audit_orchestrator/agents/helpers/config_loader.py",
1929
- )
1930
- assert titles.index("src/billing/pricing_sla_support_security_compliance_service.py") < titles.index(
1931
- "tests/unit/billing/test_controls.py",
1932
- )
1933
- assert titles.index("src/billing/pricing_sla_support_security_compliance_service.py") < titles.index(
1934
- ".github/workflows/ci.yml",
1935
- )
1936
-
1937
- def test_read_code_file_blocks_path_traversal(self, tmp_path: Path) -> None:
1938
- repo_path = tmp_path / "repo"
1939
- repo_path.mkdir()
1940
- registry = ToolRegistry(repo_path=str(repo_path))
1941
-
1942
- with pytest.raises(ToolExecutionError) as exc_info:
1943
- registry.invoke(ToolName.READ_CODE_FILE, {"path": "../secret.txt"})
1944
-
1945
- payload = json.loads(str(exc_info.value))
1946
- assert payload["error"]["code"] == "path_traversal_denied"
1947
-
1948
- def test_read_code_file_supports_line_slicing(self, tmp_path: Path) -> None:
1949
- repo_path = tmp_path / "repo"
1950
- repo_path.mkdir()
1951
- file_path = repo_path / "src" / "main.py"
1952
- file_path.parent.mkdir(parents=True)
1953
- file_path.write_text("line1\nline2\nline3\nline4\n", encoding="utf-8")
1954
-
1955
- registry = ToolRegistry(repo_path=str(repo_path))
1956
- result = registry.invoke(
1957
- ToolName.READ_CODE_FILE,
1958
- {"path": "src/main.py", "start_line": 2, "end_line": 3},
1959
- )
1960
-
1961
- assert result.payload == {"path": "src/main.py", "content": "line2\nline3", "start_line": 2, "end_line": 3}
1962
-
1963
- def test_read_code_file_scope_config_reads_from_config_root(self, tmp_path: Path) -> None:
1964
- repo_path = tmp_path / "repo"
1965
- repo_path.mkdir()
1966
- config_root = repo_path / "config" / "service-a" / "staging"
1967
- config_root.mkdir(parents=True)
1968
- config_file = config_root / "application.yml"
1969
- config_file.write_text("spring:\n profiles: staging\n", encoding="utf-8")
1970
-
1971
- registry = ToolRegistry(
1972
- repo_path=str(repo_path),
1973
- config_root=str(config_root),
1974
- )
1975
- result = registry.invoke(
1976
- ToolName.READ_CODE_FILE,
1977
- {"path": "application.yml", "scope": "config"},
1978
- )
1979
-
1980
- assert result.payload["path"] == "application.yml"
1981
- assert "profiles: staging" in result.payload["content"]
1982
-
1983
- def test_read_code_file_scope_lib_reads_from_named_lib_root(self, tmp_path: Path) -> None:
1984
- repo_path = tmp_path / "repo"
1985
- repo_path.mkdir()
1986
- lib_root = repo_path / "libs" / "shared-core"
1987
- lib_file = lib_root / "src" / "helpers.py"
1988
- lib_file.parent.mkdir(parents=True)
1989
- lib_file.write_text("def helper() -> str:\n return 'ok'\n", encoding="utf-8")
1990
-
1991
- registry = ToolRegistry(
1992
- repo_path=str(repo_path),
1993
- lib_roots=[str(lib_root)],
1994
- )
1995
- result = registry.invoke(
1996
- ToolName.READ_CODE_FILE,
1997
- {"path": "shared-core/src/helpers.py", "scope": "lib"},
1998
- )
1999
-
2000
- assert result.payload["path"] == "shared-core/src/helpers.py"
2001
- assert "def helper" in result.payload["content"]
2002
-
2003
- def test_read_code_file_scope_lib_requires_repo_prefix(self, tmp_path: Path) -> None:
2004
- repo_path = tmp_path / "repo"
2005
- repo_path.mkdir()
2006
- lib_root = repo_path / "libs" / "shared-core"
2007
- lib_file = lib_root / "src" / "helpers.py"
2008
- lib_file.parent.mkdir(parents=True)
2009
- lib_file.write_text("def helper() -> str:\n return 'ok'\n", encoding="utf-8")
2010
-
2011
- registry = ToolRegistry(
2012
- repo_path=str(repo_path),
2013
- lib_roots=[str(lib_root)],
2014
- )
2015
-
2016
- with pytest.raises(ToolExecutionError) as exc_info:
2017
- registry.invoke(
2018
- ToolName.READ_CODE_FILE,
2019
- {"path": "src/helpers.py", "scope": "lib"},
2020
- )
2021
-
2022
- payload = json.loads(str(exc_info.value))
2023
- assert payload["error"]["code"] == "invalid_code_path"
2024
- assert "required_prefixes" in payload["error"]["details"]
2025
- assert payload["error"]["details"]["required_prefixes"] == ["shared-core"]
2026
-
2027
- def test_read_code_file_scope_config_resolves_env_app_config_root(
2028
- self,
2029
- monkeypatch: pytest.MonkeyPatch,
2030
- tmp_path: Path,
2031
- ) -> None:
2032
- # VDS_AUDIT_APP_CONFIG_PATH is a trusted external root. When the
2033
- # app-config tree contains a subdirectory matching the repo name,
2034
- # _resolve_env_config_root resolves it and config-scoped file reads
2035
- # can reach files inside it.
2036
- repo_path = tmp_path / "service-a"
2037
- repo_path.mkdir()
2038
- app_config_root = tmp_path / "app-config"
2039
- config_file = app_config_root / "service-a" / "staging" / "application.yml"
2040
- config_file.parent.mkdir(parents=True)
2041
- config_file.write_text("env: staging\n", encoding="utf-8")
2042
-
2043
- registry = ToolRegistry(repo_path=str(repo_path))
2044
- monkeypatch.setenv("VDS_AUDIT_APP_CONFIG_PATH", str(app_config_root))
2045
- monkeypatch.delenv("VDS_AUDIT_CONFIG_ROOT", raising=False)
2046
-
2047
- result = registry.invoke(
2048
- ToolName.READ_CODE_FILE,
2049
- {"path": "staging/application.yml", "scope": "config"},
2050
- )
2051
-
2052
- assert result.payload["content"].strip() == "env: staging"
2053
-
2054
- def test_read_code_file_scope_config_resolves_env_config_root(
2055
- self,
2056
- monkeypatch: pytest.MonkeyPatch,
2057
- tmp_path: Path,
2058
- ) -> None:
2059
- # VDS_AUDIT_CONFIG_ROOT is a trusted external root. Config-scoped file
2060
- # reads can reach files inside it even though it lives outside the repo.
2061
- repo_path = tmp_path / "service-a"
2062
- repo_path.mkdir()
2063
- external_config_root = tmp_path / "external-config"
2064
- config_file = external_config_root / "application.yml"
2065
- config_file.parent.mkdir(parents=True)
2066
- config_file.write_text("env: external\n", encoding="utf-8")
2067
-
2068
- registry = ToolRegistry(repo_path=str(repo_path))
2069
- monkeypatch.setenv("VDS_AUDIT_CONFIG_ROOT", str(external_config_root))
2070
- monkeypatch.delenv("VDS_AUDIT_APP_CONFIG_PATH", raising=False)
2071
-
2072
- result = registry.invoke(
2073
- ToolName.READ_CODE_FILE,
2074
- {"path": "application.yml", "scope": "config"},
2075
- )
2076
-
2077
- assert result.payload["content"].strip() == "env: external"
2078
-
2079
- def test_read_code_file_scope_lib_rejects_external_env_lib_roots(
2080
- self,
2081
- monkeypatch: pytest.MonkeyPatch,
2082
- tmp_path: Path,
2083
- ) -> None:
2084
- repo_path = tmp_path / "repo"
2085
- repo_path.mkdir()
2086
- external_lib_root = tmp_path / "shared-libs" / "shared-core"
2087
- lib_file = external_lib_root / "src" / "helpers.py"
2088
- lib_file.parent.mkdir(parents=True)
2089
- lib_file.write_text("def helper() -> str:\n return 'external'\n", encoding="utf-8")
2090
-
2091
- registry = ToolRegistry(repo_path=str(repo_path))
2092
- monkeypatch.setenv("VDS_AUDIT_LIB_ROOTS", str(external_lib_root))
2093
-
2094
- with pytest.raises(ToolExecutionError) as exc_info:
2095
- registry.invoke(
2096
- ToolName.READ_CODE_FILE,
2097
- {"path": "shared-core/src/helpers.py", "scope": "lib"},
2098
- )
2099
-
2100
- payload = json.loads(str(exc_info.value))
2101
- assert payload["error"]["code"] == "code_file_not_found"
2102
-
2103
- def test_skill_tools_list_load_and_read_resource(self, monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
2104
- skill_dir = tmp_path / "skills" / "research-skill"
2105
- skill_dir.mkdir(parents=True)
2106
- (skill_dir / "SKILL.md").write_text(
2107
- "---\nname: research-skill\ndescription: research helper\n---\nUse this skill.\n",
2108
- encoding="utf-8",
2109
- )
2110
- (skill_dir / "references").mkdir()
2111
- (skill_dir / "references" / "guide.md").write_text("reference text", encoding="utf-8")
2112
-
2113
- registry = ToolRegistry()
2114
- monkeypatch.setattr(
2115
- registry,
2116
- "_resolve_skills_runtime_policy",
2117
- lambda: {
2118
- "enabled": True,
2119
- "directories": [str(tmp_path / "skills")],
2120
- "allowlist": [],
2121
- "allowed_trust_tiers": ["internal", "external-verified", "external-unverified"],
2122
- "default_trust_tier": "internal",
2123
- "trust_tiers": {},
2124
- "allow_script_execution": False,
2125
- },
2126
- )
2127
- monkeypatch.setattr(
2128
- registry,
2129
- "_collect_skills_metadata",
2130
- lambda **_kwargs: [
2131
- SimpleNamespace(
2132
- name="research-skill",
2133
- metadata_name="research-skill",
2134
- frontmatter_name="research-skill",
2135
- runtime_name="research-skill",
2136
- canonical_name="research-skill",
2137
- description="research helper",
2138
- path=str(skill_dir),
2139
- trust_tier="internal",
2140
- has_scripts=False,
2141
- content_hash="abc123",
2142
- ),
2143
- ],
2144
- )
2145
-
2146
- listed = registry.invoke(ToolName.LIST_SKILLS, {"query": "research", "limit": 10})
2147
- assert listed.payload["skills"][0]["name"] == "research-skill"
2148
-
2149
- loaded = registry.invoke(ToolName.LOAD_SKILL, {"name": "research-skill"})
2150
- assert loaded.payload["found"] is True
2151
- assert "SKILL.md" in loaded.payload["resources"]
2152
-
2153
- read = registry.invoke(
2154
- ToolName.READ_SKILL_RESOURCE,
2155
- {"name": "research-skill", "resource_path": "SKILL.md", "max_chars": 2000},
2156
- )
2157
- assert read.payload["success"] is True
2158
- assert "Use this skill." in read.payload["content"]
2159
- assert read.payload["ref"] == str((skill_dir / "SKILL.md").resolve())
2160
-
2161
- def test_skill_tools_accept_alias_argument_names(self, monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
2162
- skill_dir = tmp_path / "skills" / "research-skill"
2163
- skill_dir.mkdir(parents=True)
2164
- (skill_dir / "SKILL.md").write_text(
2165
- "---\nname: research-skill\ndescription: research helper\n---\nUse this skill.\n",
2166
- encoding="utf-8",
2167
- )
2168
-
2169
- registry = ToolRegistry()
2170
- monkeypatch.setattr(
2171
- registry,
2172
- "_resolve_skills_runtime_policy",
2173
- lambda: {
2174
- "enabled": True,
2175
- "directories": [str(tmp_path / "skills")],
2176
- "allowlist": [],
2177
- "allowed_trust_tiers": ["internal", "external-verified", "external-unverified"],
2178
- "default_trust_tier": "internal",
2179
- "trust_tiers": {},
2180
- "allow_script_execution": False,
2181
- },
2182
- )
2183
- monkeypatch.setattr(
2184
- registry,
2185
- "_collect_skills_metadata",
2186
- lambda **_kwargs: [
2187
- SimpleNamespace(
2188
- name="research-skill",
2189
- metadata_name="research-skill",
2190
- frontmatter_name="research-skill",
2191
- runtime_name="research-skill",
2192
- canonical_name="research-skill",
2193
- description="research helper",
2194
- path=str(skill_dir),
2195
- trust_tier="internal",
2196
- has_scripts=False,
2197
- content_hash="abc123",
2198
- ),
2199
- ],
2200
- )
2201
-
2202
- loaded = registry.invoke(ToolName.LOAD_SKILL, {"skill_name": "research-skill"})
2203
- assert loaded.payload["found"] is True
2204
-
2205
- read = registry.invoke(
2206
- ToolName.READ_SKILL_RESOURCE,
2207
- {"skill_name": "research-skill", "resource_name": "SKILL.md", "max_chars": 2000},
2208
- )
2209
- assert read.payload["success"] is True
2210
- assert "Use this skill." in read.payload["content"]
2211
-
2212
- script = registry.invoke(
2213
- ToolName.RUN_SKILL_SCRIPT,
2214
- {"skill_name": "research-skill", "script": "scripts/run.sh", "args": [], "timeout_seconds": 30},
2215
- )
2216
- assert script.payload["success"] is False
2217
- assert script.payload["error"] == "script_execution_disabled"
2218
-
2219
- def test_read_skill_resource_row_analysis_falls_back_to_skill_md(
2220
- self,
2221
- monkeypatch: pytest.MonkeyPatch,
2222
- tmp_path: Path,
2223
- ) -> None:
2224
- skill_dir = tmp_path / "skills" / "research-skill"
2225
- skill_dir.mkdir(parents=True)
2226
- (skill_dir / "SKILL.md").write_text(
2227
- "---\nname: research-skill\ndescription: research helper\n---\nFallback guidance.\n",
2228
- encoding="utf-8",
2229
- )
2230
-
2231
- registry = ToolRegistry()
2232
- monkeypatch.setattr(
2233
- registry,
2234
- "_resolve_skills_runtime_policy",
2235
- lambda: {
2236
- "enabled": True,
2237
- "directories": [str(tmp_path / "skills")],
2238
- "allowlist": [],
2239
- "allowed_trust_tiers": ["internal", "external-verified", "external-unverified"],
2240
- "default_trust_tier": "internal",
2241
- "trust_tiers": {},
2242
- "allow_script_execution": False,
2243
- },
2244
- )
2245
- monkeypatch.setattr(
2246
- registry,
2247
- "_collect_skills_metadata",
2248
- lambda **_kwargs: [
2249
- SimpleNamespace(
2250
- name="research-skill",
2251
- metadata_name="research-skill",
2252
- frontmatter_name="research-skill",
2253
- runtime_name="research-skill",
2254
- canonical_name="research-skill",
2255
- description="research helper",
2256
- path=str(skill_dir),
2257
- trust_tier="internal",
2258
- has_scripts=False,
2259
- content_hash="abc123",
2260
- ),
2261
- ],
2262
- )
2263
-
2264
- read = registry.invoke(
2265
- ToolName.READ_SKILL_RESOURCE,
2266
- {"name": "research-skill", "resource_path": "references/row-analysis.md", "max_chars": 2000},
2267
- )
2268
-
2269
- assert read.payload["success"] is True
2270
- assert read.payload["resource_path"] == "SKILL.md"
2271
- assert "Fallback guidance." in read.payload["content"]
2272
- assert read.payload["ref"] == str((skill_dir / "SKILL.md").resolve())
2273
-
2274
- def test_run_skill_script_returns_disabled_when_policy_blocks_execution(self) -> None:
2275
- registry = ToolRegistry()
2276
- registry._resolve_skills_runtime_policy = lambda: { # type: ignore[method-assign]
2277
- "enabled": True,
2278
- "directories": [],
2279
- "allowlist": [],
2280
- "allowed_trust_tiers": [],
2281
- "default_trust_tier": "internal",
2282
- "trust_tiers": {},
2283
- "allow_script_execution": False,
2284
- }
2285
-
2286
- result = registry.invoke(
2287
- ToolName.RUN_SKILL_SCRIPT,
2288
- {"name": "research-skill", "script_path": "scripts/run.sh", "args": [], "timeout_seconds": 30},
2289
- )
2290
-
2291
- assert result.payload["success"] is False
2292
- assert result.payload["error"] == "script_execution_disabled"
2293
-
2294
- def test_resolve_skills_runtime_policy_honors_env_overrides_when_config_unavailable(
2295
- self,
2296
- monkeypatch: pytest.MonkeyPatch,
2297
- tmp_path: Path,
2298
- ) -> None:
2299
- skills_a = tmp_path / "skills-a"
2300
- skills_b = tmp_path / "skills-b"
2301
- skills_a.mkdir()
2302
- skills_b.mkdir()
2303
- registry = ToolRegistry()
2304
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_TOOLSET_ENABLED", "true")
2305
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_DIRECTORIES", json.dumps([str(skills_a), str(skills_b)]))
2306
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_ALLOWLIST", "research-skill,vds-scripts-skill")
2307
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_ALLOWED_TRUST_TIERS", '["internal","external-verified"]')
2308
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_DEFAULT_TRUST_TIER", "internal")
2309
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_TRUST_TIERS", '{"research-skill":"internal"}')
2310
- monkeypatch.setenv("VDS_AUDIT_LLM__SKILLS_ALLOW_SCRIPT_EXECUTION", "yes")
2311
-
2312
- def _raise_config_error() -> Any:
2313
- raise RuntimeError("config unavailable")
2314
-
2315
- monkeypatch.setattr("vds_audit_orchestrator.config.get_config", _raise_config_error)
2316
-
2317
- policy = registry._resolve_skills_runtime_policy()
2318
-
2319
- assert policy["enabled"] is True
2320
- # Paths are resolved via Path.resolve(strict=False) in _normalize_skill_directories.
2321
- assert policy["directories"] == [str(skills_a.resolve()), str(skills_b.resolve())]
2322
- assert policy["allowlist"] == ["research-skill", "vds-scripts-skill"]
2323
- assert policy["allowed_trust_tiers"] == ["internal", "external-verified"]
2324
- assert policy["default_trust_tier"] == "internal"
2325
- assert policy["trust_tiers"] == {"research-skill": "internal"}
2326
- assert policy["allow_script_execution"] is True
2327
-
2328
-
2329
- def test_lookup_doc_chunk_excludes_ops_repo_file_from_repo_null_fallback() -> None:
2330
- registry = ToolRegistry(
2331
- state_dsn="postgresql://user:pass@host/db",
2332
- project_key="project-a",
2333
- )
2334
-
2335
- captured: dict[str, Any] = {}
2336
-
2337
- class _Cursor:
2338
- def execute(self, sql: str, params: tuple[Any, ...]) -> None:
2339
- captured["sql"] = sql
2340
- captured["params"] = params
2341
-
2342
- def fetchone(self) -> None:
2343
- return None
2344
-
2345
- class _CursorContext:
2346
- def __init__(self) -> None:
2347
- self._cursor = _Cursor()
2348
-
2349
- def __enter__(self) -> _Cursor:
2350
- return self._cursor
2351
-
2352
- def __exit__(self, exc_type, exc, tb) -> bool: # type: ignore[no-untyped-def]
2353
- _ = exc_type, exc, tb
2354
- return False
2355
-
2356
- class _Conn:
2357
- def cursor(self) -> _CursorContext:
2358
- return _CursorContext()
2359
-
2360
- registry._state_store = SimpleNamespace(_conn=_Conn()) # type: ignore[assignment]
2361
-
2362
- result = registry._lookup_doc_chunk(
2363
- chunk_id="chunk-1",
2364
- source_uri=None,
2365
- document_id=None,
2366
- repo_key="repo-a",
2367
- )
2368
-
2369
- assert result is None
2370
- sql = str(captured.get("sql") or "")
2371
- assert "d.source_type NOT IN ('code_file', 'ops_repo_file')" in sql
2372
-
2373
-
2374
- # ---------------------------------------------------------------------------
2375
- # P172-F: TSK-172.35–37 — Skill resource fallback telemetry
2376
- # ---------------------------------------------------------------------------
2377
-
2378
-
2379
- class TestResourceFallbackTelemetry:
2380
- """Verify requested_resource_fallback flag + skill_resource_fallback telemetry event."""
2381
-
2382
- def _make_registry_with_skill(
2383
- self,
2384
- monkeypatch: pytest.MonkeyPatch,
2385
- tmp_path: Path,
2386
- *,
2387
- has_row_analysis: bool = False,
2388
- ) -> ToolRegistry:
2389
- """Helper: ToolRegistry with a research-skill directory."""
2390
- skill_dir = tmp_path / "skills" / "research-skill"
2391
- skill_dir.mkdir(parents=True)
2392
- (skill_dir / "SKILL.md").write_text(
2393
- "---\nname: research-skill\n---\nSkill guidance.\n",
2394
- encoding="utf-8",
2395
- )
2396
- if has_row_analysis:
2397
- refs = skill_dir / "references"
2398
- refs.mkdir()
2399
- (refs / "row-analysis.md").write_text("Row analysis content.", encoding="utf-8")
2400
-
2401
- registry = ToolRegistry()
2402
- monkeypatch.setattr(
2403
- registry,
2404
- "_resolve_skills_runtime_policy",
2405
- lambda: {
2406
- "enabled": True,
2407
- "directories": [str(tmp_path / "skills")],
2408
- "allowlist": [],
2409
- "allowed_trust_tiers": ["internal", "external-verified", "external-unverified"],
2410
- "default_trust_tier": "internal",
2411
- "trust_tiers": {},
2412
- "allow_script_execution": False,
2413
- },
2414
- )
2415
- monkeypatch.setattr(
2416
- registry,
2417
- "_collect_skills_metadata",
2418
- lambda **_kwargs: [
2419
- SimpleNamespace(
2420
- name="research-skill",
2421
- metadata_name="research-skill",
2422
- frontmatter_name="research-skill",
2423
- runtime_name="research-skill",
2424
- canonical_name="research-skill",
2425
- description="research helper",
2426
- path=str(skill_dir),
2427
- trust_tier="internal",
2428
- has_scripts=False,
2429
- content_hash="abc123",
2430
- ),
2431
- ],
2432
- )
2433
- return registry
2434
-
2435
- def test_fallback_sets_requested_resource_fallback_flag(
2436
- self,
2437
- monkeypatch: pytest.MonkeyPatch,
2438
- tmp_path: Path,
2439
- ) -> None:
2440
- """TSK-172.35: requested_resource_fallback=True when references/row-analysis.md absent."""
2441
- registry = self._make_registry_with_skill(monkeypatch, tmp_path, has_row_analysis=False)
2442
- read = registry.invoke(
2443
- ToolName.READ_SKILL_RESOURCE,
2444
- {"name": "research-skill", "resource_path": "references/row-analysis.md"},
2445
- )
2446
- assert read.payload["success"] is True
2447
- assert read.payload["requested_resource_fallback"] is True
2448
-
2449
- def test_fallback_sets_fallback_reason(
2450
- self,
2451
- monkeypatch: pytest.MonkeyPatch,
2452
- tmp_path: Path,
2453
- ) -> None:
2454
- """TSK-172.35: fallback_reason='requested_resource_missing' when SKILL.md fallback fires."""
2455
- registry = self._make_registry_with_skill(monkeypatch, tmp_path, has_row_analysis=False)
2456
- read = registry.invoke(
2457
- ToolName.READ_SKILL_RESOURCE,
2458
- {"name": "research-skill", "resource_path": "references/row-analysis.md"},
2459
- )
2460
- assert read.payload["fallback_reason"] == "requested_resource_missing"
2461
-
2462
- def test_no_fallback_when_resource_exists_directly(
2463
- self,
2464
- monkeypatch: pytest.MonkeyPatch,
2465
- tmp_path: Path,
2466
- ) -> None:
2467
- """TSK-172.35: requested_resource_fallback=False when references/row-analysis.md exists."""
2468
- registry = self._make_registry_with_skill(monkeypatch, tmp_path, has_row_analysis=True)
2469
- read = registry.invoke(
2470
- ToolName.READ_SKILL_RESOURCE,
2471
- {"name": "research-skill", "resource_path": "references/row-analysis.md"},
2472
- )
2473
- assert read.payload["success"] is True
2474
- assert read.payload["requested_resource_fallback"] is False
2475
-
2476
- def test_fallback_reason_none_when_no_fallback(
2477
- self,
2478
- monkeypatch: pytest.MonkeyPatch,
2479
- tmp_path: Path,
2480
- ) -> None:
2481
- """TSK-172.35: fallback_reason=None when resource resolves directly."""
2482
- registry = self._make_registry_with_skill(monkeypatch, tmp_path, has_row_analysis=True)
2483
- read = registry.invoke(
2484
- ToolName.READ_SKILL_RESOURCE,
2485
- {"name": "research-skill", "resource_path": "references/row-analysis.md"},
2486
- )
2487
- assert read.payload["fallback_reason"] is None
2488
-
2489
- def test_fallback_emits_skill_resource_fallback_event(
2490
- self,
2491
- monkeypatch: pytest.MonkeyPatch,
2492
- tmp_path: Path,
2493
- ) -> None:
2494
- """TSK-172.36: _record_skill_tool_usage called with event='skill_resource_fallback'."""
2495
- registry = self._make_registry_with_skill(monkeypatch, tmp_path, has_row_analysis=False)
2496
- recorded: list[dict[str, Any]] = []
2497
- monkeypatch.setattr(
2498
- registry,
2499
- "_record_skill_tool_usage",
2500
- lambda entry: recorded.append(dict(entry)),
2501
- )
2502
-
2503
- registry.invoke(
2504
- ToolName.READ_SKILL_RESOURCE,
2505
- {"name": "research-skill", "resource_path": "references/row-analysis.md"},
2506
- )
2507
-
2508
- fallback_events = [e for e in recorded if e.get("event") == "skill_resource_fallback"]
2509
- assert len(fallback_events) == 1
2510
- evt = fallback_events[0]
2511
- assert evt["skill_name"] == "research-skill"
2512
- assert evt["requested_resource"] == "references/row-analysis.md"
2513
- assert evt["actual_resource"] == "SKILL.md"
2514
- assert evt["fallback_reason"] == "requested_resource_missing"
2515
-
2516
- def test_no_fallback_event_when_resource_found_directly(
2517
- self,
2518
- monkeypatch: pytest.MonkeyPatch,
2519
- tmp_path: Path,
2520
- ) -> None:
2521
- """TSK-172.36: No skill_resource_fallback event when resource resolves without fallback."""
2522
- registry = self._make_registry_with_skill(monkeypatch, tmp_path, has_row_analysis=True)
2523
- recorded: list[dict[str, Any]] = []
2524
- monkeypatch.setattr(
2525
- registry,
2526
- "_record_skill_tool_usage",
2527
- lambda entry: recorded.append(dict(entry)),
2528
- )
2529
-
2530
- registry.invoke(
2531
- ToolName.READ_SKILL_RESOURCE,
2532
- {"name": "research-skill", "resource_path": "references/row-analysis.md"},
2533
- )
2534
-
2535
- fallback_events = [e for e in recorded if e.get("event") == "skill_resource_fallback"]
2536
- assert len(fallback_events) == 0
2537
-
2538
- def test_effective_max_depth_5_and_search_cap_architecture(self) -> None:
2539
- """TSK-172.37: effective_max_depth=5 and search cap allows 3+ searches for architecture rows."""
2540
- from vds_audit_orchestrator.engine.tool_first_planner import (
2541
- effective_max_depth,
2542
- effective_search_attempt_cap,
2543
- )
2544
-
2545
- assert effective_max_depth("1. decoupling") == 5
2546
- assert effective_max_depth("2. dependency management") == 5
2547
- # cap = min_search_patterns(3) + 1 = 4, so search_code_attempt_count < 4 allows 4 attempts
2548
- assert effective_search_attempt_cap("1. decoupling") >= 4