@ngocsangairvds/vsaf 3.2.14 → 3.2.16

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 (1442) hide show
  1. package/bin/vsaf.js +18 -4
  2. package/package.json +1 -1
  3. package/src/config.js +167 -0
  4. package/src/global.js +1 -48
  5. package/src/project.js +1 -0
  6. package/src/utils.js +44 -1
  7. package/tools/vds-scripts/Makefile +9 -31
  8. package/tools/vds-scripts/docker/docker-compose.cli.yml +1 -117
  9. package/tools/vds-scripts/docker/docker-compose.services.yml +1 -40
  10. package/tools/vds-scripts/docker/infrastructure/init-schemas.sql +0 -34
  11. package/tools/vds-scripts/docker/infrastructure/pgbouncer/pgbouncer.ini +2 -6
  12. package/tools/vds-scripts/pyproject.toml +1 -33
  13. package/tools/vds-scripts/uv.lock +80 -1651
  14. package/tools/vds-scripts/vds_cli/pyproject.toml +3 -0
  15. package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +1 -127
  16. package/tools/vds-scripts/vds_cli/src/vds_cli/commands/lint_cli.py +1 -20
  17. package/tools/vds-scripts/vds_cli/src/vds_cli/router.py +0 -100
  18. package/tools/vds-scripts/vds_cli/tests/conftest.py +0 -2
  19. package/tools/vds-scripts/vds_cli/tests/unit/test_cli.py +0 -25
  20. package/tools/vds-scripts/vds_cli/tests/unit/test_lint_cli.py +2 -2
  21. package/tools/vds-scripts/vds_cli/tests/unit/test_router.py +0 -2
  22. package/tools/vds-scripts/CLOSURE.md +0 -340
  23. package/tools/vds-scripts/ECOSYSTEM-CHANGELOG.md +0 -52
  24. package/tools/vds-scripts/ECOSYSTEM-DOCS.md +0 -602
  25. package/tools/vds-scripts/ECOSYSTEM_ALIGNMENT.md +0 -133
  26. package/tools/vds-scripts/ENV-HYGIENE-OPS-NOTE.md +0 -65
  27. package/tools/vds-scripts/INVESTIGATION-cloud-401.md +0 -103
  28. package/tools/vds-scripts/MEM0_2.0_API_REFERENCE.md +0 -238
  29. package/tools/vds-scripts/PACKAGE_P125B_IMPLEMENTATION_SUMMARY.md +0 -131
  30. package/tools/vds-scripts/PHASE-MERGE-SUMMARY.md +0 -121
  31. package/tools/vds-scripts/PHASES-3-ARCHIVE.md +0 -59
  32. package/tools/vds-scripts/PROJECT_COMPLETION_SUMMARY.md +0 -45
  33. package/tools/vds-scripts/SEARCH-CRASH-REPRO.md +0 -51
  34. package/tools/vds-scripts/analyze_hexagonal.py +0 -217
  35. package/tools/vds-scripts/analyze_profiles.py +0 -60
  36. package/tools/vds-scripts/audit-checklist.xlsx +0 -0
  37. package/tools/vds-scripts/audit_orchestrator/.audit_approvals/approvals_index.json +0 -1
  38. package/tools/vds-scripts/audit_orchestrator/.env.example +0 -85
  39. package/tools/vds-scripts/audit_orchestrator/.github/workflows/audit.yml +0 -47
  40. package/tools/vds-scripts/audit_orchestrator/Dockerfile +0 -92
  41. package/tools/vds-scripts/audit_orchestrator/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +0 -218
  42. package/tools/vds-scripts/audit_orchestrator/PHASE3_INTEGRATION_SUMMARY.md +0 -268
  43. package/tools/vds-scripts/audit_orchestrator/PHASE7-MERGE-SUMMARY.md +0 -174
  44. package/tools/vds-scripts/audit_orchestrator/README.md +0 -1573
  45. package/tools/vds-scripts/audit_orchestrator/TSK-168-IMPLEMENTATION-SUMMARY.md +0 -191
  46. package/tools/vds-scripts/audit_orchestrator/TSK-196-IMPLEMENTATION-SUMMARY.md +0 -201
  47. package/tools/vds-scripts/audit_orchestrator/alembic/env.py +0 -37
  48. package/tools/vds-scripts/audit_orchestrator/alembic/script.py.mako +0 -28
  49. package/tools/vds-scripts/audit_orchestrator/alembic/versions/0001_initial_audit_state_schema.py +0 -1260
  50. package/tools/vds-scripts/audit_orchestrator/alembic.ini +0 -68
  51. package/tools/vds-scripts/audit_orchestrator/config/category-mapping.json +0 -81
  52. package/tools/vds-scripts/audit_orchestrator/config/profile-timeouts.yaml +0 -17
  53. package/tools/vds-scripts/audit_orchestrator/create_sample.py +0 -55
  54. package/tools/vds-scripts/audit_orchestrator/data/corpus_accuracy_report.json +0 -17
  55. package/tools/vds-scripts/audit_orchestrator/data/exemplar_quality_report.json +0 -1606
  56. package/tools/vds-scripts/audit_orchestrator/data/instruction_plan_fixtures.json +0 -163
  57. package/tools/vds-scripts/audit_orchestrator/data/requirement_exemplars.json +0 -3443
  58. package/tools/vds-scripts/audit_orchestrator/data/requirement_scope_fixtures.json +0 -172
  59. package/tools/vds-scripts/audit_orchestrator/debug_rg.py +0 -46
  60. package/tools/vds-scripts/audit_orchestrator/demo_code_pack.py +0 -127
  61. package/tools/vds-scripts/audit_orchestrator/docs/AGENT_SDK_SELECTION_SPEC.md +0 -720
  62. package/tools/vds-scripts/audit_orchestrator/docs/API.md +0 -804
  63. package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_ANALYSIS_APPROACH.md +0 -1041
  64. package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_SCORING_EVOLUTION_SPEC.md +0 -868
  65. package/tools/vds-scripts/audit_orchestrator/docs/DEPLOYMENT.md +0 -778
  66. package/tools/vds-scripts/audit_orchestrator/docs/LLM_AGENT_AUDIT_SPEC.md +0 -721
  67. package/tools/vds-scripts/audit_orchestrator/docs/LLM_CONTENT_ANALYSIS_SPEC.md +0 -1143
  68. package/tools/vds-scripts/audit_orchestrator/docs/LSP_SETUP_GUIDE.md +0 -221
  69. package/tools/vds-scripts/audit_orchestrator/docs/MULTI_REPO_AUDIT_SPEC.md +0 -951
  70. package/tools/vds-scripts/audit_orchestrator/docs/OLLAMA_EMBEDDINGS_SETUP.md +0 -119
  71. package/tools/vds-scripts/audit_orchestrator/docs/PHASE32_REAL_BENCHMARK_2026-02-08.md +0 -66
  72. package/tools/vds-scripts/audit_orchestrator/docs/PHASE_64_TO_92_HISTORICAL_SPEC.md +0 -1772
  73. package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-flow-trace.md +0 -201
  74. package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-verification.md +0 -124
  75. package/tools/vds-scripts/audit_orchestrator/docs/phase152-hierarchical-query-surface.md +0 -46
  76. package/tools/vds-scripts/audit_orchestrator/examples/bitbucket_metadata_example.json +0 -50
  77. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/README.md +0 -68
  78. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase117_phase118_shared_state.sql +0 -64
  79. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase154_published_pages.sql +0 -28
  80. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_dispatch_tables.sql +0 -94
  81. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_events.sql +0 -91
  82. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_scope_snapshots.sql +0 -24
  83. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_status_view.sql +0 -22
  84. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase169_dispatch_observability.sql +0 -55
  85. package/tools/vds-scripts/audit_orchestrator/legacy/migrations/state_repair_hardening.sql +0 -24
  86. package/tools/vds-scripts/audit_orchestrator/pyproject.toml +0 -211
  87. package/tools/vds-scripts/audit_orchestrator/pyrightconfig.json +0 -51
  88. package/tools/vds-scripts/audit_orchestrator/pytest.ini +0 -37
  89. package/tools/vds-scripts/audit_orchestrator/reproduce_scanner.py +0 -40
  90. package/tools/vds-scripts/audit_orchestrator/scripts/README.md +0 -116
  91. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_crawl_modes.py +0 -455
  92. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_dspy.py +0 -513
  93. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_nlp_accuracy.py +0 -138
  94. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_retrieval_modes.py +0 -176
  95. package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_upload_update_mode.py +0 -167
  96. package/tools/vds-scripts/audit_orchestrator/scripts/build_check.py +0 -76
  97. package/tools/vds-scripts/audit_orchestrator/scripts/check_live_progress.py +0 -61
  98. package/tools/vds-scripts/audit_orchestrator/scripts/cli_integration_test.py +0 -400
  99. package/tools/vds-scripts/audit_orchestrator/scripts/index_workspace.py +0 -178
  100. package/tools/vds-scripts/audit_orchestrator/scripts/inspect_route_conformance.py +0 -196
  101. package/tools/vds-scripts/audit_orchestrator/scripts/monitor_postgres.py +0 -145
  102. package/tools/vds-scripts/audit_orchestrator/scripts/optimize_audit.py +0 -462
  103. package/tools/vds-scripts/audit_orchestrator/scripts/verify.py +0 -673
  104. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase111_requirement_analysis.py +0 -375
  105. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase117_cross_repo_evidence.py +0 -77
  106. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase121_short_circuit.py +0 -680
  107. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase122_instruction_handling.py +0 -478
  108. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase125_skill_integration.py +0 -832
  109. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_36.py +0 -394
  110. package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_37.py +0 -58
  111. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/__init__.py +0 -17
  112. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/__init__.py +0 -29
  113. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/_langchain_warnings.py +0 -17
  114. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/agentic_investigator.py +0 -4130
  115. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/approval.py +0 -490
  116. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_loop_hooks.py +0 -107
  117. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_state.py +0 -50
  118. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/base.py +0 -4035
  119. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_agent.py +0 -667
  120. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_helpers.py +0 -236
  121. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_prompts.py +0 -146
  122. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/docs_agent.py +0 -1234
  123. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/langgraph_workflow.py +0 -2002
  124. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/pydantic_base.py +0 -1227
  125. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/requirement_analysis_agent.py +0 -593
  126. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_agent.py +0 -1829
  127. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_scanner.py +0 -686
  128. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/skill_tools.py +0 -204
  129. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/synthesis_agent.py +0 -1463
  130. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_efficiency_guard.py +0 -609
  131. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_registry.py +0 -3822
  132. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/__init__.py +0 -52
  133. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/evidence_corpus.py +0 -385
  134. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/filesystem.py +0 -1134
  135. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/lsp.py +0 -458
  136. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/mcp_toolset.py +0 -491
  137. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/skills_toolset.py +0 -997
  138. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/vector_evidence.py +0 -842
  139. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/usage_tracker.py +0 -682
  140. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/visualization.py +0 -303
  141. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/analyze_cmds.py +0 -892
  142. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/__init__.py +0 -15
  143. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/service.py +0 -171
  144. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/__init__.py +0 -20
  145. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/base.py +0 -60
  146. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/__init__.py +0 -6
  147. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/checks.py +0 -257
  148. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/__init__.py +0 -10
  149. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/checks.py +0 -78
  150. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/__init__.py +0 -6
  151. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/file_checks.py +0 -133
  152. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/__init__.py +0 -17
  153. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/api_docs_check.py +0 -80
  154. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/readme_check.py +0 -76
  155. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/security_docs_check.py +0 -78
  156. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/registry.py +0 -402
  157. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/__init__.py +0 -10
  158. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/checks.py +0 -276
  159. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli.py +0 -12
  160. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_common.py +0 -128
  161. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_impl.py +0 -9826
  162. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/bitbucket_cli_client.py +0 -187
  163. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/confluence_cli_client.py +0 -977
  164. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/sonarqube_cli_client.py +0 -28
  165. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/__init__.py +0 -21
  166. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/base.py +0 -25
  167. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_downloader.py +0 -644
  168. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_metadata.py +0 -133
  169. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/checklist_parser.py +0 -180
  170. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/__init__.py +0 -31
  171. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/bitbucket_probe.py +0 -443
  172. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/confluence_probe.py +0 -365
  173. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/freshness_evaluator.py +0 -330
  174. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/material_completeness_service.py +0 -1079
  175. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/confluence_collector.py +0 -259
  176. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/diagram_extractor.py +0 -280
  177. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/enrichment_extractor.py +0 -200
  178. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/evidence_cache.py +0 -35
  179. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/git_collector.py +0 -148
  180. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/graphify_collector.py +0 -171
  181. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/image_extractor.py +0 -359
  182. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/linked_page_tracker.py +0 -120
  183. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/markdown_converter.py +0 -344
  184. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_cache.py +0 -1252
  185. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_downloader.py +0 -1165
  186. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/orchestrator.py +0 -168
  187. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/registry_parser.py +0 -3063
  188. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/requirements.py +0 -70
  189. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/runner.py +0 -119
  190. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/sonarqube_collector.py +0 -113
  191. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config.py +0 -1943
  192. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/__init__.py +0 -23
  193. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/discovery.py +0 -90
  194. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/environment_resolver.py +0 -56
  195. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/evidence.py +0 -78
  196. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/models.py +0 -73
  197. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/precedence.py +0 -10
  198. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/redaction.py +0 -20
  199. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/confluence_connectivity.py +0 -140
  200. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/corpus_cmds.py +0 -278
  201. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/__init__.py +0 -7
  202. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/alembic_filters.py +0 -57
  203. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/__init__.py +0 -29
  204. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/diataxis_validator.py +0 -687
  205. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/doctor_cmds.py +0 -3295
  206. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/__init__.py +0 -5
  207. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/evaluation.py +0 -301
  208. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/modules.py +0 -172
  209. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/runtime.py +0 -836
  210. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/signatures.py +0 -406
  211. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/__init__.py +0 -192
  212. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/ad_hoc_analyzer.py +0 -399
  213. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/aggregator.py +0 -220
  214. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/auditor.py +0 -504
  215. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_evidence_cache.py +0 -111
  216. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_processor.py +0 -4776
  217. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/calibration.py +0 -217
  218. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_generator.py +0 -1201
  219. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_projection.py +0 -192
  220. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_scoping.py +0 -221
  221. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checkpoint.py +0 -159
  222. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cl003_shared_lib_guard.py +0 -194
  223. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/companion_context_service.py +0 -445
  224. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/confluence_checklist_contract.py +0 -7425
  225. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cross_check_rules.py +0 -213
  226. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/deterministic_evaluator.py +0 -237
  227. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/drift_detector.py +0 -157
  228. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/dspy_requirement_classifier.py +0 -640
  229. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_assembler.py +0 -407
  230. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_collector.py +0 -119
  231. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_diversity.py +0 -101
  232. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/gap_analyzer.py +0 -549
  233. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/graduated.py +0 -185
  234. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/grounding_validator.py +0 -287
  235. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_analyzer.py +0 -882
  236. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_compliance.py +0 -172
  237. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/llm_row_evaluator.py +0 -9270
  238. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/loader.py +0 -1070
  239. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/manual_check_config.py +0 -136
  240. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/mapping.py +0 -269
  241. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/multi_judge.py +0 -65
  242. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/phase120_checklist_update.py +0 -416
  243. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/profile_scorer.py +0 -427
  244. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_evidence_context.py +0 -449
  245. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_query_service.py +0 -155
  246. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_store.py +0 -383
  247. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_topology.py +0 -1920
  248. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/provider_failure_classifier.py +0 -778
  249. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_cli_helpers.py +0 -341
  250. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_extractor.py +0 -303
  251. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_synthesizer.py +0 -730
  252. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/regression_guard.py +0 -138
  253. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/repo_type_classifier.py +0 -297
  254. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_analysis.py +0 -1433
  255. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_classification.py +0 -1725
  256. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/result_merger.py +0 -814
  257. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/route_matrix.py +0 -267
  258. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator.py +0 -9437
  259. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_runtime.py +0 -1270
  260. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_types.py +0 -2102
  261. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/rubric.py +0 -592
  262. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/scorer.py +0 -1239
  263. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/section_packs.py +0 -645
  264. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/skill_recommendation.py +0 -1183
  265. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/stability_harness.py +0 -207
  266. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/target_selector.py +0 -841
  267. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/telemetry.py +0 -347
  268. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/template_analyzer.py +0 -469
  269. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/token_tracker.py +0 -111
  270. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/tool_first_planner.py +0 -7905
  271. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/topology_query_service.py +0 -80
  272. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/validator.py +0 -449
  273. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/weight_policy.py +0 -464
  274. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/errors.py +0 -430
  275. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/extract_cmds.py +0 -4887
  276. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/identity.py +0 -146
  277. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/__init__.py +0 -52
  278. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/baseline.py +0 -378
  279. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/change_analyzer.py +0 -407
  280. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/delta_report.py +0 -189
  281. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/diff_detector.py +0 -301
  282. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/integrations/__init__.py +0 -3
  283. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/__init__.py +0 -50
  284. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/audit_schemas.py +0 -459
  285. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/codex_oauth.py +0 -340
  286. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/cost_tracker.py +0 -288
  287. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/engine.py +0 -751
  288. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/evaluator.py +0 -245
  289. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/__init__.py +0 -32
  290. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/api_docs_evaluation.py +0 -25
  291. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/gap_analysis.py +0 -31
  292. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/instruction_templates.py +0 -634
  293. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/readme_evaluation.py +0 -25
  294. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/row_evaluation.py +0 -247
  295. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/security_docs_evaluation.py +0 -25
  296. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/template_analysis.py +0 -25
  297. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts.py +0 -0
  298. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/provider.py +0 -626
  299. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/logging_config.py +0 -577
  300. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/__init__.py +0 -58
  301. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/default_checklist_mapping.json +0 -18
  302. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/vietnamese_checklist_mapping.json +0 -38
  303. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/misc_cmds.py +0 -4689
  304. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/__init__.py +0 -153
  305. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/calibration.py +0 -98
  306. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/checklist.py +0 -921
  307. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/completeness.py +0 -309
  308. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enrichment.py +0 -58
  309. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enums.py +0 -97
  310. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/evidence.py +0 -351
  311. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/findings.py +0 -381
  312. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/gaps.py +0 -299
  313. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/graph.py +0 -42
  314. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/multi_judge.py +0 -50
  315. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/readiness.py +0 -309
  316. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/registry.py +0 -386
  317. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/reporting.py +0 -32
  318. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/task.py +0 -549
  319. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/template.py +0 -477
  320. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/__init__.py +0 -31
  321. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/metrics.py +0 -404
  322. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/parse_cmds.py +0 -608
  323. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/pdf_cmds.py +0 -208
  324. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/performance_gates.py +0 -224
  325. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/phase151_projection.py +0 -84
  326. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/__init__.py +0 -65
  327. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/detection.py +0 -842
  328. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/models.py +0 -474
  329. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/__init__.py +0 -1
  330. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_confluence_macros.py +0 -145
  331. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_field_sanitizer.py +0 -25
  332. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_table_builder.py +0 -63
  333. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_vietnamese_templates.py +0 -103
  334. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/bitbucket_link_resolver.py +0 -34
  335. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/checklist_renderer.py +0 -483
  336. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/confluence_publisher.py +0 -3048
  337. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/hierarchy_publisher.py +0 -213
  338. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/live_data_injector.py +0 -152
  339. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/macro_builder.py +0 -101
  340. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/markdown_converter.py +0 -154
  341. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/priority_renderer.py +0 -133
  342. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/project_aggregate_renderer.py +0 -423
  343. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/readiness_renderer.py +0 -186
  344. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_hierarchy_renderer.py +0 -382
  345. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_renderer.py +0 -683
  346. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/report_cmds.py +0 -788
  347. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/__init__.py +0 -13
  348. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/aggregation_report.py +0 -86
  349. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/checklist_generator.py +0 -425
  350. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/excel_generator.py +0 -599
  351. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/gap_report.py +0 -131
  352. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/json_generator.py +0 -188
  353. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/markdown_generator.py +0 -595
  354. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/__init__.py +0 -154
  355. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/collector.py +0 -61
  356. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/department_builder.py +0 -77
  357. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/errors.py +0 -9
  358. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/md_renderer.py +0 -386
  359. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_models.py +0 -95
  360. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_writer.py +0 -27
  361. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/repo_project_builders.py +0 -274
  362. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/readiness_report.py +0 -447
  363. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/reporting.py +0 -94
  364. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/sarif_generator.py +0 -519
  365. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/runtime_profiles.py +0 -98
  366. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/__init__.py +0 -29
  367. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/seed_loader.py +0 -561
  368. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/__init__.py +0 -5
  369. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/skill_routing.py +0 -312
  370. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/__init__.py +0 -0
  371. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/base.py +0 -110
  372. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/bitbucket.py +0 -129
  373. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/git_url.py +0 -60
  374. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/github.py +0 -75
  375. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/local.py +0 -58
  376. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/spec_sync_validator.py +0 -15
  377. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/__init__.py +0 -6285
  378. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/readiness_helpers.py +0 -74
  379. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/skill_readiness.py +0 -487
  380. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/store.py +0 -12927
  381. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state_cmds.py +0 -1868
  382. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/__init__.py +0 -0
  383. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/repo_sync.py +0 -409
  384. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync_cmds.py +0 -1247
  385. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/__init__.py +0 -3
  386. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/debug_bundle.py +0 -214
  387. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/validators/checklist_validator.py +0 -342
  388. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflow_cmds.py +0 -19147
  389. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/__init__.py +0 -9
  390. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/_test_audit_daily_batch.py +0 -192
  391. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_daily_batch.py +0 -308
  392. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_deep_monthly.py +0 -193
  393. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_drift_scan.py +0 -178
  394. package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_security_daily.py +0 -183
  395. package/tools/vds-scripts/audit_orchestrator/templates/sample_audit_template.xlsx +0 -0
  396. package/tools/vds-scripts/audit_orchestrator/tests/__init__.py +0 -0
  397. package/tools/vds-scripts/audit_orchestrator/tests/_helpers.py +0 -32
  398. package/tools/vds-scripts/audit_orchestrator/tests/collectors/__init__.py +0 -0
  399. package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/__init__.py +0 -0
  400. package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_bitbucket_probe.py +0 -403
  401. package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_confluence_probe.py +0 -423
  402. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_bitbucket_downloader.py +0 -289
  403. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_image_extractor.py +0 -260
  404. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_markdown_converter.py +0 -57
  405. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_cache.py +0 -197
  406. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_downloader.py +0 -550
  407. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser.py +0 -3514
  408. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_department_entry.py +0 -214
  409. package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_flow.py +0 -200
  410. package/tools/vds-scripts/audit_orchestrator/tests/conftest.py +0 -988
  411. package/tools/vds-scripts/audit_orchestrator/tests/engine/__init__.py +0 -0
  412. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_calibration.py +0 -48
  413. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_confluence_checklist_phase22_helpers.py +0 -6065
  414. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_multi_judge.py +0 -62
  415. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_stability_harness.py +0 -61
  416. package/tools/vds-scripts/audit_orchestrator/tests/engine/test_structured_metadata.py +0 -419
  417. package/tools/vds-scripts/audit_orchestrator/tests/factories/__init__.py +0 -0
  418. package/tools/vds-scripts/audit_orchestrator/tests/factories/models.py +0 -534
  419. package/tools/vds-scripts/audit_orchestrator/tests/factories/templates.py +0 -241
  420. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/__init__.py +0 -0
  421. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/__init__.py +0 -0
  422. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/compressed.drawio +0 -2
  423. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/mockup.bmpr +0 -0
  424. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/simple.drawio +0 -26
  425. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/__init__.py +0 -0
  426. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/__init__.py +0 -0
  427. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_cli.json +0 -26
  428. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_direct.json +0 -24
  429. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_cli.json +0 -14
  430. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_direct.json +0 -12
  431. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/__init__.py +0 -0
  432. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_cli.json +0 -7
  433. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_direct.json +0 -7
  434. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_cli.json +0 -11
  435. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_direct.json +0 -7
  436. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/__init__.py +0 -0
  437. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_cli.json +0 -12
  438. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_direct.json +0 -12
  439. package/tools/vds-scripts/audit_orchestrator/tests/fixtures/requirement_strategy_phase115.json +0 -118
  440. package/tools/vds-scripts/audit_orchestrator/tests/integration/__init__.py +0 -0
  441. package/tools/vds-scripts/audit_orchestrator/tests/integration/conftest.py +0 -107
  442. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/__init__.py +0 -0
  443. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/expected_outcomes.md +0 -50
  444. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/__init__.py +0 -0
  445. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/auth.py +0 -27
  446. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/config.py +0 -16
  447. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/db.py +0 -24
  448. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/main.py +0 -18
  449. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/__init__.py +0 -1
  450. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/utils.py +0 -22
  451. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_checklist_template.json +0 -110
  452. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/__init__.py +0 -0
  453. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/code_evidence_pack.json +0 -40
  454. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/manifest.json +0 -49
  455. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/__init__.py +0 -0
  456. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/__init__.py +0 -0
  457. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/brd.md +0 -19
  458. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/design.md +0 -32
  459. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/security.md +0 -23
  460. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/srs.md +0 -25
  461. package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/test.md +0 -30
  462. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_checkpoint_merge.py +0 -1371
  463. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_decoupling_route_p149.py +0 -176
  464. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_gap_analyzer_batch_p149.py +0 -151
  465. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_hybrid_search.py +0 -799
  466. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_mcp_integration.py +0 -741
  467. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_merge_ranking_p149.py +0 -98
  468. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_modality_mismatch_p149.py +0 -171
  469. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase117_118_storage.py +0 -350
  470. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase121_short_circuit.py +0 -732
  471. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase18_workflow.py +0 -223
  472. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase48_e2e_verification.py +0 -763
  473. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase81_doc_anchor_regression.py +0 -252
  474. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_provider_failure_finding_p149.py +0 -339
  475. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_readiness_e2e.py +0 -430
  476. package/tools/vds-scripts/audit_orchestrator/tests/integration/test_refined_workflow.py +0 -1180
  477. package/tools/vds-scripts/audit_orchestrator/tests/pdf/__init__.py +0 -0
  478. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/__init__.py +0 -0
  479. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/department_renderer.md +0 -24
  480. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/project_renderer.md +0 -8
  481. package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/repo_renderer.md +0 -10
  482. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_department_pdf.py +0 -112
  483. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_e2e_pdf.py +0 -135
  484. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_idempotency.py +0 -45
  485. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_md_renderer.py +0 -46
  486. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_cmds.py +0 -97
  487. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_snapshot.py +0 -77
  488. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_writer.py +0 -65
  489. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_project_builder.py +0 -199
  490. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_public_api.py +0 -135
  491. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_repo_builder.py +0 -246
  492. package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_workflow_pdf_flags.py +0 -36
  493. package/tools/vds-scripts/audit_orchestrator/tests/property/__init__.py +0 -0
  494. package/tools/vds-scripts/audit_orchestrator/tests/property/test_properties.py +0 -807
  495. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/__init__.py +0 -0
  496. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agent_error_compat.py +0 -38
  497. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agentic_skill_policy_skip.py +0 -234
  498. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_event_stream_logging.py +0 -785
  499. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_timeout_policy.py +0 -277
  500. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_trace_payload_sanitization.py +0 -92
  501. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent.py +0 -2311
  502. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent_re_exports.py +0 -25
  503. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_analysis_helpers.py +0 -94
  504. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_create_audit_agent_reasoning_effort.py +0 -69
  505. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_docs_agent.py +0 -2044
  506. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_langgraph_workflow_efficiency_metrics.py +0 -71
  507. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_output_validators.py +0 -317
  508. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_phase41_toolsets.py +0 -6427
  509. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_ai_models.py +0 -1219
  510. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_base_url_resolution.py +0 -84
  511. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_security_agent.py +0 -2069
  512. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_skill_manager_focus.py +0 -439
  513. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_synthesis_agent.py +0 -1195
  514. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_tool_efficiency_guard_fr120.py +0 -683
  515. package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_toolsets.py +0 -716
  516. package/tools/vds-scripts/audit_orchestrator/tests/test_aggregator_p149.py +0 -171
  517. package/tools/vds-scripts/audit_orchestrator/tests/test_alembic_migrations.py +0 -287
  518. package/tools/vds-scripts/audit_orchestrator/tests/test_anchor_allowlist_p149.py +0 -273
  519. package/tools/vds-scripts/audit_orchestrator/tests/test_audit_otel.py +0 -283
  520. package/tools/vds-scripts/audit_orchestrator/tests/test_checklist_models.py +0 -583
  521. package/tools/vds-scripts/audit_orchestrator/tests/test_checks/__init__.py +0 -0
  522. package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_base_check.py +0 -211
  523. package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_llm_checks.py +0 -126
  524. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/__init__.py +0 -0
  525. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_analyze_command.py +0 -400
  526. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_archive_stale_page_cli.py +0 -217
  527. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_bitbucket_metadata_cli.py +0 -354
  528. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_cli_impl_profile_availability.py +0 -114
  529. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_codex_profile.py +0 -174
  530. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_compare_backends_cli.py +0 -449
  531. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_confluence_parent_auto_resolve.py +0 -451
  532. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_corpus_purge_cli.py +0 -290
  533. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_credentials_preflight.py +0 -106
  534. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_debug_bundle.py +0 -37
  535. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_deprecation_phase157.py +0 -484
  536. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_dispatch_concurrency_diagnostics.py +0 -758
  537. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_check_confluence_cli.py +0 -320
  538. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_codex.py +0 -187
  539. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_corpus_status_cli.py +0 -236
  540. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_correlation_cli.py +0 -128
  541. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_crawl_status_cli.py +0 -192
  542. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_credentials_cli.py +0 -86
  543. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_dispatch_status_cli.py +0 -421
  544. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_heartbeat_phase169.py +0 -173
  545. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_hierarchy_status_cli.py +0 -199
  546. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_locks_cli.py +0 -134
  547. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_logs_follow_cli.py +0 -305
  548. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_migration.py +0 -333
  549. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_profile_availability_cli.py +0 -151
  550. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_skills_policy_cli.py +0 -153
  551. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_evidence_quality_cli.py +0 -307
  552. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_debug_bundle_phase36.py +0 -60
  553. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_git_manifest_cli.py +0 -172
  554. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_file_removal_phase157e.py +0 -770
  555. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_grounding_classifier.py +0 -226
  556. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_logging.py +0 -49
  557. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_materials_cli.py +0 -9127
  558. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_metadata_completeness_phase92.py +0 -364
  559. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parent_dispatch_finalization_phase168f.py +0 -111
  560. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parse_cli.py +0 -590
  561. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase117_118_feature_flags.py +0 -219
  562. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase164_control_plane.py +0 -718
  563. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase165_runner_scripts.py +0 -230
  564. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_preparation_classifications.py +0 -146
  565. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_prepare_cli.py +0 -398
  566. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publication_quality_gate.py +0 -126
  567. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publish_system_doc_cli.py +0 -158
  568. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_query_checklist_cli.py +0 -219
  569. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli.py +0 -673
  570. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli_integration.py +0 -689
  571. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_removed_flags_phase92.py +0 -36
  572. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_report_cmds.py +0 -1317
  573. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_history_index.py +0 -57
  574. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_management.py +0 -1194
  575. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_runtime_profiles_cli.py +0 -1658
  576. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_smart_run_selection.py +0 -1562
  577. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_cli.py +0 -2467
  578. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_migration.py +0 -339
  579. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_sync_repos_debug_artifacts.py +0 -1109
  580. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_upload_results_cli.py +0 -809
  581. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist.py +0 -178
  582. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist_cli.py +0 -110
  583. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_spec_sync_cli.py +0 -519
  584. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_default_parameters_baseline.py +0 -101
  585. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_options.py +0 -7896
  586. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_db_modes.py +0 -6516
  587. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_project_scope.py +0 -831
  588. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_target.py +0 -611
  589. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_lifecycle.py +0 -2488
  590. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_scaffolding.py +0 -96
  591. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_row_key_guard.py +0 -78
  592. package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_summary_artifacts.py +0 -1872
  593. package/tools/vds-scripts/audit_orchestrator/tests/test_cli_paths_phase2.py +0 -45
  594. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/__init__.py +0 -0
  595. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_bitbucket_cli_client.py +0 -124
  596. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_cli_parity.py +0 -110
  597. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_confluence_cli_client.py +0 -1149
  598. package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_sonarqube_cli_client.py +0 -19
  599. package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/__init__.py +0 -0
  600. package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/test_linked_page_tracker.py +0 -118
  601. package/tools/vds-scripts/audit_orchestrator/tests/test_companion_context_service.py +0 -230
  602. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/__init__.py +0 -0
  603. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/conftest.py +0 -11
  604. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_compile_artifact.py +0 -465
  605. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique.py +0 -120
  606. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique_e2e.py +0 -75
  607. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_evaluation.py +0 -515
  608. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_runtime_loader.py +0 -537
  609. package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_signatures_normalization.py +0 -172
  610. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/__init__.py +0 -0
  611. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_auditor_applicability.py +0 -68
  612. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_generator.py +0 -1252
  613. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_projection.py +0 -54
  614. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_confluence_checklist_projection_consistency.py +0 -1696
  615. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_critique_merger_matrix.py +0 -120
  616. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_check_rules.py +0 -459
  617. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_provider_critique.py +0 -55
  618. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_doc_loader.py +0 -73
  619. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_drift_detector.py +0 -34
  620. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_evidence_collectors.py +0 -93
  621. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_lease_timeout.py +0 -114
  622. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader.py +0 -350
  623. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader_parity.py +0 -179
  624. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_low_confidence_reeval.py +0 -691
  625. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase145a_completion.py +0 -209
  626. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase31_row_consistency_retry_benchmark.py +0 -150
  627. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_profile_detector.py +0 -286
  628. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_regression_guard.py +0 -53
  629. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_result_merger.py +0 -619
  630. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_evaluator.py +0 -15783
  631. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_failover.py +0 -215
  632. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_scorer.py +0 -597
  633. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_skill_breakdown_telemetry_fr137.py +0 -421
  634. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_targeted_auto_merge.py +0 -229
  635. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_failover.py +0 -488
  636. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_telemetry.py +0 -73
  637. package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_validator.py +0 -419
  638. package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/__init__.py +0 -0
  639. package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/test_diff_detector.py +0 -111
  640. package/tools/vds-scripts/audit_orchestrator/tests/test_infra_persistence.py +0 -291
  641. package/tools/vds-scripts/audit_orchestrator/tests/test_integration/__init__.py +0 -0
  642. package/tools/vds-scripts/audit_orchestrator/tests/test_integration/test_phase3_integration.py +0 -516
  643. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/__init__.py +0 -0
  644. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cache.py +0 -670
  645. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_model_builder.py +0 -281
  646. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_oauth.py +0 -330
  647. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_streaming.py +0 -433
  648. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cost_tracker.py +0 -27
  649. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_engine.py +0 -876
  650. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_evaluator.py +0 -212
  651. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_instruction_templates.py +0 -639
  652. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompt_metadata.py +0 -97
  653. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompts.py +0 -660
  654. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider.py +0 -330
  655. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider_contract_sync.py +0 -18
  656. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_reasoning_effort_validation.py +0 -565
  657. package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_schemas.py +0 -827
  658. package/tools/vds-scripts/audit_orchestrator/tests/test_logging_config.py +0 -297
  659. package/tools/vds-scripts/audit_orchestrator/tests/test_models/__init__.py +0 -0
  660. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_enums.py +0 -185
  661. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_findings.py +0 -1159
  662. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_project_profile.py +0 -307
  663. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_registry.py +0 -532
  664. package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_template.py +0 -708
  665. package/tools/vds-scripts/audit_orchestrator/tests/test_observability/__init__.py +0 -0
  666. package/tools/vds-scripts/audit_orchestrator/tests/test_observability/test_metrics.py +0 -60
  667. package/tools/vds-scripts/audit_orchestrator/tests/test_paths_config_phase2.py +0 -21
  668. package/tools/vds-scripts/audit_orchestrator/tests/test_performance/__init__.py +0 -0
  669. package/tools/vds-scripts/audit_orchestrator/tests/test_performance/test_fr79_performance_guardrails.py +0 -199
  670. package/tools/vds-scripts/audit_orchestrator/tests/test_phase156_hardening.py +0 -498
  671. package/tools/vds-scripts/audit_orchestrator/tests/test_phase93_regression_guards.py +0 -123
  672. package/tools/vds-scripts/audit_orchestrator/tests/test_pipeline_integration.py +0 -517
  673. package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/__init__.py +0 -0
  674. package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/test_detection.py +0 -146
  675. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/__init__.py +0 -0
  676. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_bitbucket_link_resolver.py +0 -55
  677. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer.py +0 -84
  678. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer_projection.py +0 -97
  679. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_macros.py +0 -58
  680. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_publisher.py +0 -2171
  681. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_evidence_links.py +0 -129
  682. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_field_sanitizer.py +0 -108
  683. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_hierarchy_publisher.py +0 -134
  684. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_incremental_plan_parser.py +0 -62
  685. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_live_data_injector.py +0 -48
  686. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_macro_builder.py +0 -22
  687. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_p161_confluence_optimization.py +0 -168
  688. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_priority_renderer.py +0 -96
  689. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_project_aggregate_renderer.py +0 -364
  690. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_storage_validation.py +0 -273
  691. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_summary_refactor.py +0 -118
  692. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_system_doc_hierarchy.py +0 -50
  693. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_table_builder.py +0 -23
  694. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_vietnamese_templates.py +0 -37
  695. package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_wiring_integration.py +0 -290
  696. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/__init__.py +0 -0
  697. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_aggregation_report.py +0 -181
  698. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_checklist_generator.py +0 -258
  699. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_gap_report.py +0 -73
  700. package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_json_generator.py +0 -317
  701. package/tools/vds-scripts/audit_orchestrator/tests/test_result_merger_p149.py +0 -347
  702. package/tools/vds-scripts/audit_orchestrator/tests/test_route_mode_p149.py +0 -178
  703. package/tools/vds-scripts/audit_orchestrator/tests/test_rubric_parser.py +0 -179
  704. package/tools/vds-scripts/audit_orchestrator/tests/test_scorer.py +0 -110
  705. package/tools/vds-scripts/audit_orchestrator/tests/test_state/__init__.py +0 -0
  706. package/tools/vds-scripts/audit_orchestrator/tests/test_state/test_sparse_coverage.py +0 -117
  707. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/__init__.py +0 -0
  708. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_langgraph_workflow.py +0 -2072
  709. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_p161_runtime_hardening.py +0 -341
  710. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p149.py +0 -112
  711. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p172.py +0 -126
  712. package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_guidance_p150.py +0 -95
  713. package/tools/vds-scripts/audit_orchestrator/tests/unit/__init__.py +0 -0
  714. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/__init__.py +0 -0
  715. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_agentic_investigator_phase115.py +0 -42
  716. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_requirement_analysis_agent.py +0 -412
  717. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_agent_updates.py +0 -131
  718. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_scanner.py +0 -397
  719. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_executor.py +0 -316
  720. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_fallback.py +0 -299
  721. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_policy.py +0 -520
  722. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_telemetry.py +0 -306
  723. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_synthesis_fixes.py +0 -761
  724. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_argument_robustness.py +0 -272
  725. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry.py +0 -2548
  726. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_ast_grep.py +0 -87
  727. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase123_scoping.py +0 -353
  728. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase94_ff.py +0 -445
  729. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_vector_search_phase115.py +0 -35
  730. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_utils.py +0 -1007
  731. package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_vector_evidence_toolset.py +0 -622
  732. package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/__init__.py +0 -0
  733. package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/test_workflow_cli.py +0 -123
  734. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/__init__.py +0 -0
  735. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_cache_guard.py +0 -479
  736. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_checklist_parser_phase120.py +0 -55
  737. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_diagram_extractor.py +0 -467
  738. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_enrichment_extractor.py +0 -59
  739. package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_graphify_collector.py +0 -158
  740. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/__init__.py +0 -0
  741. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_completeness.py +0 -563
  742. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_freshness_evaluator.py +0 -493
  743. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_cache_metrics.py +0 -365
  744. package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_completeness_service.py +0 -2736
  745. package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/__init__.py +0 -0
  746. package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_discovery.py +0 -47
  747. package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_redaction.py +0 -15
  748. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/__init__.py +0 -0
  749. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_ad_hoc_analyzer.py +0 -576
  750. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_agent_loop.py +0 -1896
  751. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_anchor_filter_cl003.py +0 -181
  752. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_evidence_cache.py +0 -155
  753. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_processor.py +0 -3608
  754. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_contract.py +0 -55
  755. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_scoping.py +0 -371
  756. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_companion_phase123.py +0 -142
  757. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_evidence_phase123.py +0 -249
  758. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_confluence_checklist_contract_export_parity.py +0 -813
  759. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_cross_repo_config_phase122.py +0 -613
  760. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_dspy_requirement_classifier.py +0 -517
  761. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_diversity.py +0 -144
  762. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_truncation.py +0 -108
  763. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_grounding_validator.py +0 -127
  764. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_guidance_injection_phase120.py +0 -105
  765. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_analysis_phase122.py +0 -761
  766. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_pre_filter_phase167.py +0 -334
  767. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_llm_row_evaluator_retries.py +0 -3684
  768. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_loader_phase123.py +0 -345
  769. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_manual_check_gating_phase122.py +0 -474
  770. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_parallel_eval.py +0 -263
  771. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase122_verifier_phase122.py +0 -169
  772. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase166_route_failover.py +0 -437
  773. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_post_eval_cl003_shared_lib.py +0 -267
  774. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_postproc_streaming.py +0 -194
  775. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_pre_eval_gating_phase122.py +0 -362
  776. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_prepare_topology_coverage.py +0 -247
  777. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_private_dns_sanitization_phase104.py +0 -397
  778. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_evidence_context.py +0 -450
  779. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_knowledge_store.py +0 -487
  780. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_topology.py +0 -1142
  781. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_provider_failure_classifier.py +0 -195
  782. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_extractor.py +0 -496
  783. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_synthesizer.py +0 -653
  784. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_repo_type_classifier.py +0 -303
  785. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis.py +0 -508
  786. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_execution_scope.py +0 -239
  787. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase114.py +0 -919
  788. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase115.py +0 -97
  789. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_shared_lib.py +0 -340
  790. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_drift.py +0 -729
  791. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_nlp.py +0 -670
  792. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_scope_phase122.py +0 -615
  793. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_matrix.py +0 -258
  794. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_override.py +0 -141
  795. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_routing_precision.py +0 -650
  796. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_dual_evidence.py +0 -2987
  797. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_instruction_runtime_phase122.py +0 -365
  798. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_runtime.py +0 -830
  799. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_runtime_hardening_phase122.py +0 -225
  800. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoped_na_skip.py +0 -107
  801. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoring_enhancements.py +0 -404
  802. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_retrieval_phase123.py +0 -441
  803. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_routing_phase123.py +0 -279
  804. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_resource_indexing_phase122.py +0 -188
  805. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_recommendation.py +0 -225
  806. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_routing_cl003_shared_lib.py +0 -338
  807. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skills_toolset.py +0 -319
  808. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_stability_metric.py +0 -60
  809. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_target_selector.py +0 -958
  810. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_tracker.py +0 -121
  811. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_wiring.py +0 -119
  812. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_tool_first_planner.py +0 -7103
  813. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_knowledge_persistence.py +0 -332
  814. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_query_service.py +0 -55
  815. package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_unverified_ref_retry.py +0 -909
  816. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/__init__.py +0 -0
  817. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_evidence.py +0 -515
  818. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_gaps.py +0 -422
  819. package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_readiness.py +0 -428
  820. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/__init__.py +0 -0
  821. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_confluence_hierarchy.py +0 -227
  822. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_project_title_generation.py +0 -335
  823. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_helpers.py +0 -290
  824. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_integration.py +0 -557
  825. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_readiness_renderer.py +0 -381
  826. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_repo_title_consistency.py +0 -266
  827. package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_upload_hierarchy_integration.py +0 -470
  828. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/__init__.py +0 -0
  829. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_dspy.py +0 -177
  830. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_nlp_accuracy.py +0 -72
  831. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_retrieval_modes.py +0 -123
  832. package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_verify_phase111_requirement_analysis.py +0 -409
  833. package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/__init__.py +0 -0
  834. package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_chain_cli.py +0 -277
  835. package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_loader.py +0 -502
  836. package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/__init__.py +0 -0
  837. package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/test_skill_routing.py +0 -209
  838. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/__init__.py +0 -0
  839. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_bitbucket_source.py +0 -66
  840. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_non_retryable_markers.py +0 -88
  841. package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_repo_info.py +0 -212
  842. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/__init__.py +0 -0
  843. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_completeness.py +0 -598
  844. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_events_contract_phase169.py +0 -100
  845. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_hardening_phase158.py +0 -392
  846. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_persistence_phase157.py +0 -914
  847. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_embedding_client.py +0 -64
  848. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_get_latest_completed_run.py +0 -313
  849. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_heartbeat_phase169.py +0 -109
  850. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_hybrid_search.py +0 -398
  851. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_normalize_url.py +0 -262
  852. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase152_query_surface.py +0 -59
  853. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase98_confluence_document_model.py +0 -202
  854. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_published_pages.py +0 -754
  855. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_readiness_helpers.py +0 -193
  856. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_ledger.py +0 -522
  857. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_management.py +0 -378
  858. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_schema_contract_phase170.py +0 -755
  859. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_cmds.py +0 -231
  860. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_loaders.py +0 -2151
  861. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_run_api.py +0 -2226
  862. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store.py +0 -1435
  863. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch.py +0 -646
  864. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch_status_view.py +0 -181
  865. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_scope.py +0 -213
  866. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_utilization_persist_phase169.py +0 -77
  867. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vds_search.py +0 -263
  868. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_api.py +0 -319
  869. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_runtime.py +0 -175
  870. package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_store.py +0 -1756
  871. package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/__init__.py +0 -0
  872. package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/test_repo_sync.py +0 -257
  873. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_artifact_exclusion.py +0 -119
  874. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_auto_promote_phase158.py +0 -337
  875. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_carry_forward_artifact_filtering.py +0 -317
  876. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_checklist_precache_p160a.py +0 -416
  877. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_cli_decomposition_fr219.py +0 -269
  878. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_code_chunk_carry_forward.py +0 -203
  879. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_coherence.py +0 -180
  880. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_secret_policy.py +0 -522
  881. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_project_id_migration.py +0 -318
  882. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_status_diagnostics.py +0 -239
  883. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_department_priority_ordering.py +0 -131
  884. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_coordinator_phase158.py +0 -402
  885. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_job_identity_p167a.py +0 -238
  886. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_ramp_up_phase171.py +0 -434
  887. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatcher.py +0 -911
  888. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_doc_type_en_inference.py +0 -246
  889. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_early_exit_unchunked_repos.py +0 -111
  890. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors.py +0 -237
  891. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors_taxonomy.py +0 -83
  892. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_chunking_config_phase98.py +0 -73
  893. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_cmds_state_helpers.py +0 -33
  894. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_docs_code_chunking.py +0 -260
  895. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_finalize_dispatch_run_phase168.py +0 -341
  896. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_identity.py +0 -221
  897. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_infrastructure_detection.py +0 -441
  898. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_junction_table_phase95.py +0 -259
  899. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_late_binding_assignment_p167c.py +0 -286
  900. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_misc_cmds_fr224_225_hardening.py +0 -194
  901. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_p172_integration.py +0 -306
  902. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_parent_provider_preflight.py +0 -118
  903. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase92.py +0 -141
  904. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase93.py +0 -50
  905. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase115_search_strategy.py +0 -106
  906. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase154_title_consistency.py +0 -117
  907. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase155_param_forwarding.py +0 -304
  908. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase158_concurrency_defaults.py +0 -207
  909. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_doctor_schema.py +0 -319
  910. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_regression.py +0 -334
  911. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase94_corpus_lifecycle.py +0 -307
  912. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase96_repo_key_migration.py +0 -305
  913. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_pipelined_scheduling.py +0 -130
  914. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_availability_probe.py +0 -616
  915. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_aware_row_timeout.py +0 -102
  916. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_timeout_stagger_p160cd.py +0 -205
  917. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_progress_summary_phase169.py +0 -96
  918. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_registry_checklist_diagnostics.py +0 -124
  919. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_resume_manifest_p167b.py +0 -268
  920. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_risk_mitigations_p160e1.py +0 -348
  921. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_single_row_shards_p160b.py +0 -357
  922. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_state_repo_discovery.py +0 -504
  923. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_sync_metadata_entries.py +0 -57
  924. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_task_models.py +0 -1796
  925. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_utilization_telemetry_p167e.py +0 -259
  926. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_vietnamese_fts_hardening.py +0 -160
  927. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_phase98_enrichment.py +0 -92
  928. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_project_merge_materialization.py +0 -322
  929. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_row_key_migration_guard.py +0 -88
  930. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_short_circuit_phase121.py +0 -564
  931. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_single_target_row_context.py +0 -49
  932. package/tools/vds-scripts/audit_orchestrator/tests/unit/test_zero_result_messaging.py +0 -76
  933. package/tools/vds-scripts/bandit-report.json +0 -2974
  934. package/tools/vds-scripts/brd_orchestrator/README.md +0 -29
  935. package/tools/vds-scripts/brd_orchestrator/pyproject.toml +0 -63
  936. package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/__init__.py +0 -17
  937. package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/cli.py +0 -187
  938. package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/validator.py +0 -121
  939. package/tools/vds-scripts/brd_orchestrator/tests/__init__.py +0 -0
  940. package/tools/vds-scripts/brd_orchestrator/tests/test_cli.py +0 -62
  941. package/tools/vds-scripts/brd_orchestrator/tests/test_validator.py +0 -33
  942. package/tools/vds-scripts/circular_dependency_orchestrator/README.md +0 -30
  943. package/tools/vds-scripts/circular_dependency_orchestrator/pyproject.toml +0 -43
  944. package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/__init__.py +0 -16
  945. package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/cli.py +0 -904
  946. package/tools/vds-scripts/circular_dependency_orchestrator/tests/__init__.py +0 -0
  947. package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/__init__.py +0 -0
  948. package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/test_cli.py +0 -354
  949. package/tools/vds-scripts/coverage.json +0 -1
  950. package/tools/vds-scripts/create_pr.py +0 -57
  951. package/tools/vds-scripts/diagram_generator/README.md +0 -663
  952. package/tools/vds-scripts/diagram_generator/ci_validate.sh +0 -16
  953. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.png +0 -0
  954. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.puml +0 -23
  955. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.png +0 -0
  956. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.puml +0 -21
  957. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.png +0 -0
  958. package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.puml +0 -14
  959. package/tools/vds-scripts/diagram_generator/examples/github-actions-validate.yml +0 -39
  960. package/tools/vds-scripts/diagram_generator/generate_all_diagrams.py +0 -827
  961. package/tools/vds-scripts/diagram_generator/generate_insurance_c4_diagrams.py +0 -261
  962. package/tools/vds-scripts/diagram_generator/generate_insurance_c4_quick.py +0 -486
  963. package/tools/vds-scripts/diagram_generator/pyproject.toml +0 -28
  964. package/tools/vds-scripts/diagram_generator/render_png.py +0 -59
  965. package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/__init__.py +0 -3
  966. package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/cli.py +0 -50
  967. package/tools/vds-scripts/diagram_generator/test_c4_hierarchical.py +0 -142
  968. package/tools/vds-scripts/diagram_generator/test_c4_quick.py +0 -131
  969. package/tools/vds-scripts/diagram_generator/tests/__init__.py +0 -0
  970. package/tools/vds-scripts/diagram_generator/tests/test_analyzer_completeness.py +0 -260
  971. package/tools/vds-scripts/diagram_generator/tests/test_c4_syntax_correctness.py +0 -138
  972. package/tools/vds-scripts/diagram_generator/tests/test_component_coverage.py +0 -182
  973. package/tools/vds-scripts/diagram_generator/tests/test_mermaid_output.py +0 -80
  974. package/tools/vds-scripts/diagram_generator/tests/test_png_generation.py +0 -112
  975. package/tools/vds-scripts/diagram_generator/tests/test_scenario_templates.py +0 -15
  976. package/tools/vds-scripts/diagram_generator/tests/test_sequence_accuracy.py +0 -93
  977. package/tools/vds-scripts/diagram_generator/tests/test_structurizr_export.py +0 -177
  978. package/tools/vds-scripts/diagram_generator/tests/test_style_consistency.py +0 -174
  979. package/tools/vds-scripts/diagram_generator/tests/test_usecase_generator.py +0 -201
  980. package/tools/vds-scripts/diagram_generator/tests/test_usecase_integration.py +0 -124
  981. package/tools/vds-scripts/docker/compose.phase2-verification.yml +0 -31
  982. package/tools/vds-scripts/docker-compose.openapi-validator.yml +0 -14
  983. package/tools/vds-scripts/excel_orchestrator/README.md +0 -288
  984. package/tools/vds-scripts/excel_orchestrator/RESEARCH_BASED_UPDATES_REPORT.md +0 -261
  985. package/tools/vds-scripts/excel_orchestrator/add_essential_missing_effort.py +0 -255
  986. package/tools/vds-scripts/excel_orchestrator/adjust_effort_complexity.py +0 -184
  987. package/tools/vds-scripts/excel_orchestrator/brd_analysis_and_task_breakdown.py +0 -632
  988. package/tools/vds-scripts/excel_orchestrator/brd_analysis_comprehensive.py +0 -1029
  989. package/tools/vds-scripts/excel_orchestrator/check_overlaps_and_brd_coverage.py +0 -570
  990. package/tools/vds-scripts/excel_orchestrator/clean_remarks_column.py +0 -127
  991. package/tools/vds-scripts/excel_orchestrator/comprehensive_brd_check.py +0 -322
  992. package/tools/vds-scripts/excel_orchestrator/create_buffered_summary.py +0 -119
  993. package/tools/vds-scripts/excel_orchestrator/create_service_totals_sheet.py +0 -118
  994. package/tools/vds-scripts/excel_orchestrator/examples/basic_operations.py +0 -85
  995. package/tools/vds-scripts/excel_orchestrator/expand_all_tasks.py +0 -341
  996. package/tools/vds-scripts/excel_orchestrator/expand_tasks.py +0 -304
  997. package/tools/vds-scripts/excel_orchestrator/fill_brd_references.py +0 -347
  998. package/tools/vds-scripts/excel_orchestrator/fill_remarks_and_colors.py +0 -132
  999. package/tools/vds-scripts/excel_orchestrator/finalize_brd_and_cleanup.py +0 -295
  1000. package/tools/vds-scripts/excel_orchestrator/finalize_brd_coverage.py +0 -327
  1001. package/tools/vds-scripts/excel_orchestrator/fix_all_formulas.py +0 -99
  1002. package/tools/vds-scripts/excel_orchestrator/fix_detail_presentation.py +0 -113
  1003. package/tools/vds-scripts/excel_orchestrator/fix_presentation_and_effort.py +0 -116
  1004. package/tools/vds-scripts/excel_orchestrator/fix_presentation_consistency.py +0 -231
  1005. package/tools/vds-scripts/excel_orchestrator/fix_remarks_matching.py +0 -179
  1006. package/tools/vds-scripts/excel_orchestrator/group_tasks_by_service_id.py +0 -210
  1007. package/tools/vds-scripts/excel_orchestrator/increase_brd_coverage.py +0 -497
  1008. package/tools/vds-scripts/excel_orchestrator/increase_effort_complexity.py +0 -155
  1009. package/tools/vds-scripts/excel_orchestrator/organize_and_deduplicate.py +0 -273
  1010. package/tools/vds-scripts/excel_orchestrator/pyproject.toml +0 -64
  1011. package/tools/vds-scripts/excel_orchestrator/rebuild_all_formulas.py +0 -146
  1012. package/tools/vds-scripts/excel_orchestrator/remove_base_multiplier_and_check_duplicates.py +0 -310
  1013. package/tools/vds-scripts/excel_orchestrator/remove_duplicate_brd_tasks.py +0 -137
  1014. package/tools/vds-scripts/excel_orchestrator/research_based_updates.py +0 -457
  1015. package/tools/vds-scripts/excel_orchestrator/restore_e_values.py +0 -172
  1016. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/__init__.py +0 -5
  1017. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/cli.py +0 -746
  1018. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/config.py +0 -74
  1019. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/converters.py +0 -226
  1020. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/errors.py +0 -88
  1021. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/excel_client.py +0 -443
  1022. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/formatters.py +0 -211
  1023. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/logging.py +0 -57
  1024. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/source_contract.py +0 -29
  1025. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/target_state_status.py +0 -837
  1026. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/ulnc_alignment.py +0 -1291
  1027. package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/validators.py +0 -164
  1028. package/tools/vds-scripts/excel_orchestrator/sync_detail_and_total_sheets.py +0 -211
  1029. package/tools/vds-scripts/excel_orchestrator/tests/__init__.py +0 -1
  1030. package/tools/vds-scripts/excel_orchestrator/tests/conftest.py +0 -36
  1031. package/tools/vds-scripts/excel_orchestrator/tests/test_cli.py +0 -383
  1032. package/tools/vds-scripts/excel_orchestrator/tests/test_excel_client.py +0 -129
  1033. package/tools/vds-scripts/excel_orchestrator/tests/test_ulnc_alignment.py +0 -373
  1034. package/tools/vds-scripts/excel_orchestrator/tests/test_validators.py +0 -64
  1035. package/tools/vds-scripts/excel_orchestrator/update_api_database_effort.py +0 -261
  1036. package/tools/vds-scripts/excel_orchestrator/update_buffers_inline.py +0 -115
  1037. package/tools/vds-scripts/excel_orchestrator/update_complex_services_and_add_new.py +0 -336
  1038. package/tools/vds-scripts/excel_orchestrator/update_responsibility_and_fix_rows.py +0 -208
  1039. package/tools/vds-scripts/excel_orchestrator/update_task_breakdown_vietnamese.py +0 -309
  1040. package/tools/vds-scripts/excel_orchestrator/update_vietnamese_and_responsibility.py +0 -415
  1041. package/tools/vds-scripts/excel_orchestrator/verify_brd_coverage_comprehensive.py +0 -401
  1042. package/tools/vds-scripts/hexagonal_orchestrator/README.md +0 -530
  1043. package/tools/vds-scripts/hexagonal_orchestrator/pyproject.toml +0 -48
  1044. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/__init__.py +0 -39
  1045. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/__init__.py +0 -19
  1046. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/base.py +0 -95
  1047. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/fallback.py +0 -614
  1048. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/java.py +0 -372
  1049. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/python.py +0 -437
  1050. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cache.py +0 -331
  1051. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/classifier.py +0 -263
  1052. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cli.py +0 -554
  1053. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/config.py +0 -577
  1054. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/models.py +0 -159
  1055. package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/profiler.py +0 -451
  1056. package/tools/vds-scripts/hexagonal_orchestrator/test-config.yaml +0 -38
  1057. package/tools/vds-scripts/hexagonal_orchestrator/tests/__init__.py +0 -1
  1058. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/__init__.py +0 -1
  1059. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driven/persistence/InMemoryUserRepository.java +0 -62
  1060. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driving/api/UserController.java +0 -101
  1061. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/EmailService.java +0 -33
  1062. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/UserRepository.java +0 -45
  1063. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/usecase/CreateUser.java +0 -58
  1064. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/Email.java +0 -80
  1065. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/User.java +0 -98
  1066. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-noncompliant/domain/User.java +0 -64
  1067. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Menu.java +0 -13
  1068. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Product.java +0 -16
  1069. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/__init__.py +0 -1
  1070. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/__init__.py +0 -1
  1071. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/__init__.py +0 -1
  1072. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/email_service.py +0 -60
  1073. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/user_repository.py +0 -78
  1074. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/__init__.py +0 -1
  1075. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/__init__.py +0 -1
  1076. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/user.py +0 -56
  1077. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/__init__.py +0 -1
  1078. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/email.py +0 -63
  1079. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/application/user_service.py +0 -1837
  1080. package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/domain/user.py +0 -43
  1081. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cache.py +0 -458
  1082. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_integration.py +0 -942
  1083. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_unit.py +0 -557
  1084. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cross_repo_pollution.py +0 -275
  1085. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_foundation.py +0 -129
  1086. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_integration.py +0 -1524
  1087. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_java_analyzer.py +0 -642
  1088. package/tools/vds-scripts/hexagonal_orchestrator/tests/test_timing_unit.py +0 -60
  1089. package/tools/vds-scripts/intellij_orchestrator/README.md +0 -55
  1090. package/tools/vds-scripts/intellij_orchestrator/pyproject.toml +0 -64
  1091. package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/__init__.py +0 -17
  1092. package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/cli.py +0 -210
  1093. package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/core.py +0 -260
  1094. package/tools/vds-scripts/intellij_orchestrator/tests/__init__.py +0 -1
  1095. package/tools/vds-scripts/intellij_orchestrator/tests/test_cli.py +0 -112
  1096. package/tools/vds-scripts/intellij_orchestrator/tests/test_core.py +0 -83
  1097. package/tools/vds-scripts/links_orchestrator/README.md +0 -63
  1098. package/tools/vds-scripts/links_orchestrator/pyproject.toml +0 -64
  1099. package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/__init__.py +0 -10
  1100. package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/cli.py +0 -254
  1101. package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/validator.py +0 -244
  1102. package/tools/vds-scripts/links_orchestrator/tests/__init__.py +0 -0
  1103. package/tools/vds-scripts/links_orchestrator/tests/test_cli.py +0 -128
  1104. package/tools/vds-scripts/links_orchestrator/tests/test_validator.py +0 -76
  1105. package/tools/vds-scripts/lsp_orchestrator/.dockerignore +0 -69
  1106. package/tools/vds-scripts/lsp_orchestrator/ARCHITECTURE.md +0 -383
  1107. package/tools/vds-scripts/lsp_orchestrator/CODE_QUALITY_IMPROVEMENTS.md +0 -196
  1108. package/tools/vds-scripts/lsp_orchestrator/COMMANDS.md +0 -870
  1109. package/tools/vds-scripts/lsp_orchestrator/Dockerfile +0 -59
  1110. package/tools/vds-scripts/lsp_orchestrator/IMPLEMENTATION_SUMMARY.md +0 -490
  1111. package/tools/vds-scripts/lsp_orchestrator/LSP_ISSUES_AND_FINDINGS.md +0 -380
  1112. package/tools/vds-scripts/lsp_orchestrator/README.md +0 -616
  1113. package/tools/vds-scripts/lsp_orchestrator/SETUP.md +0 -143
  1114. package/tools/vds-scripts/lsp_orchestrator/TEST_COVERAGE_SUMMARY.md +0 -255
  1115. package/tools/vds-scripts/lsp_orchestrator/VERIFICATION_CHECKLIST.md +0 -814
  1116. package/tools/vds-scripts/lsp_orchestrator/docker-compose.yml +0 -102
  1117. package/tools/vds-scripts/lsp_orchestrator/docs/FOR_LLMS.md +0 -401
  1118. package/tools/vds-scripts/lsp_orchestrator/docs/explanation/lsp-response-matching.md +0 -79
  1119. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/automate-with-json.md +0 -159
  1120. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/docker-mode.md +0 -256
  1121. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/navigate-code.md +0 -116
  1122. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/parallel-processing.md +0 -179
  1123. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/project-tool-detection.md +0 -320
  1124. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/type-check-code.md +0 -46
  1125. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/use-daemon-mode.md +0 -78
  1126. package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/wsl2-optimization.md +0 -227
  1127. package/tools/vds-scripts/lsp_orchestrator/docs/index.md +0 -88
  1128. package/tools/vds-scripts/lsp_orchestrator/docs/operator-hover-definition.md +0 -143
  1129. package/tools/vds-scripts/lsp_orchestrator/docs/reference/commands.md +0 -581
  1130. package/tools/vds-scripts/lsp_orchestrator/docs/reference/configuration.md +0 -422
  1131. package/tools/vds-scripts/lsp_orchestrator/docs/tutorials/00-quick-start.md +0 -169
  1132. package/tools/vds-scripts/lsp_orchestrator/pyproject.toml +0 -63
  1133. package/tools/vds-scripts/lsp_orchestrator/src/test_file.py +0 -5
  1134. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/__init__.py +0 -3
  1135. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/aggregator.py +0 -340
  1136. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/basedpyright_runner.py +0 -167
  1137. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/cli.py +0 -3370
  1138. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/code_actions.py +0 -79
  1139. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/core.py +0 -3295
  1140. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_client.py +0 -672
  1141. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_manager.py +0 -577
  1142. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_server.py +0 -1040
  1143. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/__init__.py +0 -9
  1144. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/project_detector.py +0 -537
  1145. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/formatters.py +0 -141
  1146. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ipc_protocol.py +0 -225
  1147. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_client.py +0 -957
  1148. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_router.py +0 -335
  1149. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mcp_server.py +0 -181
  1150. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/__init__.py +0 -201
  1151. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_detector.py +0 -646
  1152. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_tools.py +0 -114
  1153. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models.py +0 -399
  1154. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mypy_runner.py +0 -209
  1155. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/protocols.py +0 -52
  1156. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_lsp_client.py +0 -109
  1157. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_runner.py +0 -44
  1158. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/utils.py +0 -959
  1159. package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/workspace_indexer.py +0 -1037
  1160. package/tools/vds-scripts/lsp_orchestrator/test_workspace_lsp.py +0 -6
  1161. package/tools/vds-scripts/lsp_orchestrator/tests/__init__.py +0 -1
  1162. package/tools/vds-scripts/lsp_orchestrator/tests/conftest.py +0 -6
  1163. package/tools/vds-scripts/lsp_orchestrator/tests/test_aggregator.py +0 -59
  1164. package/tools/vds-scripts/lsp_orchestrator/tests/test_cli.py +0 -111
  1165. package/tools/vds-scripts/lsp_orchestrator/tests/test_detect_tools_command.py +0 -186
  1166. package/tools/vds-scripts/lsp_orchestrator/tests/test_formatter_linter_detection.py +0 -519
  1167. package/tools/vds-scripts/lsp_orchestrator/tests/test_integration_phase9_10_11.py +0 -367
  1168. package/tools/vds-scripts/lsp_orchestrator/tests/test_mypy_runner.py +0 -482
  1169. package/tools/vds-scripts/lsp_orchestrator/tests/test_package_manager_detection.py +0 -399
  1170. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase10.py +0 -389
  1171. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase11.py +0 -327
  1172. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase12_integration.py +0 -634
  1173. package/tools/vds-scripts/lsp_orchestrator/tests/test_phase9.py +0 -196
  1174. package/tools/vds-scripts/lsp_orchestrator/tests/test_project_detector.py +0 -377
  1175. package/tools/vds-scripts/lsp_orchestrator/tests/test_test_runner_detection.py +0 -549
  1176. package/tools/vds-scripts/lsp_orchestrator/tests/test_type_checker_routing.py +0 -362
  1177. package/tools/vds-scripts/lsp_orchestrator/tests/test_workspace_indexer.py +0 -144
  1178. package/tools/vds-scripts/markdown_orchestrator/README.md +0 -72
  1179. package/tools/vds-scripts/markdown_orchestrator/pyproject.toml +0 -39
  1180. package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/__init__.py +0 -5
  1181. package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/cli.py +0 -102
  1182. package/tools/vds-scripts/multi_agent_orchestrator/Dockerfile +0 -65
  1183. package/tools/vds-scripts/multi_agent_orchestrator/README.md +0 -306
  1184. package/tools/vds-scripts/multi_agent_orchestrator/postman/README.md +0 -264
  1185. package/tools/vds-scripts/multi_agent_orchestrator/postman/TEST_RESULTS_SUMMARY.md +0 -197
  1186. package/tools/vds-scripts/multi_agent_orchestrator/postman/VDS-Multi-Agent-Orchestrator-API.postman_collection.json +0 -1010
  1187. package/tools/vds-scripts/multi_agent_orchestrator/postman/environments/local-development.postman_environment.json +0 -55
  1188. package/tools/vds-scripts/multi_agent_orchestrator/postman/test-results.json +0 -24146
  1189. package/tools/vds-scripts/multi_agent_orchestrator/pyproject.toml +0 -63
  1190. package/tools/vds-scripts/multi_agent_orchestrator/run_api.py +0 -9
  1191. package/tools/vds-scripts/multi_agent_orchestrator/run_mock_api.py +0 -9
  1192. package/tools/vds-scripts/multi_agent_orchestrator/simple_test.py +0 -53
  1193. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/__init__.py +0 -25
  1194. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/agent_pool.py +0 -433
  1195. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/__init__.py +0 -5
  1196. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/main.py +0 -722
  1197. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/mock_main.py +0 -812
  1198. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/change_log.py +0 -515
  1199. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/cli.py +0 -424
  1200. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/config.py +0 -220
  1201. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/conflict_resolver.py +0 -462
  1202. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/coordinator.py +0 -627
  1203. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/models.py +0 -389
  1204. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/progress_dashboard.py +0 -380
  1205. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/redis_client.py +0 -245
  1206. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/scheduler_subscriber.py +0 -272
  1207. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_manager.py +0 -536
  1208. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_tracking.py +0 -550
  1209. package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/vds_ai_memory_client.py +0 -352
  1210. package/tools/vds-scripts/multi_agent_orchestrator/test_complete_system.py +0 -149
  1211. package/tools/vds-scripts/multi_agent_orchestrator/test_infrastructure_only.py +0 -194
  1212. package/tools/vds-scripts/multi_agent_orchestrator/test_integration.py +0 -108
  1213. package/tools/vds-scripts/multi_agent_orchestrator/tests/__init__.py +0 -1
  1214. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_agent_registration_credential_validator.py +0 -223
  1215. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_config.py +0 -210
  1216. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_models.py +0 -195
  1217. package/tools/vds-scripts/multi_agent_orchestrator/tests/test_w9_agent_routes.py +0 -321
  1218. package/tools/vds-scripts/openapi_orchestrator/README.md +0 -197
  1219. package/tools/vds-scripts/openapi_orchestrator/pyproject.toml +0 -106
  1220. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/__init__.py +0 -29
  1221. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/cli.py +0 -345
  1222. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/full_validator.py +0 -183
  1223. package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/spec_validator.py +0 -197
  1224. package/tools/vds-scripts/openapi_orchestrator/tests/__init__.py +0 -1
  1225. package/tools/vds-scripts/openapi_orchestrator/tests/test_cli.py +0 -234
  1226. package/tools/vds-scripts/openapi_orchestrator/tests/test_full_validator.py +0 -203
  1227. package/tools/vds-scripts/openapi_orchestrator/tests/test_spec_validator.py +0 -295
  1228. package/tools/vds-scripts/pdf_orchestrator/.dockerignore +0 -93
  1229. package/tools/vds-scripts/pdf_orchestrator/.env.example +0 -40
  1230. package/tools/vds-scripts/pdf_orchestrator/.ruff_rules.py +0 -350
  1231. package/tools/vds-scripts/pdf_orchestrator/.yamllint.yml +0 -43
  1232. package/tools/vds-scripts/pdf_orchestrator/DEVELOPMENT_PLAN.md +0 -80
  1233. package/tools/vds-scripts/pdf_orchestrator/Dockerfile +0 -87
  1234. package/tools/vds-scripts/pdf_orchestrator/README.md +0 -608
  1235. package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.md +0 -6
  1236. package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.pdf +0 -0
  1237. package/tools/vds-scripts/pdf_orchestrator/config/alertmanager.yml +0 -83
  1238. package/tools/vds-scripts/pdf_orchestrator/config/prometheus.prod.yml +0 -98
  1239. package/tools/vds-scripts/pdf_orchestrator/config/prometheus.yml +0 -40
  1240. package/tools/vds-scripts/pdf_orchestrator/config/redis.conf +0 -78
  1241. package/tools/vds-scripts/pdf_orchestrator/docs/COMPETITIVE_ANALYSIS_REPORT.md +0 -309
  1242. package/tools/vds-scripts/pdf_orchestrator/docs/FEATURES_GUIDE.md +0 -518
  1243. package/tools/vds-scripts/pdf_orchestrator/docs/MULTI_USER_DEPLOYMENT_GUIDE.md +0 -615
  1244. package/tools/vds-scripts/pdf_orchestrator/docs/USER_GUIDE.md +0 -829
  1245. package/tools/vds-scripts/pdf_orchestrator/pyproject.toml +0 -87
  1246. package/tools/vds-scripts/pdf_orchestrator/pytest.ini +0 -71
  1247. package/tools/vds-scripts/pdf_orchestrator/ruff.toml +0 -6
  1248. package/tools/vds-scripts/pdf_orchestrator/scripts/debug_security_report.py +0 -59
  1249. package/tools/vds-scripts/pdf_orchestrator/scripts/demo_library_selector.py +0 -109
  1250. package/tools/vds-scripts/pdf_orchestrator/scripts/generate_project_stats.py +0 -52
  1251. package/tools/vds-scripts/pdf_orchestrator/scripts/generate_styled_pdf.py +0 -95
  1252. package/tools/vds-scripts/pdf_orchestrator/scripts/migrate_render_pdfs.py +0 -285
  1253. package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.bat +0 -283
  1254. package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.sh +0 -324
  1255. package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/__init__.py +0 -5
  1256. package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/cli.py +0 -542
  1257. package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/config.py +0 -33
  1258. package/tools/vds-scripts/pdf_orchestrator/tests/README.md +0 -650
  1259. package/tools/vds-scripts/pdf_orchestrator/tests/__init__.py +0 -0
  1260. package/tools/vds-scripts/pdf_orchestrator/tests/conftest.py +0 -520
  1261. package/tools/vds-scripts/pdf_orchestrator/tests/requirements.txt +0 -51
  1262. package/tools/vds-scripts/pdf_orchestrator/tests/run_tests.py +0 -659
  1263. package/tools/vds-scripts/pdf_orchestrator/tests/test_config.py +0 -36
  1264. package/tools/vds-scripts/progress_report_orchestrator/Dockerfile +0 -77
  1265. package/tools/vds-scripts/progress_report_orchestrator/README.md +0 -39
  1266. package/tools/vds-scripts/progress_report_orchestrator/alembic/env.py +0 -42
  1267. package/tools/vds-scripts/progress_report_orchestrator/alembic/script.py.mako +0 -28
  1268. package/tools/vds-scripts/progress_report_orchestrator/alembic/versions/0001_initial_progress_schema.py +0 -180
  1269. package/tools/vds-scripts/progress_report_orchestrator/alembic.ini +0 -67
  1270. package/tools/vds-scripts/progress_report_orchestrator/pyproject.toml +0 -67
  1271. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/__init__.py +0 -3
  1272. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/__init__.py +0 -1
  1273. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/endpoint_scanner.py +0 -238
  1274. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/git_activity.py +0 -159
  1275. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/hexagonal.py +0 -100
  1276. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/test_scanner.py +0 -136
  1277. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/cli.py +0 -743
  1278. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/config.py +0 -50
  1279. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/__init__.py +0 -12
  1280. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/alembic_filters.py +0 -64
  1281. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/memory.py +0 -82
  1282. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/__init__.py +0 -1
  1283. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/analysis.py +0 -84
  1284. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/report.py +0 -117
  1285. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/topology.py +0 -101
  1286. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/__init__.py +0 -1
  1287. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/kg_parser.py +0 -252
  1288. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/uc_reader.py +0 -159
  1289. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/__init__.py +0 -1
  1290. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/concurrency.py +0 -39
  1291. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/llm_eval.py +0 -570
  1292. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/report.py +0 -1256
  1293. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/structural.py +0 -384
  1294. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/sync.py +0 -143
  1295. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/__init__.py +0 -5
  1296. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/engine.py +0 -105
  1297. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/templates.py +0 -236
  1298. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/scheduler_subscriber.py +0 -238
  1299. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/README.md +0 -56
  1300. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/__init__.py +0 -1
  1301. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-architecture-reviewer/SKILL.md +0 -67
  1302. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-endpoint-matcher/SKILL.md +0 -67
  1303. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/__init__.py +0 -1
  1304. package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/schema.py +0 -625
  1305. package/tools/vds-scripts/progress_report_orchestrator/tests/__init__.py +0 -0
  1306. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/__init__.py +0 -0
  1307. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/.gitkeep +0 -0
  1308. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/__init__.py +0 -0
  1309. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/doc-dependencies.yaml +0 -79
  1310. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-docs.yaml +0 -478
  1311. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-services.yaml +0 -18
  1312. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/registry.yaml +0 -346
  1313. package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/phase3_baseline_standard.md +0 -564
  1314. package/tools/vds-scripts/progress_report_orchestrator/tests/integration/__init__.py +0 -0
  1315. package/tools/vds-scripts/progress_report_orchestrator/tests/integration/test_checkpoint.py +0 -276
  1316. package/tools/vds-scripts/progress_report_orchestrator/tests/test_alembic_migrations.py +0 -265
  1317. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/__init__.py +0 -0
  1318. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_analyzers.py +0 -267
  1319. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_bounded_gather.py +0 -176
  1320. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_cli_phase_report.py +0 -119
  1321. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_delta.py +0 -169
  1322. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_error_handling.py +0 -150
  1323. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_gate_exit_codes.py +0 -230
  1324. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_git_activity.py +0 -215
  1325. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_kg_parser.py +0 -267
  1326. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_autodetect.py +0 -183
  1327. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_eval.py +0 -529
  1328. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_memory_integration.py +0 -151
  1329. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_migration_contract.py +0 -254
  1330. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_mode_rendering.py +0 -576
  1331. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_models.py +0 -251
  1332. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_progress_llm_config.py +0 -67
  1333. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_recommendations.py +0 -480
  1334. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_report_enhancements.py +0 -415
  1335. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_resume_reload.py +0 -343
  1336. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_trend_regression.py +0 -294
  1337. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_uc_reader.py +0 -169
  1338. package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_valence_gap.py +0 -293
  1339. package/tools/vds-scripts/project-cycle-report.json +0 -14
  1340. package/tools/vds-scripts/project-dependency-graph.json +0 -11361
  1341. package/tools/vds-scripts/project-topology.json +0 -99
  1342. package/tools/vds-scripts/public_interface_boundary_orchestrator/pyproject.toml +0 -18
  1343. package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/__init__.py +0 -0
  1344. package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/cli.py +0 -232
  1345. package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/__init__.py +0 -0
  1346. package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/test_cli.py +0 -108
  1347. package/tools/vds-scripts/research_orchestrator/README.md +0 -68
  1348. package/tools/vds-scripts/research_orchestrator/py.typed +0 -0
  1349. package/tools/vds-scripts/research_orchestrator/pyproject.toml +0 -95
  1350. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/__init__.py +0 -3
  1351. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/_env.py +0 -11
  1352. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/cli.py +0 -335
  1353. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/config.py +0 -43
  1354. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/__init__.py +0 -0
  1355. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/models.py +0 -89
  1356. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/scoring.py +0 -102
  1357. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/exceptions.py +0 -78
  1358. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/http_client.py +0 -160
  1359. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/logging.py +0 -49
  1360. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/__init__.py +0 -0
  1361. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/formatters.py +0 -93
  1362. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/py.typed +0 -1
  1363. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/__init__.py +0 -0
  1364. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/build.py +0 -156
  1365. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/format.py +0 -147
  1366. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/__init__.py +0 -0
  1367. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health.py +0 -66
  1368. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health_graph.py +0 -52
  1369. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/registry.py +0 -127
  1370. package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/search.py +0 -230
  1371. package/tools/vds-scripts/research_orchestrator/tests/__init__.py +0 -0
  1372. package/tools/vds-scripts/research_orchestrator/tests/conftest.py +0 -53
  1373. package/tools/vds-scripts/research_orchestrator/tests/test_cli.py +0 -222
  1374. package/tools/vds-scripts/research_orchestrator/tests/test_config.py +0 -23
  1375. package/tools/vds-scripts/research_orchestrator/tests/test_exceptions.py +0 -62
  1376. package/tools/vds-scripts/research_orchestrator/tests/test_formatters.py +0 -89
  1377. package/tools/vds-scripts/research_orchestrator/tests/test_graph_integration.py +0 -149
  1378. package/tools/vds-scripts/research_orchestrator/tests/test_http_client.py +0 -134
  1379. package/tools/vds-scripts/research_orchestrator/tests/test_report_build.py +0 -128
  1380. package/tools/vds-scripts/research_orchestrator/tests/test_report_format.py +0 -91
  1381. package/tools/vds-scripts/research_orchestrator/tests/test_scoring.py +0 -95
  1382. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/__init__.py +0 -1
  1383. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_health.py +0 -139
  1384. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_registry.py +0 -135
  1385. package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_search.py +0 -238
  1386. package/tools/vds-scripts/run-history.json +0 -26
  1387. package/tools/vds-scripts/schema_converter/README.md +0 -109
  1388. package/tools/vds-scripts/schema_converter/pyproject.toml +0 -37
  1389. package/tools/vds-scripts/schema_converter/src/vds_schema_converter/__init__.py +0 -3
  1390. package/tools/vds-scripts/schema_converter/src/vds_schema_converter/cli.py +0 -50
  1391. package/tools/vds-scripts/schema_converter/tests/__init__.py +0 -0
  1392. package/tools/vds-scripts/schema_converter/tests/test_json_schema_generator.py +0 -115
  1393. package/tools/vds-scripts/schema_converter/tests/test_mermaid_generator.py +0 -112
  1394. package/tools/vds-scripts/schema_converter/tests/test_parser.py +0 -111
  1395. package/tools/vds-scripts/schema_converter/tests/test_plantuml_generator.py +0 -112
  1396. package/tools/vds-scripts/schema_converter/tests/test_plantuml_validator.py +0 -69
  1397. package/tools/vds-scripts/schema_converter/tests/test_prisma_generator.py +0 -113
  1398. package/tools/vds-scripts/schema_converter/tests/test_sql_generator.py +0 -138
  1399. package/tools/vds-scripts/schema_converter/tests/test_typeorm_generator.py +0 -110
  1400. package/tools/vds-scripts/schema_converter/tests/test_validators.py +0 -96
  1401. package/tools/vds-scripts/spec_orchestrator/README.md +0 -13
  1402. package/tools/vds-scripts/spec_orchestrator/pyproject.toml +0 -40
  1403. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/__init__.py +0 -5
  1404. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/cli.py +0 -162
  1405. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/core.py +0 -575
  1406. package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/sync.py +0 -306
  1407. package/tools/vds-scripts/spec_orchestrator/tests/__init__.py +0 -0
  1408. package/tools/vds-scripts/spec_orchestrator/tests/test_frontmatter_drift.py +0 -243
  1409. package/tools/vds-scripts/spec_orchestrator/tests/test_sync.py +0 -342
  1410. package/tools/vds-scripts/structure_orchestrator/README.md +0 -60
  1411. package/tools/vds-scripts/structure_orchestrator/pyproject.toml +0 -103
  1412. package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/__init__.py +0 -13
  1413. package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/cli.py +0 -308
  1414. package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/validator.py +0 -257
  1415. package/tools/vds-scripts/structure_orchestrator/tests/__init__.py +0 -0
  1416. package/tools/vds-scripts/structure_orchestrator/tests/test_cli.py +0 -161
  1417. package/tools/vds-scripts/structure_orchestrator/tests/test_helpers.py +0 -115
  1418. package/tools/vds-scripts/structure_orchestrator/tests/test_validator.py +0 -104
  1419. package/tools/vds-scripts/task_orchestrator/README.md +0 -50
  1420. package/tools/vds-scripts/task_orchestrator/__init__.py +0 -18
  1421. package/tools/vds-scripts/task_orchestrator/pyproject.toml +0 -43
  1422. package/tools/vds-scripts/task_orchestrator/scripts/run_excel_sync.py +0 -36
  1423. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/__init__.py +0 -13
  1424. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/audit.py +0 -134
  1425. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/cli.py +0 -127
  1426. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/debug.py +0 -133
  1427. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/normalize.py +0 -113
  1428. package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/refine.py +0 -201
  1429. package/tools/vds-scripts/task_orchestrator/tests/__init__.py +0 -0
  1430. package/tools/vds-scripts/task_orchestrator/tests/test_task_orchestrator.py +0 -84
  1431. package/tools/vds-scripts/temp_query_projects.py +0 -2
  1432. package/tools/vds-scripts/test_small.md +0 -1
  1433. package/tools/vds-scripts/text_utils_orchestrator/pyproject.toml +0 -20
  1434. package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/__init__.py +0 -7
  1435. package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/i18n.py +0 -143
  1436. package/tools/vds-scripts/text_utils_orchestrator/tests/__init__.py +0 -0
  1437. package/tools/vds-scripts/text_utils_orchestrator/tests/test_i18n.py +0 -53
  1438. package/tools/vds-scripts/upgrade_major.py +0 -61
  1439. package/tools/vds-scripts/upgrade_major_v2.py +0 -64
  1440. package/tools/vds-scripts/verify_violations.py +0 -57
  1441. package/tools/vds-scripts/workflow-summary.json +0 -325
  1442. package/tools/vds-scripts/workflow-summary.md +0 -8
