@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,2987 +0,0 @@
1
- """Tests for dual evidence anchoring (TSK-198).
2
-
3
- Tests that row evaluator correctly wires both doc evidence (Confluence URLs)
4
- and code evidence (code paths) into EvidenceAnchor lists for canonical checklist.
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- import pytest
10
- from vds_agent_core.agents.loop import (
11
- AgentLoopResult,
12
- AgentLoopStep,
13
- LoopTerminationReason,
14
- )
15
- from vds_audit_orchestrator.agents.tool_registry import ToolName
16
- from vds_audit_orchestrator.engine.deterministic_evaluator import DeterministicEvaluator
17
- from vds_audit_orchestrator.engine.row_evaluator import RowEvaluator
18
- from vds_audit_orchestrator.engine.row_evaluator_types import RowEvaluationResult, RowEvaluatorConfig, RowLLMMode
19
- from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
20
- from vds_audit_orchestrator.evidence.traceability import CodeAnchor, TraceRecord
21
- from vds_audit_orchestrator.models.checklist import (
22
- EvidenceAnchor,
23
- RowProvenance,
24
- RowStatus,
25
- ScoreBreakdown,
26
- )
27
- from vds_audit_orchestrator.models.evidence import Evidence, EvidenceStatus
28
- from vds_audit_orchestrator.models.template import AuditCheck
29
-
30
- # =============================================================================
31
- # Fixtures
32
- # =============================================================================
33
-
34
-
35
- @pytest.fixture
36
- def sample_check():
37
- """Create a sample audit check for testing."""
38
- return AuditCheck(
39
- id="API-001",
40
- name="API endpoint documented",
41
- description="API endpoint /api/policies must be documented in Confluence",
42
- check_type="api_documented",
43
- weight=2.0,
44
- section_id="api_documentation",
45
- )
46
-
47
-
48
- @pytest.fixture
49
- def confluence_evidence():
50
- """Create Confluence evidence with URL."""
51
- confluence_url = "https://confluence.example.com/display/PROJECT/API-Docs"
52
- return Evidence(
53
- source="confluence",
54
- source_id="confluence:page-123",
55
- title="API Documentation",
56
- content="# API Documentation\n\n## GET /api/policies\n\nReturns list of policies.",
57
- content_hash="conf123",
58
- status=EvidenceStatus.FOUND,
59
- source_url=confluence_url,
60
- )
61
-
62
-
63
- @pytest.fixture
64
- def code_evidence_pack():
65
- """Create code evidence pack with API file."""
66
- return CodeEvidencePack(
67
- repo_path="/test/repo",
68
- files=[
69
- CodeEvidence(
70
- file_path="src/api/routes.py",
71
- content="@app.route('/api/policies')\ndef get_policies():\n pass",
72
- original_lines=50,
73
- original_bytes=1000,
74
- priority=1,
75
- ),
76
- ],
77
- )
78
-
79
-
80
- @pytest.fixture
81
- def traceability_with_match():
82
- """Create traceability record with code anchor matching the check."""
83
- return [
84
- TraceRecord(
85
- mention_id="mention-001",
86
- mention_type="endpoint",
87
- mention_value="/api/policies",
88
- source_page_id="page-123",
89
- source_url="https://confluence.example.com/display/PROJECT/API-Docs",
90
- code_anchors=[
91
- CodeAnchor(
92
- file="src/api/routes.py",
93
- line=42,
94
- match="@app.route('/api/policies')",
95
- ),
96
- CodeAnchor(
97
- file="src/api/routes.py",
98
- line=43,
99
- match="def get_policies():",
100
- ),
101
- ],
102
- confidence="high",
103
- ),
104
- ]
105
-
106
-
107
- @pytest.fixture
108
- def traceability_no_match():
109
- """Create traceability record that doesn't match the check."""
110
- return [
111
- TraceRecord(
112
- mention_id="mention-002",
113
- mention_type="endpoint",
114
- mention_value="/api/users", # Different endpoint
115
- source_page_id="page-456",
116
- source_url="https://confluence.example.com/display/PROJECT/Users",
117
- code_anchors=[
118
- CodeAnchor(
119
- file="src/api/users.py",
120
- line=10,
121
- match="@app.route('/api/users')",
122
- ),
123
- ],
124
- confidence="high",
125
- ),
126
- ]
127
-
128
-
129
- # =============================================================================
130
- # Dual Evidence Tests
131
- # =============================================================================
132
-
133
-
134
- class TestDualEvidenceAnchors:
135
- """Test docs+code evidence anchoring (TSK-198)."""
136
-
137
- def test_evaluate_with_code_evidence_only(self, sample_check, code_evidence_pack, traceability_with_match):
138
- """Test row evaluation includes code anchors when traceability matches."""
139
- evaluator = DeterministicEvaluator(template_hash="test_hash")
140
-
141
- # Evaluate with no doc evidence, but with code evidence via traceability
142
- result = evaluator.evaluate(
143
- check=sample_check,
144
- evidence=None,
145
- row_id="row_0",
146
- code_evidence=code_evidence_pack,
147
- traceability=traceability_with_match,
148
- )
149
-
150
- assert isinstance(result, RowEvaluationResult)
151
-
152
- # Should have code anchors from traceability
153
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
154
- assert len(code_anchors) > 0, "Should have code_path anchors from traceability"
155
-
156
- # Verify code anchor format
157
- first_code_anchor = code_anchors[0]
158
- assert "src/api/routes.py" in first_code_anchor.ref_value
159
- assert "#L" in first_code_anchor.ref_value # Should have line number
160
- assert first_code_anchor.verified is True
161
-
162
- def test_evaluate_with_confluence_evidence_only(self, sample_check, confluence_evidence):
163
- """Test row evaluation with only Confluence evidence (no code evidence)."""
164
- evaluator = DeterministicEvaluator(template_hash="test_hash")
165
-
166
- result = evaluator.evaluate(
167
- check=sample_check,
168
- evidence=confluence_evidence,
169
- row_id="row_0",
170
- )
171
-
172
- # Should have URL anchors from Confluence
173
- url_anchors = [a for a in result.evidence_anchors if a.ref_type == "url"]
174
- assert len(url_anchors) > 0, "Should have URL anchors from Confluence evidence"
175
-
176
- # Should NOT have code anchors (no traceability provided)
177
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
178
- assert len(code_anchors) == 0, "Should not have code anchors without traceability"
179
-
180
-
181
- def test_apply_trace_backed_anchor_verification_enriches_verified_doc_anchor_metadata() -> None:
182
- result = RowEvaluationResult(
183
- row_id="CL-004:row_3",
184
- check_id="CL-004",
185
- status=RowStatus.FAIL,
186
- score=30.0,
187
- score_breakdown=ScoreBreakdown.compute(raw_score=30.0),
188
- reason="reason",
189
- finding="finding",
190
- provenance=RowProvenance(
191
- evaluator_type="unit_test",
192
- evaluator_version="test",
193
- row_llm_mode="selective",
194
- template_hash="template",
195
- evidence_hash="evidence",
196
- ),
197
- evidence_anchors=[
198
- EvidenceAnchor(
199
- ref_type="confluence_chunk",
200
- ref_value="chunk:abc123",
201
- excerpt="MariaDB",
202
- verified=True,
203
- verification_reason="excerpt_verified_in_context",
204
- )
205
- ],
206
- retrieval_trace={
207
- "tool_first_loop": {
208
- "trace_steps": [
209
- {
210
- "tool": ToolName.READ_DOC_CHUNK.value,
211
- "output": {
212
- "ref": "chunk:abc123",
213
- "chunk_id": "abc123",
214
- "page_id": "88718940",
215
- "page_title": "OpenAPI Specification",
216
- "source_url": "https://confluence.example.com/pages/viewpage.action?pageId=88718940",
217
- "content": "MariaDB sizing details",
218
- },
219
- }
220
- ]
221
- }
222
- },
223
- )
224
-
225
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
226
- anchor = verified.evidence_anchors[0]
227
- assert anchor.page_id == "88718940"
228
- assert anchor.page_title == "OpenAPI Specification"
229
- assert anchor.source_url == "https://confluence.example.com/pages/viewpage.action?pageId=88718940"
230
- assert anchor.chunk_id == "abc123"
231
-
232
- def test_evaluate_with_dual_evidence(
233
- self, sample_check, confluence_evidence, code_evidence_pack, traceability_with_match
234
- ):
235
- """Test row evaluation with both docs and code evidence (TSK-198 primary test)."""
236
- evaluator = DeterministicEvaluator(template_hash="test_hash")
237
-
238
- result = evaluator.evaluate(
239
- check=sample_check,
240
- evidence=confluence_evidence,
241
- row_id="row_0",
242
- code_evidence=code_evidence_pack,
243
- traceability=traceability_with_match,
244
- )
245
-
246
- # Should have both URL and code anchors
247
- anchor_types = {a.ref_type for a in result.evidence_anchors}
248
- assert "url" in anchor_types, "Should have URL anchors from Confluence"
249
- assert "code_path" in anchor_types, "Should have code_path anchors from traceability"
250
-
251
- # Verify we have at least one of each
252
- url_anchors = [a for a in result.evidence_anchors if a.ref_type == "url"]
253
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
254
-
255
- assert len(url_anchors) >= 1, "Should have at least one URL anchor"
256
- assert len(code_anchors) >= 1, "Should have at least one code anchor"
257
-
258
- # Verify URL anchor has Confluence URL
259
- assert any("confluence.example.com" in a.ref_value for a in url_anchors)
260
-
261
- # Verify code anchor has file path and line number
262
- assert any("#L" in a.ref_value for a in code_anchors)
263
- assert any("src/api/routes.py" in a.ref_value for a in code_anchors)
264
-
265
- def test_evaluate_without_code_evidence_graceful(self, sample_check, confluence_evidence):
266
- """Test graceful degradation when code evidence is not provided."""
267
- evaluator = DeterministicEvaluator(template_hash="test_hash")
268
-
269
- # Call with code_evidence=None (default)
270
- result = evaluator.evaluate(
271
- check=sample_check,
272
- evidence=confluence_evidence,
273
- row_id="row_0",
274
- )
275
-
276
- # Should work without error
277
- assert result is not None
278
- assert result.status in [RowStatus.PASS, RowStatus.PARTIAL, RowStatus.FAIL]
279
-
280
- # Should have doc evidence but no code evidence
281
- url_anchors = [a for a in result.evidence_anchors if a.ref_type == "url"]
282
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
283
-
284
- assert len(url_anchors) > 0, "Should have URL anchors"
285
- assert len(code_anchors) == 0, "Should have no code anchors without traceability"
286
-
287
- def test_evaluate_with_no_matching_traces(
288
- self, sample_check, confluence_evidence, code_evidence_pack, traceability_no_match
289
- ):
290
- """Test that non-matching traces don't produce code anchors."""
291
- evaluator = DeterministicEvaluator(template_hash="test_hash")
292
-
293
- result = evaluator.evaluate(
294
- check=sample_check,
295
- evidence=confluence_evidence,
296
- row_id="row_0",
297
- code_evidence=code_evidence_pack,
298
- traceability=traceability_no_match, # Traces don't match check
299
- )
300
-
301
- # Should have URL anchors from Confluence
302
- url_anchors = [a for a in result.evidence_anchors if a.ref_type == "url"]
303
- assert len(url_anchors) > 0, "Should have URL anchors"
304
-
305
- # Should NOT have code anchors (trace doesn't match)
306
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
307
- assert len(code_anchors) == 0, "Should not have code anchors from non-matching traces"
308
-
309
- def test_trace_matching_by_check_description(self):
310
- """Test that traces match checks based on description content."""
311
- evaluator = DeterministicEvaluator(template_hash="test_hash")
312
-
313
- # Check with endpoint in description
314
- check = AuditCheck(
315
- id="API-002",
316
- name="User API documented",
317
- description="The /api/users endpoint must be documented",
318
- check_type="api_documented",
319
- weight=1.0,
320
- section_id="api",
321
- )
322
-
323
- # Trace with matching endpoint
324
- traces = [
325
- TraceRecord(
326
- mention_id="m1",
327
- mention_type="endpoint",
328
- mention_value="/api/users",
329
- source_url="https://confluence.example.com/page/1",
330
- code_anchors=[
331
- CodeAnchor(file="api/users.py", line=10, match="@route('/api/users')"),
332
- ],
333
- ),
334
- ]
335
-
336
- result = evaluator.evaluate(
337
- check=check,
338
- evidence=None,
339
- row_id="row_0",
340
- traceability=traces,
341
- )
342
-
343
- # Should match and include code anchor
344
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
345
- assert len(code_anchors) > 0, "Should match trace by description content"
346
-
347
- def test_trace_matching_by_check_id(self):
348
- """Test that traces match checks based on check ID."""
349
- evaluator = DeterministicEvaluator(template_hash="test_hash")
350
-
351
- # Check with identifier in ID
352
- check = AuditCheck(
353
- id="JIRA-1234",
354
- name="Story implementation",
355
- description="Implement user story JIRA-1234",
356
- check_type="requirement_coverage",
357
- weight=1.0,
358
- section_id="requirements",
359
- )
360
-
361
- # Trace with matching identifier
362
- traces = [
363
- TraceRecord(
364
- mention_id="m1",
365
- mention_type="identifier",
366
- mention_value="JIRA-1234",
367
- source_url="https://confluence.example.com/page/2",
368
- code_anchors=[
369
- CodeAnchor(file="features/user_story.py", line=5, match="# JIRA-1234"),
370
- ],
371
- ),
372
- ]
373
-
374
- result = evaluator.evaluate(
375
- check=check,
376
- evidence=None,
377
- row_id="row_0",
378
- traceability=traces,
379
- )
380
-
381
- # Should match and include code anchor
382
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
383
- assert len(code_anchors) > 0, "Should match trace by check ID"
384
-
385
- def test_code_anchor_line_range_populated(self, sample_check, traceability_with_match):
386
- """Test that code anchors have line_range populated."""
387
- evaluator = DeterministicEvaluator(template_hash="test_hash")
388
-
389
- result = evaluator.evaluate(
390
- check=sample_check,
391
- evidence=None,
392
- row_id="row_0",
393
- traceability=traceability_with_match,
394
- )
395
-
396
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
397
- assert len(code_anchors) > 0
398
-
399
- # Verify line_range is set
400
- first_anchor = code_anchors[0]
401
- assert first_anchor.line_range is not None, "Code anchor should have line_range"
402
- assert isinstance(first_anchor.line_range, tuple)
403
- assert len(first_anchor.line_range) == 2
404
- assert first_anchor.line_range[0] > 0, "Line range should have positive line numbers"
405
-
406
- def test_code_anchor_excerpt_truncated(self):
407
- """Test that long code excerpts are truncated."""
408
- evaluator = DeterministicEvaluator(template_hash="test_hash")
409
-
410
- # Create trace with long match text
411
- long_match = "x" * 500
412
- traces = [
413
- TraceRecord(
414
- mention_id="m1",
415
- mention_type="endpoint",
416
- mention_value="/api/long",
417
- source_url="https://confluence.example.com/page/3",
418
- code_anchors=[
419
- CodeAnchor(file="long.py", line=1, match=long_match),
420
- ],
421
- ),
422
- ]
423
-
424
- check = AuditCheck(
425
- id="LONG-001",
426
- name="Long test",
427
- description="Test with /api/long endpoint",
428
- check_type="test",
429
- weight=1.0,
430
- section_id="test",
431
- )
432
-
433
- result = evaluator.evaluate(
434
- check=check,
435
- evidence=None,
436
- row_id="row_0",
437
- traceability=traces,
438
- )
439
-
440
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
441
- assert len(code_anchors) > 0
442
-
443
- # Verify excerpt is truncated to 200 chars
444
- first_anchor = code_anchors[0]
445
- assert first_anchor.excerpt is not None
446
- assert len(first_anchor.excerpt) <= 200, "Excerpt should be truncated to 200 chars"
447
-
448
- def test_multiple_code_anchors_from_single_trace(self):
449
- """Test that multiple code anchors from one trace are all included."""
450
- evaluator = DeterministicEvaluator(template_hash="test_hash")
451
-
452
- # Trace with multiple code anchors
453
- traces = [
454
- TraceRecord(
455
- mention_id="m1",
456
- mention_type="endpoint",
457
- mention_value="/api/multi",
458
- source_url="https://confluence.example.com/page/4",
459
- code_anchors=[
460
- CodeAnchor(file="api.py", line=10, match="route 1"),
461
- CodeAnchor(file="api.py", line=20, match="route 2"),
462
- CodeAnchor(file="api.py", line=30, match="route 3"),
463
- ],
464
- ),
465
- ]
466
-
467
- check = AuditCheck(
468
- id="MULTI-001",
469
- name="Multi anchor test",
470
- description="Test /api/multi endpoint with multiple matches",
471
- check_type="test",
472
- weight=1.0,
473
- section_id="test",
474
- )
475
-
476
- result = evaluator.evaluate(
477
- check=check,
478
- evidence=None,
479
- row_id="row_0",
480
- traceability=traces,
481
- )
482
-
483
- code_anchors = [a for a in result.evidence_anchors if a.ref_type == "code_path"]
484
- assert len(code_anchors) == 3, "Should include all code anchors from trace"
485
-
486
- # Verify they're all from the same file
487
- assert all("api.py" in a.ref_value for a in code_anchors)
488
-
489
-
490
- # =============================================================================
491
- # Checklist Generator Integration
492
- # =============================================================================
493
-
494
-
495
- class TestChecklistGeneratorDualAnchors:
496
- """Test checklist generator formats dual anchors correctly."""
497
-
498
- def test_format_evidence_refs_urls_first(self):
499
- """Test that _format_evidence_refs lists URLs before code paths."""
500
- from vds_audit_orchestrator.models.checklist import EvidenceAnchor
501
- from vds_audit_orchestrator.reports.checklist_generator import ChecklistGenerator
502
-
503
- generator = ChecklistGenerator()
504
-
505
- anchors = [
506
- EvidenceAnchor(ref_type="code_path", ref_value="src/api.py#L42"),
507
- EvidenceAnchor(ref_type="url", ref_value="https://confluence.example.com/page/1"),
508
- EvidenceAnchor(ref_type="code_path", ref_value="src/routes.py#L10"),
509
- EvidenceAnchor(ref_type="url", ref_value="https://confluence.example.com/page/2"),
510
- ]
511
-
512
- formatted = generator._format_evidence_refs(anchors)
513
-
514
- lines = formatted.split("\n")
515
-
516
- # URLs should come first (with 📄 emoji)
517
- assert lines[0].startswith("📄")
518
- assert lines[1].startswith("📄")
519
- # Code paths should come after (with 💻 emoji)
520
- assert lines[2].startswith("💻")
521
- assert lines[3].startswith("💻")
522
-
523
- def test_format_evidence_refs_empty_list(self):
524
- """Test that empty anchor list returns empty string."""
525
- from vds_audit_orchestrator.reports.checklist_generator import ChecklistGenerator
526
-
527
- generator = ChecklistGenerator()
528
- formatted = generator._format_evidence_refs([])
529
- assert formatted == ""
530
-
531
- def test_format_evidence_refs_only_urls(self):
532
- """Test formatting with only URL anchors."""
533
- from vds_audit_orchestrator.models.checklist import EvidenceAnchor
534
- from vds_audit_orchestrator.reports.checklist_generator import ChecklistGenerator
535
-
536
- generator = ChecklistGenerator()
537
-
538
- anchors = [
539
- EvidenceAnchor(ref_type="url", ref_value="https://confluence.example.com/page/1"),
540
- EvidenceAnchor(ref_type="url", ref_value="https://confluence.example.com/page/2"),
541
- ]
542
-
543
- formatted = generator._format_evidence_refs(anchors)
544
- lines = formatted.split("\n")
545
-
546
- assert len(lines) == 2
547
- assert all(line.startswith("📄") for line in lines)
548
-
549
- def test_format_evidence_refs_only_code(self):
550
- """Test formatting with only code path anchors."""
551
- from vds_audit_orchestrator.models.checklist import EvidenceAnchor
552
- from vds_audit_orchestrator.reports.checklist_generator import ChecklistGenerator
553
-
554
- generator = ChecklistGenerator()
555
-
556
- anchors = [
557
- EvidenceAnchor(ref_type="code_path", ref_value="src/api.py#L42"),
558
- EvidenceAnchor(ref_type="code_path", ref_value="src/routes.py#L10"),
559
- ]
560
-
561
- formatted = generator._format_evidence_refs(anchors)
562
- lines = formatted.split("\n")
563
-
564
- assert len(lines) == 2
565
- assert all(line.startswith("💻") for line in lines)
566
-
567
- def test_format_evidence_refs_mixed_types(self):
568
- """Test formatting with mixed anchor types (url, code_path, other)."""
569
- from vds_audit_orchestrator.models.checklist import EvidenceAnchor
570
- from vds_audit_orchestrator.reports.checklist_generator import ChecklistGenerator
571
-
572
- generator = ChecklistGenerator()
573
-
574
- anchors = [
575
- EvidenceAnchor(ref_type="url", ref_value="https://confluence.example.com/page/1"),
576
- EvidenceAnchor(ref_type="code_path", ref_value="src/api.py#L42"),
577
- EvidenceAnchor(ref_type="path", ref_value="README.md"), # "other" type
578
- ]
579
-
580
- formatted = generator._format_evidence_refs(anchors)
581
- lines = formatted.split("\n")
582
-
583
- assert len(lines) == 3
584
- # URL first
585
- assert lines[0].startswith("📄")
586
- # Code second
587
- assert lines[1].startswith("💻")
588
- # Other third (no emoji prefix, just type label)
589
- assert "path:" in lines[2]
590
-
591
-
592
- class TestRowEvaluatorEvidenceRefSelection:
593
- """Test synthesis ref prioritization/capping for tool-first rows."""
594
-
595
- def test_prioritize_synthesis_evidence_refs_prefers_tool_loop_and_caps(
596
- self,
597
- monkeypatch: pytest.MonkeyPatch,
598
- ) -> None:
599
- monkeypatch.setenv("VDS_AUDIT_LLM__ROW_MAX_EVIDENCE_REFS", "3")
600
- loop_result = AgentLoopResult(
601
- termination_reason=LoopTerminationReason.COMPLETED,
602
- steps_executed=6,
603
- budget_remaining=9,
604
- elapsed_seconds=0.5,
605
- evidence_refs=["chunk:alpha", "src/service.py"],
606
- )
607
-
608
- selected_refs = RowEvaluator._prioritize_synthesis_evidence_refs(
609
- row_id="CL-001:row_0",
610
- requirement_text="",
611
- requirement_guidance=None,
612
- requirement_interpretation=None,
613
- base_refs=["README.md", "src/service.py", "docs/runbook.md"],
614
- loop_result=loop_result,
615
- augmented_refs=["chunk:beta", "docs/runbook.md"],
616
- )
617
-
618
- assert selected_refs == ["chunk:alpha", "src/service.py", "chunk:beta"]
619
-
620
- def test_prioritize_synthesis_evidence_refs_default_cap_without_loop(
621
- self,
622
- monkeypatch: pytest.MonkeyPatch,
623
- ) -> None:
624
- monkeypatch.delenv("VDS_AUDIT_LLM__ROW_MAX_EVIDENCE_REFS", raising=False)
625
- base_refs = [f"ref-{idx}" for idx in range(1, 18)]
626
-
627
- selected_refs = RowEvaluator._prioritize_synthesis_evidence_refs(
628
- row_id="CL-002:row_1",
629
- requirement_text="",
630
- requirement_guidance=None,
631
- requirement_interpretation=None,
632
- base_refs=base_refs,
633
- loop_result=None,
634
- augmented_refs=None,
635
- )
636
-
637
- assert len(selected_refs) == 12
638
- assert selected_refs == base_refs[:12]
639
-
640
- def test_prioritize_synthesis_evidence_refs_prefers_recorded_refs_from_trace_steps(
641
- self,
642
- monkeypatch: pytest.MonkeyPatch,
643
- ) -> None:
644
- monkeypatch.setenv("VDS_AUDIT_LLM__ROW_MAX_EVIDENCE_REFS", "4")
645
- loop_result = AgentLoopResult(
646
- termination_reason=LoopTerminationReason.COMPLETED,
647
- steps_executed=4,
648
- budget_remaining=7,
649
- elapsed_seconds=0.4,
650
- evidence_refs=["docs/a.md", "src/a.py", "src/b.py"],
651
- trace_steps=[
652
- AgentLoopStep(
653
- step=1,
654
- tool=ToolName.RECORD_EVIDENCE_REFS,
655
- budget_cost=1,
656
- budget_remaining=9,
657
- output={
658
- "refs": [
659
- {"ref_type": "doc_path", "ref_value": "chunk:alpha"},
660
- {"ref_type": "code_path", "ref_value": "src/a.py"},
661
- ]
662
- },
663
- )
664
- ],
665
- )
666
-
667
- selected_refs = RowEvaluator._prioritize_synthesis_evidence_refs(
668
- row_id="CL-003:row_2",
669
- requirement_text="",
670
- requirement_guidance=None,
671
- requirement_interpretation=None,
672
- base_refs=["README.md", "docs/a.md"],
673
- loop_result=loop_result,
674
- augmented_refs=["docs/b.md"],
675
- )
676
-
677
- assert selected_refs == ["src/a.py", "chunk:alpha", "docs/a.md", "src/b.py"]
678
-
679
- def test_prioritize_synthesis_evidence_refs_does_not_reappend_seed_refs_after_tool_refs(
680
- self,
681
- monkeypatch: pytest.MonkeyPatch,
682
- ) -> None:
683
- monkeypatch.setenv("VDS_AUDIT_LLM__ROW_MAX_EVIDENCE_REFS", "12")
684
- loop_result = AgentLoopResult(
685
- termination_reason=LoopTerminationReason.COMPLETED,
686
- steps_executed=3,
687
- budget_remaining=8,
688
- elapsed_seconds=0.4,
689
- evidence_refs=["src/wiring/A.java", "attachment://57037192/57037316"],
690
- )
691
-
692
- selected_refs = RowEvaluator._prioritize_synthesis_evidence_refs(
693
- row_id="CL-003:row_2",
694
- requirement_text="",
695
- requirement_guidance=None,
696
- requirement_interpretation=None,
697
- base_refs=[
698
- "README.md",
699
- "KBKT.docx",
700
- "pom.xml",
701
- "attachment://seed-only",
702
- ],
703
- loop_result=loop_result,
704
- augmented_refs=["src/wiring/B.java"],
705
- )
706
-
707
- assert selected_refs == [
708
- "src/wiring/A.java",
709
- "attachment://57037192/57037316",
710
- "src/wiring/B.java",
711
- "README.md",
712
- "KBKT.docx",
713
- "pom.xml",
714
- "attachment://seed-only",
715
- ]
716
-
717
-
718
- class TestTraceBackedAnchorVerification:
719
- """Test trace-backed verification quality for LLM-provided anchors."""
720
-
721
- @staticmethod
722
- def _make_result(anchor: EvidenceAnchor, trace_steps: list[dict[str, object]]) -> RowEvaluationResult:
723
- return RowEvaluationResult(
724
- row_id="CL-001:row_0",
725
- check_id="CL-001",
726
- status=RowStatus.PARTIAL,
727
- score=50.0,
728
- score_breakdown=ScoreBreakdown.compute(raw_score=50.0, coverage=1.0, confidence=1.0),
729
- reason="test",
730
- finding="test",
731
- evidence_anchors=[anchor],
732
- provenance=RowProvenance(
733
- row_llm_mode="selective",
734
- template_hash="template",
735
- evidence_hash="evidence",
736
- ),
737
- retrieval_trace={
738
- "tool_first_loop": {
739
- "trace_steps": trace_steps,
740
- }
741
- },
742
- )
743
-
744
- @staticmethod
745
- def _make_result_from_anchors(
746
- anchors: list[EvidenceAnchor], trace_steps: list[dict[str, object]]
747
- ) -> RowEvaluationResult:
748
- return RowEvaluationResult(
749
- row_id="CL-001:row_0",
750
- check_id="CL-001",
751
- status=RowStatus.PARTIAL,
752
- score=50.0,
753
- score_breakdown=ScoreBreakdown.compute(raw_score=50.0, coverage=1.0, confidence=1.0),
754
- reason="test",
755
- finding="test",
756
- evidence_anchors=anchors,
757
- provenance=RowProvenance(
758
- row_llm_mode="selective",
759
- template_hash="template",
760
- evidence_hash="evidence",
761
- ),
762
- retrieval_trace={
763
- "tool_first_loop": {
764
- "trace_steps": trace_steps,
765
- }
766
- },
767
- )
768
-
769
- def test_trace_verification_accepts_ellipsis_excerpt(self) -> None:
770
- anchor = EvidenceAnchor(
771
- ref_type="code_file",
772
- ref_value="src/service.py",
773
- excerpt="import org.springframework.stereotype.Service; ... @Service @RequiredArgsConstructor",
774
- verified=False,
775
- verification_reason="llm_anchor_provided",
776
- )
777
- trace_steps = [
778
- {
779
- "tool": "read_code_file",
780
- "output": {
781
- "path": "src/service.py",
782
- "content": (
783
- "import org.springframework.stereotype.Service;\n"
784
- "@Service\n"
785
- "@RequiredArgsConstructor\n"
786
- "public class ServiceImpl {}"
787
- ),
788
- },
789
- }
790
- ]
791
-
792
- result = self._make_result(anchor, trace_steps)
793
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
794
- updated_anchor = verified.evidence_anchors[0]
795
-
796
- assert updated_anchor.verified is True
797
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
798
-
799
- def test_trace_verification_marks_mismatch_when_excerpt_missing(self) -> None:
800
- anchor = EvidenceAnchor(
801
- ref_type="code_file",
802
- ref_value="src/service.py",
803
- excerpt="no matching excerpt ... should fail",
804
- verified=False,
805
- verification_reason="llm_anchor_provided",
806
- )
807
- trace_steps = [
808
- {
809
- "tool": "read_code_file",
810
- "output": {
811
- "path": "src/service.py",
812
- "content": (
813
- "import org.springframework.stereotype.Service;\n"
814
- "@Service\n"
815
- "@RequiredArgsConstructor\n"
816
- "public class ServiceImpl {}"
817
- ),
818
- },
819
- }
820
- ]
821
-
822
- result = self._make_result(anchor, trace_steps)
823
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
824
- updated_anchor = verified.evidence_anchors[0]
825
-
826
- assert updated_anchor.verified is False
827
- assert updated_anchor.verification_reason == "excerpt_mismatch_or_unverified"
828
-
829
- def test_trace_verification_recovers_doc_excerpt_from_read_chunk_when_llm_excerpt_mismatches(self) -> None:
830
- anchor = EvidenceAnchor(
831
- ref_type="doc",
832
- ref_value="chunk:abc123",
833
- excerpt="This stale summary does not match the actual chunk content.",
834
- verified=False,
835
- verification_reason="llm_anchor_provided",
836
- )
837
- trace_steps = [
838
- {
839
- "tool": "read_doc_chunk",
840
- "output": {
841
- "ref": "chunk:abc123",
842
- "content": (
843
- "System sizing baseline for DB Maria includes config tables, settings, "
844
- "frequency, and feature flags for CEP services."
845
- ),
846
- },
847
- }
848
- ]
849
-
850
- result = self._make_result(anchor, trace_steps)
851
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
852
- updated_anchor = verified.evidence_anchors[0]
853
-
854
- assert updated_anchor.verified is True
855
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
856
- assert "DB Maria" in updated_anchor.excerpt
857
-
858
- def test_trace_verification_accepts_formatting_only_whitespace_differences_for_code(self) -> None:
859
- anchor = EvidenceAnchor(
860
- ref_type="code_file",
861
- ref_value="src/config/DatabaseConfig.java",
862
- excerpt=(
863
- '@EnableJpaRepositories(entityManagerFactoryRef = "mainEntityManagerFactory", '
864
- 'transactionManagerRef = "mainTransactionManager", basePackages = '
865
- '{"vn.com.viettel.vds.campaign.repository.campaign"})'
866
- ),
867
- verified=False,
868
- verification_reason="llm_anchor_provided",
869
- )
870
- trace_steps = [
871
- {
872
- "tool": "read_code_file",
873
- "output": {
874
- "path": "src/config/DatabaseConfig.java",
875
- "content": (
876
- '@EnableJpaRepositories(entityManagerFactoryRef = "mainEntityManagerFactory",\n'
877
- ' transactionManagerRef = "mainTransactionManager", basePackages = {\n'
878
- ' "vn.com.viettel.vds.campaign.repository.campaign"})\n'
879
- '@EnableJpaAuditing(auditorAwareRef = "auditorProvider")\n'
880
- ),
881
- },
882
- }
883
- ]
884
-
885
- result = self._make_result(anchor, trace_steps)
886
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
887
- updated_anchor = verified.evidence_anchors[0]
888
-
889
- assert updated_anchor.verified is True
890
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
891
-
892
- def test_trace_verification_decodes_escaped_newlines_for_code_excerpt_match(self) -> None:
893
- anchor = EvidenceAnchor(
894
- ref_type="code_file",
895
- ref_value="src/config/DatabaseConfig.java",
896
- excerpt='@Configuration\\n@ConditionalOnProperty(value = "app.datasource.default.enable", havingValue = "true")',
897
- verified=False,
898
- verification_reason="llm_anchor_provided",
899
- )
900
- trace_steps = [
901
- {
902
- "tool": "read_code_file",
903
- "output": {
904
- "path": "src/config/DatabaseConfig.java",
905
- "content": (
906
- "@Configuration\n"
907
- '@ConditionalOnProperty(value = "app.datasource.default.enable", havingValue = "true")\n'
908
- ),
909
- },
910
- }
911
- ]
912
-
913
- result = self._make_result(anchor, trace_steps)
914
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
915
- updated_anchor = verified.evidence_anchors[0]
916
-
917
- assert updated_anchor.verified is True
918
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
919
-
920
- def test_trace_verification_auto_verifies_llm_anchor_without_excerpt(self) -> None:
921
- anchor = EvidenceAnchor(
922
- ref_type="code_file",
923
- ref_value="src/service.py",
924
- excerpt=None,
925
- verified=False,
926
- verification_reason="llm_anchor_provided",
927
- )
928
- trace_steps = [
929
- {
930
- "tool": "read_code_file",
931
- "output": {
932
- "path": "src/service.py",
933
- "content": "class ServiceImpl {}",
934
- },
935
- }
936
- ]
937
-
938
- result = self._make_result(anchor, trace_steps)
939
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
940
- updated_anchor = verified.evidence_anchors[0]
941
-
942
- assert updated_anchor.verified is True
943
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
944
- assert updated_anchor.excerpt == "class ServiceImpl {}"
945
-
946
- def test_trace_verification_auto_verifies_no_excerpt_reason_when_read_content_is_unique(self) -> None:
947
- anchor = EvidenceAnchor(
948
- ref_type="code_file",
949
- ref_value="src/service.py",
950
- excerpt=None,
951
- verified=False,
952
- verification_reason="no_excerpt_to_verify",
953
- )
954
- trace_steps = [
955
- {
956
- "tool": "read_code_file",
957
- "output": {
958
- "path": "src/service.py",
959
- "content": "class ServiceImpl {}",
960
- },
961
- }
962
- ]
963
-
964
- result = self._make_result(anchor, trace_steps)
965
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
966
- updated_anchor = verified.evidence_anchors[0]
967
-
968
- assert updated_anchor.verified is True
969
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
970
- assert updated_anchor.excerpt == "class ServiceImpl {}"
971
-
972
- def test_trace_verification_backfills_code_line_range_from_read_trace(self) -> None:
973
- anchor = EvidenceAnchor(
974
- ref_type="code_path",
975
- ref_value="src/service.py",
976
- excerpt=None,
977
- verified=False,
978
- verification_reason="no_excerpt_to_verify",
979
- )
980
- trace_steps = [
981
- {
982
- "tool": "read_code_file",
983
- "output": {
984
- "path": "src/service.py",
985
- "start_line": 12,
986
- "end_line": 34,
987
- "content": "class ServiceImpl {}",
988
- },
989
- }
990
- ]
991
-
992
- result = self._make_result(anchor, trace_steps)
993
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
994
- updated_anchor = verified.evidence_anchors[0]
995
-
996
- assert updated_anchor.line_range == (12, 34)
997
- assert updated_anchor.verified is True
998
- assert updated_anchor.verification_reason == "excerpt_verified_in_context"
999
-
1000
- def test_trace_verification_keeps_fallback_anchor_unverified_without_excerpt(self) -> None:
1001
- anchor = EvidenceAnchor(
1002
- ref_type="code_file",
1003
- ref_value="src/service.py",
1004
- excerpt=None,
1005
- verified=False,
1006
- verification_reason="fallback_ref_inherited",
1007
- )
1008
- trace_steps = [
1009
- {
1010
- "tool": "read_code_file",
1011
- "output": {
1012
- "path": "src/service.py",
1013
- "content": "class ServiceImpl {}",
1014
- },
1015
- }
1016
- ]
1017
-
1018
- result = self._make_result(anchor, trace_steps)
1019
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
1020
- updated_anchor = verified.evidence_anchors[0]
1021
-
1022
- assert updated_anchor.verified is False
1023
- assert updated_anchor.verification_reason == "no_excerpt_to_verify"
1024
-
1025
- def test_trace_verification_keeps_anchor_unverified_when_read_matches_are_ambiguous(self) -> None:
1026
- anchor = EvidenceAnchor(
1027
- ref_type="code_path",
1028
- ref_value="src/auth/AuthenticationFilter.java",
1029
- excerpt=None,
1030
- verified=False,
1031
- verification_reason="llm_anchor_provided",
1032
- )
1033
- trace_steps = [
1034
- {
1035
- "tool": "read_code_file",
1036
- "output": {
1037
- "path": "a/src/auth/AuthenticationFilter.java",
1038
- "content": "@Component\npublic class AuthenticationFilter {}",
1039
- },
1040
- },
1041
- {
1042
- "tool": "read_code_file",
1043
- "output": {
1044
- "path": "b/src/auth/AuthenticationFilter.java",
1045
- "content": "@Service\npublic class AuthenticationFilter {}",
1046
- },
1047
- },
1048
- ]
1049
-
1050
- result = self._make_result(anchor, trace_steps)
1051
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
1052
- updated_anchor = verified.evidence_anchors[0]
1053
-
1054
- assert updated_anchor.verified is False
1055
- assert updated_anchor.verification_reason == "llm_anchor_provided"
1056
- assert updated_anchor.excerpt is None
1057
-
1058
- def test_trace_verification_prunes_low_signal_unverified_anchors_when_verified_anchor_exists(self) -> None:
1059
- anchors = [
1060
- EvidenceAnchor(
1061
- ref_type="code_path",
1062
- ref_value="src/main.py",
1063
- excerpt="security.enabled=true",
1064
- verified=False,
1065
- verification_reason="llm_anchor_provided",
1066
- ),
1067
- EvidenceAnchor(
1068
- ref_type="code_path",
1069
- ref_value="src/fallback.py",
1070
- excerpt=None,
1071
- verified=False,
1072
- verification_reason="fallback_ref_inherited",
1073
- ),
1074
- EvidenceAnchor(
1075
- ref_type="code_path",
1076
- ref_value="src/other.py",
1077
- excerpt=None,
1078
- verified=False,
1079
- verification_reason="llm_anchor_provided",
1080
- ),
1081
- ]
1082
- trace_steps = [
1083
- {
1084
- "tool": "read_code_file",
1085
- "output": {
1086
- "path": "src/main.py",
1087
- "content": "security.enabled=true\n",
1088
- },
1089
- },
1090
- {
1091
- "tool": "read_code_file",
1092
- "output": {
1093
- "path": "src/fallback.py",
1094
- "content": "class Fallback {}\n",
1095
- },
1096
- },
1097
- {
1098
- "tool": "read_code_file",
1099
- "output": {
1100
- "path": "a/src/other.py",
1101
- "content": "different content A\n",
1102
- },
1103
- },
1104
- {
1105
- "tool": "read_code_file",
1106
- "output": {
1107
- "path": "b/src/other.py",
1108
- "content": "different content B\n",
1109
- },
1110
- },
1111
- ]
1112
-
1113
- result = self._make_result_from_anchors(anchors, trace_steps)
1114
- verified = RowEvaluator._apply_trace_backed_anchor_verification(result)
1115
-
1116
- assert [anchor.ref_value for anchor in verified.evidence_anchors] == ["src/main.py"]
1117
- assert verified.retrieval_trace.get("anchor_pruning", {}).get("dropped_low_signal_anchor_count") == 2
1118
- assert verified.retrieval_trace.get("anchor_pruning", {}).get("policy") == "prefer_verified_decisive_anchors"
1119
-
1120
-
1121
- class TestPhase103GroundingHardGates:
1122
- """Phase 103: strict anchor identity + code-grounding hard gate behavior."""
1123
-
1124
- def test_anchor_identity_contract_reports_invalid_cited_refs(self) -> None:
1125
- result = RowEvaluationResult(
1126
- row_id="CL-004:row_3",
1127
- check_id="CL-004",
1128
- status=RowStatus.PARTIAL,
1129
- score=60.0,
1130
- score_breakdown=ScoreBreakdown.compute(raw_score=60.0),
1131
- reason="test",
1132
- finding="test",
1133
- evidence_anchors=[
1134
- EvidenceAnchor(
1135
- ref_type="code_path",
1136
- ref_value="src/a.py",
1137
- verified=False,
1138
- verification_reason="llm_anchor_provided",
1139
- ),
1140
- EvidenceAnchor(
1141
- ref_type="code_path",
1142
- ref_value="src/unlisted.py",
1143
- verified=False,
1144
- verification_reason="llm_anchor_provided",
1145
- ),
1146
- ],
1147
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1148
- retrieval_trace={"tool_first_loop": {"evidence_refs": ["src/a.py", "docs/runbook.md"]}},
1149
- )
1150
-
1151
- contract = RowEvaluator._build_anchor_identity_contract(result)
1152
-
1153
- assert "src/a.py" in contract["allowed_anchor_ids"]
1154
- assert "src/unlisted.py" in contract["invalid_cited_anchor_ids"]
1155
- assert contract["allowed_count"] == 2
1156
- assert contract["cited_count"] == 2
1157
- assert contract["coverage_ratio"] == 1.0
1158
- assert contract["invalid_count"] == 1
1159
- assert contract["invalid_reason_code"] == "anchor_id_not_allowed"
1160
-
1161
- def test_anchor_identity_contract_accepts_final_cited_refs_not_in_exploratory_set(self) -> None:
1162
- result = RowEvaluationResult(
1163
- row_id="CL-017:row_16",
1164
- check_id="CL-017",
1165
- status=RowStatus.FAIL,
1166
- score=15.0,
1167
- score_breakdown=ScoreBreakdown.compute(raw_score=15.0),
1168
- reason="test",
1169
- finding="test",
1170
- evidence_anchors=[
1171
- EvidenceAnchor(
1172
- ref_type="code_path",
1173
- ref_value="src/config/AppConfig.java",
1174
- verified=False,
1175
- verification_reason="llm_anchor_provided",
1176
- ),
1177
- EvidenceAnchor(
1178
- ref_type="doc",
1179
- ref_value="attachment://25123075/146146420",
1180
- verified=False,
1181
- verification_reason="llm_anchor_provided",
1182
- ),
1183
- ],
1184
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1185
- retrieval_trace={
1186
- "tool_first_loop": {"evidence_refs": ["src/config/AuditorAwareImpl.java", "chunk:abdc897104a4f463"]},
1187
- "evidence_ref_sets": {
1188
- "final_cited_refs": [
1189
- "src/config/AppConfig.java",
1190
- "attachment://25123075/146146420",
1191
- ]
1192
- },
1193
- },
1194
- )
1195
-
1196
- contract = RowEvaluator._build_anchor_identity_contract(result)
1197
-
1198
- assert "src/config/AppConfig.java" in contract["allowed_anchor_ids"]
1199
- assert "attachment://25123075/146146420" in contract["allowed_anchor_ids"]
1200
- assert contract["invalid_cited_anchor_ids"] == []
1201
- assert contract["invalid_count"] == 0
1202
- assert contract["invalid_reason_code"] is False
1203
-
1204
- def test_anchor_identity_contract_ignores_internal_analysis_refs(self) -> None:
1205
- result = RowEvaluationResult(
1206
- row_id="CL-031:row_30",
1207
- check_id="CL-031",
1208
- status=RowStatus.ERROR,
1209
- score=0.0,
1210
- score_breakdown=ScoreBreakdown.compute(raw_score=0.0),
1211
- reason="test",
1212
- finding="test",
1213
- evidence_anchors=[
1214
- EvidenceAnchor(
1215
- ref_type="confluence_chunk",
1216
- ref_value="chunk:6eb413f3e9764797",
1217
- verified=False,
1218
- verification_reason="fallback_ref_inherited",
1219
- ),
1220
- EvidenceAnchor(
1221
- ref_type="confluence_url",
1222
- ref_value="http://confluence.digital.vn/display/TTCN24/PAR+Project+Audit",
1223
- verified=False,
1224
- verification_reason="fallback_ref_inherited",
1225
- ),
1226
- EvidenceAnchor(
1227
- ref_type="doc_path",
1228
- ref_value="references/row-analysis.md",
1229
- verified=False,
1230
- verification_reason="fallback_ref_inherited",
1231
- ),
1232
- ],
1233
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1234
- retrieval_trace={
1235
- "tool_first_loop": {
1236
- "evidence_refs": [
1237
- "src/main/java/vn/com/viettel/vds/merchantbilling/core/domain/dto/UserInfoDto.java",
1238
- "chunk:6eb413f3e9764797",
1239
- ]
1240
- },
1241
- "evidence_ref_sets": {
1242
- "final_cited_refs": [
1243
- "chunk:6eb413f3e9764797",
1244
- "http://confluence.digital.vn/display/TTCN24/PAR+Project+Audit",
1245
- "references/row-analysis.md",
1246
- ]
1247
- },
1248
- },
1249
- )
1250
-
1251
- contract = RowEvaluator._build_anchor_identity_contract(result)
1252
-
1253
- assert contract["cited_anchor_ids"] == ["chunk:6eb413f3e9764797"]
1254
- assert contract["invalid_cited_anchor_ids"] == []
1255
- assert contract["invalid_count"] == 0
1256
- assert contract["invalid_reason_code"] is False
1257
-
1258
- def test_code_grounding_hard_gate_forces_error_when_verified_ratio_zero(self) -> None:
1259
- result = RowEvaluationResult(
1260
- row_id="CL-004:row_3",
1261
- check_id="CL-004",
1262
- status=RowStatus.PARTIAL,
1263
- score=55.0,
1264
- score_breakdown=ScoreBreakdown.compute(raw_score=55.0),
1265
- reason="test",
1266
- finding="test",
1267
- evidence_anchors=[
1268
- EvidenceAnchor(
1269
- ref_type="code_path",
1270
- ref_value="src/config/database.py",
1271
- excerpt=None,
1272
- verified=False,
1273
- verification_reason="llm_anchor_provided",
1274
- )
1275
- ],
1276
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1277
- retrieval_trace={},
1278
- )
1279
- coverage = RowEvaluator._build_row_verification_coverage(result.evidence_anchors)
1280
-
1281
- gated = RowEvaluator._apply_code_grounding_hard_gate(
1282
- result=result,
1283
- verification_coverage=coverage,
1284
- requirement_interpretation={"code_target": True},
1285
- )
1286
-
1287
- assert gated.status == RowStatus.ERROR
1288
- assert gated.error_message == "analysis_breakdown_excerpt_discipline"
1289
- assert gated.score == 0.0
1290
- assert isinstance(gated.retrieval_trace, dict)
1291
- assert gated.retrieval_trace.get("code_grounding_hard_gate", {}).get("applied") is True
1292
- assert gated.retrieval_trace.get("tooling_error_event", {}).get("event") == "pre_output_grounding_guard"
1293
- assert (
1294
- gated.retrieval_trace.get("tooling_error_event", {}).get("reason_code")
1295
- == "analysis_breakdown_excerpt_discipline"
1296
- )
1297
- assert (
1298
- gated.retrieval_trace.get("tooling_error_event", {}).get("trigger")
1299
- == "excerpt_discipline_zero_verified_code"
1300
- )
1301
- assert gated.retrieval_trace.get("code_grounding_hard_gate", {}).get("missing_excerpt_count") == 1
1302
- assert gated.retrieval_trace.get("code_grounding_hard_gate", {}).get("mismatched_excerpt_count") == 0
1303
-
1304
- def test_code_grounding_hard_gate_uses_excerpt_discipline_for_mismatch_breakdown(self) -> None:
1305
- result = RowEvaluationResult(
1306
- row_id="CL-004:row_3",
1307
- check_id="CL-004",
1308
- status=RowStatus.PARTIAL,
1309
- score=55.0,
1310
- score_breakdown=ScoreBreakdown.compute(raw_score=55.0),
1311
- reason="test",
1312
- finding="test",
1313
- evidence_anchors=[
1314
- EvidenceAnchor(
1315
- ref_type="code_path",
1316
- ref_value="src/config/database.py",
1317
- excerpt="DataSource bean",
1318
- verified=False,
1319
- verification_reason="excerpt_mismatch_or_unverified",
1320
- )
1321
- ],
1322
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1323
- retrieval_trace={},
1324
- )
1325
- coverage = RowEvaluator._build_row_verification_coverage(result.evidence_anchors)
1326
-
1327
- gated = RowEvaluator._apply_code_grounding_hard_gate(
1328
- result=result,
1329
- verification_coverage=coverage,
1330
- requirement_interpretation={"code_target": True},
1331
- )
1332
-
1333
- assert gated.status == RowStatus.ERROR
1334
- assert gated.error_message == "analysis_breakdown_excerpt_discipline"
1335
- assert gated.retrieval_trace.get("code_grounding_hard_gate", {}).get("mismatched_excerpt_count") == 1
1336
-
1337
- def test_code_grounding_hard_gate_downgrades_code_only_excerpt_collapse_to_fail(self) -> None:
1338
- result = RowEvaluationResult(
1339
- row_id="CL-032:row_31",
1340
- check_id="CL-032",
1341
- status=RowStatus.PARTIAL,
1342
- score=55.0,
1343
- score_breakdown=ScoreBreakdown.compute(raw_score=55.0),
1344
- reason="test",
1345
- finding="test",
1346
- evidence_anchors=[
1347
- EvidenceAnchor(
1348
- ref_type="code_path",
1349
- ref_value="src/config/app.py",
1350
- excerpt="mismatch excerpt",
1351
- verified=False,
1352
- verification_reason="excerpt_mismatch_or_unverified",
1353
- )
1354
- ],
1355
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1356
- retrieval_trace={
1357
- "route_mode": "code_only",
1358
- "tool_first_loop": {
1359
- "route_mode": "code_only",
1360
- "code_search_count": 1,
1361
- "code_read_count": 1,
1362
- "docs_search_count": 0,
1363
- "docs_read_count": 0,
1364
- },
1365
- },
1366
- )
1367
- coverage = RowEvaluator._build_row_verification_coverage(result.evidence_anchors)
1368
-
1369
- gated = RowEvaluator._apply_code_grounding_hard_gate(
1370
- result=result,
1371
- verification_coverage=coverage,
1372
- requirement_interpretation={"code_target": True},
1373
- )
1374
-
1375
- assert gated.status == RowStatus.FAIL
1376
- assert gated.score == 9.0
1377
- assert gated.error_message is None
1378
- assert gated.retry_metadata["reason_code"] == "analysis_breakdown_excerpt_discipline"
1379
- assert gated.retrieval_trace.get("code_only_quality_floor", {}).get("applied") is True
1380
- assert gated.retrieval_trace.get("code_grounding_hard_gate", {}).get("downgraded_to_fail") is True
1381
-
1382
- def test_code_grounding_hard_gate_downgrades_code_required_excerpt_collapse_to_fail(self) -> None:
1383
- result = RowEvaluationResult(
1384
- row_id="CL-004:row_3",
1385
- check_id="CL-004",
1386
- status=RowStatus.PARTIAL,
1387
- score=55.0,
1388
- score_breakdown=ScoreBreakdown.compute(raw_score=55.0),
1389
- reason="test",
1390
- finding="test",
1391
- evidence_anchors=[
1392
- EvidenceAnchor(
1393
- ref_type="code_path",
1394
- ref_value="src/main/java/com/example/DatabaseConfig.java",
1395
- excerpt="mismatch excerpt",
1396
- verified=False,
1397
- verification_reason="excerpt_mismatch_or_unverified",
1398
- )
1399
- ],
1400
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1401
- retrieval_trace={
1402
- "route_mode": "hybrid_code_first",
1403
- "tool_first_loop": {
1404
- "route_mode": "hybrid_code_first",
1405
- "code_search_count": 1,
1406
- "code_read_count": 1,
1407
- "docs_search_count": 1,
1408
- "docs_read_count": 1,
1409
- },
1410
- "requirement_analysis": {
1411
- "analysis_mode": "hybrid_balanced",
1412
- "required_anchor_modalities": ["code", "docs"],
1413
- },
1414
- },
1415
- )
1416
- coverage = RowEvaluator._build_row_verification_coverage(result.evidence_anchors)
1417
-
1418
- gated = RowEvaluator._apply_code_grounding_hard_gate(
1419
- result=result,
1420
- verification_coverage=coverage,
1421
- requirement_interpretation={"code_target": True},
1422
- )
1423
-
1424
- assert gated.status == RowStatus.FAIL
1425
- assert gated.score == 9.0
1426
- assert gated.error_message is None
1427
- assert gated.retry_metadata["reason_code"] == "analysis_breakdown_excerpt_discipline"
1428
- assert gated.retrieval_trace.get("code_required_quality_floor", {}).get("applied") is True
1429
- assert gated.retrieval_trace.get("code_grounding_hard_gate", {}).get("downgraded_to_fail") is True
1430
-
1431
- def test_excerpt_discipline_provisional_filter_marks_missing_excerpt_without_reason(self) -> None:
1432
- result = RowEvaluationResult(
1433
- row_id="CL-004:row_9",
1434
- check_id="CL-004",
1435
- status=RowStatus.PARTIAL,
1436
- score=55.0,
1437
- score_breakdown=ScoreBreakdown.compute(raw_score=55.0),
1438
- reason="test",
1439
- finding="test",
1440
- evidence_anchors=[
1441
- EvidenceAnchor(
1442
- ref_type="code_path",
1443
- ref_value="src/config/database.py",
1444
- excerpt=None,
1445
- verified=True,
1446
- verification_reason="llm_anchor_provided",
1447
- )
1448
- ],
1449
- provenance=RowProvenance(row_llm_mode="selective", template_hash="t", evidence_hash="e"),
1450
- retrieval_trace={},
1451
- )
1452
-
1453
- filtered, diagnostics = RowEvaluator._apply_excerpt_discipline_provisional_filter(result)
1454
-
1455
- assert diagnostics["applied"] is True
1456
- assert diagnostics["provisional_anchor_count"] == 1
1457
- assert "src/config/database.py" in diagnostics["provisional_anchor_ids"]
1458
- anchor = filtered.evidence_anchors[0]
1459
- assert anchor.verified is False
1460
- assert anchor.verification_reason == "provisional_no_excerpt"
1461
- assert anchor.excerpt_unavailable_reason == "excerpt_not_provided"
1462
-
1463
- def test_recover_anchor_excerpt_from_same_file_multi_read_content(self) -> None:
1464
- excerpt = RowEvaluator._recover_anchor_excerpt_from_read_content(
1465
- anchor_ref="src/main/java/com/example/DatabaseConfig.java",
1466
- ref_type="code_path",
1467
- matched_contents=[
1468
- "package com.example;\n@Configuration\npublic class DatabaseConfig {\n",
1469
- "@Bean\npublic DataSource campaignDataSource() {\n return null;\n}\n",
1470
- ],
1471
- )
1472
-
1473
- assert excerpt
1474
- assert "DatabaseConfig" in excerpt or "campaignDataSource" in excerpt
1475
-
1476
- def test_citation_precision_prefers_substantive_code_anchor_for_code_only(self) -> None:
1477
- result = RowEvaluationResult(
1478
- row_id="CL-032:row_31",
1479
- check_id="CL-032",
1480
- status=RowStatus.FAIL,
1481
- score=9.0,
1482
- score_breakdown=ScoreBreakdown.compute(raw_score=9.0),
1483
- reason="Đọc code nhưng anchor cuối cùng chỉ còn file generic.",
1484
- finding="Evidence yếu.",
1485
- evidence_anchors=[
1486
- EvidenceAnchor(
1487
- ref_type="code_path",
1488
- ref_value="pom.xml",
1489
- excerpt="<artifactId>campaign-noti-outbound-service</artifactId>",
1490
- verified=True,
1491
- verification_reason="excerpt_verified_in_context",
1492
- ),
1493
- EvidenceAnchor(
1494
- ref_type="code_path",
1495
- ref_value="src/main/java/vn/com/viettel/vds/campaign/inapp/config/database/ElasticsearchClientConfig.java",
1496
- excerpt="public class ElasticsearchClientConfig {",
1497
- verified=True,
1498
- verification_reason="excerpt_verified_in_context",
1499
- line_range=(1, 220),
1500
- ),
1501
- ],
1502
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1503
- retrieval_trace={
1504
- "route_mode": "code_only",
1505
- "tool_first_loop": {
1506
- "route_mode": "code_only",
1507
- "code_search_count": 1,
1508
- "code_read_count": 3,
1509
- "docs_search_count": 0,
1510
- "docs_read_count": 0,
1511
- },
1512
- "evidence_ref_sets": {
1513
- "final_cited_refs": ["pom.xml"],
1514
- "final_cited_ref_count": 1,
1515
- "citation_retention_rate": 0.3333,
1516
- },
1517
- },
1518
- )
1519
-
1520
- filtered = RowEvaluator._apply_citation_precision_filter(result)
1521
-
1522
- refs = [anchor.ref_value for anchor in filtered.evidence_anchors]
1523
- assert "src/main/java/vn/com/viettel/vds/campaign/inapp/config/database/ElasticsearchClientConfig.java" in refs
1524
- assert "pom.xml" not in refs
1525
- assert "prefer_substantive_code_anchor_for_code_only" in str(
1526
- filtered.retrieval_trace.get("evidence_ref_sets", {}).get("citation_precision_filter_reason", "")
1527
- ) or "replace_generic_code_anchor_for_code_only" in str(
1528
- filtered.retrieval_trace.get("evidence_ref_sets", {}).get("citation_precision_filter_reason", "")
1529
- )
1530
-
1531
- def test_citation_precision_drops_docs_modality_for_code_only_when_substantive_code_exists(self) -> None:
1532
- result = RowEvaluationResult(
1533
- row_id="CL-033:row_32",
1534
- check_id="CL-033",
1535
- status=RowStatus.FAIL,
1536
- score=12.0,
1537
- score_breakdown=ScoreBreakdown.compute(raw_score=12.0),
1538
- reason="Reasoning-linked citation filter reintroduced a docs-style anchor.",
1539
- finding="Code-first evidence degraded to generic refs.",
1540
- evidence_anchors=[
1541
- EvidenceAnchor(
1542
- ref_type="code_path",
1543
- ref_value="pom.xml",
1544
- excerpt="<artifactId>campaign-noti-outbound-service</artifactId>",
1545
- verified=True,
1546
- verification_reason="excerpt_verified_in_context",
1547
- ),
1548
- EvidenceAnchor(
1549
- ref_type="url",
1550
- ref_value="https://confluence.example.local/pages/viewpage.action?pageId=123",
1551
- excerpt="Deployment note",
1552
- verified=True,
1553
- verification_reason="excerpt_verified_in_context",
1554
- ),
1555
- EvidenceAnchor(
1556
- ref_type="code_path",
1557
- ref_value="src/main/java/vn/com/viettel/vds/campaign/inapp/config/database/ElasticsearchClientConfig.java",
1558
- excerpt="public class ElasticsearchClientConfig {",
1559
- verified=True,
1560
- verification_reason="excerpt_verified_in_context",
1561
- line_range=(1, 220),
1562
- ),
1563
- ],
1564
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1565
- retrieval_trace={
1566
- "route_mode": "code_only",
1567
- "tool_first_loop": {
1568
- "route_mode": "code_only",
1569
- "code_search_count": 1,
1570
- "code_read_count": 2,
1571
- "docs_search_count": 0,
1572
- "docs_read_count": 0,
1573
- },
1574
- "evidence_ref_sets": {
1575
- "citation_precision_filter_reason": "reasoning_linked_refs|preserve_docs_modality",
1576
- "final_cited_refs": [
1577
- "pom.xml",
1578
- "https://confluence.example.local/pages/viewpage.action?pageId=123",
1579
- ],
1580
- "final_cited_ref_count": 2,
1581
- "citation_retention_rate": 0.6667,
1582
- },
1583
- },
1584
- )
1585
-
1586
- filtered = RowEvaluator._apply_citation_precision_filter(result)
1587
-
1588
- refs = [anchor.ref_value for anchor in filtered.evidence_anchors]
1589
- assert "src/main/java/vn/com/viettel/vds/campaign/inapp/config/database/ElasticsearchClientConfig.java" in refs
1590
- assert "https://confluence.example.local/pages/viewpage.action?pageId=123" not in refs
1591
- assert "drop_docs_modality_for_code_only_with_substantive_code" in str(
1592
- filtered.retrieval_trace.get("evidence_ref_sets", {}).get("citation_precision_filter_reason", "")
1593
- )
1594
-
1595
- def test_citation_precision_replaces_generic_code_anchor_after_reasoning_link_for_code_only(self) -> None:
1596
- result = RowEvaluationResult(
1597
- row_id="CL-036:row_35",
1598
- check_id="CL-036",
1599
- status=RowStatus.FAIL,
1600
- score=9.0,
1601
- score_breakdown=ScoreBreakdown.compute(raw_score=9.0),
1602
- reason="The final cited file was pom.xml.",
1603
- finding="pom.xml was cited instead of ElasticsearchClientConfig.java.",
1604
- evidence_anchors=[
1605
- EvidenceAnchor(
1606
- ref_type="code_path",
1607
- ref_value="pom.xml",
1608
- excerpt="<artifactId>campaign-noti-outbound-service</artifactId>",
1609
- verified=True,
1610
- verification_reason="excerpt_verified_in_context",
1611
- ),
1612
- EvidenceAnchor(
1613
- ref_type="code_path",
1614
- ref_value="src/main/java/vn/com/viettel/vds/campaign/inapp/config/database/ElasticsearchClientConfig.java",
1615
- excerpt="public class ElasticsearchClientConfig {",
1616
- verified=True,
1617
- verification_reason="excerpt_verified_in_context",
1618
- line_range=(1, 220),
1619
- ),
1620
- EvidenceAnchor(
1621
- ref_type="code_path",
1622
- ref_value="src/main/java/vn/com/viettel/vds/campaign/inapp/dto/request/FCMDataDTO.java",
1623
- excerpt="public class FCMDataDTO {",
1624
- verified=True,
1625
- verification_reason="excerpt_verified_in_context",
1626
- line_range=(1, 120),
1627
- ),
1628
- ],
1629
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1630
- retrieval_trace={
1631
- "route_mode": "code_only",
1632
- "tool_first_loop": {
1633
- "route_mode": "code_only",
1634
- "code_search_count": 1,
1635
- "code_read_count": 3,
1636
- "docs_search_count": 0,
1637
- "docs_read_count": 0,
1638
- },
1639
- "evidence_ref_sets": {
1640
- "citation_precision_filter_reason": "reasoning_linked_refs",
1641
- },
1642
- },
1643
- )
1644
-
1645
- filtered = RowEvaluator._apply_citation_precision_filter(result)
1646
-
1647
- refs = [anchor.ref_value for anchor in filtered.evidence_anchors]
1648
- assert "pom.xml" not in refs
1649
- assert (
1650
- "src/main/java/vn/com/viettel/vds/campaign/inapp/config/database/ElasticsearchClientConfig.java" in refs
1651
- or "src/main/java/vn/com/viettel/vds/campaign/inapp/dto/request/FCMDataDTO.java" in refs
1652
- )
1653
- assert "replace_generic_code_anchor_for_code_only" in str(
1654
- filtered.retrieval_trace.get("evidence_ref_sets", {}).get("citation_precision_filter_reason", "")
1655
- )
1656
-
1657
- def test_citation_precision_replaces_generic_code_anchor_for_mixed_requirement_analysis(self) -> None:
1658
- result = RowEvaluationResult(
1659
- row_id="CL-003:row_2",
1660
- check_id="CL-003",
1661
- status=RowStatus.FAIL,
1662
- score=19.5,
1663
- score_breakdown=ScoreBreakdown.compute(raw_score=25.0),
1664
- reason="The final cited file was pom.xml even though AppConfig.java was read.",
1665
- finding="Dependency-graph evidence degraded to generic metadata.",
1666
- evidence_anchors=[
1667
- EvidenceAnchor(
1668
- ref_type="code_path",
1669
- ref_value="pom.xml",
1670
- excerpt="<artifactId>arch-grpc-test-client</artifactId>",
1671
- verified=True,
1672
- verification_reason="excerpt_verified_in_context",
1673
- ),
1674
- EvidenceAnchor(
1675
- ref_type="code_path",
1676
- ref_value="src/main/java/vn/com/viettel/vds/campaign/config/application/AppConfig.java",
1677
- excerpt="public class AppConfig {",
1678
- verified=True,
1679
- verification_reason="excerpt_verified_in_context",
1680
- line_range=(1, 220),
1681
- ),
1682
- EvidenceAnchor(
1683
- ref_type="url",
1684
- ref_value="https://confluence.example.local/pages/viewpage.action?pageId=25123685",
1685
- excerpt="Architecture note",
1686
- verified=True,
1687
- verification_reason="excerpt_verified_in_context",
1688
- ),
1689
- ],
1690
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1691
- retrieval_trace={
1692
- "tool_first_loop": {
1693
- "route_mode": "hybrid_code_first",
1694
- "code_search_count": 1,
1695
- "code_read_count": 1,
1696
- "docs_search_count": 1,
1697
- "docs_read_count": 1,
1698
- "requirement_analysis": {
1699
- "analysis_mode": "hybrid_balanced",
1700
- "analysis_reason_codes": [
1701
- "evidence_target_docs",
1702
- "evidence_target_code",
1703
- "substantive_source_candidate_present",
1704
- "mixed_modalities_required",
1705
- ],
1706
- "required_anchor_modalities": ["code", "docs"],
1707
- "generic_anchor_exemption": False,
1708
- "minimum_substantive_code_anchors": 1,
1709
- "finalization_policy": "mixed_modalities_preserve_strong_code",
1710
- },
1711
- },
1712
- "evidence_ref_sets": {
1713
- "citation_precision_filter_reason": "reasoning_linked_refs|preserve_docs_modality",
1714
- "final_cited_refs": [
1715
- "pom.xml",
1716
- "https://confluence.example.local/pages/viewpage.action?pageId=25123685",
1717
- ],
1718
- "final_cited_ref_count": 2,
1719
- "citation_retention_rate": 1.0,
1720
- },
1721
- },
1722
- )
1723
-
1724
- filtered = RowEvaluator._apply_citation_precision_filter(result)
1725
-
1726
- refs = [anchor.ref_value for anchor in filtered.evidence_anchors]
1727
- assert refs[0] == "src/main/java/vn/com/viettel/vds/campaign/config/application/AppConfig.java"
1728
- assert "pom.xml" not in refs
1729
- reasons = str(filtered.retrieval_trace.get("evidence_ref_sets", {}).get("citation_precision_filter_reason", ""))
1730
- assert "replace_generic_code_anchor_for_requirement_analysis" in reasons
1731
- assert "prioritize_substantive_code_anchor_for_requirement_analysis" in reasons
1732
-
1733
- def test_finalize_result_downgrades_code_only_anchor_allowlist_violation_to_fail(
1734
- self,
1735
- sample_audit_template,
1736
- ) -> None:
1737
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
1738
- base_result = RowEvaluationResult(
1739
- row_id="CL-049:row_48",
1740
- check_id="CL-049",
1741
- status=RowStatus.PARTIAL,
1742
- score=61.0,
1743
- score_breakdown=ScoreBreakdown.compute(raw_score=61.0),
1744
- reason="test",
1745
- finding="test",
1746
- evidence_anchors=[
1747
- EvidenceAnchor(
1748
- ref_type="code_path",
1749
- ref_value="README.md",
1750
- verified=False,
1751
- verification_reason="no_excerpt_to_verify",
1752
- )
1753
- ],
1754
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1755
- retrieval_trace={
1756
- "route_mode": "code_only",
1757
- "tool_first_loop": {
1758
- "route_mode": "code_only",
1759
- "code_search_count": 1,
1760
- "code_read_count": 1,
1761
- "docs_search_count": 0,
1762
- "docs_read_count": 0,
1763
- "evidence_refs": ["src/security/AuthConfig.java"],
1764
- },
1765
- },
1766
- )
1767
-
1768
- finalized = evaluator._finalize_result(base_result)
1769
-
1770
- assert finalized.status == RowStatus.FAIL
1771
- assert finalized.score == 9.0
1772
- assert finalized.error_message is None
1773
- assert finalized.retry_metadata["reason_code"] == "anchor_allowlist_violation"
1774
- assert finalized.retrieval_trace.get("code_only_quality_floor", {}).get("applied") is True
1775
-
1776
- def test_finalize_result_downgrades_code_required_allowlist_violation_to_fail(
1777
- self,
1778
- sample_audit_template,
1779
- ) -> None:
1780
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
1781
- base_result = RowEvaluationResult(
1782
- row_id="CL-017:row_16",
1783
- check_id="CL-017",
1784
- status=RowStatus.PARTIAL,
1785
- score=63.0,
1786
- score_breakdown=ScoreBreakdown.compute(raw_score=63.0),
1787
- reason="test",
1788
- finding="test",
1789
- evidence_anchors=[
1790
- EvidenceAnchor(
1791
- ref_type="code_path",
1792
- ref_value="attachment://123/456",
1793
- excerpt="public class PushDataToKafkaUtils {",
1794
- verified=True,
1795
- verification_reason="llm_anchor_provided",
1796
- line_range=(1, 220),
1797
- )
1798
- ],
1799
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1800
- retrieval_trace={
1801
- "requirement_analysis": {
1802
- "analysis_mode": "hybrid_balanced",
1803
- "analysis_reason_codes": ["decoupling_config_split_row"],
1804
- "required_anchor_modalities": ["code", "docs"],
1805
- "generic_anchor_exemption": False,
1806
- "minimum_substantive_code_anchors": 1,
1807
- "finalization_policy": "mixed_modalities_preserve_strong_code",
1808
- },
1809
- "analysis_mode": "hybrid_balanced",
1810
- "required_anchor_modalities": ["code", "docs"],
1811
- "finalization_policy": "mixed_modalities_preserve_strong_code",
1812
- "route_mode": "hybrid_code_first",
1813
- "tool_first_loop": {
1814
- "route_mode": "hybrid_code_first",
1815
- "code_search_count": 2,
1816
- "code_read_count": 2,
1817
- "docs_search_count": 1,
1818
- "docs_read_count": 1,
1819
- "evidence_refs": [
1820
- "src/main/java/vn/com/viettel/vds/campaign/config/kafka/PushDataToKafkaUtils.java",
1821
- "src/main/java/vn/com/viettel/vds/campaign/config/database/CampaignDBConfig.java",
1822
- ],
1823
- },
1824
- "evidence_ref_sets": {
1825
- "exploratory_refs": [
1826
- "src/main/java/vn/com/viettel/vds/campaign/config/kafka/PushDataToKafkaUtils.java",
1827
- "src/main/java/vn/com/viettel/vds/campaign/config/database/CampaignDBConfig.java",
1828
- ]
1829
- },
1830
- },
1831
- )
1832
-
1833
- finalized = evaluator._finalize_result(base_result)
1834
-
1835
- assert finalized.status == RowStatus.FAIL
1836
- assert finalized.score == 9.0
1837
- assert finalized.error_message is None
1838
- assert finalized.retry_metadata["reason_code"] == "anchor_allowlist_violation"
1839
- assert finalized.retrieval_trace.get("code_required_quality_floor", {}).get("applied") is True
1840
-
1841
- def test_finalize_result_clears_stale_allowlist_fail_when_verified_anchors_become_compliant(
1842
- self,
1843
- sample_audit_template,
1844
- ) -> None:
1845
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
1846
- base_result = RowEvaluationResult(
1847
- row_id="CL-001:row_0",
1848
- check_id="CL-001",
1849
- status=RowStatus.FAIL,
1850
- score=9.0,
1851
- score_breakdown=ScoreBreakdown.compute(raw_score=9.0),
1852
- reason="Đã đọc bằng chứng code nhưng các anchor cuối cùng không khớp allowlist của nguồn đã đọc.",
1853
- finding="Cần trích dẫn lại trực tiếp từ file code đã đọc; anchor cuối cùng hiện không nằm trong exploratory allowlist nên bị loại bỏ.",
1854
- evidence_anchors=[
1855
- EvidenceAnchor(
1856
- ref_type="code_path",
1857
- ref_value="src/main/java/com/example/config/DatabaseConfig.java",
1858
- excerpt="public class DatabaseConfig {}",
1859
- verified=True,
1860
- verification_reason="excerpt_verified_in_context",
1861
- line_range=(1, 120),
1862
- )
1863
- ],
1864
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1865
- retry_metadata={
1866
- "stage": "anchor_allowlist_filter",
1867
- "failure_stage": "synthesis",
1868
- "reason_code": "anchor_allowlist_violation",
1869
- "downgraded_from_error_to_fail": True,
1870
- },
1871
- retrieval_trace={
1872
- "code_only_quality_floor": {
1873
- "applied": True,
1874
- "reason_code": "anchor_allowlist_violation",
1875
- "downgraded_from_error_to_fail": True,
1876
- "score_floor": 9.0,
1877
- }
1878
- },
1879
- )
1880
-
1881
- cleared = evaluator._clear_stale_anchor_allowlist_failure(
1882
- result=base_result,
1883
- anchor_identity_contract={
1884
- "invalid_count": 0,
1885
- "allowed_anchor_ids": ["src/main/java/com/example/config/DatabaseConfig.java"],
1886
- "cited_anchor_ids": ["src/main/java/com/example/config/DatabaseConfig.java"],
1887
- },
1888
- )
1889
-
1890
- assert cleared.status == RowStatus.PARTIAL
1891
- assert cleared.score == 60.0
1892
- assert cleared.error_message is None
1893
- assert cleared.retry_metadata is None
1894
- assert cleared.retrieval_trace.get("anchor_allowlist_reconciled", {}).get("applied") is True
1895
- assert "Allowlist đã được reconcile" in str(cleared.finding)
1896
-
1897
- def test_finalize_result_marks_authoritative_skill_as_final_result_source(
1898
- self,
1899
- sample_audit_template,
1900
- ) -> None:
1901
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
1902
- base_result = RowEvaluationResult(
1903
- row_id="CL-007:row_6",
1904
- check_id="CL-007",
1905
- status=RowStatus.FAIL,
1906
- score=82.0,
1907
- score_breakdown=ScoreBreakdown.compute(raw_score=82.0),
1908
- reason="Skill result found decisive migration evidence.",
1909
- finding="Migration assets are present and authoritative.",
1910
- evidence_anchors=[
1911
- EvidenceAnchor(
1912
- ref_type="code_path",
1913
- ref_value="src/main/resources/db/changelog.xml",
1914
- excerpt="<databaseChangeLog>",
1915
- verified=True,
1916
- verification_reason="excerpt_verified_in_context",
1917
- )
1918
- ],
1919
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1920
- retrieval_trace={
1921
- "requirement_analysis": {
1922
- "strict_single_skill_only": True,
1923
- },
1924
- "tool_first_loop": {
1925
- "skill_execution_effective_call_count": 1,
1926
- "trace_steps": [
1927
- {
1928
- "tool": "read_skill_resource",
1929
- "output": {"success": True, "name": "migration-script-detection-skill"},
1930
- },
1931
- {
1932
- "tool": "record_evidence_refs",
1933
- "output": {
1934
- "refs": [
1935
- {
1936
- "ref_type": "code_path",
1937
- "ref_value": "src/main/resources/db/changelog.xml",
1938
- "verified": True,
1939
- }
1940
- ]
1941
- },
1942
- },
1943
- ],
1944
- },
1945
- "authoritative_skill_finalization": {
1946
- "applied": True,
1947
- "recorded_ref_count": 1,
1948
- "strict_single_skill_only": True,
1949
- },
1950
- "final_result_source": "authoritative_skill",
1951
- "failure_diagnostics": {
1952
- "failure_stage": "synthesis",
1953
- "reason_code": "provider_transient_error",
1954
- },
1955
- },
1956
- retry_metadata={
1957
- "failure_stage": "synthesis",
1958
- "reason_code": "provider_transient_error",
1959
- },
1960
- )
1961
-
1962
- finalized = evaluator._finalize_result(base_result)
1963
-
1964
- assert finalized.retrieval_trace.get("final_result_source") == "authoritative_skill"
1965
- assert finalized.retrieval_trace.get("authoritative_skill_finalization", {}).get("applied") is True
1966
- assert finalized.retry_metadata is None
1967
-
1968
- def test_clear_stale_allowlist_failure_accepts_authoritative_skill_finalization_without_verified_refs(
1969
- self,
1970
- sample_audit_template,
1971
- ) -> None:
1972
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
1973
- base_result = RowEvaluationResult(
1974
- row_id="CL-003:row_2",
1975
- check_id="CL-003",
1976
- status=RowStatus.FAIL,
1977
- score=9.0,
1978
- score_breakdown=ScoreBreakdown.compute(raw_score=9.0),
1979
- reason="stale allowlist failure",
1980
- finding="weak generic finding",
1981
- evidence_anchors=[],
1982
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
1983
- retry_metadata={
1984
- "failure_stage": "synthesis",
1985
- "stage": "anchor_allowlist_filter",
1986
- "reason_code": "anchor_allowlist_violation",
1987
- },
1988
- retrieval_trace={
1989
- "final_result_source": "authoritative_skill",
1990
- },
1991
- )
1992
-
1993
- cleared = evaluator._clear_stale_anchor_allowlist_failure(
1994
- result=base_result,
1995
- anchor_identity_contract={"invalid_count": 0},
1996
- )
1997
-
1998
- assert cleared.retrieval_trace.get("anchor_allowlist_reconciled", {}).get("applied") is True
1999
-
2000
- def test_finalize_result_downgrades_docs_primary_allowlist_violation_to_partial(
2001
- self,
2002
- sample_audit_template,
2003
- ) -> None:
2004
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
2005
- base_result = RowEvaluationResult(
2006
- row_id="CL-052:row_51",
2007
- check_id="CL-052",
2008
- status=RowStatus.FAIL,
2009
- score=65.0,
2010
- score_breakdown=ScoreBreakdown.compute(raw_score=65.0),
2011
- reason="test",
2012
- finding="test",
2013
- evidence_anchors=[
2014
- EvidenceAnchor(
2015
- ref_type="code_path",
2016
- ref_value="src/main/java/com/example/Dto.java",
2017
- excerpt="public class Dto {}",
2018
- verified=True,
2019
- verification_reason="excerpt_verified_in_context",
2020
- )
2021
- ],
2022
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2023
- retrieval_trace={
2024
- "requirement_analysis": {
2025
- "analysis_mode": "docs_first",
2026
- "required_anchor_modalities": ["docs"],
2027
- "finalization_policy": "docs_primary",
2028
- },
2029
- "required_anchor_modalities": ["docs"],
2030
- "finalization_policy": "docs_primary",
2031
- "evidence_ref_sets": {
2032
- "exploratory_refs": ["https://confluence.local/pages/viewpage.action?pageId=1"],
2033
- "final_cited_refs": ["src/main/java/com/example/Dto.java"],
2034
- },
2035
- },
2036
- )
2037
-
2038
- finalized = evaluator._finalize_result(base_result)
2039
-
2040
- assert finalized.status == RowStatus.PARTIAL
2041
- assert finalized.score > 0.0
2042
- assert finalized.error_message is None
2043
- assert finalized.retry_metadata["reason_code"] in {
2044
- "anchor_allowlist_violation",
2045
- "evidence_shortfall_before_synthesis",
2046
- }
2047
-
2048
- def test_finalize_result_normalizes_line_qualified_code_anchor_ids_for_allowlist(
2049
- self,
2050
- sample_audit_template,
2051
- ) -> None:
2052
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
2053
- base_result = RowEvaluationResult(
2054
- row_id="CL-004:row_3",
2055
- check_id="CL-004",
2056
- status=RowStatus.PARTIAL,
2057
- score=63.0,
2058
- score_breakdown=ScoreBreakdown.compute(raw_score=63.0),
2059
- reason="Current evidence is still incomplete.",
2060
- finding="Need mixed-modality corroboration.",
2061
- evidence_anchors=[
2062
- EvidenceAnchor(
2063
- ref_type="code_path",
2064
- ref_value="code:src/main/java/com/example/config/DatabaseConfig.java:18",
2065
- excerpt='@EnableJpaRepositories(basePackages = {"com.example.repository"})',
2066
- verified=True,
2067
- verification_reason="excerpt_verified_in_context",
2068
- line_range=(1, 220),
2069
- ),
2070
- EvidenceAnchor(
2071
- ref_type="code_path",
2072
- ref_value="code:src/main/resources/application.properties:49",
2073
- excerpt="app.datasource.default.url=jdbc:mariadb://host:3306/campaign",
2074
- verified=True,
2075
- verification_reason="excerpt_verified_in_context",
2076
- line_range=(1, 220),
2077
- ),
2078
- ],
2079
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2080
- retrieval_trace={
2081
- "requirement_analysis": {
2082
- "analysis_mode": "hybrid_balanced",
2083
- "analysis_reason_codes": ["mixed_modalities_required", "corroborating_code_anchors_required"],
2084
- "required_anchor_modalities": ["code", "docs"],
2085
- "generic_anchor_exemption": False,
2086
- "minimum_substantive_code_anchors": 2,
2087
- "finalization_policy": "mixed_modalities_preserve_strong_code",
2088
- },
2089
- "analysis_mode": "hybrid_balanced",
2090
- "required_anchor_modalities": ["code", "docs"],
2091
- "finalization_policy": "mixed_modalities_preserve_strong_code",
2092
- "tool_first_loop": {
2093
- "route_mode": "hybrid_code_first",
2094
- "code_search_count": 2,
2095
- "code_read_count": 3,
2096
- "docs_search_count": 1,
2097
- "docs_read_count": 0,
2098
- "evidence_refs": [
2099
- "src/main/java/com/example/config/DatabaseConfig.java",
2100
- "src/main/resources/application.properties",
2101
- ],
2102
- },
2103
- "evidence_ref_sets": {
2104
- "exploratory_refs": [
2105
- "src/main/java/com/example/config/DatabaseConfig.java",
2106
- "src/main/resources/application.properties",
2107
- ],
2108
- "final_cited_refs": [
2109
- "code:src/main/java/com/example/config/DatabaseConfig.java:18",
2110
- "code:src/main/resources/application.properties:49",
2111
- ],
2112
- },
2113
- },
2114
- )
2115
-
2116
- finalized = evaluator._finalize_result(base_result)
2117
-
2118
- assert finalized.retry_metadata.get("reason_code") != "anchor_allowlist_violation"
2119
- assert finalized.retrieval_trace.get("anchor_identity_contract", {}).get("invalid_count") == 0
2120
- assert [anchor.ref_value for anchor in finalized.evidence_anchors] == [
2121
- "code:src/main/java/com/example/config/DatabaseConfig.java:18",
2122
- "code:src/main/resources/application.properties:49",
2123
- ]
2124
-
2125
- def test_finalize_result_clears_stale_allowlist_failure_when_contract_is_clean(
2126
- self,
2127
- sample_audit_template,
2128
- ) -> None:
2129
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
2130
- base_result = RowEvaluationResult(
2131
- row_id="CL-017:row_16",
2132
- check_id="CL-017",
2133
- status=RowStatus.FAIL,
2134
- score=9.0,
2135
- score_breakdown=ScoreBreakdown.compute(raw_score=9.0),
2136
- reason="Đã đọc bằng chứng code nhưng các anchor cuối cùng không khớp allowlist của nguồn đã đọc, nên không thể giữ kết luận ở mức pass.",
2137
- finding="Cần trích dẫn lại trực tiếp từ file code đã đọc; anchor cuối cùng hiện không nằm trong exploratory allowlist nên bị loại bỏ.",
2138
- evidence_anchors=[
2139
- EvidenceAnchor(
2140
- ref_type="code_path",
2141
- ref_value="src/main/java/com/example/config/RestConfiguration.java",
2142
- excerpt="public class RestConfiguration {}",
2143
- verified=True,
2144
- verification_reason="excerpt_verified_in_context",
2145
- line_range=(1, 20),
2146
- )
2147
- ],
2148
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2149
- retry_metadata={
2150
- "failure_stage": "synthesis",
2151
- "stage": "anchor_allowlist_filter",
2152
- "reason_code": "anchor_allowlist_violation",
2153
- "evidence_retrieved": True,
2154
- "downgraded_from_error_to_fail": True,
2155
- },
2156
- retrieval_trace={
2157
- "route_mode": "code_only",
2158
- "tool_first_loop": {
2159
- "route_mode": "code_only",
2160
- "code_search_count": 1,
2161
- "code_read_count": 1,
2162
- "docs_search_count": 0,
2163
- "docs_read_count": 0,
2164
- "evidence_refs": ["src/main/java/com/example/config/RestConfiguration.java"],
2165
- },
2166
- "code_only_quality_floor": {
2167
- "applied": True,
2168
- "reason_code": "anchor_allowlist_violation",
2169
- "downgraded_from_error_to_fail": True,
2170
- "score_floor": 9.0,
2171
- },
2172
- "evidence_ref_sets": {
2173
- "exploratory_refs": ["src/main/java/com/example/config/RestConfiguration.java"],
2174
- "final_cited_refs": ["src/main/java/com/example/config/RestConfiguration.java"],
2175
- },
2176
- "failure_diagnostics": {
2177
- "failure_stage": "synthesis",
2178
- "reason_code": "provider_transient_error",
2179
- "stage": "prompt_backend_invoke",
2180
- "evidence_retrieved": True,
2181
- "retry_count": 2,
2182
- "error_type": "RowEvaluationBackendError",
2183
- },
2184
- },
2185
- )
2186
-
2187
- finalized = evaluator._finalize_result(base_result)
2188
-
2189
- assert finalized.retrieval_trace.get("anchor_identity_contract", {}).get("invalid_count") == 0
2190
- assert finalized.retrieval_trace.get("anchor_allowlist_reconciled", {}).get("applied") is True
2191
- assert finalized.error_message is None
2192
-
2193
- def test_finalize_result_reclassifies_requirement_analysis_error_with_substantive_code_anchor(
2194
- self,
2195
- sample_audit_template,
2196
- ) -> None:
2197
- evaluator = RowEvaluator(config=RowEvaluatorConfig(mode=RowLLMMode.PER_ROW), template=sample_audit_template)
2198
- base_result = RowEvaluationResult(
2199
- row_id="CL-002:row_1",
2200
- check_id="CL-002",
2201
- status=RowStatus.ERROR,
2202
- score=30.6,
2203
- score_breakdown=ScoreBreakdown.compute(raw_score=30.6),
2204
- reason="Need stronger source proof for cross-module calls.",
2205
- finding="Current source proof is incomplete but not a runtime evaluation error.",
2206
- evidence_anchors=[
2207
- EvidenceAnchor(
2208
- ref_type="code_path",
2209
- ref_value="src/main/java/vn/com/viettel/vds/campaign/config/application/AppConfig.java",
2210
- excerpt="public class AppConfig {",
2211
- verified=True,
2212
- verification_reason="excerpt_verified_in_context",
2213
- line_range=(1, 220),
2214
- ),
2215
- EvidenceAnchor(
2216
- ref_type="code_path",
2217
- ref_value="pom.xml",
2218
- excerpt="<artifactId>campaign-rws-distribution-service</artifactId>",
2219
- verified=True,
2220
- verification_reason="excerpt_verified_in_context",
2221
- ),
2222
- ],
2223
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2224
- retrieval_trace={
2225
- "tool_first_loop": {
2226
- "route_mode": "hybrid_code_first",
2227
- "code_search_count": 1,
2228
- "code_read_count": 2,
2229
- "docs_search_count": 1,
2230
- "docs_read_count": 0,
2231
- "requirement_analysis": {
2232
- "analysis_mode": "hybrid_balanced",
2233
- "analysis_reason_codes": [
2234
- "dual_evidence_targets",
2235
- "substantive_source_candidate_present",
2236
- "mixed_modalities_required",
2237
- ],
2238
- "required_anchor_modalities": ["code", "docs"],
2239
- "generic_anchor_exemption": False,
2240
- "minimum_substantive_code_anchors": 1,
2241
- "finalization_policy": "mixed_modalities_preserve_strong_code",
2242
- },
2243
- },
2244
- },
2245
- )
2246
-
2247
- finalized = evaluator._finalize_result(base_result)
2248
-
2249
- assert finalized.status == RowStatus.FAIL
2250
- assert finalized.score == 30.6
2251
- assert finalized.error_message is None
2252
- assert finalized.retry_metadata["reason_code"] == "requirement_analysis_substantive_code_evidence_preserved"
2253
- assert finalized.retrieval_trace.get("requirement_analysis_error_reclassified", {}).get("applied") is True
2254
-
2255
-
2256
- class TestPhase104AnchorRepairDiagnostics:
2257
- """Phase 104: anchor-repair telemetry and dominant reason projection."""
2258
-
2259
- def test_anchor_repair_diagnostics_project_success_and_dominant_reason(self) -> None:
2260
- diagnostics = RowEvaluator._build_anchor_repair_diagnostics(
2261
- pre_repair_coverage={
2262
- "row_ref_count": 2,
2263
- "verified_true_count": 0,
2264
- "verified_false_count": 2,
2265
- "verification_reason_breakdown": {"llm_anchor_provided": 2},
2266
- },
2267
- post_repair_coverage={
2268
- "row_ref_count": 2,
2269
- "verified_true_count": 1,
2270
- "verified_false_count": 1,
2271
- "verification_reason_breakdown": {"no_excerpt_to_verify": 1},
2272
- },
2273
- )
2274
-
2275
- assert diagnostics == {
2276
- "anchor_repair_attempted": True,
2277
- "anchor_repair_success_count": 1,
2278
- "anchor_repair_unresolved_count": 1,
2279
- "dominant_unverified_reason": "no_excerpt_to_verify",
2280
- }
2281
-
2282
- def test_anchor_repair_diagnostics_handles_no_anchors(self) -> None:
2283
- diagnostics = RowEvaluator._build_anchor_repair_diagnostics(
2284
- pre_repair_coverage={"row_ref_count": 0, "verified_true_count": 0, "verified_false_count": 0},
2285
- post_repair_coverage={"row_ref_count": 0, "verified_true_count": 0, "verified_false_count": 0},
2286
- )
2287
-
2288
- assert diagnostics == {
2289
- "anchor_repair_attempted": False,
2290
- "anchor_repair_success_count": 0,
2291
- "anchor_repair_unresolved_count": 0,
2292
- "dominant_unverified_reason": False,
2293
- }
2294
-
2295
-
2296
- class TestPhase105RetryTelemetryParity:
2297
- def test_resolve_effective_retry_telemetry_counts_corrective_retry_attempt(self) -> None:
2298
- retry_count, retry_metadata = RowEvaluator._resolve_effective_retry_telemetry(
2299
- retry_count=0,
2300
- retry_metadata={},
2301
- retrieval_trace={
2302
- "retry_attempted": True,
2303
- "retry_outcome": "retry_rejected_no_improvement",
2304
- "retry_ratio": 0.5,
2305
- },
2306
- )
2307
-
2308
- assert retry_count == 1
2309
- assert retry_metadata["corrective_retry_attempted"] is True
2310
- assert retry_metadata["corrective_retry_count"] == 1
2311
- assert retry_metadata["corrective_retry_outcome"] == "retry_rejected_no_improvement"
2312
-
2313
- def test_resolve_effective_retry_telemetry_preserves_higher_backend_retry_count(self) -> None:
2314
- retry_count, retry_metadata = RowEvaluator._resolve_effective_retry_telemetry(
2315
- retry_count=2,
2316
- retry_metadata={"existing": "value"},
2317
- retrieval_trace={"retry_attempted": True},
2318
- )
2319
-
2320
- assert retry_count == 2
2321
- assert retry_metadata["existing"] == "value"
2322
- assert retry_metadata["corrective_retry_attempted"] is True
2323
- assert retry_metadata["corrective_retry_count"] == 2
2324
-
2325
-
2326
- class TestPhase111RequirementAnalysisTraceDiagnostics:
2327
- def test_promote_requirement_analysis_diagnostics_from_code_ranking_trace(self) -> None:
2328
- trace = {
2329
- "tool_first_loop": {
2330
- "code_ranking_diagnostics": {
2331
- "requirement_analysis": {
2332
- "analysis_mode": "code_first",
2333
- "analysis_reason_codes": ["code_first_requirement"],
2334
- "required_anchor_modalities": ["code"],
2335
- "generic_anchor_exemption": False,
2336
- "minimum_substantive_code_anchors": 1,
2337
- "finalization_policy": "code_substantive_required",
2338
- }
2339
- }
2340
- }
2341
- }
2342
-
2343
- promoted = RowEvaluator._promote_requirement_analysis_diagnostics(trace)
2344
-
2345
- assert isinstance(promoted, dict)
2346
- assert promoted["analysis_mode"] == "code_first"
2347
- assert promoted["analysis_reason_codes"] == ["code_first_requirement"]
2348
- assert promoted["required_anchor_modalities"] == ["code"]
2349
- assert promoted["generic_anchor_exemption"] is False
2350
- assert promoted["minimum_substantive_code_anchors"] == 1
2351
- assert promoted["finalization_policy"] == "code_substantive_required"
2352
- assert promoted["tool_first_loop"]["analysis_mode"] == "code_first"
2353
- assert promoted["tool_first_loop"]["finalization_policy"] == "code_substantive_required"
2354
-
2355
- def test_promote_requirement_analysis_prefers_richer_mixed_modality_payload(self) -> None:
2356
- trace = {
2357
- "requirement_analysis": {
2358
- "analysis_mode": "code_first",
2359
- "analysis_reason_codes": ["code_first_requirement"],
2360
- "required_anchor_modalities": ["code"],
2361
- "generic_anchor_exemption": False,
2362
- "minimum_substantive_code_anchors": 0,
2363
- "finalization_policy": "code_substantive_required",
2364
- },
2365
- "tool_first_loop": {
2366
- "code_ranking_diagnostics": {
2367
- "requirement_analysis": {
2368
- "analysis_mode": "hybrid_balanced",
2369
- "analysis_reason_codes": ["mixed_modalities_required", "docs_marker_signal"],
2370
- "required_anchor_modalities": ["code", "docs"],
2371
- "generic_anchor_exemption": False,
2372
- "minimum_substantive_code_anchors": 1,
2373
- "finalization_policy": "mixed_modalities_preserve_strong_code",
2374
- }
2375
- }
2376
- },
2377
- }
2378
-
2379
- promoted = RowEvaluator._promote_requirement_analysis_diagnostics(trace)
2380
-
2381
- assert isinstance(promoted, dict)
2382
- assert promoted["analysis_mode"] == "hybrid_balanced"
2383
- assert promoted["analysis_reason_codes"] == ["mixed_modalities_required", "docs_marker_signal"]
2384
- assert promoted["required_anchor_modalities"] == ["code", "docs"]
2385
- assert promoted["minimum_substantive_code_anchors"] == 1
2386
- assert promoted["finalization_policy"] == "mixed_modalities_preserve_strong_code"
2387
-
2388
- def test_promote_requirement_analysis_from_inline_diagnostics(self) -> None:
2389
- trace = {
2390
- "analysis_mode": "code_first",
2391
- "analysis_reason_codes": ["code_first_requirement", "substantive_source_candidate_present"],
2392
- "required_anchor_modalities": ["code"],
2393
- "generic_anchor_exemption": False,
2394
- "minimum_substantive_code_anchors": 1,
2395
- "finalization_policy": "code_substantive_required",
2396
- "tool_first_loop": {},
2397
- }
2398
-
2399
- promoted = RowEvaluator._promote_requirement_analysis_diagnostics(trace)
2400
-
2401
- assert isinstance(promoted, dict)
2402
- assert promoted["analysis_mode"] == "code_first"
2403
- assert promoted["analysis_reason_codes"] == ["code_first_requirement", "substantive_source_candidate_present"]
2404
- assert promoted["required_anchor_modalities"] == ["code"]
2405
- assert promoted["generic_anchor_exemption"] is False
2406
- assert promoted["minimum_substantive_code_anchors"] == 1
2407
- assert promoted["finalization_policy"] == "code_substantive_required"
2408
- assert promoted["requirement_analysis"]["analysis_mode"] == "code_first"
2409
- assert promoted["tool_first_loop"]["analysis_mode"] == "code_first"
2410
-
2411
- def test_promote_requirement_analysis_preserves_existing_tool_first_loop_payload(self) -> None:
2412
- trace = {
2413
- "tool_first_loop": {
2414
- "route_mode": "code_only",
2415
- "code_read_count": 2,
2416
- "record_evidence_refs_contract_met": True,
2417
- "trace_steps": [{"tool": "read_code_file", "ref": "src/main/java/Foo.java"}],
2418
- },
2419
- "analysis_mode": "code_first",
2420
- "analysis_reason_codes": ["code_first_requirement"],
2421
- "required_anchor_modalities": ["code"],
2422
- "generic_anchor_exemption": False,
2423
- "minimum_substantive_code_anchors": 1,
2424
- "finalization_policy": "code_substantive_required",
2425
- }
2426
-
2427
- promoted = RowEvaluator._promote_requirement_analysis_diagnostics(trace)
2428
-
2429
- assert isinstance(promoted, dict)
2430
- loop_trace = promoted["tool_first_loop"]
2431
- assert loop_trace["route_mode"] == "code_only"
2432
- assert loop_trace["code_read_count"] == 2
2433
- assert loop_trace["record_evidence_refs_contract_met"] is True
2434
- assert loop_trace["trace_steps"] == [{"tool": "read_code_file", "ref": "src/main/java/Foo.java"}]
2435
- assert loop_trace["analysis_mode"] == "code_first"
2436
- assert loop_trace["finalization_policy"] == "code_substantive_required"
2437
- assert loop_trace["requirement_analysis"]["analysis_mode"] == "code_first"
2438
-
2439
- def test_promote_requirement_analysis_from_route_reason_and_interpretation_fallback(self) -> None:
2440
- trace = {
2441
- "requirement_interpretation": {
2442
- "intent": "Validate hexagonal decoupling through implementation evidence.",
2443
- "control_objective": "Architecture",
2444
- "evidence_targets": ["code"],
2445
- "code_targets": ["src/main/java/com/acme/domain/OrderService.java"],
2446
- "docs_markers": [],
2447
- "code_markers": ["decoupling"],
2448
- "process_markers": [],
2449
- },
2450
- "tool_first_loop": {
2451
- "route_mode": "hybrid_code_first",
2452
- "route_reason": (
2453
- "targets=code; control_objective=architecture; risk_focus=quality;"
2454
- " confidence=0.82; analysis_mode=code_first; finalization_policy=code_substantive_required"
2455
- ),
2456
- "code_search_count": 2,
2457
- "code_read_count": 1,
2458
- "docs_intent_utilization": {
2459
- "docs_target": False,
2460
- "code_target": True,
2461
- },
2462
- },
2463
- }
2464
-
2465
- promoted = RowEvaluator._promote_requirement_analysis_diagnostics(trace)
2466
-
2467
- assert isinstance(promoted, dict)
2468
- assert promoted["analysis_mode"] == "code_first"
2469
- assert promoted["finalization_policy"] == "code_substantive_required"
2470
- assert promoted["required_anchor_modalities"] == ["code"]
2471
- assert promoted["minimum_substantive_code_anchors"] == 1
2472
- assert promoted["generic_anchor_exemption"] is False
2473
- assert "route_reason_analysis_mode_hint" in promoted["analysis_reason_codes"]
2474
- assert promoted["requirement_analysis"]["analysis_mode"] == "code_first"
2475
- assert promoted["tool_first_loop"]["analysis_mode"] == "code_first"
2476
-
2477
- def test_citation_precision_records_reason_when_only_generic_code_anchor_remains(self) -> None:
2478
- result = RowEvaluationResult(
2479
- row_id="CL-051:row_50",
2480
- check_id="CL-051",
2481
- status=RowStatus.FAIL,
2482
- score=18.0,
2483
- score_breakdown=ScoreBreakdown.compute(raw_score=18.0),
2484
- reason="Only generic metadata anchor found in repo.",
2485
- finding="Substantive source path is unavailable for this requirement.",
2486
- evidence_anchors=[
2487
- EvidenceAnchor(
2488
- ref_type="code_path",
2489
- ref_value="pom.xml",
2490
- excerpt="<artifactId>campaign-service</artifactId>",
2491
- verified=True,
2492
- verification_reason="excerpt_verified_in_context",
2493
- ),
2494
- ],
2495
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2496
- retrieval_trace={
2497
- "requirement_analysis": {
2498
- "analysis_mode": "code_first",
2499
- "analysis_reason_codes": ["code_first_requirement"],
2500
- "required_anchor_modalities": ["code"],
2501
- "generic_anchor_exemption": False,
2502
- "minimum_substantive_code_anchors": 1,
2503
- "finalization_policy": "code_substantive_required",
2504
- },
2505
- "tool_first_loop": {
2506
- "route_mode": "hybrid_code_first",
2507
- "code_search_count": 1,
2508
- "code_read_count": 1,
2509
- "docs_search_count": 0,
2510
- "docs_read_count": 0,
2511
- },
2512
- },
2513
- )
2514
-
2515
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2516
-
2517
- # Phase 147: When only a generic code anchor remains (no substantive ones) and
2518
- # minimum_substantive_code_anchors > 0, the grounding precheck triggers early
2519
- # and records the shortfall via grounding_precheck instead of evidence_ref_sets.
2520
- grounding_precheck = finalized.retrieval_trace.get("grounding_precheck", {})
2521
- assert isinstance(grounding_precheck, dict)
2522
- assert bool(grounding_precheck.get("applied"))
2523
- assert bool(grounding_precheck.get("unmet_substantive_code_anchors"))
2524
- assert finalized.status == RowStatus.PARTIAL
2525
-
2526
- def test_citation_precision_preserves_corroborating_code_anchors_for_requirement_analysis(self) -> None:
2527
- result = RowEvaluationResult(
2528
- row_id="CL-003:row_2",
2529
- check_id="CL-003",
2530
- status=RowStatus.FAIL,
2531
- score=21.0,
2532
- score_breakdown=ScoreBreakdown.compute(raw_score=21.0),
2533
- reason="Need corroborating code anchors for decoupling proof.",
2534
- finding="Single code anchor is insufficient when multiple substantive candidates were explored.",
2535
- evidence_anchors=[
2536
- EvidenceAnchor(
2537
- ref_type="code_path",
2538
- ref_value="src/main/java/com/example/config/AppConfig.java",
2539
- file_path="src/main/java/com/example/config/AppConfig.java",
2540
- excerpt="class AppConfig {}",
2541
- verified=True,
2542
- verification_reason="excerpt_verified_in_context",
2543
- line_range=[1, 220],
2544
- ),
2545
- EvidenceAnchor(
2546
- ref_type="code_path",
2547
- ref_value="src/main/java/com/example/service/OrderService.java",
2548
- file_path="src/main/java/com/example/service/OrderService.java",
2549
- excerpt="class OrderService {}",
2550
- verified=True,
2551
- verification_reason="excerpt_verified_in_context",
2552
- line_range=[1, 220],
2553
- ),
2554
- EvidenceAnchor(
2555
- ref_type="code_path",
2556
- ref_value="pom.xml",
2557
- excerpt="<artifactId>campaign-service</artifactId>",
2558
- verified=True,
2559
- verification_reason="excerpt_verified_in_context",
2560
- ),
2561
- ],
2562
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2563
- retrieval_trace={
2564
- "requirement_analysis": {
2565
- "analysis_mode": "hybrid_balanced",
2566
- "analysis_reason_codes": ["mixed_modalities_required", "corroborating_code_anchors_required"],
2567
- "required_anchor_modalities": ["code", "docs"],
2568
- "generic_anchor_exemption": False,
2569
- "minimum_substantive_code_anchors": 2,
2570
- "finalization_policy": "mixed_modalities_preserve_strong_code",
2571
- },
2572
- "tool_first_loop": {
2573
- "route_mode": "hybrid_code_first",
2574
- "code_read_count": 2,
2575
- "docs_read_count": 1,
2576
- },
2577
- "evidence_ref_sets": {
2578
- "exploratory_refs": [
2579
- "src/main/java/com/example/config/AppConfig.java",
2580
- "src/main/java/com/example/service/OrderService.java",
2581
- "pom.xml",
2582
- ]
2583
- },
2584
- },
2585
- )
2586
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2587
-
2588
- refs = list(finalized.evidence_anchors or [])
2589
- ref_values = [getattr(anchor, "ref_value", "") for anchor in refs]
2590
- assert "src/main/java/com/example/config/AppConfig.java" in ref_values
2591
- assert "src/main/java/com/example/service/OrderService.java" in ref_values
2592
- assert "pom.xml" not in ref_values
2593
- ref_sets = finalized.retrieval_trace.get("evidence_ref_sets", {})
2594
- assert isinstance(ref_sets, dict)
2595
- reasons = list(ref_sets.get("filter_reasons") or [])
2596
- assert "replace_generic_code_anchor_for_requirement_analysis" in reasons
2597
- assert "prioritize_substantive_code_anchor_for_requirement_analysis" in reasons
2598
-
2599
-
2600
- # ---------------------------------------------------------------------------
2601
- # TSK-172 — tool-first loop evidence bypasses grounding precheck
2602
- # ---------------------------------------------------------------------------
2603
-
2604
-
2605
- class TestToolFirstLoopGroundingPrecheck:
2606
- """TSK-172: When all evidence_anchors are supplemental fallback refs (added after LLM
2607
- synthesis failed) and tool_first_loop collected real code evidence_refs, the
2608
- substantive_code sub-check in the grounding precheck must be waived.
2609
-
2610
- This mirrors the smoke6 CL-001 failure: provider_http_error during synthesis left
2611
- evidence_anchors=[] initially; _append_trace_grounded_supplemental_anchors added a
2612
- Dockerfile anchor with verification_reason=VERIFICATION_REASON_FALLBACK_REF_INHERITED.
2613
- Without the waiver, the grounding precheck fires on the Dockerfile and sets score=0%.
2614
- """
2615
-
2616
- def test_all_supplemental_anchors_with_tool_first_evidence_bypasses_substantive_code_check(
2617
- self,
2618
- ) -> None:
2619
- """Smoke6 scenario: ALL evidence_anchors are supplemental fallback refs
2620
- (Dockerfile, verification_reason=fallback_ref_inherited) AND tool_first_loop
2621
- collected real Java source evidence_refs. The substantive_code sub-check must
2622
- be waived — only the modality check still runs."""
2623
- from vds_audit_orchestrator.models.checklist import (
2624
- VERIFICATION_REASON_FALLBACK_REF_INHERITED,
2625
- RowStatus,
2626
- )
2627
-
2628
- result = RowEvaluationResult(
2629
- row_id="CL-001:row_1",
2630
- check_id="CL-001",
2631
- status=RowStatus.PASS,
2632
- score=0.45,
2633
- score_breakdown=ScoreBreakdown.compute(raw_score=0.45),
2634
- reason="Partial hexagonal compliance detected.",
2635
- finding="Partial hexagonal compliance: domain layer present but adapters mixed.",
2636
- # Dockerfile supplemental anchor added by _append_trace_grounded_supplemental_anchors
2637
- # after LLM synthesis failed with provider_http_error.
2638
- evidence_anchors=[
2639
- EvidenceAnchor(
2640
- ref_type="code_path",
2641
- ref_value="Dockerfile",
2642
- verified=False,
2643
- verification_reason=VERIFICATION_REASON_FALLBACK_REF_INHERITED,
2644
- excerpt_unavailable_reason="fallback_ref_inherited_no_excerpt",
2645
- )
2646
- ],
2647
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2648
- retrieval_trace={
2649
- "requirement_analysis": {
2650
- "analysis_mode": "code_first",
2651
- "analysis_reason_codes": ["corroborating_code_anchors_required", "code_first_requirement"],
2652
- "required_anchor_modalities": ["code"],
2653
- "generic_anchor_exemption": False,
2654
- "minimum_substantive_code_anchors": 2,
2655
- "finalization_policy": "code_substantive_required",
2656
- },
2657
- "tool_first_loop": {
2658
- "termination_reason": "stagnation",
2659
- "steps_executed": 15,
2660
- "code_read_count": 10,
2661
- "skill_first_loaded_at_step": 2,
2662
- "breadth_enforcement_applied": True,
2663
- "evidence_refs": [
2664
- "src/main/java/vn/com/example/core/domain/entity/ConfigPolicyEntity.java",
2665
- "src/main/java/vn/com/example/core/service/impl/TmsTransactionServiceImpl.java",
2666
- "src/main/java/vn/com/example/infrastructure/store/repository/TxRepository.java",
2667
- ],
2668
- },
2669
- },
2670
- )
2671
-
2672
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2673
-
2674
- # substantive_code sub-check must be waived: precheck must NOT fire for this
2675
- assert "substantive_code_shortfall" not in (finalized.finding or ""), (
2676
- "substantive_code precheck must be waived when all anchors are supplemental "
2677
- "fallback refs and tool_first_loop has real evidence_refs. "
2678
- f"Got finding={finalized.finding!r}"
2679
- )
2680
-
2681
- def test_empty_tool_first_loop_evidence_refs_still_applies_precheck(self) -> None:
2682
- """When tool_first_loop.evidence_refs is empty/absent, the grounding precheck
2683
- still fires for rows that require substantive code anchors."""
2684
- from vds_audit_orchestrator.models.checklist import RowStatus
2685
-
2686
- result = RowEvaluationResult(
2687
- row_id="CL-001:row_1",
2688
- check_id="CL-001",
2689
- status=RowStatus.PASS,
2690
- score=0.45,
2691
- score_breakdown=ScoreBreakdown.compute(raw_score=0.45),
2692
- reason="Synthetic reason.",
2693
- finding="Synthetic finding.",
2694
- # Non-empty but non-substantive: Dockerfile is excluded from substantive code
2695
- # anchors so the precheck CAN fire (avoids the early-return on empty list).
2696
- evidence_anchors=[EvidenceAnchor(ref_type="code_path", ref_value="Dockerfile")],
2697
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2698
- retrieval_trace={
2699
- "requirement_analysis": {
2700
- "analysis_mode": "code_first",
2701
- "analysis_reason_codes": ["corroborating_code_anchors_required"],
2702
- "required_anchor_modalities": ["code"],
2703
- "generic_anchor_exemption": False,
2704
- "minimum_substantive_code_anchors": 2,
2705
- "finalization_policy": "code_substantive_required",
2706
- },
2707
- # tool_first_loop present but evidence_refs is empty — no bypass
2708
- "tool_first_loop": {
2709
- "termination_reason": "max_steps",
2710
- "steps_executed": 5,
2711
- "evidence_refs": [],
2712
- },
2713
- },
2714
- )
2715
-
2716
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2717
-
2718
- # Precheck should fire because evidence_refs is empty (no bypass) and the only
2719
- # anchor (Dockerfile) is excluded from substantive code anchors.
2720
- assert finalized.status == RowStatus.PARTIAL, (
2721
- "Grounding precheck must still apply when tool_first_loop.evidence_refs is empty. "
2722
- f"Got status={finalized.status}"
2723
- )
2724
- assert "substantive_code_shortfall" in (finalized.finding or ""), (
2725
- "substantive_code_shortfall must appear in finding when no tool-first evidence collected"
2726
- )
2727
-
2728
- def test_code_modality_check_waived_when_all_supplemental_and_tool_first_has_refs(self) -> None:
2729
- """When all anchors are fallback refs but tool_first_loop has real code refs,
2730
- the code-modality check must be waived — smoke8b regression: unmet_modalities=['code']
2731
- blocked synthesis even though 8+ Java files were collected by the retrieval loop."""
2732
- from vds_audit_orchestrator.models.checklist import (
2733
- VERIFICATION_REASON_FALLBACK_REF_INHERITED,
2734
- RowStatus,
2735
- )
2736
-
2737
- result = RowEvaluationResult(
2738
- row_id="CL-001:row_1",
2739
- check_id="CL-001",
2740
- status=RowStatus.PASS,
2741
- score=0.45,
2742
- score_breakdown=ScoreBreakdown.compute(raw_score=0.45),
2743
- reason="Partial hexagonal compliance detected.",
2744
- finding="Partial hexagonal compliance: domain layer present but adapters mixed.",
2745
- # Only a Dockerfile with fallback_ref_inherited — this makes filtered=[] in the
2746
- # precheck (supplemental anchors are excluded from filtered), so _select_anchors_for_modality
2747
- # returns [] for "code" → modality check fires WITHOUT the fix.
2748
- evidence_anchors=[
2749
- EvidenceAnchor(
2750
- ref_type="code_path",
2751
- ref_value="Dockerfile",
2752
- verified=False,
2753
- verification_reason=VERIFICATION_REASON_FALLBACK_REF_INHERITED,
2754
- excerpt_unavailable_reason="fallback_ref_inherited_no_excerpt",
2755
- )
2756
- ],
2757
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2758
- retrieval_trace={
2759
- "requirement_analysis": {
2760
- "analysis_mode": "code_first",
2761
- "analysis_reason_codes": ["corroborating_code_anchors_required"],
2762
- "required_anchor_modalities": ["code"],
2763
- "generic_anchor_exemption": False,
2764
- # minimum=0 isolates just the modality check (substantive check is guarded by >0)
2765
- "minimum_substantive_code_anchors": 0,
2766
- "finalization_policy": "code_substantive_required",
2767
- },
2768
- "tool_first_loop": {
2769
- "termination_reason": "stagnation",
2770
- "steps_executed": 15,
2771
- "code_read_count": 8,
2772
- "evidence_refs": [
2773
- "src/main/java/vn/com/example/core/domain/entity/ConfigPolicyEntity.java",
2774
- "src/main/java/vn/com/example/core/service/impl/TmsTransactionServiceImpl.java",
2775
- "src/main/java/vn/com/example/infrastructure/store/repository/TxRepository.java",
2776
- ],
2777
- },
2778
- },
2779
- )
2780
-
2781
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2782
-
2783
- assert finalized.status == RowStatus.PASS, (
2784
- "Code-modality check must be waived when all anchors are supplemental fallback refs "
2785
- "and tool_first_loop collected real Java evidence refs. "
2786
- f"Got status={finalized.status}, finding={finalized.finding!r}"
2787
- )
2788
-
2789
- def test_llm_anchor_provided_with_tool_first_code_refs_waives_both_gates(self) -> None:
2790
- """Smoke9+smoke10 regression: LLM partially ran and provided anchors with
2791
- llm_anchor_provided and excerpt_verified_in_context — synthesis didn't complete.
2792
- tool_first_loop has Java refs. Both grounding precheck gates must be waived.
2793
- excerpt_verified_in_context is the supplemental pipeline verifying Dockerfile content —
2794
- it is NOT a sign of successful LLM synthesis and must be in the allowed set."""
2795
- from vds_audit_orchestrator.models.checklist import (
2796
- VERIFICATION_REASON_EXCERPT_VERIFIED_IN_CONTEXT,
2797
- VERIFICATION_REASON_LLM_ANCHOR_PROVIDED,
2798
- RowStatus,
2799
- )
2800
-
2801
- result = RowEvaluationResult(
2802
- row_id="CL-001:row_1",
2803
- check_id="CL-001",
2804
- status=RowStatus.PASS,
2805
- score=0.0,
2806
- score_breakdown=ScoreBreakdown.compute(raw_score=0.0),
2807
- reason="Synthesis incomplete.",
2808
- finding="Synthesis incomplete: provider partially responded.",
2809
- # Mix of llm_anchor_provided + excerpt_verified_in_context (smoke10: supplemental
2810
- # pipeline verified Dockerfile content) — _all_anchors_supplemental=False, but
2811
- # both reasons indicate synthesis did NOT complete successfully.
2812
- evidence_anchors=[
2813
- EvidenceAnchor(
2814
- ref_type="code_path",
2815
- ref_value="Dockerfile",
2816
- verified=True,
2817
- verification_reason=VERIFICATION_REASON_EXCERPT_VERIFIED_IN_CONTEXT,
2818
- excerpt="FROM openjdk:17-jre-slim",
2819
- ),
2820
- EvidenceAnchor(
2821
- ref_type="code_path",
2822
- ref_value="pom.xml",
2823
- verified=False,
2824
- verification_reason=VERIFICATION_REASON_LLM_ANCHOR_PROVIDED,
2825
- excerpt_unavailable_reason="llm_cited_without_excerpt",
2826
- ),
2827
- ],
2828
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2829
- retrieval_trace={
2830
- "requirement_analysis": {
2831
- "analysis_mode": "code_first",
2832
- "analysis_reason_codes": ["corroborating_code_anchors_required"],
2833
- "required_anchor_modalities": ["code"],
2834
- "generic_anchor_exemption": False,
2835
- "minimum_substantive_code_anchors": 2,
2836
- "finalization_policy": "code_substantive_required",
2837
- },
2838
- "tool_first_loop": {
2839
- "termination_reason": "stagnation",
2840
- "steps_executed": 15,
2841
- "code_read_count": 8,
2842
- "evidence_refs": [
2843
- "src/main/java/vn/com/example/core/domain/entity/ConfigPolicyEntity.java",
2844
- "src/main/java/vn/com/example/core/service/impl/TmsServiceImpl.java",
2845
- "src/main/java/vn/com/example/infrastructure/repository/TxRepository.java",
2846
- ],
2847
- },
2848
- },
2849
- )
2850
-
2851
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2852
-
2853
- assert "substantive_code_shortfall" not in (finalized.finding or ""), (
2854
- "substantive_code precheck must be waived for llm_anchor_provided anchors + Java evidence_refs. "
2855
- f"Got finding={finalized.finding!r}"
2856
- )
2857
- assert finalized.status != RowStatus.PARTIAL or "evidence_shortfall" not in (finalized.finding or ""), (
2858
- "Grounding precheck must not fire when llm_anchor_provided + Java evidence_refs collected. "
2859
- f"Got status={finalized.status}, finding={finalized.finding!r}"
2860
- )
2861
-
2862
- def test_no_waiver_when_no_code_extension_in_tool_first_refs(self) -> None:
2863
- """Safety check: when tool_first_loop only collected non-code files (.xml, .txt),
2864
- the waiver must NOT apply — the grounding precheck should still fire."""
2865
- from vds_audit_orchestrator.models.checklist import (
2866
- VERIFICATION_REASON_FALLBACK_REF_INHERITED,
2867
- RowStatus,
2868
- )
2869
-
2870
- result = RowEvaluationResult(
2871
- row_id="CL-001:row_1",
2872
- check_id="CL-001",
2873
- status=RowStatus.PASS,
2874
- score=0.45,
2875
- score_breakdown=ScoreBreakdown.compute(raw_score=0.45),
2876
- reason="Incomplete analysis.",
2877
- finding="Incomplete: no code anchors verified.",
2878
- evidence_anchors=[
2879
- EvidenceAnchor(
2880
- ref_type="code_path",
2881
- ref_value="Dockerfile",
2882
- verified=False,
2883
- verification_reason=VERIFICATION_REASON_FALLBACK_REF_INHERITED,
2884
- excerpt_unavailable_reason="fallback_ref_inherited_no_excerpt",
2885
- )
2886
- ],
2887
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2888
- retrieval_trace={
2889
- "requirement_analysis": {
2890
- "analysis_mode": "code_first",
2891
- "analysis_reason_codes": ["corroborating_code_anchors_required"],
2892
- "required_anchor_modalities": ["code"],
2893
- "generic_anchor_exemption": False,
2894
- "minimum_substantive_code_anchors": 2,
2895
- "finalization_policy": "code_substantive_required",
2896
- },
2897
- "tool_first_loop": {
2898
- "termination_reason": "stagnation",
2899
- "steps_executed": 5,
2900
- # Only .xml and README — no .java/.py/.ts etc.
2901
- "evidence_refs": ["pom.xml", "README.md", "config/application.yml"],
2902
- },
2903
- },
2904
- )
2905
-
2906
- finalized = RowEvaluator._apply_citation_precision_filter(result)
2907
-
2908
- assert finalized.status == RowStatus.PARTIAL, (
2909
- "Grounding precheck must still fire when tool_first_loop has no code file extensions. "
2910
- f"Got status={finalized.status}"
2911
- )
2912
- assert "substantive_code_shortfall" in (finalized.finding or ""), (
2913
- "substantive_code_shortfall must appear when only non-code refs in tool_first_loop. "
2914
- f"Got finding={finalized.finding!r}"
2915
- )
2916
-
2917
- def test_code_grounding_hard_gate_waived_when_initial_verification_passed(self) -> None:
2918
- """Phase 172: _apply_code_grounding_hard_gate returns result unchanged (no downgrade)
2919
- when tool_first_loop collected real Java code evidence AND initial verification_coverage
2920
- ratio exceeded 0.8. Mirrors smoke11: architecture rows penalized for paraphrased
2921
- excerpts despite substantive tool-first evidence already being verified."""
2922
- from vds_audit_orchestrator.models.checklist import RowStatus
2923
-
2924
- result = RowEvaluationResult(
2925
- row_id="CL-001:row_1",
2926
- check_id="CL-001",
2927
- status=RowStatus.PASS,
2928
- score=75.0,
2929
- score_breakdown=ScoreBreakdown.compute(raw_score=75.0),
2930
- reason="Port interfaces found; infrastructure separated.",
2931
- finding="Hexagonal compliance verified via tool-first evidence.",
2932
- evidence_anchors=[
2933
- EvidenceAnchor(
2934
- ref_type="code_path",
2935
- ref_value="src/main/java/vn/com/example/core/domain/PaymentPort.java",
2936
- verified=True,
2937
- verification_reason="excerpt_verified_in_context",
2938
- excerpt="interface PaymentPort",
2939
- )
2940
- ],
2941
- provenance=RowProvenance(row_llm_mode="per-row", template_hash="t", evidence_hash="e"),
2942
- retrieval_trace={
2943
- "verification_coverage": {
2944
- # Initial verification passed — ratio above 0.8 threshold
2945
- "verified_ratio": 0.9,
2946
- "has_any_refs": True,
2947
- "missing_excerpt_count": 0,
2948
- "mismatched_excerpt_count": 0,
2949
- "verified_false_count": 0,
2950
- },
2951
- "tool_first_loop": {
2952
- "termination_reason": "completed",
2953
- "steps_executed": 8,
2954
- "code_read_count": 4,
2955
- "evidence_refs": [
2956
- "src/main/java/vn/com/example/core/domain/PaymentPort.java",
2957
- "src/main/java/vn/com/example/infrastructure/adapter/PaymentAdapter.java",
2958
- ],
2959
- },
2960
- },
2961
- )
2962
-
2963
- # Post-finalization coverage: verified_ratio=0.0 so the "> 0.0" early return
2964
- # does NOT fire, forcing the gate to reach the Phase 172 waiver block.
2965
- post_coverage: dict = {
2966
- "has_any_refs": True,
2967
- "verified_ratio": 0.0,
2968
- "missing_excerpt_count": 1,
2969
- "mismatched_excerpt_count": 0,
2970
- "verified_false_count": 1,
2971
- "verification_reason_breakdown": {"missing_excerpt": 1},
2972
- }
2973
-
2974
- gated = RowEvaluator._apply_code_grounding_hard_gate(
2975
- result=result,
2976
- verification_coverage=post_coverage,
2977
- requirement_interpretation={"code_target": True},
2978
- )
2979
-
2980
- assert gated.score == 75.0, (
2981
- "Hard gate must not downgrade score when Phase 172 waiver fires "
2982
- "(initial_verification_passed=True + Java evidence_refs in tool_first_loop). "
2983
- f"Got score={gated.score}"
2984
- )
2985
- assert gated.status == RowStatus.PASS, (
2986
- f"Hard gate must not change status when Phase 172 waiver fires. Got status={gated.status}"
2987
- )