@@ -1,2069 +0,0 @@
1
- """Tests for SecurityAgent."""
2
-
3
- from __future__ import annotations
4
-
5
- import json
6
- from pathlib import Path
7
- from tempfile import TemporaryDirectory
8
- from typing import Any
9
- from unittest.mock import AsyncMock, MagicMock
10
-
11
- import pytest
12
- from vds_agent_core.config import LLMProtocolType
13
- from vds_audit_orchestrator.agents.pydantic_base import SecurityFindings, Vulnerability
14
- from vds_audit_orchestrator.agents.security_agent import (
15
- SecurityAgent,
16
- )
17
- from vds_audit_orchestrator.agents.security_scanner import SECURITY_PATTERNS
18
- from vds_audit_orchestrator.llm.provider import LLMSettings
19
- from vds_audit_orchestrator.models.evidence import Evidence, EvidenceBundle, EvidenceStatus
20
-
21
-
22
- @pytest.fixture
23
- def mock_evidence_bundle():
24
- """Create a mock evidence bundle with security data."""
25
- return EvidenceBundle(
26
- repository="test-repo",
27
- git_evidence=[
28
- Evidence(
29
- source="git_file",
30
- source_id="security-config.yaml",
31
- title="Security Config",
32
- content="enable_auth: true\nallow_anonymous: false",
33
- content_hash="hash1",
34
- status=EvidenceStatus.FOUND,
35
- ),
36
- Evidence(
37
- source="git_file",
38
- source_id="src/unsafe.py",
39
- title="Unsafe Code",
40
- content="eval(user_input)",
41
- content_hash="hash2",
42
- status=EvidenceStatus.FOUND,
43
- ),
44
- ],
45
- sonarqube_evidence=[
46
- Evidence(
47
- source="sonarqube_metric",
48
- source_id="test-repo",
49
- title="Quality Gate",
50
- content=json.dumps(
51
- {
52
- "issues": [
53
- {
54
- "key": "issue-1",
55
- "severity": "CRITICAL",
56
- "message": "Hardcoded password in configuration",
57
- "component": "src/config.py",
58
- "rule": "security:S123",
59
- }
60
- ]
61
- }
62
- ),
63
- content_hash="hash3",
64
- status=EvidenceStatus.FOUND,
65
- )
66
- ],
67
- )
68
-
69
-
70
- @pytest.mark.asyncio
71
- async def test_tool_usage_logged_in_metadata(monkeypatch, mock_evidence_bundle):
72
- """Ensure pattern scanner usage is recorded in security metadata."""
73
- # Create a temporary directory to act as repo_path
74
- with TemporaryDirectory() as tmpdir:
75
- # Create a test file with security pattern
76
- test_file = Path(tmpdir) / "test.py"
77
- test_file.write_text("password = 'supersecret123'")
78
-
79
- agent = SecurityAgent(settings=LLMSettings(enabled=False))
80
- # Pass repo_path via profile
81
- result = await agent.analyze(mock_evidence_bundle, profile={"repo_path": tmpdir})
82
-
83
- assert result.success is True
84
- # Check that pattern scanner was used
85
- assert (
86
- result.metadata.get("pattern_scanner_used") is True
87
- or result.metadata.get("pattern_scanner_skipped") is not None
88
- )
89
-
90
-
91
- class TestSecurityAgent:
92
- """Tests for SecurityAgent."""
93
-
94
- @pytest.mark.asyncio
95
- async def test_analyze_bundle_missing(self):
96
- """Test handling of missing evidence bundle."""
97
- agent = SecurityAgent()
98
- result = await agent.analyze({})
99
- assert result.success is False
100
- assert result.error and "Evidence bundle missing" in result.error
101
-
102
- @pytest.mark.asyncio
103
- async def test_analyze_sonarqube(self, mock_evidence_bundle):
104
- """Test parsing of SonarQube evidence."""
105
- # Ensure no LLM needed for this part
106
- mock_settings = MagicMock()
107
- mock_settings.enabled = False
108
- agent = SecurityAgent(settings=mock_settings)
109
-
110
- result = await agent.analyze(mock_evidence_bundle)
111
-
112
- assert result.success is True
113
- findings = result.findings
114
-
115
- # Check SonarQube findings
116
- sq_findings = [f for f in findings if f.get("source") == "sonarqube"]
117
- assert len(sq_findings) >= 1
118
- assert sq_findings[0]["type"] == "sonarqube_vulnerability"
119
- assert "Hardcoded password" in sq_findings[0]["description"]
120
- assert "Hardcoded password" in sq_findings[0]["description"]
121
-
122
- @pytest.mark.asyncio
123
- async def test_analyze_patterns_scanner(self, mock_evidence_bundle):
124
- """Test security pattern detection via SecurityPatternScanner."""
125
- mock_settings = MagicMock()
126
- mock_settings.enabled = False
127
- agent = SecurityAgent(settings=mock_settings)
128
-
129
- # Create a temporary directory with security issues
130
- with TemporaryDirectory() as tmpdir:
131
- # Create a test file with security pattern
132
- test_file = Path(tmpdir) / "unsafe.py"
133
- test_file.write_text("password = 'supersecret123'\neval(user_input)")
134
-
135
- # Pass repo_path via profile
136
- result = await agent.analyze(mock_evidence_bundle, profile={"repo_path": tmpdir})
137
-
138
- assert result.success is True
139
- findings = result.findings
140
-
141
- # Check for pattern scanner findings
142
- pattern_findings = [f for f in findings if f.get("source") == "pattern_scanner"]
143
- # Should find the hardcoded password
144
- assert len(pattern_findings) >= 1
145
-
146
- @pytest.mark.asyncio
147
- async def test_analyze_llm_config(self, mock_evidence_bundle):
148
- """Test LLM-based security config analysis."""
149
- mock_settings = MagicMock()
150
- mock_settings.enabled = True
151
-
152
- # Structured response from PydanticAI using SecurityFindings model
153
- llm_output = SecurityFindings(
154
- vulnerabilities=[
155
- Vulnerability(
156
- id="SEC-001",
157
- severity="medium",
158
- category="configuration",
159
- title="Security Misconfiguration",
160
- description="Anonymous access might be risky",
161
- affected_component="security-config.yaml",
162
- remediation="Review settings",
163
- cvss_score=None,
164
- )
165
- ],
166
- posture_score=5.0,
167
- sonarqube_issues=0,
168
- dependency_vulnerabilities=0,
169
- confidence=0.8,
170
- security_controls=["basic_auth"],
171
- recommendations=["Review anonymous access settings"],
172
- )
173
-
174
- agent = SecurityAgent(settings=mock_settings)
175
- agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
176
- result = await agent.analyze(mock_evidence_bundle)
177
-
178
- assert result.success is True
179
- findings = result.findings
180
-
181
- # Check LLM findings (now using pydantic_ai_analysis source)
182
- llm_findings = [f for f in findings if f.get("source") == "pydantic_ai_analysis"]
183
- assert len(llm_findings) == 1
184
- assert llm_findings[0]["location"] == "security-config.yaml"
185
-
186
- # ========== NEW TEST CASES ==========
187
-
188
- # 1. Severity classification tests
189
- @pytest.mark.asyncio
190
- async def test_severity_classification_critical(self):
191
- """Test CRITICAL severity classification for high-risk issues."""
192
- mock_settings = MagicMock()
193
- mock_settings.enabled = False
194
- agent = SecurityAgent(settings=mock_settings)
195
-
196
- bundle = EvidenceBundle(
197
- repository="test-repo",
198
- git_evidence=[
199
- Evidence(
200
- source="git_file",
201
- source_id="src/unsafe.py",
202
- title="Unsafe Code",
203
- content="eval(user_input)",
204
- content_hash="hash1",
205
- status=EvidenceStatus.FOUND,
206
- )
207
- ],
208
- sonarqube_evidence=[
209
- Evidence(
210
- source="sonarqube_metric",
211
- source_id="test-repo",
212
- title="Critical Issues",
213
- content=json.dumps(
214
- {
215
- "issues": [
216
- {
217
- "key": "issue-1",
218
- "severity": "CRITICAL",
219
- "message": "SQL injection vulnerability",
220
- "component": "src/db.py",
221
- "rule": "security:S456",
222
- }
223
- ]
224
- }
225
- ),
226
- content_hash="hash2",
227
- status=EvidenceStatus.FOUND,
228
- ),
229
- ],
230
- )
231
-
232
- result = await agent.analyze(bundle)
233
-
234
- assert result.success is True
235
- findings = result.findings
236
-
237
- # Check for CRITICAL severity findings
238
- critical_findings = [f for f in findings if f.get("severity") == "CRITICAL"]
239
- assert len(critical_findings) > 0
240
-
241
- @pytest.mark.asyncio
242
- async def test_severity_classification_high(self):
243
- """Test HIGH severity classification for security issues."""
244
- mock_settings = MagicMock()
245
- mock_settings.enabled = False
246
- agent = SecurityAgent(settings=mock_settings)
247
-
248
- bundle = EvidenceBundle(
249
- repository="test-repo",
250
- git_evidence=[
251
- Evidence(
252
- source="git_file",
253
- source_id="config.py",
254
- title="Config File",
255
- content="DB_PASSWORD='supersecret123'\nAPI_KEY='sk-1234567890'",
256
- content_hash="hash1",
257
- status=EvidenceStatus.FOUND,
258
- )
259
- ],
260
- sonarqube_evidence=[],
261
- )
262
-
263
- result = await agent.analyze(bundle)
264
-
265
- assert result.success is True
266
- findings = result.findings
267
-
268
- # Check for HIGH severity findings from git analysis (hardcoded secrets)
269
- high_findings = [f for f in findings if f.get("severity") == "HIGH"]
270
- assert len(high_findings) > 0
271
-
272
- # Verify hardcoded secrets are detected with HIGH severity
273
- secret_findings = [f for f in high_findings if "potential_" in f.get("type", "")]
274
- assert len(secret_findings) > 0
275
-
276
- @pytest.mark.asyncio
277
- async def test_severity_classification_medium(self):
278
- """Test MEDIUM severity classification."""
279
- mock_settings = MagicMock()
280
- mock_settings.enabled = False
281
- agent = SecurityAgent(settings=mock_settings)
282
-
283
- bundle = EvidenceBundle(
284
- repository="test-repo",
285
- git_evidence=[
286
- Evidence(
287
- source="git_file",
288
- source_id="README.md",
289
- title="Readme",
290
- content="This is a readme without security configs",
291
- content_hash="hash1",
292
- status=EvidenceStatus.FOUND,
293
- )
294
- ],
295
- sonarqube_evidence=[],
296
- )
297
-
298
- result = await agent.analyze(bundle)
299
-
300
- assert result.success is True
301
- findings = result.findings
302
-
303
- # Check for MEDIUM severity findings (missing security configs)
304
- medium_findings = [f for f in findings if f.get("severity") == "MEDIUM"]
305
- assert len(medium_findings) > 0
306
- assert any(f.get("type") == "missing_security_config" for f in medium_findings)
307
-
308
- @pytest.mark.asyncio
309
- async def test_severity_classification_patterns(self):
310
- """Test severity classification for security patterns."""
311
- mock_settings = MagicMock()
312
- mock_settings.enabled = False
313
- agent = SecurityAgent(settings=mock_settings)
314
-
315
- bundle = EvidenceBundle(
316
- repository="test-repo",
317
- git_evidence=[],
318
- sonarqube_evidence=[],
319
- )
320
-
321
- result = await agent.analyze(bundle)
322
-
323
- assert result.success is True
324
-
325
- # Check that SECURITY_PATTERNS have valid severity levels
326
- for pattern in SECURITY_PATTERNS:
327
- assert pattern.severity in ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
328
-
329
- # 2. Cross-source correlation tests
330
- @pytest.mark.asyncio
331
- async def test_cross_source_correlation_git_sonarqube_scanner(self, mock_evidence_bundle):
332
- """Test correlation of findings from git, SonarQube, and pattern scanner."""
333
- mock_settings = MagicMock()
334
- mock_settings.enabled = False
335
- agent = SecurityAgent(settings=mock_settings)
336
-
337
- # Create a temporary directory with security issues
338
- with TemporaryDirectory() as tmpdir:
339
- # Create a test file with security pattern
340
- test_file = Path(tmpdir) / "unsafe.py"
341
- test_file.write_text("password = 'supersecret123'")
342
-
343
- result = await agent.analyze(mock_evidence_bundle, profile={"repo_path": tmpdir})
344
-
345
- assert result.success is True
346
- findings = result.findings
347
- metadata = result.metadata
348
-
349
- # Verify pattern scanner was used
350
- assert metadata.get("pattern_scanner_used") is True
351
- assert metadata["sonarqube_issues_parsed"] == len(mock_evidence_bundle.sonarqube_evidence)
352
-
353
- # Check findings from different sources
354
- sonarqube_findings = [f for f in findings if f.get("source") == "sonarqube"]
355
-
356
- # At least one finding should be present from each active source
357
- assert len(sonarqube_findings) > 0 # From mock_evidence_bundle
358
-
359
- # 3. SonarQube parsing tests with various formats
360
- @pytest.mark.asyncio
361
- async def test_sonarqube_parsing_various_formats(self):
362
- """Test SonarQube parsing with various issue formats."""
363
- mock_settings = MagicMock()
364
- mock_settings.enabled = False
365
- agent = SecurityAgent(settings=mock_settings)
366
-
367
- # Create bundle with different SonarQube formats
368
- bundle = EvidenceBundle(
369
- repository="test-repo",
370
- git_evidence=[],
371
- sonarqube_evidence=[
372
- # Format 1: Structured JSON with CRITICAL
373
- Evidence(
374
- source="sonarqube_metric",
375
- source_id="test-repo",
376
- title="Critical Issues",
377
- content=json.dumps(
378
- {
379
- "issues": [
380
- {
381
- "key": "issue-1",
382
- "severity": "CRITICAL",
383
- "message": "SQL injection vulnerability",
384
- "component": "src/db.py",
385
- "rule": "security:S456",
386
- }
387
- ]
388
- }
389
- ),
390
- content_hash="hash1",
391
- status=EvidenceStatus.FOUND,
392
- ),
393
- # Format 2: Structured JSON with MAJOR
394
- Evidence(
395
- source="sonarqube_metric",
396
- source_id="test-repo",
397
- title="Major Issues",
398
- content=json.dumps(
399
- {
400
- "issues": [
401
- {
402
- "key": "issue-2",
403
- "severity": "MAJOR",
404
- "message": "Authentication bypass possible",
405
- "component": "src/auth.py",
406
- "rule": "security:S789",
407
- }
408
- ]
409
- }
410
- ),
411
- content_hash="hash2",
412
- status=EvidenceStatus.FOUND,
413
- ),
414
- # Format 3: Unstructured with keywords
415
- Evidence(
416
- source="sonarqube_metric",
417
- source_id="test-repo",
418
- title="Text Report",
419
- content="Found 2 CRITICAL security hotspots and 5 MAJOR vulnerabilities in codebase",
420
- content_hash="hash3",
421
- status=EvidenceStatus.FOUND,
422
- ),
423
- ],
424
- )
425
-
426
- result = await agent.analyze(bundle)
427
-
428
- assert result.success is True
429
- findings = result.findings
430
-
431
- # Check CRITICAL from structured format
432
- critical_sq = [f for f in findings if f.get("severity") == "CRITICAL" and f.get("source") == "sonarqube"]
433
- assert len(critical_sq) > 0
434
- assert critical_sq[0]["type"] == "sonarqube_vulnerability"
435
-
436
- # Check HIGH (MAJOR) from structured format
437
- high_sq = [f for f in findings if f.get("severity") == "HIGH" and f.get("source") == "sonarqube"]
438
- assert len(high_sq) > 0
439
-
440
- # Check keyword-based detection for unstructured
441
- keyword_findings = [f for f in findings if f.get("type") == "sonarqube_issue"]
442
- assert len(keyword_findings) > 0
443
-
444
- @pytest.mark.asyncio
445
- async def test_sonarqube_parsing_blocker_severity(self):
446
- """Test SonarQube parsing with BLOCKER severity."""
447
- mock_settings = MagicMock()
448
- mock_settings.enabled = False
449
- agent = SecurityAgent(settings=mock_settings)
450
-
451
- bundle = EvidenceBundle(
452
- repository="test-repo",
453
- git_evidence=[],
454
- sonarqube_evidence=[
455
- Evidence(
456
- source="sonarqube_metric",
457
- source_id="test-repo",
458
- title="Blocker Issues",
459
- content=json.dumps(
460
- {
461
- "issues": [
462
- {
463
- "key": "issue-1",
464
- "severity": "BLOCKER",
465
- "message": "Hard-coded credential used",
466
- "component": "src/config.py",
467
- "rule": "security:S001",
468
- }
469
- ]
470
- }
471
- ),
472
- content_hash="hash1",
473
- status=EvidenceStatus.FOUND,
474
- ),
475
- ],
476
- )
477
-
478
- result = await agent.analyze(bundle)
479
-
480
- assert result.success is True
481
- findings = result.findings
482
-
483
- # BLOCKER should be treated as CRITICAL
484
- blocker_findings = [f for f in findings if f.get("severity") == "CRITICAL"]
485
- assert len(blocker_findings) > 0
486
-
487
- # 4. Security pattern detection edge cases
488
- @pytest.mark.asyncio
489
- async def test_security_pattern_detection_false_positives(self):
490
- """Test security pattern detection filters false positives."""
491
- mock_settings = MagicMock()
492
- mock_settings.enabled = False
493
- agent = SecurityAgent(settings=mock_settings)
494
-
495
- bundle = EvidenceBundle(
496
- repository="test-repo",
497
- git_evidence=[
498
- # Example files that should be filtered
499
- Evidence(
500
- source="git_file",
501
- source_id="config.example.py",
502
- title="Example Config",
503
- content="DB_PASSWORD='example_password_here'\nAPI_KEY='your_api_key_here'",
504
- content_hash="hash1",
505
- status=EvidenceStatus.FOUND,
506
- ),
507
- Evidence(
508
- source="git_file",
509
- source_id="config.placeholder.py",
510
- title="Placeholder Config",
511
- content="SECRET_KEY='xxx'\nTOKEN='***'",
512
- content_hash="hash2",
513
- status=EvidenceStatus.FOUND,
514
- ),
515
- ],
516
- sonarqube_evidence=[],
517
- )
518
-
519
- result = await agent.analyze(bundle)
520
-
521
- assert result.success is True
522
- findings = result.findings
523
-
524
- # False positives should be filtered (no HIGH severity secret findings)
525
- secret_findings = [f for f in findings if "potential_" in f.get("type", "") and f.get("severity") == "HIGH"]
526
- # These should be filtered out
527
- assert len(secret_findings) == 0
528
-
529
- @pytest.mark.asyncio
530
- async def test_security_pattern_detection_multiple_secrets(self):
531
- """Test detection of multiple different secret types."""
532
- mock_settings = MagicMock()
533
- mock_settings.enabled = False
534
- agent = SecurityAgent(settings=mock_settings)
535
-
536
- bundle = EvidenceBundle(
537
- repository="test-repo",
538
- git_evidence=[
539
- Evidence(
540
- source="git_file",
541
- source_id="config.py",
542
- title="Config File",
543
- content="DB_PASSWORD='supersecret123'\nAPI_KEY='sk-1234567890'",
544
- content_hash="hash1",
545
- status=EvidenceStatus.FOUND,
546
- ),
547
- Evidence(
548
- source="git_file",
549
- source_id="auth.py",
550
- title="Auth Module",
551
- content="JWT_SECRET='my-secret-key'\nprivate_key='-----BEGIN PRIVATE KEY-----'",
552
- content_hash="hash2",
553
- status=EvidenceStatus.FOUND,
554
- ),
555
- Evidence(
556
- source="git_file",
557
- source_id="api.py",
558
- title="API Client",
559
- content="bearer_token='Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'",
560
- content_hash="hash3",
561
- status=EvidenceStatus.FOUND,
562
- ),
563
- ],
564
- sonarqube_evidence=[],
565
- )
566
-
567
- result = await agent.analyze(bundle)
568
-
569
- assert result.success is True
570
- findings = result.findings
571
-
572
- # Check for different secret types
573
- secret_types = set()
574
- for finding in findings:
575
- if "potential_" in finding.get("type", ""):
576
- secret_types.add(finding["type"])
577
-
578
- # Should detect multiple secret types
579
- expected_types = {
580
- "potential_hardcoded_password",
581
- "potential_hardcoded_api_key",
582
- "potential_hardcoded_secret",
583
- "potential_hardcoded_private_key",
584
- "potential_hardcoded_token",
585
- }
586
- detected_types = {t for t in secret_types if t in expected_types}
587
- assert len(detected_types) > 0
588
-
589
- # 5. Empty SonarQube metrics test
590
- @pytest.mark.asyncio
591
- async def test_empty_sonarqube_metrics(self):
592
- """Test handling of empty SonarQube metrics."""
593
- mock_settings = MagicMock()
594
- mock_settings.enabled = False
595
- agent = SecurityAgent(settings=mock_settings)
596
-
597
- bundle = EvidenceBundle(
598
- repository="test-repo",
599
- git_evidence=[
600
- Evidence(
601
- source="git_file",
602
- source_id="README.md",
603
- title="Readme",
604
- content="This is a readme file",
605
- content_hash="hash1",
606
- status=EvidenceStatus.FOUND,
607
- )
608
- ],
609
- sonarqube_evidence=[
610
- Evidence(
611
- source="sonarqube_metric",
612
- source_id="test-repo",
613
- title="Quality Gate",
614
- content="",
615
- content_hash="hash2",
616
- status=EvidenceStatus.FOUND,
617
- )
618
- ],
619
- )
620
-
621
- result = await agent.analyze(bundle)
622
-
623
- assert result.success is True
624
- assert result.metadata["sonarqube_issues_parsed"] == 1
625
-
626
- # Should not crash on empty content
627
- findings = result.findings
628
- assert isinstance(findings, list)
629
-
630
- @pytest.mark.asyncio
631
- async def test_empty_sonarqube_evidence_list(self):
632
- """Test handling when SonarQube evidence list is empty."""
633
- mock_settings = MagicMock()
634
- mock_settings.enabled = False
635
- agent = SecurityAgent(settings=mock_settings)
636
-
637
- bundle = EvidenceBundle(
638
- repository="test-repo",
639
- git_evidence=[],
640
- sonarqube_evidence=[],
641
- )
642
-
643
- result = await agent.analyze(bundle)
644
-
645
- assert result.success is True
646
- assert result.metadata["sonarqube_issues_parsed"] == 0
647
-
648
- # 6. LLM security config analysis with different configs
649
- @pytest.mark.asyncio
650
- async def test_llm_analysis_different_risk_levels(self):
651
- """Test LLM analysis with different risk level outputs."""
652
- # Test HIGH risk level using SecurityFindings model
653
- llm_output_high = SecurityFindings(
654
- vulnerabilities=[
655
- Vulnerability(
656
- id="SEC-001",
657
- severity="high",
658
- category="authentication",
659
- title="Authentication Bypass",
660
- description="Critical auth flaw detected",
661
- affected_component="src/auth.py",
662
- remediation="Implement proper authentication",
663
- cvss_score=None,
664
- )
665
- ],
666
- posture_score=4.5, # Score 4.0-5.9 = HIGH risk
667
- confidence=0.85,
668
- security_controls=[],
669
- recommendations=["Implement proper authentication"],
670
- sonarqube_issues=0,
671
- dependency_vulnerabilities=0,
672
- )
673
-
674
- mock_settings = MagicMock()
675
- mock_settings.enabled = True
676
-
677
- bundle = EvidenceBundle(
678
- repository="test-repo",
679
- git_evidence=[
680
- Evidence(
681
- source="git_file",
682
- source_id="src/auth.py",
683
- title="Auth Module",
684
- content="# Authentication code",
685
- content_hash="hash1",
686
- status=EvidenceStatus.FOUND,
687
- )
688
- ],
689
- sonarqube_evidence=[],
690
- )
691
-
692
- agent = SecurityAgent(settings=mock_settings)
693
- agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output_high)
694
- result = await agent.analyze(bundle)
695
-
696
- assert result.success is True
697
- assert result.metadata["overall_risk_level"] == "HIGH"
698
- # Check that security_summary contains expected content
699
- assert (
700
- "high" in result.metadata["security_summary"].lower()
701
- or "security" in result.metadata["security_summary"].lower()
702
- )
703
-
704
- llm_findings = [f for f in result.findings if f.get("source") == "pydantic_ai_analysis"]
705
- assert len(llm_findings) > 0
706
- assert llm_findings[0]["severity"] == "HIGH"
707
-
708
- @pytest.mark.asyncio
709
- async def test_llm_analysis_json_with_markdown_wrapper(self):
710
- """Test LLM analysis when response is wrapped in markdown code blocks."""
711
- # Use SecurityFindings model (PydanticAI handles structured output)
712
- llm_output = SecurityFindings(
713
- vulnerabilities=[
714
- Vulnerability(
715
- id="SEC-002",
716
- severity="medium",
717
- category="input_validation",
718
- title="Missing Input Sanitization",
719
- description="Missing input sanitization",
720
- affected_component="src/api.py",
721
- remediation="Add input validation",
722
- cvss_score=None,
723
- )
724
- ],
725
- posture_score=6.5, # Medium score = MEDIUM risk
726
- confidence=0.8,
727
- sonarqube_issues=0,
728
- dependency_vulnerabilities=0,
729
- security_controls=[],
730
- recommendations=["Add input validation"],
731
- )
732
-
733
- mock_settings = MagicMock()
734
- mock_settings.enabled = True
735
-
736
- bundle = EvidenceBundle(
737
- repository="test-repo",
738
- git_evidence=[
739
- Evidence(
740
- source="git_file",
741
- source_id="src/api.py",
742
- title="API Module",
743
- content="# API code",
744
- content_hash="hash1",
745
- status=EvidenceStatus.FOUND,
746
- )
747
- ],
748
- sonarqube_evidence=[],
749
- )
750
-
751
- agent = SecurityAgent(settings=mock_settings)
752
- agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
753
- result = await agent.analyze(bundle)
754
-
755
- assert result.success is True
756
- assert result.metadata["overall_risk_level"] == "MEDIUM"
757
-
758
- @pytest.mark.asyncio
759
- async def test_llm_analysis_invalid_json_response(self):
760
- """Test LLM analysis when response is not valid JSON."""
761
- mock_settings = MagicMock()
762
- mock_settings.enabled = True
763
-
764
- bundle = EvidenceBundle(
765
- repository="test-repo",
766
- git_evidence=[
767
- Evidence(
768
- source="git_file",
769
- source_id="README.md",
770
- title="Readme",
771
- content="# Project readme",
772
- content_hash="hash1",
773
- status=EvidenceStatus.FOUND,
774
- )
775
- ],
776
- sonarqube_evidence=[],
777
- )
778
-
779
- agent = SecurityAgent(settings=mock_settings)
780
- agent._run_pydantic_agent = AsyncMock(side_effect=ValueError("Invalid LLM output"))
781
- result = await agent.analyze(bundle)
782
-
783
- # Should still succeed with fallback
784
- assert result.success is True
785
- assert result.metadata.get("llm_error") or result.metadata.get("overall_risk_level") == "UNKNOWN"
786
-
787
- # 7. Multiple findings aggregation test
788
- @pytest.mark.asyncio
789
- async def test_multiple_findings_aggregation(self, mock_evidence_bundle):
790
- """Test aggregation of findings from multiple sources."""
791
- mock_settings = MagicMock()
792
- mock_settings.enabled = False
793
- agent = SecurityAgent(settings=mock_settings)
794
-
795
- # Create a temporary directory with security issues
796
- with TemporaryDirectory() as tmpdir:
797
- # Create test files with security patterns
798
- db_file = Path(tmpdir) / "src" / "db.py"
799
- db_file.parent.mkdir(parents=True, exist_ok=True)
800
- db_file.write_text('query = f"SELECT * FROM users WHERE id={user_input}"')
801
-
802
- auth_file = Path(tmpdir) / "src" / "auth.py"
803
- auth_file.write_text("password = 'supersecret123'")
804
-
805
- result = await agent.analyze(mock_evidence_bundle, profile={"repo_path": tmpdir})
806
-
807
- assert result.success is True
808
- findings = result.findings
809
-
810
- # Should have findings from multiple sources
811
- sources = {f.get("source") for f in findings}
812
- assert "sonarqube" in sources or len(findings) > 0
813
-
814
- # Verify metadata aggregation
815
- metadata = result.metadata
816
- assert "pattern_scanner_used" in metadata or "pattern_scanner_skipped" in metadata
817
- assert "sonarqube_issues_parsed" in metadata
818
-
819
- # 8. Additional edge cases
820
- @pytest.mark.asyncio
821
- async def test_security_config_files_detection(self):
822
- """Test detection of security configuration files."""
823
- mock_settings = MagicMock()
824
- mock_settings.enabled = False
825
- agent = SecurityAgent(settings=mock_settings)
826
-
827
- bundle = EvidenceBundle(
828
- repository="test-repo",
829
- git_evidence=[
830
- Evidence(
831
- source="git_file",
832
- source_id="SECURITY.md",
833
- title="Security Documentation",
834
- content="# Security Policy\n\nThis document outlines security practices.",
835
- content_hash="hash1",
836
- status=EvidenceStatus.FOUND,
837
- ),
838
- Evidence(
839
- source="git_file",
840
- source_id=".snyk",
841
- title="Snyk Config",
842
- content="# Snyk configuration",
843
- content_hash="hash2",
844
- status=EvidenceStatus.FOUND,
845
- ),
846
- Evidence(
847
- source="git_file",
848
- source_id="dependabot.yml",
849
- title="Dependabot Config",
850
- content="# Dependabot configuration",
851
- content_hash="hash3",
852
- status=EvidenceStatus.FOUND,
853
- ),
854
- ],
855
- sonarqube_evidence=[],
856
- )
857
-
858
- result = await agent.analyze(bundle)
859
-
860
- assert result.success is True
861
- findings = result.findings
862
-
863
- # Should detect security config files (no missing config warning)
864
- missing_config_findings = [f for f in findings if f.get("type") == "missing_security_config"]
865
- # Since we have SECURITY.md and .snyk, missing configs should be reduced or none
866
- assert len(missing_config_findings) == 0
867
-
868
- @pytest.mark.asyncio
869
- async def test_evidence_bundle_dict_input(self, mock_evidence_bundle):
870
- """Test analyzing evidence bundle passed as dict."""
871
- mock_settings = MagicMock()
872
- mock_settings.enabled = False
873
- agent = SecurityAgent(settings=mock_settings)
874
-
875
- result = await agent.analyze({"evidence_bundle": mock_evidence_bundle})
876
-
877
- assert result.success is True
878
-
879
- @pytest.mark.asyncio
880
- async def test_llm_disabled(self, mock_evidence_bundle):
881
- """Test behavior when LLM is disabled."""
882
- mock_settings = MagicMock()
883
- mock_settings.enabled = False
884
- agent = SecurityAgent(settings=mock_settings)
885
-
886
- result = await agent.analyze(mock_evidence_bundle)
887
-
888
- assert result.success is True
889
- assert result.metadata["llm_analysis_used"] is False
890
-
891
- @pytest.mark.asyncio
892
- async def test_security_patterns_severity_levels(self):
893
- """Test that SECURITY_PATTERNS have valid severity levels."""
894
- # Test all security patterns have valid severity levels
895
- valid_severities = {"CRITICAL", "HIGH", "MEDIUM", "LOW"}
896
-
897
- for pattern in SECURITY_PATTERNS:
898
- assert pattern.severity in valid_severities, (
899
- f"Pattern {pattern.name} has invalid severity {pattern.severity}"
900
- )
901
-
902
- # Verify expected severity mappings for key patterns
903
- pattern_severities = {p.name: p.severity for p in SECURITY_PATTERNS}
904
-
905
- # Hardcoded secrets should be CRITICAL
906
- assert pattern_severities.get("hardcoded_password") == "CRITICAL"
907
- assert pattern_severities.get("hardcoded_api_key") == "CRITICAL"
908
- assert pattern_severities.get("hardcoded_jwt_secret") == "CRITICAL"
909
-
910
- # SQL injection should be HIGH
911
- assert pattern_severities.get("sql_string_concat") == "HIGH"
912
-
913
- # CORS should be MEDIUM
914
- assert pattern_severities.get("cors_allow_all") == "MEDIUM"
915
-
916
- @pytest.mark.asyncio
917
- async def test_sonarqube_minor_severity_not_reported(self):
918
- """Test that MINOR severity SonarQube issues are handled correctly."""
919
- mock_settings = MagicMock()
920
- mock_settings.enabled = False
921
- agent = SecurityAgent(settings=mock_settings)
922
-
923
- bundle = EvidenceBundle(
924
- repository="test-repo",
925
- git_evidence=[],
926
- sonarqube_evidence=[
927
- Evidence(
928
- source="sonarqube_metric",
929
- source_id="test-repo",
930
- title="Minor Issues",
931
- content=json.dumps(
932
- {
933
- "issues": [
934
- {
935
- "key": "issue-1",
936
- "severity": "MINOR",
937
- "message": "Code style issue",
938
- "component": "src/util.py",
939
- "rule": "style:S001",
940
- }
941
- ]
942
- }
943
- ),
944
- content_hash="hash1",
945
- status=EvidenceStatus.FOUND,
946
- ),
947
- ],
948
- )
949
-
950
- result = await agent.analyze(bundle)
951
-
952
- assert result.success is True
953
- # MINOR issues should be handled (may or may not produce findings depending on implementation)
954
- findings = result.findings
955
- # The implementation may still report MINOR issues
956
- assert isinstance(findings, list)
957
-
958
-
959
- @pytest.mark.asyncio
960
- async def test_security_analysis_passes_toolsets_to_pydantic_agent(monkeypatch, mock_evidence_bundle):
961
- """Security analysis should forward configured toolsets to _run_pydantic_agent."""
962
- mock_settings = MagicMock()
963
- mock_settings.enabled = True
964
- agent = SecurityAgent(settings=mock_settings)
965
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
966
- run_mock = AsyncMock(
967
- return_value=SecurityFindings(
968
- vulnerabilities=[],
969
- posture_score=7.5,
970
- sonarqube_issues=0,
971
- dependency_vulnerabilities=0,
972
- confidence=0.8,
973
- security_controls=[],
974
- recommendations=[],
975
- )
976
- )
977
- monkeypatch.setattr(agent, "_run_pydantic_agent", run_mock)
978
-
979
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
980
-
981
- assert output is not None
982
- assert run_mock.await_args.kwargs["toolsets"] == ["toolset-security"]
983
- max_tool_calls = run_mock.await_args.kwargs["max_tool_calls"]
984
- assert isinstance(max_tool_calls, int)
985
- assert 8 <= max_tool_calls <= 64
986
- assert "Tool-first requirements:" in run_mock.await_args.kwargs["user_prompt"]
987
-
988
-
989
- @pytest.mark.asyncio
990
- async def test_security_analysis_evidence_first_when_tools_unavailable(monkeypatch, mock_evidence_bundle):
991
- """Security analysis should enforce strict no-tool guidance in zero-tool mode."""
992
- mock_settings = MagicMock()
993
- mock_settings.enabled = True
994
- agent = SecurityAgent(settings=mock_settings)
995
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: [])
996
- run_mock = AsyncMock(
997
- return_value=SecurityFindings(
998
- vulnerabilities=[],
999
- posture_score=7.5,
1000
- sonarqube_issues=0,
1001
- dependency_vulnerabilities=0,
1002
- confidence=0.8,
1003
- security_controls=[],
1004
- recommendations=[],
1005
- )
1006
- )
1007
- monkeypatch.setattr(agent, "_run_pydantic_agent", run_mock)
1008
-
1009
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1010
-
1011
- assert output is not None
1012
- assert run_mock.await_args.kwargs["toolsets"] == []
1013
- assert run_mock.await_args.kwargs["max_tool_calls"] == 0
1014
- assert "Zero-tool requirements (strict):" in run_mock.await_args.kwargs["user_prompt"]
1015
- assert "Do not call any tool or skill." in run_mock.await_args.kwargs["user_prompt"]
1016
-
1017
-
1018
- @pytest.mark.asyncio
1019
- async def test_security_analysis_zero_tool_invalid_tool_usage_fails_fast(monkeypatch, mock_evidence_bundle):
1020
- """Zero-tool mode must fail fast without allowlist retry when tool usage is attempted."""
1021
- mock_settings = MagicMock()
1022
- mock_settings.enabled = True
1023
- agent = SecurityAgent(settings=mock_settings)
1024
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: [])
1025
- run_mock = AsyncMock(side_effect=RuntimeError("Unknown tool: read_file"))
1026
- monkeypatch.setattr(agent, "_run_pydantic_agent", run_mock)
1027
-
1028
- with pytest.raises(RuntimeError, match="zero-tool mode forbids tool calls"):
1029
- await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1030
-
1031
- assert run_mock.await_count == 1
1032
-
1033
-
1034
- @pytest.mark.asyncio
1035
- async def test_security_analysis_retries_after_invalid_tool_with_allowlist_prompt(monkeypatch, mock_evidence_bundle):
1036
- """Invalid tool usage should trigger one allowlist-guided retry."""
1037
- mock_settings = MagicMock()
1038
- mock_settings.enabled = True
1039
- agent = SecurityAgent(settings=mock_settings)
1040
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1041
- monkeypatch.setattr(
1042
- agent,
1043
- "_resolve_tool_policy",
1044
- lambda: (["search_evidence", "read_evidence_document"], {}),
1045
- )
1046
-
1047
- expected = SecurityFindings(
1048
- vulnerabilities=[],
1049
- posture_score=7.5,
1050
- sonarqube_issues=0,
1051
- dependency_vulnerabilities=0,
1052
- confidence=0.8,
1053
- security_controls=[],
1054
- recommendations=[],
1055
- )
1056
- run_prompts: list[str] = []
1057
-
1058
- async def _fake_run(**kwargs):
1059
- run_prompts.append(kwargs["user_prompt"])
1060
- if len(run_prompts) == 1:
1061
- raise RuntimeError("Unknown tool: run_shell")
1062
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_evidence_document": 1}}
1063
- return expected
1064
-
1065
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1066
-
1067
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1068
-
1069
- assert output is expected
1070
- assert len(run_prompts) == 2
1071
- assert "TOOL ALLOWLIST GUARD" in run_prompts[1]
1072
-
1073
-
1074
- @pytest.mark.asyncio
1075
- @pytest.mark.parametrize(
1076
- "budget_error",
1077
- [
1078
- "The next tool call(s) would exceed the tool_calls_limit of 16 (tool_calls=17).",
1079
- "The next request would exceed the request_limit of 10.",
1080
- ],
1081
- )
1082
- async def test_security_analysis_budget_exhaustion_retries_with_final_synthesis(
1083
- monkeypatch, mock_evidence_bundle, budget_error
1084
- ):
1085
- """tool_calls_limit/request_limit should trigger one bounded recovery retry first."""
1086
- mock_settings = MagicMock()
1087
- mock_settings.enabled = True
1088
- agent = SecurityAgent(settings=mock_settings)
1089
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1090
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS", raising=False)
1091
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS", raising=False)
1092
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TOOL_ALLOWLIST", raising=False)
1093
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TURNS", raising=False)
1094
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TOOL_CALLS", raising=False)
1095
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TOOL_ALLOWLIST", raising=False)
1096
- monkeypatch.setattr(
1097
- "vds_audit_orchestrator.agents.security_agent.get_config",
1098
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=56)),
1099
- )
1100
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", raising=False)
1101
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", raising=False)
1102
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", raising=False)
1103
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", raising=False)
1104
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS", "8")
1105
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS", "14")
1106
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", "8")
1107
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", "14")
1108
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS", "8")
1109
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS", "14")
1110
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", "8")
1111
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", "14")
1112
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS", "7")
1113
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS", "11")
1114
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", "7")
1115
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", "11")
1116
-
1117
- expected = SecurityFindings(
1118
- vulnerabilities=[],
1119
- posture_score=7.0,
1120
- sonarqube_issues=0,
1121
- dependency_vulnerabilities=0,
1122
- confidence=0.7,
1123
- security_controls=[],
1124
- recommendations=[],
1125
- )
1126
- calls: list[dict[str, object]] = []
1127
-
1128
- async def _fake_run(**kwargs):
1129
- calls.append(kwargs)
1130
- if len(calls) == 1:
1131
- raise RuntimeError(budget_error)
1132
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_file": 1, "grep_search": 1}}
1133
- return expected
1134
-
1135
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1136
-
1137
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1138
-
1139
- assert output is expected
1140
- assert len(calls) == 2
1141
- assert "BUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS)" in str(calls[1]["user_prompt"])
1142
- assert calls[1]["max_tool_calls"] == 11
1143
- assert calls[1]["max_turns"] == 7
1144
-
1145
-
1146
- @pytest.mark.asyncio
1147
- @pytest.mark.parametrize(
1148
- "budget_error",
1149
- [
1150
- "The next tool call(s) would exceed the tool_calls_limit of 16 (tool_calls=17).",
1151
- "The next request would exceed the request_limit of 10.",
1152
- ],
1153
- )
1154
- async def test_security_analysis_budget_exhaustion_falls_back_to_final_synthesis_after_recovery_retry(
1155
- monkeypatch, mock_evidence_bundle, budget_error
1156
- ):
1157
- """A second budget error should fall back to final synthesis mode without tools."""
1158
- mock_settings = MagicMock()
1159
- mock_settings.enabled = True
1160
- agent = SecurityAgent(settings=mock_settings)
1161
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1162
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS", raising=False)
1163
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS", raising=False)
1164
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TOOL_ALLOWLIST", raising=False)
1165
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TURNS", raising=False)
1166
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TOOL_CALLS", raising=False)
1167
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TOOL_ALLOWLIST", raising=False)
1168
- monkeypatch.setattr(
1169
- "vds_audit_orchestrator.agents.security_agent.get_config",
1170
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=56)),
1171
- )
1172
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", raising=False)
1173
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", raising=False)
1174
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", raising=False)
1175
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", raising=False)
1176
-
1177
- expected = SecurityFindings(
1178
- vulnerabilities=[],
1179
- posture_score=7.0,
1180
- sonarqube_issues=0,
1181
- dependency_vulnerabilities=0,
1182
- confidence=0.7,
1183
- security_controls=[],
1184
- recommendations=[],
1185
- )
1186
- calls: list[dict[str, object]] = []
1187
-
1188
- async def _fake_run(**kwargs):
1189
- calls.append(kwargs)
1190
- if len(calls) <= 2:
1191
- raise RuntimeError(budget_error)
1192
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_file": 1, "grep_search": 1}}
1193
- return expected
1194
-
1195
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1196
-
1197
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1198
-
1199
- assert output is expected
1200
- assert len(calls) == 3
1201
- assert "BUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS)" in str(calls[1]["user_prompt"])
1202
- observed_recovery_tool_calls = int(calls[1]["max_tool_calls"])
1203
- observed_recovery_turns = int(calls[1]["max_turns"])
1204
- assert observed_recovery_tool_calls in {8, 14}
1205
- assert observed_recovery_turns in {6, 8}
1206
- if observed_recovery_tool_calls == 8:
1207
- assert observed_recovery_turns == 6
1208
- else:
1209
- assert observed_recovery_turns == 8
1210
- assert "BUDGET EXHAUSTED - FINAL SYNTHESIS MODE" in str(calls[2]["user_prompt"])
1211
- assert calls[2]["toolsets"] == []
1212
- assert calls[2]["max_tool_calls"] == 1
1213
- assert calls[2]["max_turns"] is None
1214
-
1215
-
1216
- @pytest.mark.asyncio
1217
- @pytest.mark.parametrize(
1218
- ("budget_error", "expect_recovery_retry"),
1219
- [
1220
- ("UsageLimitExceeded: The next request would exceed the request_limit of 20.", False),
1221
- ("UsageLimitExceeded: The next tool call(s) would exceed the tool_calls_limit of 20 (tool_calls=21).", True),
1222
- ],
1223
- )
1224
- async def test_security_analysis_strict_local_openai_budget_limit_behavior(
1225
- monkeypatch, mock_evidence_bundle, budget_error, expect_recovery_retry
1226
- ):
1227
- """Strict local OpenAI limit exhaustion should use bounded recovery for tool-call overflow only."""
1228
- # Isolate budget env vars to prevent leakage from ~/.vds/.env (GAP fix)
1229
- for env_key in [
1230
- "VDS_AUDIT_AGENTIC_STRICT_MAX_TURNS_CAP",
1231
- "VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TURNS_CAP",
1232
- "VDS_AUDIT_AGENTIC_STRICT_MAX_TOOL_CALLS_CAP",
1233
- "VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TOOL_CALLS_CAP",
1234
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS",
1235
- "VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TURNS",
1236
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS",
1237
- "VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TOOL_CALLS",
1238
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS",
1239
- "VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TURNS",
1240
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS",
1241
- "VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS",
1242
- "VDS_AUDIT_AGENTIC_COMPACT_MAX_TURNS",
1243
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_MAX_TURNS",
1244
- "VDS_AUDIT_AGENTIC_COMPACT_MAX_TOOL_CALLS",
1245
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_MAX_TOOL_CALLS",
1246
- "VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TURNS",
1247
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_DEFAULT_MAX_TURNS",
1248
- "VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TOOL_CALLS",
1249
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_DEFAULT_MAX_TOOL_CALLS",
1250
- ]:
1251
- monkeypatch.delenv(env_key, raising=False)
1252
- settings = LLMSettings(
1253
- enabled=True,
1254
- protocol=LLMProtocolType.OPENAI,
1255
- base_url="http://127.0.0.1:11434/v1",
1256
- )
1257
- agent = SecurityAgent(settings=settings)
1258
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1259
- monkeypatch.setattr(
1260
- "vds_audit_orchestrator.agents.security_agent.get_config",
1261
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=24)),
1262
- )
1263
-
1264
- expected = SecurityFindings(
1265
- vulnerabilities=[],
1266
- posture_score=7.1,
1267
- sonarqube_issues=0,
1268
- dependency_vulnerabilities=0,
1269
- confidence=0.72,
1270
- security_controls=[],
1271
- recommendations=[],
1272
- )
1273
- calls: list[dict[str, object]] = []
1274
-
1275
- async def _fake_run(**kwargs):
1276
- calls.append(kwargs)
1277
- if len(calls) == 1:
1278
- raise RuntimeError(budget_error)
1279
- if expect_recovery_retry:
1280
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_evidence_document": 1}}
1281
- else:
1282
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {}}
1283
- return expected
1284
-
1285
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1286
-
1287
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1288
-
1289
- assert output is expected
1290
- assert len(calls) == 2
1291
- if expect_recovery_retry:
1292
- assert "BUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS)" in str(calls[1]["user_prompt"])
1293
- assert calls[1]["toolsets"] == ["toolset-security"]
1294
- assert calls[1]["max_tool_calls"] == 7
1295
- assert calls[1]["max_turns"] == 6
1296
- else:
1297
- assert "BUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS)" not in str(calls[1]["user_prompt"])
1298
- assert "BUDGET EXHAUSTED - FINAL SYNTHESIS MODE" in str(calls[1]["user_prompt"])
1299
- assert calls[1]["toolsets"] == []
1300
- assert calls[1]["max_tool_calls"] == 1
1301
- assert calls[1]["max_turns"] is None
1302
-
1303
-
1304
- @pytest.mark.asyncio
1305
- async def test_security_budget_recovery_terminal_pass_pivots_early_to_synthesis(monkeypatch, mock_evidence_bundle):
1306
- """Low-signal terminal recovery pass should pivot directly to synthesis-only mode."""
1307
- # Isolate ALL budget env vars to prevent leakage from ~/.vds/.env
1308
- for env_key in [
1309
- "VDS_AUDIT_AGENTIC_STRICT_MAX_TURNS_CAP",
1310
- "VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TURNS_CAP",
1311
- "VDS_AUDIT_AGENTIC_STRICT_MAX_TOOL_CALLS_CAP",
1312
- "VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TOOL_CALLS_CAP",
1313
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TURNS",
1314
- "VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TURNS",
1315
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_MAX_TOOL_CALLS",
1316
- "VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_MAX_TOOL_CALLS",
1317
- "VDS_AUDIT_AGENTIC_COMPACT_MAX_TURNS",
1318
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_MAX_TURNS",
1319
- "VDS_AUDIT_AGENTIC_COMPACT_MAX_TOOL_CALLS",
1320
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_MAX_TOOL_CALLS",
1321
- "VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TURNS",
1322
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_DEFAULT_MAX_TURNS",
1323
- "VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TOOL_CALLS",
1324
- "VDS_AUDIT_AGENTIC_SECURITY_COMPACT_DEFAULT_MAX_TOOL_CALLS",
1325
- ]:
1326
- monkeypatch.delenv(env_key, raising=False)
1327
- mock_settings = MagicMock()
1328
- mock_settings.enabled = True
1329
- agent = SecurityAgent(settings=mock_settings)
1330
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1331
- monkeypatch.setattr(
1332
- "vds_audit_orchestrator.agents.security_agent.get_config",
1333
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=56)),
1334
- )
1335
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", raising=False)
1336
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", raising=False)
1337
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TURNS", raising=False)
1338
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_BUDGET_RECOVERY_TERMINAL_MAX_TOOL_CALLS", raising=False)
1339
-
1340
- expected = SecurityFindings(
1341
- vulnerabilities=[],
1342
- posture_score=7.0,
1343
- sonarqube_issues=0,
1344
- dependency_vulnerabilities=0,
1345
- confidence=0.7,
1346
- security_controls=[],
1347
- recommendations=[],
1348
- )
1349
- calls: list[dict[str, Any]] = []
1350
-
1351
- async def _fake_run(**kwargs):
1352
- calls.append(kwargs)
1353
- if len(calls) == 1:
1354
- raise RuntimeError("The next tool call(s) would exceed the tool_calls_limit of 16 (tool_calls=17).")
1355
- if len(calls) == 2:
1356
- agent._last_agent_run_telemetry = {
1357
- "event_tool_calls_completed": 4,
1358
- "event_tool_count_by_name": {"search_evidence": 4, "read_evidence_document": 0},
1359
- }
1360
- return expected
1361
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {}}
1362
- return expected
1363
-
1364
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1365
-
1366
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1367
-
1368
- assert output is expected
1369
- assert len(calls) == 3
1370
- assert "BUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS)" in str(calls[1]["user_prompt"])
1371
- assert calls[1]["max_tool_calls"] == 8
1372
- assert calls[1]["max_turns"] == 6
1373
- assert "RECOVERY TERMINAL PASS EXIT - FINAL SYNTHESIS MODE" in str(calls[2]["user_prompt"])
1374
- assert calls[2]["toolsets"] == []
1375
- assert calls[2]["max_tool_calls"] == 1
1376
- assert calls[2]["max_turns"] is None
1377
-
1378
-
1379
- @pytest.mark.asyncio
1380
- async def test_security_budget_recovery_allowlist_filters_non_read_tools(monkeypatch, mock_evidence_bundle):
1381
- """Recovery allowlist should remain read-first even when env includes search tools."""
1382
- mock_settings = MagicMock()
1383
- mock_settings.enabled = True
1384
- agent = SecurityAgent(settings=mock_settings)
1385
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1386
- monkeypatch.setenv(
1387
- "VDS_AUDIT_AGENTIC_BUDGET_RECOVERY_TOOL_ALLOWLIST",
1388
- "search_evidence,list_evidence_documents,read_evidence_document,read_file,rg_search",
1389
- )
1390
-
1391
- expected = SecurityFindings(
1392
- vulnerabilities=[],
1393
- posture_score=7.0,
1394
- sonarqube_issues=0,
1395
- dependency_vulnerabilities=0,
1396
- confidence=0.7,
1397
- security_controls=[],
1398
- recommendations=[],
1399
- )
1400
- captured_allowlists: list[list[str]] = []
1401
- calls: list[dict[str, object]] = []
1402
-
1403
- def _capture_apply_tool_allowlist(toolsets, allowlist):
1404
- captured_allowlists.append(list(allowlist))
1405
- return list(toolsets)
1406
-
1407
- async def _fake_run(**kwargs):
1408
- calls.append(kwargs)
1409
- if len(calls) == 1:
1410
- raise RuntimeError("The next tool call(s) would exceed the tool_calls_limit of 16 (tool_calls=17).")
1411
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_evidence_document": 1}}
1412
- return expected
1413
-
1414
- monkeypatch.setattr(agent, "_apply_tool_allowlist", _capture_apply_tool_allowlist)
1415
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1416
-
1417
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1418
-
1419
- assert output is expected
1420
- assert len(captured_allowlists) >= 1
1421
- recovery_allowlist = captured_allowlists[-1]
1422
- assert "search_evidence" not in recovery_allowlist
1423
- assert "rg_search" not in recovery_allowlist
1424
- assert "list_evidence_documents" in recovery_allowlist
1425
- assert "read_evidence_document" in recovery_allowlist
1426
- assert "read_file" in recovery_allowlist
1427
-
1428
-
1429
- @pytest.mark.asyncio
1430
- async def test_security_budget_synthesis_zero_tool_mode_coerces_ungrounded_vulnerabilities(
1431
- monkeypatch, mock_evidence_bundle
1432
- ):
1433
- """Zero-tool synthesis mode must coerce ungrounded vulnerabilities without extra retries."""
1434
- mock_settings = MagicMock()
1435
- mock_settings.enabled = True
1436
- agent = SecurityAgent(settings=mock_settings)
1437
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1438
-
1439
- calls: list[dict[str, Any]] = []
1440
- synthesis_output = SecurityFindings(
1441
- vulnerabilities=[
1442
- Vulnerability(
1443
- id="SEC-001",
1444
- severity="high",
1445
- category="code",
1446
- title="Ungrounded assertion",
1447
- description="Model-reported issue without concrete evidence reads in synthesis mode",
1448
- affected_component="src/app.py",
1449
- remediation="Validate via read_file before reporting",
1450
- )
1451
- ],
1452
- posture_score=4.0,
1453
- sonarqube_issues=0,
1454
- dependency_vulnerabilities=0,
1455
- confidence=0.9,
1456
- security_controls=[],
1457
- recommendations=[],
1458
- )
1459
-
1460
- async def _fake_run(**kwargs):
1461
- calls.append(kwargs)
1462
- if len(calls) <= 2:
1463
- raise RuntimeError("The next tool call(s) would exceed the tool_calls_limit of 24 (tool_calls=25).")
1464
- # No grounded read/search activity is available in synthesis call telemetry.
1465
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {}}
1466
- return synthesis_output
1467
-
1468
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1469
-
1470
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1471
-
1472
- assert output is not None
1473
- assert len(calls) == 3
1474
- assert "BUDGET RECOVERY MODE (READ-FOCUSED TERMINAL PASS)" in str(calls[1]["user_prompt"])
1475
- assert "BUDGET EXHAUSTED - FINAL SYNTHESIS MODE" in str(calls[2]["user_prompt"])
1476
- assert calls[2]["toolsets"] == []
1477
- assert calls[2]["max_tool_calls"] == 1
1478
- assert output.vulnerabilities == []
1479
- assert output.confidence <= 0.4
1480
-
1481
-
1482
- @pytest.mark.asyncio
1483
- async def test_security_analysis_tightens_strict_budget_for_local_openai(monkeypatch, mock_evidence_bundle):
1484
- """Strict mode on local OpenAI endpoints should apply bounded, non-overtightened budgets."""
1485
- settings = LLMSettings(
1486
- enabled=True,
1487
- protocol=LLMProtocolType.OPENAI,
1488
- base_url="http://127.0.0.1:11434/v1",
1489
- )
1490
- agent = SecurityAgent(settings=settings)
1491
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1492
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_STRICT_MAX_TURNS_CAP", raising=False)
1493
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_STRICT_MAX_TOOL_CALLS_CAP", raising=False)
1494
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TURNS_CAP", raising=False)
1495
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_SECURITY_STRICT_MAX_TOOL_CALLS_CAP", raising=False)
1496
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_COMPACT_MAX_TURNS", raising=False)
1497
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_COMPACT_MAX_TOOL_CALLS", raising=False)
1498
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TURNS", raising=False)
1499
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_COMPACT_DEFAULT_MAX_TOOL_CALLS", raising=False)
1500
- monkeypatch.setattr(
1501
- "vds_audit_orchestrator.agents.security_agent.get_config",
1502
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=24)),
1503
- )
1504
-
1505
- expected = SecurityFindings(
1506
- vulnerabilities=[],
1507
- posture_score=7.0,
1508
- sonarqube_issues=0,
1509
- dependency_vulnerabilities=0,
1510
- confidence=0.7,
1511
- security_controls=[],
1512
- recommendations=[],
1513
- )
1514
- calls: list[dict[str, object]] = []
1515
-
1516
- async def _fake_run(**kwargs):
1517
- calls.append(kwargs)
1518
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_evidence_document": 1}}
1519
- return expected
1520
-
1521
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1522
-
1523
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1524
-
1525
- assert output is expected
1526
- assert len(calls) == 1
1527
- assert calls[0]["max_turns"] == 8
1528
- assert calls[0]["max_tool_calls"] == 20
1529
-
1530
-
1531
- @pytest.mark.asyncio
1532
- async def test_security_analysis_local_openai_prompt_adds_budget_discipline(monkeypatch, mock_evidence_bundle):
1533
- """Local OpenAI mode should append explicit bounded tool-usage guidance to prompt."""
1534
- mock_settings = MagicMock()
1535
- mock_settings.enabled = True
1536
- agent = SecurityAgent(settings=mock_settings)
1537
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1538
- monkeypatch.setattr(agent, "_should_disable_parallel_tool_calls", lambda: True)
1539
-
1540
- run_mock = AsyncMock(
1541
- return_value=SecurityFindings(
1542
- vulnerabilities=[],
1543
- posture_score=7.5,
1544
- sonarqube_issues=0,
1545
- dependency_vulnerabilities=0,
1546
- confidence=0.8,
1547
- security_controls=[],
1548
- recommendations=[],
1549
- )
1550
- )
1551
- monkeypatch.setattr(agent, "_run_pydantic_agent", run_mock)
1552
-
1553
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1554
-
1555
- assert output is not None
1556
- assert (
1557
- "Local OpenAI discipline: keep tool usage bounded and deterministic."
1558
- in run_mock.await_args.kwargs["user_prompt"]
1559
- )
1560
-
1561
-
1562
- @pytest.mark.asyncio
1563
- async def test_security_analysis_strict_tool_cap_override_from_env(monkeypatch, mock_evidence_bundle):
1564
- """Generic env override should control strict tool-call cap for SecurityAgent."""
1565
- settings = LLMSettings(
1566
- enabled=True,
1567
- protocol=LLMProtocolType.OPENAI,
1568
- base_url="http://127.0.0.1:11434/v1",
1569
- )
1570
- agent = SecurityAgent(settings=settings)
1571
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1572
- monkeypatch.setattr(
1573
- "vds_audit_orchestrator.agents.security_agent.get_config",
1574
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=24)),
1575
- )
1576
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_STRICT_MAX_TOOL_CALLS_CAP", "24")
1577
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_COMPACT_MAX_TOOL_CALLS", "24")
1578
-
1579
- expected = SecurityFindings(
1580
- vulnerabilities=[],
1581
- posture_score=7.0,
1582
- sonarqube_issues=0,
1583
- dependency_vulnerabilities=0,
1584
- confidence=0.7,
1585
- security_controls=[],
1586
- recommendations=[],
1587
- )
1588
- calls: list[dict[str, object]] = []
1589
-
1590
- async def _fake_run(**kwargs):
1591
- calls.append(kwargs)
1592
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_evidence_document": 1}}
1593
- return expected
1594
-
1595
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1596
-
1597
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1598
-
1599
- assert output is expected
1600
- assert len(calls) == 1
1601
- assert calls[0]["max_tool_calls"] == 24
1602
-
1603
-
1604
- @pytest.mark.asyncio
1605
- async def test_security_analysis_strict_turn_cap_override_from_env(monkeypatch, mock_evidence_bundle):
1606
- """Generic env override should control strict max turns when compact cap aligns."""
1607
- settings = LLMSettings(
1608
- enabled=True,
1609
- protocol=LLMProtocolType.OPENAI,
1610
- base_url="http://127.0.0.1:11434/v1",
1611
- )
1612
- agent = SecurityAgent(settings=settings)
1613
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1614
- monkeypatch.setattr(
1615
- "vds_audit_orchestrator.agents.security_agent.get_config",
1616
- lambda: MagicMock(agentic=MagicMock(strict_no_fallback=True, max_turns=10, max_tool_calls=24)),
1617
- )
1618
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_STRICT_MAX_TURNS_CAP", "10")
1619
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_STRICT_MAX_TOOL_CALLS_CAP", "20")
1620
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_COMPACT_MAX_TURNS", "10")
1621
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_COMPACT_MAX_TOOL_CALLS", "20")
1622
-
1623
- expected = SecurityFindings(
1624
- vulnerabilities=[],
1625
- posture_score=7.0,
1626
- sonarqube_issues=0,
1627
- dependency_vulnerabilities=0,
1628
- confidence=0.7,
1629
- security_controls=[],
1630
- recommendations=[],
1631
- )
1632
- calls: list[dict[str, object]] = []
1633
-
1634
- async def _fake_run(**kwargs):
1635
- calls.append(kwargs)
1636
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_evidence_document": 1}}
1637
- return expected
1638
-
1639
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1640
-
1641
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1642
-
1643
- assert output is expected
1644
- assert len(calls) == 1
1645
- assert calls[0]["max_turns"] == 10
1646
- assert calls[0]["max_tool_calls"] == 20
1647
-
1648
-
1649
- @pytest.mark.asyncio
1650
- async def test_security_analysis_trailing_characters_retries_with_output_recovery(monkeypatch, mock_evidence_bundle):
1651
- """Trailing JSON characters should trigger one strict output-format recovery retry."""
1652
- mock_settings = MagicMock()
1653
- mock_settings.enabled = True
1654
- agent = SecurityAgent(settings=mock_settings)
1655
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1656
-
1657
- expected = SecurityFindings(
1658
- vulnerabilities=[],
1659
- posture_score=7.2,
1660
- sonarqube_issues=0,
1661
- dependency_vulnerabilities=0,
1662
- confidence=0.75,
1663
- security_controls=[],
1664
- recommendations=[],
1665
- )
1666
- calls: list[dict[str, Any]] = []
1667
-
1668
- async def _fake_run(**kwargs):
1669
- calls.append(kwargs)
1670
- if len(calls) == 1:
1671
- raise ValueError("trailing characters at line 1 column 103")
1672
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_file": 1, "grep_search": 1}}
1673
- return expected
1674
-
1675
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1676
-
1677
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1678
-
1679
- assert output is expected
1680
- assert len(calls) == 2
1681
- assert "OUTPUT FORMAT RECOVERY MODE" in str(calls[1]["user_prompt"])
1682
- assert calls[1]["toolsets"] == []
1683
- assert calls[1]["max_tool_calls"] == 1
1684
- assert calls[1]["max_turns"] is None
1685
-
1686
-
1687
- @pytest.mark.asyncio
1688
- async def test_security_analysis_rate_limit_retries_once(monkeypatch, mock_evidence_bundle):
1689
- """Provider 429/rate-limit should trigger one retry with backoff."""
1690
- mock_settings = MagicMock()
1691
- mock_settings.enabled = True
1692
- agent = SecurityAgent(settings=mock_settings)
1693
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1694
- monkeypatch.setattr("vds_audit_orchestrator.agents.security_agent.asyncio.sleep", AsyncMock())
1695
-
1696
- expected = SecurityFindings(
1697
- vulnerabilities=[],
1698
- posture_score=7.1,
1699
- sonarqube_issues=0,
1700
- dependency_vulnerabilities=0,
1701
- confidence=0.7,
1702
- security_controls=[],
1703
- recommendations=[],
1704
- )
1705
- calls: list[dict[str, Any]] = []
1706
-
1707
- async def _fake_run(**kwargs):
1708
- calls.append(kwargs)
1709
- if len(calls) == 1:
1710
- raise RuntimeError(
1711
- "status_code: 429, model_name: claude-haiku-4-5-20251001, body: {'type': 'error', 'error': {'type': 'rate_limit_error', 'message': 'Rate limit exceeded'}}"
1712
- )
1713
- agent._last_agent_run_telemetry = {"event_tool_count_by_name": {"read_file": 1, "grep_search": 1}}
1714
- return expected
1715
-
1716
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1717
-
1718
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1719
-
1720
- assert output is expected
1721
- assert len(calls) == 2
1722
-
1723
-
1724
- @pytest.mark.asyncio
1725
- async def test_security_analysis_cadence_guard_pivots_search_only_burst(monkeypatch, mock_evidence_bundle):
1726
- """Search-only burst should trigger cadence pivot prompt once."""
1727
- mock_settings = MagicMock()
1728
- mock_settings.enabled = True
1729
- agent = SecurityAgent(settings=mock_settings)
1730
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1731
- monkeypatch.setattr(
1732
- agent,
1733
- "_resolve_tool_policy",
1734
- lambda: (
1735
- ["search_evidence", "read_evidence_document"],
1736
- {"search_only_burst_min_tool_calls": 4, "search_only_burst_min_search_calls": 4},
1737
- ),
1738
- )
1739
-
1740
- expected = SecurityFindings(
1741
- vulnerabilities=[],
1742
- posture_score=7.5,
1743
- sonarqube_issues=0,
1744
- dependency_vulnerabilities=0,
1745
- confidence=0.8,
1746
- security_controls=[],
1747
- recommendations=[],
1748
- )
1749
- run_prompts: list[str] = []
1750
-
1751
- async def _fake_run(**kwargs):
1752
- run_prompts.append(kwargs["user_prompt"])
1753
- if len(run_prompts) == 1:
1754
- agent._last_agent_run_telemetry = {
1755
- "event_tool_calls_completed": 4,
1756
- "event_tool_count_by_name": {"search_evidence": 4, "read_evidence_document": 0},
1757
- }
1758
- else:
1759
- agent._last_agent_run_telemetry = {
1760
- "event_tool_calls_completed": 4,
1761
- "event_tool_count_by_name": {"search_evidence": 2, "read_evidence_document": 1},
1762
- }
1763
- return expected
1764
-
1765
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1766
-
1767
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1768
-
1769
- assert output is expected
1770
- assert len(run_prompts) == 2
1771
- assert "CADENCE PIVOT GUARD" in run_prompts[1]
1772
-
1773
-
1774
- @pytest.mark.asyncio
1775
- async def test_security_analysis_cadence_guard_accepts_grounded_output_without_restart(
1776
- monkeypatch, mock_evidence_bundle
1777
- ):
1778
- """Low-signal cadence with grounded output should be accepted without synthesis restart."""
1779
- mock_settings = MagicMock()
1780
- mock_settings.enabled = True
1781
- agent = SecurityAgent(settings=mock_settings)
1782
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1783
- monkeypatch.setattr(
1784
- agent,
1785
- "_resolve_tool_policy",
1786
- lambda: (
1787
- ["grep_search", "read_file"],
1788
- {"high_repeat_min_tool_calls": 10, "max_unique_tools_in_window": 2},
1789
- ),
1790
- )
1791
- # Keep cadence acceptance thresholds deterministic for this test; host env can override defaults.
1792
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_CADENCE_ACCEPT_MIN_READ_CALLS", "2")
1793
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_CADENCE_ACCEPT_MIN_UNIQUE_TOOLS", "2")
1794
-
1795
- expected = SecurityFindings(
1796
- vulnerabilities=[],
1797
- posture_score=7.2,
1798
- sonarqube_issues=0,
1799
- dependency_vulnerabilities=0,
1800
- confidence=0.82,
1801
- security_controls=[],
1802
- recommendations=[],
1803
- )
1804
- calls: list[dict[str, Any]] = []
1805
-
1806
- async def _fake_run(**kwargs):
1807
- calls.append(kwargs)
1808
- if len(calls) == 1:
1809
- agent._last_agent_run_telemetry = {
1810
- "event_tool_calls_completed": 12,
1811
- "event_tool_count_by_name": {"grep_search": 8, "read_file": 4},
1812
- }
1813
- return expected
1814
- agent._last_agent_run_telemetry = {"event_tool_calls_completed": 0, "event_tool_count_by_name": {}}
1815
- return expected
1816
-
1817
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1818
-
1819
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1820
-
1821
- assert output is expected
1822
- assert len(calls) == 1
1823
-
1824
-
1825
- def test_security_low_signal_search_burst_detects_mixed_loop_churn() -> None:
1826
- telemetry = {
1827
- "event_tool_calls_completed": 12,
1828
- "event_tool_count_by_name": {
1829
- "grep_search": 7,
1830
- "read_file": 5,
1831
- },
1832
- }
1833
-
1834
- assert SecurityAgent._is_low_signal_search_burst(telemetry, policy={}) is True
1835
-
1836
-
1837
- def test_security_build_analysis_toolsets_disables_skills(monkeypatch):
1838
- """Security analysis should drop skills toolsets to avoid noisy script calls."""
1839
-
1840
- class _SkillToolset:
1841
- skills = {"llm-analysis-skill": object()}
1842
- _vds_skill_metadata = []
1843
-
1844
- class _OtherToolset:
1845
- pass
1846
-
1847
- agent = SecurityAgent(settings=MagicMock(enabled=True))
1848
- monkeypatch.setattr(
1849
- "vds_audit_orchestrator.agents.security_agent._build_toolsets",
1850
- lambda *_: [_SkillToolset(), _OtherToolset()],
1851
- )
1852
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_SECURITY_ENABLE_SKILLS_TOOLSET", "false")
1853
- monkeypatch.delenv("VDS_AUDIT_AGENTIC_ENABLE_SKILLS_TOOLSET", raising=False)
1854
-
1855
- toolsets = agent._build_analysis_toolsets()
1856
-
1857
- assert len(toolsets) == 1
1858
- assert isinstance(toolsets[0], _OtherToolset)
1859
-
1860
-
1861
- def test_security_build_analysis_toolsets_can_enable_skills_via_env(monkeypatch):
1862
- """Security analysis may keep skills toolsets when explicitly enabled via env."""
1863
-
1864
- class _SkillToolset:
1865
- skills = {"llm-analysis-skill": object()}
1866
- _vds_skill_metadata = []
1867
-
1868
- class _OtherToolset:
1869
- pass
1870
-
1871
- agent = SecurityAgent(settings=MagicMock(enabled=True))
1872
- monkeypatch.setattr(
1873
- "vds_audit_orchestrator.agents.security_agent._build_toolsets",
1874
- lambda *_: [_SkillToolset(), _OtherToolset()],
1875
- )
1876
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_SECURITY_ENABLE_SKILLS_TOOLSET", "true")
1877
-
1878
- toolsets = agent._build_analysis_toolsets()
1879
-
1880
- assert len(toolsets) == 2
1881
- assert any(isinstance(item, _SkillToolset) for item in toolsets)
1882
- assert any(isinstance(item, _OtherToolset) for item in toolsets)
1883
-
1884
-
1885
- def test_security_has_min_evidence_grounding() -> None:
1886
- assert SecurityAgent._has_min_evidence_grounding(None) is False
1887
- assert SecurityAgent._has_min_evidence_grounding({}) is False
1888
- assert (
1889
- SecurityAgent._has_min_evidence_grounding(
1890
- {"event_tool_count_by_name": {"search_evidence": 1, "read_evidence_document": 1}}
1891
- )
1892
- is True
1893
- )
1894
- assert (
1895
- SecurityAgent._has_min_evidence_grounding(
1896
- {"event_tool_count_by_name": {"search_evidence": 2, "read_evidence_document": 0}}
1897
- )
1898
- is False
1899
- )
1900
- assert (
1901
- SecurityAgent._has_min_evidence_grounding(
1902
- {"event_tool_count_by_name": {"search_evidence": 2, "read_evidence_document": 1}},
1903
- min_read_calls=2,
1904
- min_unique_tools=2,
1905
- )
1906
- is False
1907
- )
1908
-
1909
-
1910
- @pytest.mark.asyncio
1911
- async def test_security_analysis_cadence_guard_stricter_accept_threshold_retries(monkeypatch, mock_evidence_bundle):
1912
- """Stricter cadence acceptance threshold should force one retry before accept."""
1913
- mock_settings = MagicMock()
1914
- mock_settings.enabled = True
1915
- agent = SecurityAgent(settings=mock_settings)
1916
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: ["toolset-security"])
1917
- monkeypatch.setattr(
1918
- agent,
1919
- "_resolve_tool_policy",
1920
- lambda: (
1921
- ["search_evidence", "read_evidence_document"],
1922
- {"high_repeat_min_tool_calls": 10, "max_unique_tools_in_window": 2},
1923
- ),
1924
- )
1925
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_CADENCE_ACCEPT_MIN_READ_CALLS", "2")
1926
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_CADENCE_ACCEPT_MIN_UNIQUE_TOOLS", "2")
1927
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_CADENCE_RETRY_MAX_TURNS", "6")
1928
- monkeypatch.setenv("VDS_AUDIT_AGENTIC_CADENCE_RETRY_MAX_TOOL_CALLS", "10")
1929
-
1930
- expected = SecurityFindings(
1931
- vulnerabilities=[],
1932
- posture_score=7.1,
1933
- sonarqube_issues=0,
1934
- dependency_vulnerabilities=0,
1935
- confidence=0.8,
1936
- security_controls=[],
1937
- recommendations=[],
1938
- )
1939
- calls: list[dict[str, Any]] = []
1940
-
1941
- async def _fake_run(**kwargs):
1942
- calls.append(kwargs)
1943
- if len(calls) == 1:
1944
- agent._last_agent_run_telemetry = {
1945
- "event_tool_calls_completed": 10,
1946
- "event_tool_count_by_name": {"search_evidence": 9, "read_evidence_document": 1},
1947
- }
1948
- return expected
1949
- # Second call: enough read calls (2 >= 2) and not search-dominant (4 < max(8, 8))
1950
- agent._last_agent_run_telemetry = {
1951
- "event_tool_calls_completed": 10,
1952
- "event_tool_count_by_name": {"search_evidence": 4, "read_evidence_document": 3, "read_file": 3},
1953
- }
1954
- return expected
1955
-
1956
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
1957
-
1958
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
1959
-
1960
- assert output is expected
1961
- assert len(calls) == 2
1962
- assert "CADENCE PIVOT GUARD" in str(calls[1]["user_prompt"])
1963
- assert calls[1]["max_turns"] == 6
1964
- assert calls[1]["max_tool_calls"] == 10
1965
-
1966
-
1967
- @pytest.mark.asyncio
1968
- async def test_security_analysis_cadence_retry_tool_allowlist_applied(monkeypatch, mock_evidence_bundle):
1969
- """Cadence retry should optionally narrow toolsets via env allowlist."""
1970
- mock_settings = MagicMock()
1971
- mock_settings.enabled = True
1972
- agent = SecurityAgent(settings=mock_settings)
1973
-
1974
- class _Toolset:
1975
- def __init__(self):
1976
- self.tools = {
1977
- "search_evidence": object(),
1978
- "read_evidence_document": object(),
1979
- "read_file": object(),
1980
- "grep_search": object(),
1981
- }
1982
-
1983
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: [_Toolset()])
1984
- monkeypatch.setattr(
1985
- agent,
1986
- "_resolve_tool_policy",
1987
- lambda: (
1988
- ["search_evidence", "read_evidence_document", "read_file", "grep_search"],
1989
- {"high_repeat_min_tool_calls": 10, "max_unique_tools_in_window": 2},
1990
- ),
1991
- )
1992
- monkeypatch.setenv(
1993
- "VDS_AUDIT_AGENTIC_CADENCE_RETRY_TOOL_ALLOWLIST",
1994
- "read_evidence_document,read_file,search_evidence",
1995
- )
1996
-
1997
- expected = SecurityFindings(
1998
- vulnerabilities=[],
1999
- posture_score=7.1,
2000
- sonarqube_issues=0,
2001
- dependency_vulnerabilities=0,
2002
- confidence=0.8,
2003
- security_controls=[],
2004
- recommendations=[],
2005
- )
2006
- calls: list[dict[str, Any]] = []
2007
-
2008
- async def _fake_run(**kwargs):
2009
- calls.append(kwargs)
2010
- if len(calls) == 1:
2011
- agent._last_agent_run_telemetry = {
2012
- "event_tool_calls_completed": 10,
2013
- "event_tool_count_by_name": {"search_evidence": 9, "read_evidence_document": 0},
2014
- }
2015
- return expected
2016
- agent._last_agent_run_telemetry = {
2017
- "event_tool_calls_completed": 10,
2018
- "event_tool_count_by_name": {"search_evidence": 6, "read_evidence_document": 2, "read_file": 1},
2019
- }
2020
- return expected
2021
-
2022
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
2023
-
2024
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
2025
-
2026
- assert output is expected
2027
- assert len(calls) == 2
2028
- retry_toolset = (calls[1].get("toolsets") or [None])[0]
2029
- retry_tools = getattr(retry_toolset, "tools", {})
2030
- assert set(retry_tools.keys()) == {"read_evidence_document", "read_file", "search_evidence"}
2031
-
2032
-
2033
- @pytest.mark.asyncio
2034
- async def test_security_analysis_retries_and_drops_ungrounded_output(monkeypatch, mock_evidence_bundle):
2035
- agent = SecurityAgent(settings=MagicMock(enabled=True))
2036
- monkeypatch.setattr(agent, "_build_analysis_toolsets", lambda: [object()])
2037
- monkeypatch.setattr(agent, "_collect_available_skill_names", lambda *_: [])
2038
- monkeypatch.setattr(
2039
- agent,
2040
- "_resolve_tool_policy",
2041
- lambda: (["search_evidence", "read_evidence_document"], {"search_only_burst_min_tool_calls": 4}),
2042
- )
2043
-
2044
- expected = SecurityFindings(
2045
- vulnerabilities=[],
2046
- posture_score=7.0,
2047
- sonarqube_issues=0,
2048
- dependency_vulnerabilities=0,
2049
- confidence=0.8,
2050
- security_controls=[],
2051
- recommendations=[],
2052
- )
2053
- run_prompts: list[str] = []
2054
-
2055
- async def _fake_run(**kwargs):
2056
- run_prompts.append(kwargs["user_prompt"])
2057
- agent._last_agent_run_telemetry = {
2058
- "event_tool_calls_completed": 0,
2059
- "event_tool_count_by_name": {"search_evidence": 0, "read_evidence_document": 0},
2060
- }
2061
- return expected
2062
-
2063
- monkeypatch.setattr(agent, "_run_pydantic_agent", _fake_run)
2064
-
2065
- output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle, existing_findings=[])
2066
-
2067
- assert output is None
2068
- assert len(run_prompts) == 2
2069
- assert "EVIDENCE GROUNDING GUARD" in run_prompts[1]