@ngocsangairvds/vsaf 3.2.13 → 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/vsaf.js +13 -0
- package/package.json +1 -1
- package/src/config.js +167 -0
- package/src/global.js +34 -51
- package/src/utils.js +44 -1
- package/tools/vds-scripts/Makefile +9 -31
- package/tools/vds-scripts/docker/docker-compose.cli.yml +1 -117
- package/tools/vds-scripts/docker/docker-compose.services.yml +1 -40
- package/tools/vds-scripts/docker/infrastructure/init-schemas.sql +0 -34
- package/tools/vds-scripts/docker/infrastructure/pgbouncer/pgbouncer.ini +2 -6
- package/tools/vds-scripts/pyproject.toml +1 -33
- package/tools/vds-scripts/uv.lock +80 -1651
- package/tools/vds-scripts/vds_cli/pyproject.toml +3 -0
- package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +1 -127
- package/tools/vds-scripts/vds_cli/src/vds_cli/commands/lint_cli.py +1 -20
- package/tools/vds-scripts/vds_cli/src/vds_cli/router.py +0 -100
- package/tools/vds-scripts/vds_cli/tests/conftest.py +0 -2
- package/tools/vds-scripts/vds_cli/tests/unit/test_cli.py +0 -25
- package/tools/vds-scripts/vds_cli/tests/unit/test_lint_cli.py +2 -2
- package/tools/vds-scripts/vds_cli/tests/unit/test_router.py +0 -2
- package/tools/vds-scripts/CLOSURE.md +0 -340
- package/tools/vds-scripts/ECOSYSTEM-CHANGELOG.md +0 -52
- package/tools/vds-scripts/ECOSYSTEM-DOCS.md +0 -602
- package/tools/vds-scripts/ECOSYSTEM_ALIGNMENT.md +0 -133
- package/tools/vds-scripts/ENV-HYGIENE-OPS-NOTE.md +0 -65
- package/tools/vds-scripts/INVESTIGATION-cloud-401.md +0 -103
- package/tools/vds-scripts/MEM0_2.0_API_REFERENCE.md +0 -238
- package/tools/vds-scripts/PACKAGE_P125B_IMPLEMENTATION_SUMMARY.md +0 -131
- package/tools/vds-scripts/PHASE-MERGE-SUMMARY.md +0 -121
- package/tools/vds-scripts/PHASES-3-ARCHIVE.md +0 -59
- package/tools/vds-scripts/PROJECT_COMPLETION_SUMMARY.md +0 -45
- package/tools/vds-scripts/SEARCH-CRASH-REPRO.md +0 -51
- package/tools/vds-scripts/analyze_hexagonal.py +0 -217
- package/tools/vds-scripts/analyze_profiles.py +0 -60
- package/tools/vds-scripts/audit-checklist.xlsx +0 -0
- package/tools/vds-scripts/audit_orchestrator/.audit_approvals/approvals_index.json +0 -1
- package/tools/vds-scripts/audit_orchestrator/.env.example +0 -85
- package/tools/vds-scripts/audit_orchestrator/.github/workflows/audit.yml +0 -47
- package/tools/vds-scripts/audit_orchestrator/Dockerfile +0 -92
- package/tools/vds-scripts/audit_orchestrator/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +0 -218
- package/tools/vds-scripts/audit_orchestrator/PHASE3_INTEGRATION_SUMMARY.md +0 -268
- package/tools/vds-scripts/audit_orchestrator/PHASE7-MERGE-SUMMARY.md +0 -174
- package/tools/vds-scripts/audit_orchestrator/README.md +0 -1573
- package/tools/vds-scripts/audit_orchestrator/TSK-168-IMPLEMENTATION-SUMMARY.md +0 -191
- package/tools/vds-scripts/audit_orchestrator/TSK-196-IMPLEMENTATION-SUMMARY.md +0 -201
- package/tools/vds-scripts/audit_orchestrator/alembic/env.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/alembic/script.py.mako +0 -28
- package/tools/vds-scripts/audit_orchestrator/alembic/versions/0001_initial_audit_state_schema.py +0 -1260
- package/tools/vds-scripts/audit_orchestrator/alembic.ini +0 -68
- package/tools/vds-scripts/audit_orchestrator/config/category-mapping.json +0 -81
- package/tools/vds-scripts/audit_orchestrator/config/profile-timeouts.yaml +0 -17
- package/tools/vds-scripts/audit_orchestrator/create_sample.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/data/corpus_accuracy_report.json +0 -17
- package/tools/vds-scripts/audit_orchestrator/data/exemplar_quality_report.json +0 -1606
- package/tools/vds-scripts/audit_orchestrator/data/instruction_plan_fixtures.json +0 -163
- package/tools/vds-scripts/audit_orchestrator/data/requirement_exemplars.json +0 -3443
- package/tools/vds-scripts/audit_orchestrator/data/requirement_scope_fixtures.json +0 -172
- package/tools/vds-scripts/audit_orchestrator/debug_rg.py +0 -46
- package/tools/vds-scripts/audit_orchestrator/demo_code_pack.py +0 -127
- package/tools/vds-scripts/audit_orchestrator/docs/AGENT_SDK_SELECTION_SPEC.md +0 -720
- package/tools/vds-scripts/audit_orchestrator/docs/API.md +0 -804
- package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_ANALYSIS_APPROACH.md +0 -1041
- package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_SCORING_EVOLUTION_SPEC.md +0 -868
- package/tools/vds-scripts/audit_orchestrator/docs/DEPLOYMENT.md +0 -778
- package/tools/vds-scripts/audit_orchestrator/docs/LLM_AGENT_AUDIT_SPEC.md +0 -721
- package/tools/vds-scripts/audit_orchestrator/docs/LLM_CONTENT_ANALYSIS_SPEC.md +0 -1143
- package/tools/vds-scripts/audit_orchestrator/docs/LSP_SETUP_GUIDE.md +0 -221
- package/tools/vds-scripts/audit_orchestrator/docs/MULTI_REPO_AUDIT_SPEC.md +0 -951
- package/tools/vds-scripts/audit_orchestrator/docs/OLLAMA_EMBEDDINGS_SETUP.md +0 -119
- package/tools/vds-scripts/audit_orchestrator/docs/PHASE32_REAL_BENCHMARK_2026-02-08.md +0 -66
- package/tools/vds-scripts/audit_orchestrator/docs/PHASE_64_TO_92_HISTORICAL_SPEC.md +0 -1772
- package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-flow-trace.md +0 -201
- package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-verification.md +0 -124
- package/tools/vds-scripts/audit_orchestrator/docs/phase152-hierarchical-query-surface.md +0 -46
- package/tools/vds-scripts/audit_orchestrator/examples/bitbucket_metadata_example.json +0 -50
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/README.md +0 -68
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase117_phase118_shared_state.sql +0 -64
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase154_published_pages.sql +0 -28
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_dispatch_tables.sql +0 -94
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_events.sql +0 -91
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_scope_snapshots.sql +0 -24
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_status_view.sql +0 -22
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase169_dispatch_observability.sql +0 -55
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/state_repair_hardening.sql +0 -24
- package/tools/vds-scripts/audit_orchestrator/pyproject.toml +0 -211
- package/tools/vds-scripts/audit_orchestrator/pyrightconfig.json +0 -51
- package/tools/vds-scripts/audit_orchestrator/pytest.ini +0 -37
- package/tools/vds-scripts/audit_orchestrator/reproduce_scanner.py +0 -40
- package/tools/vds-scripts/audit_orchestrator/scripts/README.md +0 -116
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_crawl_modes.py +0 -455
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_dspy.py +0 -513
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_nlp_accuracy.py +0 -138
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_retrieval_modes.py +0 -176
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_upload_update_mode.py +0 -167
- package/tools/vds-scripts/audit_orchestrator/scripts/build_check.py +0 -76
- package/tools/vds-scripts/audit_orchestrator/scripts/check_live_progress.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/scripts/cli_integration_test.py +0 -400
- package/tools/vds-scripts/audit_orchestrator/scripts/index_workspace.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/scripts/inspect_route_conformance.py +0 -196
- package/tools/vds-scripts/audit_orchestrator/scripts/monitor_postgres.py +0 -145
- package/tools/vds-scripts/audit_orchestrator/scripts/optimize_audit.py +0 -462
- package/tools/vds-scripts/audit_orchestrator/scripts/verify.py +0 -673
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase111_requirement_analysis.py +0 -375
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase117_cross_repo_evidence.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase121_short_circuit.py +0 -680
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase122_instruction_handling.py +0 -478
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase125_skill_integration.py +0 -832
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_36.py +0 -394
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_37.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/_langchain_warnings.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/agentic_investigator.py +0 -4130
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/approval.py +0 -490
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_loop_hooks.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_state.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/base.py +0 -4035
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_agent.py +0 -667
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_helpers.py +0 -236
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_prompts.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/docs_agent.py +0 -1234
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/langgraph_workflow.py +0 -2002
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/pydantic_base.py +0 -1227
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/requirement_analysis_agent.py +0 -593
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_agent.py +0 -1829
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_scanner.py +0 -686
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/skill_tools.py +0 -204
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/synthesis_agent.py +0 -1463
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_efficiency_guard.py +0 -609
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_registry.py +0 -3822
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/__init__.py +0 -52
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/evidence_corpus.py +0 -385
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/filesystem.py +0 -1134
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/lsp.py +0 -458
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/mcp_toolset.py +0 -491
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/skills_toolset.py +0 -997
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/vector_evidence.py +0 -842
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/usage_tracker.py +0 -682
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/visualization.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/analyze_cmds.py +0 -892
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/__init__.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/service.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/__init__.py +0 -20
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/base.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/__init__.py +0 -6
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/checks.py +0 -257
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/__init__.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/checks.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/__init__.py +0 -6
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/file_checks.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/__init__.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/api_docs_check.py +0 -80
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/readme_check.py +0 -76
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/security_docs_check.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/registry.py +0 -402
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/__init__.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/checks.py +0 -276
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli.py +0 -12
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_common.py +0 -128
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_impl.py +0 -9826
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/bitbucket_cli_client.py +0 -187
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/confluence_cli_client.py +0 -977
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/sonarqube_cli_client.py +0 -28
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/__init__.py +0 -21
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/base.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_downloader.py +0 -644
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_metadata.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/checklist_parser.py +0 -180
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/__init__.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/bitbucket_probe.py +0 -443
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/confluence_probe.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/freshness_evaluator.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/material_completeness_service.py +0 -1079
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/confluence_collector.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/diagram_extractor.py +0 -280
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/enrichment_extractor.py +0 -200
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/evidence_cache.py +0 -35
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/git_collector.py +0 -148
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/graphify_collector.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/image_extractor.py +0 -359
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/linked_page_tracker.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/markdown_converter.py +0 -344
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_cache.py +0 -1252
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_downloader.py +0 -1165
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/orchestrator.py +0 -168
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/registry_parser.py +0 -3063
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/requirements.py +0 -70
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/runner.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/sonarqube_collector.py +0 -113
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config.py +0 -1943
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/__init__.py +0 -23
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/discovery.py +0 -90
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/environment_resolver.py +0 -56
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/evidence.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/models.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/precedence.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/redaction.py +0 -20
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/confluence_connectivity.py +0 -140
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/corpus_cmds.py +0 -278
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/__init__.py +0 -7
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/alembic_filters.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/diataxis_validator.py +0 -687
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/doctor_cmds.py +0 -3295
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/__init__.py +0 -5
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/evaluation.py +0 -301
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/modules.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/runtime.py +0 -836
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/signatures.py +0 -406
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/__init__.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/ad_hoc_analyzer.py +0 -399
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/aggregator.py +0 -220
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/auditor.py +0 -504
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_evidence_cache.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_processor.py +0 -4776
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/calibration.py +0 -217
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_generator.py +0 -1201
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_projection.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_scoping.py +0 -221
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checkpoint.py +0 -159
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cl003_shared_lib_guard.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/companion_context_service.py +0 -445
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/confluence_checklist_contract.py +0 -7425
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cross_check_rules.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/deterministic_evaluator.py +0 -237
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/drift_detector.py +0 -157
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/dspy_requirement_classifier.py +0 -640
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_assembler.py +0 -407
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_collector.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_diversity.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/gap_analyzer.py +0 -549
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/graduated.py +0 -185
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/grounding_validator.py +0 -287
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_analyzer.py +0 -882
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_compliance.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/llm_row_evaluator.py +0 -9270
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/loader.py +0 -1070
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/manual_check_config.py +0 -136
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/mapping.py +0 -269
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/multi_judge.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/phase120_checklist_update.py +0 -416
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/profile_scorer.py +0 -427
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_evidence_context.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_query_service.py +0 -155
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_store.py +0 -383
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_topology.py +0 -1920
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/provider_failure_classifier.py +0 -778
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_cli_helpers.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_extractor.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_synthesizer.py +0 -730
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/regression_guard.py +0 -138
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/repo_type_classifier.py +0 -297
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_analysis.py +0 -1433
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_classification.py +0 -1725
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/result_merger.py +0 -814
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/route_matrix.py +0 -267
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator.py +0 -9437
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_runtime.py +0 -1270
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_types.py +0 -2102
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/rubric.py +0 -592
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/scorer.py +0 -1239
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/section_packs.py +0 -645
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/skill_recommendation.py +0 -1183
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/stability_harness.py +0 -207
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/target_selector.py +0 -841
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/telemetry.py +0 -347
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/template_analyzer.py +0 -469
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/token_tracker.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/tool_first_planner.py +0 -7905
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/topology_query_service.py +0 -80
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/validator.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/weight_policy.py +0 -464
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/errors.py +0 -430
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/extract_cmds.py +0 -4887
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/identity.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/__init__.py +0 -52
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/baseline.py +0 -378
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/change_analyzer.py +0 -407
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/delta_report.py +0 -189
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/diff_detector.py +0 -301
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/integrations/__init__.py +0 -3
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/__init__.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/audit_schemas.py +0 -459
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/codex_oauth.py +0 -340
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/cost_tracker.py +0 -288
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/engine.py +0 -751
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/evaluator.py +0 -245
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/__init__.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/api_docs_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/gap_analysis.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/instruction_templates.py +0 -634
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/readme_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/row_evaluation.py +0 -247
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/security_docs_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/template_analysis.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/provider.py +0 -626
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/logging_config.py +0 -577
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/__init__.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/default_checklist_mapping.json +0 -18
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/vietnamese_checklist_mapping.json +0 -38
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/misc_cmds.py +0 -4689
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/__init__.py +0 -153
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/calibration.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/checklist.py +0 -921
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/completeness.py +0 -309
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enrichment.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enums.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/evidence.py +0 -351
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/findings.py +0 -381
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/gaps.py +0 -299
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/graph.py +0 -42
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/multi_judge.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/readiness.py +0 -309
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/registry.py +0 -386
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/reporting.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/task.py +0 -549
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/template.py +0 -477
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/__init__.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/metrics.py +0 -404
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/parse_cmds.py +0 -608
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/pdf_cmds.py +0 -208
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/performance_gates.py +0 -224
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/phase151_projection.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/__init__.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/detection.py +0 -842
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/models.py +0 -474
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/__init__.py +0 -1
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_confluence_macros.py +0 -145
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_field_sanitizer.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_table_builder.py +0 -63
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_vietnamese_templates.py +0 -103
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/bitbucket_link_resolver.py +0 -34
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/checklist_renderer.py +0 -483
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/confluence_publisher.py +0 -3048
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/hierarchy_publisher.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/live_data_injector.py +0 -152
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/macro_builder.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/markdown_converter.py +0 -154
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/priority_renderer.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/project_aggregate_renderer.py +0 -423
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/readiness_renderer.py +0 -186
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_hierarchy_renderer.py +0 -382
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_renderer.py +0 -683
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/report_cmds.py +0 -788
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/__init__.py +0 -13
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/aggregation_report.py +0 -86
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/checklist_generator.py +0 -425
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/excel_generator.py +0 -599
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/gap_report.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/json_generator.py +0 -188
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/markdown_generator.py +0 -595
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/__init__.py +0 -154
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/collector.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/department_builder.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/errors.py +0 -9
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/md_renderer.py +0 -386
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_models.py +0 -95
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_writer.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/repo_project_builders.py +0 -274
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/readiness_report.py +0 -447
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/reporting.py +0 -94
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/sarif_generator.py +0 -519
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/runtime_profiles.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/seed_loader.py +0 -561
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/__init__.py +0 -5
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/skill_routing.py +0 -312
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/base.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/bitbucket.py +0 -129
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/git_url.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/github.py +0 -75
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/local.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/spec_sync_validator.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/__init__.py +0 -6285
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/readiness_helpers.py +0 -74
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/skill_readiness.py +0 -487
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/store.py +0 -12927
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state_cmds.py +0 -1868
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/repo_sync.py +0 -409
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync_cmds.py +0 -1247
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/__init__.py +0 -3
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/debug_bundle.py +0 -214
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/validators/checklist_validator.py +0 -342
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflow_cmds.py +0 -19147
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/__init__.py +0 -9
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/_test_audit_daily_batch.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_daily_batch.py +0 -308
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_deep_monthly.py +0 -193
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_drift_scan.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_security_daily.py +0 -183
- package/tools/vds-scripts/audit_orchestrator/templates/sample_audit_template.xlsx +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/_helpers.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_bitbucket_probe.py +0 -403
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_confluence_probe.py +0 -423
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_bitbucket_downloader.py +0 -289
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_image_extractor.py +0 -260
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_markdown_converter.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_cache.py +0 -197
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_downloader.py +0 -550
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser.py +0 -3514
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_department_entry.py +0 -214
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_flow.py +0 -200
- package/tools/vds-scripts/audit_orchestrator/tests/conftest.py +0 -988
- package/tools/vds-scripts/audit_orchestrator/tests/engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_calibration.py +0 -48
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_confluence_checklist_phase22_helpers.py +0 -6065
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_multi_judge.py +0 -62
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_stability_harness.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_structured_metadata.py +0 -419
- package/tools/vds-scripts/audit_orchestrator/tests/factories/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/factories/models.py +0 -534
- package/tools/vds-scripts/audit_orchestrator/tests/factories/templates.py +0 -241
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/compressed.drawio +0 -2
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/mockup.bmpr +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/simple.drawio +0 -26
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_cli.json +0 -26
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_direct.json +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_cli.json +0 -14
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_direct.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_cli.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_direct.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_cli.json +0 -11
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_direct.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_cli.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_direct.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/requirement_strategy_phase115.json +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/integration/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/conftest.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/expected_outcomes.md +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/auth.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/config.py +0 -16
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/db.py +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/main.py +0 -18
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/__init__.py +0 -1
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/utils.py +0 -22
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_checklist_template.json +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/code_evidence_pack.json +0 -40
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/manifest.json +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/brd.md +0 -19
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/design.md +0 -32
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/security.md +0 -23
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/srs.md +0 -25
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/test.md +0 -30
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_checkpoint_merge.py +0 -1371
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_decoupling_route_p149.py +0 -176
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_gap_analyzer_batch_p149.py +0 -151
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_hybrid_search.py +0 -799
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_mcp_integration.py +0 -741
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_merge_ranking_p149.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_modality_mismatch_p149.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase117_118_storage.py +0 -350
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase121_short_circuit.py +0 -732
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase18_workflow.py +0 -223
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase48_e2e_verification.py +0 -763
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase81_doc_anchor_regression.py +0 -252
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_provider_failure_finding_p149.py +0 -339
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_readiness_e2e.py +0 -430
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_refined_workflow.py +0 -1180
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/department_renderer.md +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/project_renderer.md +0 -8
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/repo_renderer.md +0 -10
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_department_pdf.py +0 -112
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_e2e_pdf.py +0 -135
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_idempotency.py +0 -45
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_md_renderer.py +0 -46
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_cmds.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_snapshot.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_writer.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_project_builder.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_public_api.py +0 -135
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_repo_builder.py +0 -246
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_workflow_pdf_flags.py +0 -36
- package/tools/vds-scripts/audit_orchestrator/tests/property/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/property/test_properties.py +0 -807
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agent_error_compat.py +0 -38
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agentic_skill_policy_skip.py +0 -234
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_event_stream_logging.py +0 -785
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_timeout_policy.py +0 -277
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_trace_payload_sanitization.py +0 -92
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent.py +0 -2311
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent_re_exports.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_analysis_helpers.py +0 -94
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_create_audit_agent_reasoning_effort.py +0 -69
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_docs_agent.py +0 -2044
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_langgraph_workflow_efficiency_metrics.py +0 -71
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_output_validators.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_phase41_toolsets.py +0 -6427
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_ai_models.py +0 -1219
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_base_url_resolution.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_security_agent.py +0 -2069
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_skill_manager_focus.py +0 -439
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_synthesis_agent.py +0 -1195
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_tool_efficiency_guard_fr120.py +0 -683
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_toolsets.py +0 -716
- package/tools/vds-scripts/audit_orchestrator/tests/test_aggregator_p149.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/tests/test_alembic_migrations.py +0 -287
- package/tools/vds-scripts/audit_orchestrator/tests/test_anchor_allowlist_p149.py +0 -273
- package/tools/vds-scripts/audit_orchestrator/tests/test_audit_otel.py +0 -283
- package/tools/vds-scripts/audit_orchestrator/tests/test_checklist_models.py +0 -583
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_base_check.py +0 -211
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_llm_checks.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_analyze_command.py +0 -400
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_archive_stale_page_cli.py +0 -217
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_bitbucket_metadata_cli.py +0 -354
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_cli_impl_profile_availability.py +0 -114
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_codex_profile.py +0 -174
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_compare_backends_cli.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_confluence_parent_auto_resolve.py +0 -451
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_corpus_purge_cli.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_credentials_preflight.py +0 -106
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_debug_bundle.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_deprecation_phase157.py +0 -484
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_dispatch_concurrency_diagnostics.py +0 -758
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_check_confluence_cli.py +0 -320
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_codex.py +0 -187
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_corpus_status_cli.py +0 -236
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_correlation_cli.py +0 -128
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_crawl_status_cli.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_credentials_cli.py +0 -86
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_dispatch_status_cli.py +0 -421
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_heartbeat_phase169.py +0 -173
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_hierarchy_status_cli.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_locks_cli.py +0 -134
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_logs_follow_cli.py +0 -305
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_migration.py +0 -333
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_profile_availability_cli.py +0 -151
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_skills_policy_cli.py +0 -153
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_evidence_quality_cli.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_debug_bundle_phase36.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_git_manifest_cli.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_file_removal_phase157e.py +0 -770
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_grounding_classifier.py +0 -226
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_logging.py +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_materials_cli.py +0 -9127
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_metadata_completeness_phase92.py +0 -364
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parent_dispatch_finalization_phase168f.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parse_cli.py +0 -590
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase117_118_feature_flags.py +0 -219
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase164_control_plane.py +0 -718
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase165_runner_scripts.py +0 -230
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_preparation_classifications.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_prepare_cli.py +0 -398
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publication_quality_gate.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publish_system_doc_cli.py +0 -158
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_query_checklist_cli.py +0 -219
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli.py +0 -673
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli_integration.py +0 -689
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_removed_flags_phase92.py +0 -36
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_report_cmds.py +0 -1317
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_history_index.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_management.py +0 -1194
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_runtime_profiles_cli.py +0 -1658
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_smart_run_selection.py +0 -1562
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_cli.py +0 -2467
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_migration.py +0 -339
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_sync_repos_debug_artifacts.py +0 -1109
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_upload_results_cli.py +0 -809
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist_cli.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_spec_sync_cli.py +0 -519
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_default_parameters_baseline.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_options.py +0 -7896
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_db_modes.py +0 -6516
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_project_scope.py +0 -831
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_target.py +0 -611
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_lifecycle.py +0 -2488
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_scaffolding.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_row_key_guard.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_summary_artifacts.py +0 -1872
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli_paths_phase2.py +0 -45
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_bitbucket_cli_client.py +0 -124
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_cli_parity.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_confluence_cli_client.py +0 -1149
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_sonarqube_cli_client.py +0 -19
- package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/test_linked_page_tracker.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/test_companion_context_service.py +0 -230
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/conftest.py +0 -11
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_compile_artifact.py +0 -465
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique_e2e.py +0 -75
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_evaluation.py +0 -515
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_runtime_loader.py +0 -537
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_signatures_normalization.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_auditor_applicability.py +0 -68
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_generator.py +0 -1252
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_projection.py +0 -54
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_confluence_checklist_projection_consistency.py +0 -1696
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_critique_merger_matrix.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_check_rules.py +0 -459
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_provider_critique.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_doc_loader.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_drift_detector.py +0 -34
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_evidence_collectors.py +0 -93
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_lease_timeout.py +0 -114
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader.py +0 -350
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader_parity.py +0 -179
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_low_confidence_reeval.py +0 -691
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase145a_completion.py +0 -209
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase31_row_consistency_retry_benchmark.py +0 -150
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_profile_detector.py +0 -286
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_regression_guard.py +0 -53
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_result_merger.py +0 -619
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_evaluator.py +0 -15783
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_failover.py +0 -215
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_scorer.py +0 -597
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_skill_breakdown_telemetry_fr137.py +0 -421
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_targeted_auto_merge.py +0 -229
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_failover.py +0 -488
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_telemetry.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_validator.py +0 -419
- package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/test_diff_detector.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/test_infra_persistence.py +0 -291
- package/tools/vds-scripts/audit_orchestrator/tests/test_integration/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_integration/test_phase3_integration.py +0 -516
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cache.py +0 -670
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_model_builder.py +0 -281
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_oauth.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_streaming.py +0 -433
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cost_tracker.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_engine.py +0 -876
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_evaluator.py +0 -212
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_instruction_templates.py +0 -639
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompt_metadata.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompts.py +0 -660
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider_contract_sync.py +0 -18
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_reasoning_effort_validation.py +0 -565
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_schemas.py +0 -827
- package/tools/vds-scripts/audit_orchestrator/tests/test_logging_config.py +0 -297
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_enums.py +0 -185
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_findings.py +0 -1159
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_project_profile.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_registry.py +0 -532
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_template.py +0 -708
- package/tools/vds-scripts/audit_orchestrator/tests/test_observability/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_observability/test_metrics.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/test_paths_config_phase2.py +0 -21
- package/tools/vds-scripts/audit_orchestrator/tests/test_performance/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_performance/test_fr79_performance_guardrails.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/test_phase156_hardening.py +0 -498
- package/tools/vds-scripts/audit_orchestrator/tests/test_phase93_regression_guards.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/test_pipeline_integration.py +0 -517
- package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/test_detection.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_bitbucket_link_resolver.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer_projection.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_macros.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_publisher.py +0 -2171
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_evidence_links.py +0 -129
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_field_sanitizer.py +0 -108
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_hierarchy_publisher.py +0 -134
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_incremental_plan_parser.py +0 -62
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_live_data_injector.py +0 -48
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_macro_builder.py +0 -22
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_p161_confluence_optimization.py +0 -168
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_priority_renderer.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_project_aggregate_renderer.py +0 -364
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_storage_validation.py +0 -273
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_summary_refactor.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_system_doc_hierarchy.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_table_builder.py +0 -23
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_vietnamese_templates.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_wiring_integration.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_aggregation_report.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_checklist_generator.py +0 -258
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_gap_report.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_json_generator.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/test_result_merger_p149.py +0 -347
- package/tools/vds-scripts/audit_orchestrator/tests/test_route_mode_p149.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/tests/test_rubric_parser.py +0 -179
- package/tools/vds-scripts/audit_orchestrator/tests/test_scorer.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_state/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_state/test_sparse_coverage.py +0 -117
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_langgraph_workflow.py +0 -2072
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_p161_runtime_hardening.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p149.py +0 -112
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p172.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_guidance_p150.py +0 -95
- package/tools/vds-scripts/audit_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_agentic_investigator_phase115.py +0 -42
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_requirement_analysis_agent.py +0 -412
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_agent_updates.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_scanner.py +0 -397
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_executor.py +0 -316
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_fallback.py +0 -299
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_policy.py +0 -520
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_telemetry.py +0 -306
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_synthesis_fixes.py +0 -761
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_argument_robustness.py +0 -272
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry.py +0 -2548
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_ast_grep.py +0 -87
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase123_scoping.py +0 -353
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase94_ff.py +0 -445
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_vector_search_phase115.py +0 -35
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_utils.py +0 -1007
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_vector_evidence_toolset.py +0 -622
- package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/test_workflow_cli.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_cache_guard.py +0 -479
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_checklist_parser_phase120.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_diagram_extractor.py +0 -467
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_enrichment_extractor.py +0 -59
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_graphify_collector.py +0 -158
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_completeness.py +0 -563
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_freshness_evaluator.py +0 -493
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_cache_metrics.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_completeness_service.py +0 -2736
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_discovery.py +0 -47
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_redaction.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_ad_hoc_analyzer.py +0 -576
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_agent_loop.py +0 -1896
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_anchor_filter_cl003.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_evidence_cache.py +0 -155
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_processor.py +0 -3608
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_contract.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_scoping.py +0 -371
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_companion_phase123.py +0 -142
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_evidence_phase123.py +0 -249
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_confluence_checklist_contract_export_parity.py +0 -813
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_cross_repo_config_phase122.py +0 -613
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_dspy_requirement_classifier.py +0 -517
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_diversity.py +0 -144
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_truncation.py +0 -108
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_grounding_validator.py +0 -127
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_guidance_injection_phase120.py +0 -105
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_analysis_phase122.py +0 -761
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_pre_filter_phase167.py +0 -334
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_llm_row_evaluator_retries.py +0 -3684
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_loader_phase123.py +0 -345
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_manual_check_gating_phase122.py +0 -474
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_parallel_eval.py +0 -263
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase122_verifier_phase122.py +0 -169
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase166_route_failover.py +0 -437
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_post_eval_cl003_shared_lib.py +0 -267
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_postproc_streaming.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_pre_eval_gating_phase122.py +0 -362
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_prepare_topology_coverage.py +0 -247
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_private_dns_sanitization_phase104.py +0 -397
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_evidence_context.py +0 -450
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_knowledge_store.py +0 -487
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_topology.py +0 -1142
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_provider_failure_classifier.py +0 -195
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_extractor.py +0 -496
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_synthesizer.py +0 -653
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_repo_type_classifier.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis.py +0 -508
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_execution_scope.py +0 -239
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase114.py +0 -919
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase115.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_shared_lib.py +0 -340
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_drift.py +0 -729
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_nlp.py +0 -670
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_scope_phase122.py +0 -615
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_matrix.py +0 -258
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_override.py +0 -141
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_routing_precision.py +0 -650
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_dual_evidence.py +0 -2987
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_instruction_runtime_phase122.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_runtime.py +0 -830
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_runtime_hardening_phase122.py +0 -225
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoped_na_skip.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoring_enhancements.py +0 -404
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_retrieval_phase123.py +0 -441
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_routing_phase123.py +0 -279
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_resource_indexing_phase122.py +0 -188
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_recommendation.py +0 -225
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_routing_cl003_shared_lib.py +0 -338
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skills_toolset.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_stability_metric.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_target_selector.py +0 -958
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_tracker.py +0 -121
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_wiring.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_tool_first_planner.py +0 -7103
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_knowledge_persistence.py +0 -332
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_query_service.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_unverified_ref_retry.py +0 -909
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_evidence.py +0 -515
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_gaps.py +0 -422
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_readiness.py +0 -428
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_confluence_hierarchy.py +0 -227
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_project_title_generation.py +0 -335
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_helpers.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_integration.py +0 -557
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_readiness_renderer.py +0 -381
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_repo_title_consistency.py +0 -266
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_upload_hierarchy_integration.py +0 -470
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_dspy.py +0 -177
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_nlp_accuracy.py +0 -72
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_retrieval_modes.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_verify_phase111_requirement_analysis.py +0 -409
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_chain_cli.py +0 -277
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_loader.py +0 -502
- package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/test_skill_routing.py +0 -209
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_bitbucket_source.py +0 -66
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_non_retryable_markers.py +0 -88
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_repo_info.py +0 -212
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_completeness.py +0 -598
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_events_contract_phase169.py +0 -100
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_hardening_phase158.py +0 -392
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_persistence_phase157.py +0 -914
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_embedding_client.py +0 -64
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_get_latest_completed_run.py +0 -313
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_heartbeat_phase169.py +0 -109
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_hybrid_search.py +0 -398
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_normalize_url.py +0 -262
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase152_query_surface.py +0 -59
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase98_confluence_document_model.py +0 -202
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_published_pages.py +0 -754
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_readiness_helpers.py +0 -193
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_ledger.py +0 -522
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_management.py +0 -378
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_schema_contract_phase170.py +0 -755
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_cmds.py +0 -231
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_loaders.py +0 -2151
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_run_api.py +0 -2226
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store.py +0 -1435
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch.py +0 -646
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch_status_view.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_scope.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_utilization_persist_phase169.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vds_search.py +0 -263
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_api.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_runtime.py +0 -175
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_store.py +0 -1756
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/test_repo_sync.py +0 -257
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_artifact_exclusion.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_auto_promote_phase158.py +0 -337
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_carry_forward_artifact_filtering.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_checklist_precache_p160a.py +0 -416
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_cli_decomposition_fr219.py +0 -269
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_code_chunk_carry_forward.py +0 -203
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_coherence.py +0 -180
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_secret_policy.py +0 -522
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_project_id_migration.py +0 -318
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_status_diagnostics.py +0 -239
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_department_priority_ordering.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_coordinator_phase158.py +0 -402
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_job_identity_p167a.py +0 -238
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_ramp_up_phase171.py +0 -434
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatcher.py +0 -911
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_doc_type_en_inference.py +0 -246
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_early_exit_unchunked_repos.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors.py +0 -237
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors_taxonomy.py +0 -83
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_chunking_config_phase98.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_cmds_state_helpers.py +0 -33
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_docs_code_chunking.py +0 -260
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_finalize_dispatch_run_phase168.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_identity.py +0 -221
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_infrastructure_detection.py +0 -441
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_junction_table_phase95.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_late_binding_assignment_p167c.py +0 -286
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_misc_cmds_fr224_225_hardening.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_p172_integration.py +0 -306
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_parent_provider_preflight.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase92.py +0 -141
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase93.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase115_search_strategy.py +0 -106
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase154_title_consistency.py +0 -117
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase155_param_forwarding.py +0 -304
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase158_concurrency_defaults.py +0 -207
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_doctor_schema.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_regression.py +0 -334
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase94_corpus_lifecycle.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase96_repo_key_migration.py +0 -305
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_pipelined_scheduling.py +0 -130
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_availability_probe.py +0 -616
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_aware_row_timeout.py +0 -102
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_timeout_stagger_p160cd.py +0 -205
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_progress_summary_phase169.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_registry_checklist_diagnostics.py +0 -124
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_resume_manifest_p167b.py +0 -268
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_risk_mitigations_p160e1.py +0 -348
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_single_row_shards_p160b.py +0 -357
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_state_repo_discovery.py +0 -504
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_sync_metadata_entries.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_task_models.py +0 -1796
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_utilization_telemetry_p167e.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_vietnamese_fts_hardening.py +0 -160
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_phase98_enrichment.py +0 -92
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_project_merge_materialization.py +0 -322
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_row_key_migration_guard.py +0 -88
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_short_circuit_phase121.py +0 -564
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_single_target_row_context.py +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_zero_result_messaging.py +0 -76
- package/tools/vds-scripts/bandit-report.json +0 -2974
- package/tools/vds-scripts/brd_orchestrator/README.md +0 -29
- package/tools/vds-scripts/brd_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/cli.py +0 -187
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/validator.py +0 -121
- package/tools/vds-scripts/brd_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/brd_orchestrator/tests/test_cli.py +0 -62
- package/tools/vds-scripts/brd_orchestrator/tests/test_validator.py +0 -33
- package/tools/vds-scripts/circular_dependency_orchestrator/README.md +0 -30
- package/tools/vds-scripts/circular_dependency_orchestrator/pyproject.toml +0 -43
- package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/__init__.py +0 -16
- package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/cli.py +0 -904
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/test_cli.py +0 -354
- package/tools/vds-scripts/coverage.json +0 -1
- package/tools/vds-scripts/create_pr.py +0 -57
- package/tools/vds-scripts/diagram_generator/README.md +0 -663
- package/tools/vds-scripts/diagram_generator/ci_validate.sh +0 -16
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.puml +0 -23
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.puml +0 -21
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.puml +0 -14
- package/tools/vds-scripts/diagram_generator/examples/github-actions-validate.yml +0 -39
- package/tools/vds-scripts/diagram_generator/generate_all_diagrams.py +0 -827
- package/tools/vds-scripts/diagram_generator/generate_insurance_c4_diagrams.py +0 -261
- package/tools/vds-scripts/diagram_generator/generate_insurance_c4_quick.py +0 -486
- package/tools/vds-scripts/diagram_generator/pyproject.toml +0 -28
- package/tools/vds-scripts/diagram_generator/render_png.py +0 -59
- package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/__init__.py +0 -3
- package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/cli.py +0 -50
- package/tools/vds-scripts/diagram_generator/test_c4_hierarchical.py +0 -142
- package/tools/vds-scripts/diagram_generator/test_c4_quick.py +0 -131
- package/tools/vds-scripts/diagram_generator/tests/__init__.py +0 -0
- package/tools/vds-scripts/diagram_generator/tests/test_analyzer_completeness.py +0 -260
- package/tools/vds-scripts/diagram_generator/tests/test_c4_syntax_correctness.py +0 -138
- package/tools/vds-scripts/diagram_generator/tests/test_component_coverage.py +0 -182
- package/tools/vds-scripts/diagram_generator/tests/test_mermaid_output.py +0 -80
- package/tools/vds-scripts/diagram_generator/tests/test_png_generation.py +0 -112
- package/tools/vds-scripts/diagram_generator/tests/test_scenario_templates.py +0 -15
- package/tools/vds-scripts/diagram_generator/tests/test_sequence_accuracy.py +0 -93
- package/tools/vds-scripts/diagram_generator/tests/test_structurizr_export.py +0 -177
- package/tools/vds-scripts/diagram_generator/tests/test_style_consistency.py +0 -174
- package/tools/vds-scripts/diagram_generator/tests/test_usecase_generator.py +0 -201
- package/tools/vds-scripts/diagram_generator/tests/test_usecase_integration.py +0 -124
- package/tools/vds-scripts/docker/compose.phase2-verification.yml +0 -31
- package/tools/vds-scripts/docker-compose.openapi-validator.yml +0 -14
- package/tools/vds-scripts/excel_orchestrator/README.md +0 -288
- package/tools/vds-scripts/excel_orchestrator/RESEARCH_BASED_UPDATES_REPORT.md +0 -261
- package/tools/vds-scripts/excel_orchestrator/add_essential_missing_effort.py +0 -255
- package/tools/vds-scripts/excel_orchestrator/adjust_effort_complexity.py +0 -184
- package/tools/vds-scripts/excel_orchestrator/brd_analysis_and_task_breakdown.py +0 -632
- package/tools/vds-scripts/excel_orchestrator/brd_analysis_comprehensive.py +0 -1029
- package/tools/vds-scripts/excel_orchestrator/check_overlaps_and_brd_coverage.py +0 -570
- package/tools/vds-scripts/excel_orchestrator/clean_remarks_column.py +0 -127
- package/tools/vds-scripts/excel_orchestrator/comprehensive_brd_check.py +0 -322
- package/tools/vds-scripts/excel_orchestrator/create_buffered_summary.py +0 -119
- package/tools/vds-scripts/excel_orchestrator/create_service_totals_sheet.py +0 -118
- package/tools/vds-scripts/excel_orchestrator/examples/basic_operations.py +0 -85
- package/tools/vds-scripts/excel_orchestrator/expand_all_tasks.py +0 -341
- package/tools/vds-scripts/excel_orchestrator/expand_tasks.py +0 -304
- package/tools/vds-scripts/excel_orchestrator/fill_brd_references.py +0 -347
- package/tools/vds-scripts/excel_orchestrator/fill_remarks_and_colors.py +0 -132
- package/tools/vds-scripts/excel_orchestrator/finalize_brd_and_cleanup.py +0 -295
- package/tools/vds-scripts/excel_orchestrator/finalize_brd_coverage.py +0 -327
- package/tools/vds-scripts/excel_orchestrator/fix_all_formulas.py +0 -99
- package/tools/vds-scripts/excel_orchestrator/fix_detail_presentation.py +0 -113
- package/tools/vds-scripts/excel_orchestrator/fix_presentation_and_effort.py +0 -116
- package/tools/vds-scripts/excel_orchestrator/fix_presentation_consistency.py +0 -231
- package/tools/vds-scripts/excel_orchestrator/fix_remarks_matching.py +0 -179
- package/tools/vds-scripts/excel_orchestrator/group_tasks_by_service_id.py +0 -210
- package/tools/vds-scripts/excel_orchestrator/increase_brd_coverage.py +0 -497
- package/tools/vds-scripts/excel_orchestrator/increase_effort_complexity.py +0 -155
- package/tools/vds-scripts/excel_orchestrator/organize_and_deduplicate.py +0 -273
- package/tools/vds-scripts/excel_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/excel_orchestrator/rebuild_all_formulas.py +0 -146
- package/tools/vds-scripts/excel_orchestrator/remove_base_multiplier_and_check_duplicates.py +0 -310
- package/tools/vds-scripts/excel_orchestrator/remove_duplicate_brd_tasks.py +0 -137
- package/tools/vds-scripts/excel_orchestrator/research_based_updates.py +0 -457
- package/tools/vds-scripts/excel_orchestrator/restore_e_values.py +0 -172
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/cli.py +0 -746
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/config.py +0 -74
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/converters.py +0 -226
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/errors.py +0 -88
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/excel_client.py +0 -443
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/formatters.py +0 -211
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/logging.py +0 -57
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/source_contract.py +0 -29
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/target_state_status.py +0 -837
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/ulnc_alignment.py +0 -1291
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/validators.py +0 -164
- package/tools/vds-scripts/excel_orchestrator/sync_detail_and_total_sheets.py +0 -211
- package/tools/vds-scripts/excel_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/excel_orchestrator/tests/conftest.py +0 -36
- package/tools/vds-scripts/excel_orchestrator/tests/test_cli.py +0 -383
- package/tools/vds-scripts/excel_orchestrator/tests/test_excel_client.py +0 -129
- package/tools/vds-scripts/excel_orchestrator/tests/test_ulnc_alignment.py +0 -373
- package/tools/vds-scripts/excel_orchestrator/tests/test_validators.py +0 -64
- package/tools/vds-scripts/excel_orchestrator/update_api_database_effort.py +0 -261
- package/tools/vds-scripts/excel_orchestrator/update_buffers_inline.py +0 -115
- package/tools/vds-scripts/excel_orchestrator/update_complex_services_and_add_new.py +0 -336
- package/tools/vds-scripts/excel_orchestrator/update_responsibility_and_fix_rows.py +0 -208
- package/tools/vds-scripts/excel_orchestrator/update_task_breakdown_vietnamese.py +0 -309
- package/tools/vds-scripts/excel_orchestrator/update_vietnamese_and_responsibility.py +0 -415
- package/tools/vds-scripts/excel_orchestrator/verify_brd_coverage_comprehensive.py +0 -401
- package/tools/vds-scripts/hexagonal_orchestrator/README.md +0 -530
- package/tools/vds-scripts/hexagonal_orchestrator/pyproject.toml +0 -48
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/__init__.py +0 -39
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/__init__.py +0 -19
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/base.py +0 -95
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/fallback.py +0 -614
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/java.py +0 -372
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/python.py +0 -437
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cache.py +0 -331
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/classifier.py +0 -263
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cli.py +0 -554
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/config.py +0 -577
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/models.py +0 -159
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/profiler.py +0 -451
- package/tools/vds-scripts/hexagonal_orchestrator/test-config.yaml +0 -38
- package/tools/vds-scripts/hexagonal_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driven/persistence/InMemoryUserRepository.java +0 -62
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driving/api/UserController.java +0 -101
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/EmailService.java +0 -33
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/UserRepository.java +0 -45
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/usecase/CreateUser.java +0 -58
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/Email.java +0 -80
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/User.java +0 -98
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-noncompliant/domain/User.java +0 -64
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Menu.java +0 -13
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Product.java +0 -16
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/email_service.py +0 -60
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/user_repository.py +0 -78
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/user.py +0 -56
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/email.py +0 -63
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/application/user_service.py +0 -1837
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/domain/user.py +0 -43
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cache.py +0 -458
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_integration.py +0 -942
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_unit.py +0 -557
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cross_repo_pollution.py +0 -275
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_foundation.py +0 -129
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_integration.py +0 -1524
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_java_analyzer.py +0 -642
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_timing_unit.py +0 -60
- package/tools/vds-scripts/intellij_orchestrator/README.md +0 -55
- package/tools/vds-scripts/intellij_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/cli.py +0 -210
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/core.py +0 -260
- package/tools/vds-scripts/intellij_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/intellij_orchestrator/tests/test_cli.py +0 -112
- package/tools/vds-scripts/intellij_orchestrator/tests/test_core.py +0 -83
- package/tools/vds-scripts/links_orchestrator/README.md +0 -63
- package/tools/vds-scripts/links_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/__init__.py +0 -10
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/cli.py +0 -254
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/validator.py +0 -244
- package/tools/vds-scripts/links_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/links_orchestrator/tests/test_cli.py +0 -128
- package/tools/vds-scripts/links_orchestrator/tests/test_validator.py +0 -76
- package/tools/vds-scripts/lsp_orchestrator/.dockerignore +0 -69
- package/tools/vds-scripts/lsp_orchestrator/ARCHITECTURE.md +0 -383
- package/tools/vds-scripts/lsp_orchestrator/CODE_QUALITY_IMPROVEMENTS.md +0 -196
- package/tools/vds-scripts/lsp_orchestrator/COMMANDS.md +0 -870
- package/tools/vds-scripts/lsp_orchestrator/Dockerfile +0 -59
- package/tools/vds-scripts/lsp_orchestrator/IMPLEMENTATION_SUMMARY.md +0 -490
- package/tools/vds-scripts/lsp_orchestrator/LSP_ISSUES_AND_FINDINGS.md +0 -380
- package/tools/vds-scripts/lsp_orchestrator/README.md +0 -616
- package/tools/vds-scripts/lsp_orchestrator/SETUP.md +0 -143
- package/tools/vds-scripts/lsp_orchestrator/TEST_COVERAGE_SUMMARY.md +0 -255
- package/tools/vds-scripts/lsp_orchestrator/VERIFICATION_CHECKLIST.md +0 -814
- package/tools/vds-scripts/lsp_orchestrator/docker-compose.yml +0 -102
- package/tools/vds-scripts/lsp_orchestrator/docs/FOR_LLMS.md +0 -401
- package/tools/vds-scripts/lsp_orchestrator/docs/explanation/lsp-response-matching.md +0 -79
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/automate-with-json.md +0 -159
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/docker-mode.md +0 -256
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/navigate-code.md +0 -116
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/parallel-processing.md +0 -179
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/project-tool-detection.md +0 -320
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/type-check-code.md +0 -46
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/use-daemon-mode.md +0 -78
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/wsl2-optimization.md +0 -227
- package/tools/vds-scripts/lsp_orchestrator/docs/index.md +0 -88
- package/tools/vds-scripts/lsp_orchestrator/docs/operator-hover-definition.md +0 -143
- package/tools/vds-scripts/lsp_orchestrator/docs/reference/commands.md +0 -581
- package/tools/vds-scripts/lsp_orchestrator/docs/reference/configuration.md +0 -422
- package/tools/vds-scripts/lsp_orchestrator/docs/tutorials/00-quick-start.md +0 -169
- package/tools/vds-scripts/lsp_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/lsp_orchestrator/src/test_file.py +0 -5
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/aggregator.py +0 -340
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/basedpyright_runner.py +0 -167
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/cli.py +0 -3370
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/code_actions.py +0 -79
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/core.py +0 -3295
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_client.py +0 -672
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_manager.py +0 -577
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_server.py +0 -1040
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/__init__.py +0 -9
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/project_detector.py +0 -537
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/formatters.py +0 -141
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ipc_protocol.py +0 -225
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_client.py +0 -957
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_router.py +0 -335
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mcp_server.py +0 -181
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/__init__.py +0 -201
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_detector.py +0 -646
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_tools.py +0 -114
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models.py +0 -399
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mypy_runner.py +0 -209
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/protocols.py +0 -52
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_lsp_client.py +0 -109
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_runner.py +0 -44
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/utils.py +0 -959
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/workspace_indexer.py +0 -1037
- package/tools/vds-scripts/lsp_orchestrator/test_workspace_lsp.py +0 -6
- package/tools/vds-scripts/lsp_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/lsp_orchestrator/tests/conftest.py +0 -6
- package/tools/vds-scripts/lsp_orchestrator/tests/test_aggregator.py +0 -59
- package/tools/vds-scripts/lsp_orchestrator/tests/test_cli.py +0 -111
- package/tools/vds-scripts/lsp_orchestrator/tests/test_detect_tools_command.py +0 -186
- package/tools/vds-scripts/lsp_orchestrator/tests/test_formatter_linter_detection.py +0 -519
- package/tools/vds-scripts/lsp_orchestrator/tests/test_integration_phase9_10_11.py +0 -367
- package/tools/vds-scripts/lsp_orchestrator/tests/test_mypy_runner.py +0 -482
- package/tools/vds-scripts/lsp_orchestrator/tests/test_package_manager_detection.py +0 -399
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase10.py +0 -389
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase11.py +0 -327
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase12_integration.py +0 -634
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase9.py +0 -196
- package/tools/vds-scripts/lsp_orchestrator/tests/test_project_detector.py +0 -377
- package/tools/vds-scripts/lsp_orchestrator/tests/test_test_runner_detection.py +0 -549
- package/tools/vds-scripts/lsp_orchestrator/tests/test_type_checker_routing.py +0 -362
- package/tools/vds-scripts/lsp_orchestrator/tests/test_workspace_indexer.py +0 -144
- package/tools/vds-scripts/markdown_orchestrator/README.md +0 -72
- package/tools/vds-scripts/markdown_orchestrator/pyproject.toml +0 -39
- package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/cli.py +0 -102
- package/tools/vds-scripts/multi_agent_orchestrator/Dockerfile +0 -65
- package/tools/vds-scripts/multi_agent_orchestrator/README.md +0 -306
- package/tools/vds-scripts/multi_agent_orchestrator/postman/README.md +0 -264
- package/tools/vds-scripts/multi_agent_orchestrator/postman/TEST_RESULTS_SUMMARY.md +0 -197
- package/tools/vds-scripts/multi_agent_orchestrator/postman/VDS-Multi-Agent-Orchestrator-API.postman_collection.json +0 -1010
- package/tools/vds-scripts/multi_agent_orchestrator/postman/environments/local-development.postman_environment.json +0 -55
- package/tools/vds-scripts/multi_agent_orchestrator/postman/test-results.json +0 -24146
- package/tools/vds-scripts/multi_agent_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/multi_agent_orchestrator/run_api.py +0 -9
- package/tools/vds-scripts/multi_agent_orchestrator/run_mock_api.py +0 -9
- package/tools/vds-scripts/multi_agent_orchestrator/simple_test.py +0 -53
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/__init__.py +0 -25
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/agent_pool.py +0 -433
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/__init__.py +0 -5
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/main.py +0 -722
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/mock_main.py +0 -812
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/change_log.py +0 -515
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/cli.py +0 -424
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/config.py +0 -220
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/conflict_resolver.py +0 -462
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/coordinator.py +0 -627
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/models.py +0 -389
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/progress_dashboard.py +0 -380
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/redis_client.py +0 -245
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/scheduler_subscriber.py +0 -272
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_manager.py +0 -536
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_tracking.py +0 -550
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/vds_ai_memory_client.py +0 -352
- package/tools/vds-scripts/multi_agent_orchestrator/test_complete_system.py +0 -149
- package/tools/vds-scripts/multi_agent_orchestrator/test_infrastructure_only.py +0 -194
- package/tools/vds-scripts/multi_agent_orchestrator/test_integration.py +0 -108
- package/tools/vds-scripts/multi_agent_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_agent_registration_credential_validator.py +0 -223
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_config.py +0 -210
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_models.py +0 -195
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_w9_agent_routes.py +0 -321
- package/tools/vds-scripts/openapi_orchestrator/README.md +0 -197
- package/tools/vds-scripts/openapi_orchestrator/pyproject.toml +0 -106
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/__init__.py +0 -29
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/cli.py +0 -345
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/full_validator.py +0 -183
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/spec_validator.py +0 -197
- package/tools/vds-scripts/openapi_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/openapi_orchestrator/tests/test_cli.py +0 -234
- package/tools/vds-scripts/openapi_orchestrator/tests/test_full_validator.py +0 -203
- package/tools/vds-scripts/openapi_orchestrator/tests/test_spec_validator.py +0 -295
- package/tools/vds-scripts/pdf_orchestrator/.dockerignore +0 -93
- package/tools/vds-scripts/pdf_orchestrator/.env.example +0 -40
- package/tools/vds-scripts/pdf_orchestrator/.ruff_rules.py +0 -350
- package/tools/vds-scripts/pdf_orchestrator/.yamllint.yml +0 -43
- package/tools/vds-scripts/pdf_orchestrator/DEVELOPMENT_PLAN.md +0 -80
- package/tools/vds-scripts/pdf_orchestrator/Dockerfile +0 -87
- package/tools/vds-scripts/pdf_orchestrator/README.md +0 -608
- package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.md +0 -6
- package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.pdf +0 -0
- package/tools/vds-scripts/pdf_orchestrator/config/alertmanager.yml +0 -83
- package/tools/vds-scripts/pdf_orchestrator/config/prometheus.prod.yml +0 -98
- package/tools/vds-scripts/pdf_orchestrator/config/prometheus.yml +0 -40
- package/tools/vds-scripts/pdf_orchestrator/config/redis.conf +0 -78
- package/tools/vds-scripts/pdf_orchestrator/docs/COMPETITIVE_ANALYSIS_REPORT.md +0 -309
- package/tools/vds-scripts/pdf_orchestrator/docs/FEATURES_GUIDE.md +0 -518
- package/tools/vds-scripts/pdf_orchestrator/docs/MULTI_USER_DEPLOYMENT_GUIDE.md +0 -615
- package/tools/vds-scripts/pdf_orchestrator/docs/USER_GUIDE.md +0 -829
- package/tools/vds-scripts/pdf_orchestrator/pyproject.toml +0 -87
- package/tools/vds-scripts/pdf_orchestrator/pytest.ini +0 -71
- package/tools/vds-scripts/pdf_orchestrator/ruff.toml +0 -6
- package/tools/vds-scripts/pdf_orchestrator/scripts/debug_security_report.py +0 -59
- package/tools/vds-scripts/pdf_orchestrator/scripts/demo_library_selector.py +0 -109
- package/tools/vds-scripts/pdf_orchestrator/scripts/generate_project_stats.py +0 -52
- package/tools/vds-scripts/pdf_orchestrator/scripts/generate_styled_pdf.py +0 -95
- package/tools/vds-scripts/pdf_orchestrator/scripts/migrate_render_pdfs.py +0 -285
- package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.bat +0 -283
- package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.sh +0 -324
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/cli.py +0 -542
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/config.py +0 -33
- package/tools/vds-scripts/pdf_orchestrator/tests/README.md +0 -650
- package/tools/vds-scripts/pdf_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/pdf_orchestrator/tests/conftest.py +0 -520
- package/tools/vds-scripts/pdf_orchestrator/tests/requirements.txt +0 -51
- package/tools/vds-scripts/pdf_orchestrator/tests/run_tests.py +0 -659
- package/tools/vds-scripts/pdf_orchestrator/tests/test_config.py +0 -36
- package/tools/vds-scripts/progress_report_orchestrator/Dockerfile +0 -77
- package/tools/vds-scripts/progress_report_orchestrator/README.md +0 -39
- package/tools/vds-scripts/progress_report_orchestrator/alembic/env.py +0 -42
- package/tools/vds-scripts/progress_report_orchestrator/alembic/script.py.mako +0 -28
- package/tools/vds-scripts/progress_report_orchestrator/alembic/versions/0001_initial_progress_schema.py +0 -180
- package/tools/vds-scripts/progress_report_orchestrator/alembic.ini +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/pyproject.toml +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/endpoint_scanner.py +0 -238
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/git_activity.py +0 -159
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/hexagonal.py +0 -100
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/test_scanner.py +0 -136
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/cli.py +0 -743
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/config.py +0 -50
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/__init__.py +0 -12
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/alembic_filters.py +0 -64
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/memory.py +0 -82
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/analysis.py +0 -84
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/report.py +0 -117
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/topology.py +0 -101
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/kg_parser.py +0 -252
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/uc_reader.py +0 -159
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/concurrency.py +0 -39
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/llm_eval.py +0 -570
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/report.py +0 -1256
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/structural.py +0 -384
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/sync.py +0 -143
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/__init__.py +0 -5
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/engine.py +0 -105
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/templates.py +0 -236
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/scheduler_subscriber.py +0 -238
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/README.md +0 -56
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-architecture-reviewer/SKILL.md +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-endpoint-matcher/SKILL.md +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/schema.py +0 -625
- package/tools/vds-scripts/progress_report_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/.gitkeep +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/doc-dependencies.yaml +0 -79
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-docs.yaml +0 -478
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-services.yaml +0 -18
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/registry.yaml +0 -346
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/phase3_baseline_standard.md +0 -564
- package/tools/vds-scripts/progress_report_orchestrator/tests/integration/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/integration/test_checkpoint.py +0 -276
- package/tools/vds-scripts/progress_report_orchestrator/tests/test_alembic_migrations.py +0 -265
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_analyzers.py +0 -267
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_bounded_gather.py +0 -176
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_cli_phase_report.py +0 -119
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_delta.py +0 -169
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_error_handling.py +0 -150
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_gate_exit_codes.py +0 -230
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_git_activity.py +0 -215
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_kg_parser.py +0 -267
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_autodetect.py +0 -183
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_eval.py +0 -529
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_memory_integration.py +0 -151
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_migration_contract.py +0 -254
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_mode_rendering.py +0 -576
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_models.py +0 -251
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_progress_llm_config.py +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_recommendations.py +0 -480
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_report_enhancements.py +0 -415
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_resume_reload.py +0 -343
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_trend_regression.py +0 -294
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_uc_reader.py +0 -169
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_valence_gap.py +0 -293
- package/tools/vds-scripts/project-cycle-report.json +0 -14
- package/tools/vds-scripts/project-dependency-graph.json +0 -11361
- package/tools/vds-scripts/project-topology.json +0 -99
- package/tools/vds-scripts/public_interface_boundary_orchestrator/pyproject.toml +0 -18
- package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/__init__.py +0 -0
- package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/cli.py +0 -232
- package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/test_cli.py +0 -108
- package/tools/vds-scripts/research_orchestrator/README.md +0 -68
- package/tools/vds-scripts/research_orchestrator/py.typed +0 -0
- package/tools/vds-scripts/research_orchestrator/pyproject.toml +0 -95
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/_env.py +0 -11
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/cli.py +0 -335
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/config.py +0 -43
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/models.py +0 -89
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/scoring.py +0 -102
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/exceptions.py +0 -78
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/http_client.py +0 -160
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/logging.py +0 -49
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/formatters.py +0 -93
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/py.typed +0 -1
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/build.py +0 -156
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/format.py +0 -147
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health.py +0 -66
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health_graph.py +0 -52
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/registry.py +0 -127
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/search.py +0 -230
- package/tools/vds-scripts/research_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/tests/conftest.py +0 -53
- package/tools/vds-scripts/research_orchestrator/tests/test_cli.py +0 -222
- package/tools/vds-scripts/research_orchestrator/tests/test_config.py +0 -23
- package/tools/vds-scripts/research_orchestrator/tests/test_exceptions.py +0 -62
- package/tools/vds-scripts/research_orchestrator/tests/test_formatters.py +0 -89
- package/tools/vds-scripts/research_orchestrator/tests/test_graph_integration.py +0 -149
- package/tools/vds-scripts/research_orchestrator/tests/test_http_client.py +0 -134
- package/tools/vds-scripts/research_orchestrator/tests/test_report_build.py +0 -128
- package/tools/vds-scripts/research_orchestrator/tests/test_report_format.py +0 -91
- package/tools/vds-scripts/research_orchestrator/tests/test_scoring.py +0 -95
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/__init__.py +0 -1
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_health.py +0 -139
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_registry.py +0 -135
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_search.py +0 -238
- package/tools/vds-scripts/run-history.json +0 -26
- package/tools/vds-scripts/schema_converter/README.md +0 -109
- package/tools/vds-scripts/schema_converter/pyproject.toml +0 -37
- package/tools/vds-scripts/schema_converter/src/vds_schema_converter/__init__.py +0 -3
- package/tools/vds-scripts/schema_converter/src/vds_schema_converter/cli.py +0 -50
- package/tools/vds-scripts/schema_converter/tests/__init__.py +0 -0
- package/tools/vds-scripts/schema_converter/tests/test_json_schema_generator.py +0 -115
- package/tools/vds-scripts/schema_converter/tests/test_mermaid_generator.py +0 -112
- package/tools/vds-scripts/schema_converter/tests/test_parser.py +0 -111
- package/tools/vds-scripts/schema_converter/tests/test_plantuml_generator.py +0 -112
- package/tools/vds-scripts/schema_converter/tests/test_plantuml_validator.py +0 -69
- package/tools/vds-scripts/schema_converter/tests/test_prisma_generator.py +0 -113
- package/tools/vds-scripts/schema_converter/tests/test_sql_generator.py +0 -138
- package/tools/vds-scripts/schema_converter/tests/test_typeorm_generator.py +0 -110
- package/tools/vds-scripts/schema_converter/tests/test_validators.py +0 -96
- package/tools/vds-scripts/spec_orchestrator/README.md +0 -13
- package/tools/vds-scripts/spec_orchestrator/pyproject.toml +0 -40
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/cli.py +0 -162
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/core.py +0 -575
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/sync.py +0 -306
- package/tools/vds-scripts/spec_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/spec_orchestrator/tests/test_frontmatter_drift.py +0 -243
- package/tools/vds-scripts/spec_orchestrator/tests/test_sync.py +0 -342
- package/tools/vds-scripts/structure_orchestrator/README.md +0 -60
- package/tools/vds-scripts/structure_orchestrator/pyproject.toml +0 -103
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/__init__.py +0 -13
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/cli.py +0 -308
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/validator.py +0 -257
- package/tools/vds-scripts/structure_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/structure_orchestrator/tests/test_cli.py +0 -161
- package/tools/vds-scripts/structure_orchestrator/tests/test_helpers.py +0 -115
- package/tools/vds-scripts/structure_orchestrator/tests/test_validator.py +0 -104
- package/tools/vds-scripts/task_orchestrator/README.md +0 -50
- package/tools/vds-scripts/task_orchestrator/__init__.py +0 -18
- package/tools/vds-scripts/task_orchestrator/pyproject.toml +0 -43
- package/tools/vds-scripts/task_orchestrator/scripts/run_excel_sync.py +0 -36
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/__init__.py +0 -13
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/audit.py +0 -134
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/cli.py +0 -127
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/debug.py +0 -133
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/normalize.py +0 -113
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/refine.py +0 -201
- package/tools/vds-scripts/task_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/task_orchestrator/tests/test_task_orchestrator.py +0 -84
- package/tools/vds-scripts/temp_query_projects.py +0 -2
- package/tools/vds-scripts/test_small.md +0 -1
- package/tools/vds-scripts/text_utils_orchestrator/pyproject.toml +0 -20
- package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/__init__.py +0 -7
- package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/i18n.py +0 -143
- package/tools/vds-scripts/text_utils_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/text_utils_orchestrator/tests/test_i18n.py +0 -53
- package/tools/vds-scripts/upgrade_major.py +0 -61
- package/tools/vds-scripts/upgrade_major_v2.py +0 -64
- package/tools/vds-scripts/verify_violations.py +0 -57
- package/tools/vds-scripts/workflow-summary.json +0 -325
- package/tools/vds-scripts/workflow-summary.md +0 -8
|
@@ -1,2311 +0,0 @@
|
|
|
1
|
-
"""Tests for CodeAnalysisAgent.
|
|
2
|
-
|
|
3
|
-
Phase 23 Refinement (FR-1.1):
|
|
4
|
-
- Updated tests to use SecurityPatternScanner instead of grepai
|
|
5
|
-
- Tests now mock SecurityPatternScanner for security pattern detection
|
|
6
|
-
- Source changed from "grepai" to "pattern_scanner"
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
from __future__ import annotations
|
|
10
|
-
|
|
11
|
-
import asyncio
|
|
12
|
-
from types import SimpleNamespace
|
|
13
|
-
from unittest.mock import AsyncMock, MagicMock, patch
|
|
14
|
-
|
|
15
|
-
import pytest
|
|
16
|
-
from vds_agent_core.config import LLMProtocolType
|
|
17
|
-
from vds_audit_orchestrator.agents.code_agent import CodeAnalysisAgent
|
|
18
|
-
from vds_audit_orchestrator.agents.pydantic_base import (
|
|
19
|
-
CodeFindings,
|
|
20
|
-
CodeIssue,
|
|
21
|
-
)
|
|
22
|
-
from vds_audit_orchestrator.agents.security_scanner import ScanResult
|
|
23
|
-
from vds_audit_orchestrator.llm.provider import LLMSettings
|
|
24
|
-
from vds_audit_orchestrator.models.evidence import Evidence, EvidenceBundle, EvidenceStatus
|
|
25
|
-
from vds_audit_orchestrator.models.task import AuditTask
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@pytest.fixture
|
|
29
|
-
def mock_evidence_bundle():
|
|
30
|
-
"""Create a mock evidence bundle."""
|
|
31
|
-
return EvidenceBundle(
|
|
32
|
-
repository="test-repo",
|
|
33
|
-
git_evidence=[
|
|
34
|
-
Evidence(
|
|
35
|
-
source="git_file",
|
|
36
|
-
source_id="src/main.py",
|
|
37
|
-
title="Main App",
|
|
38
|
-
content="def main():\n # TODO: Implement feature\n pass",
|
|
39
|
-
content_hash="hash1",
|
|
40
|
-
status=EvidenceStatus.FOUND,
|
|
41
|
-
),
|
|
42
|
-
Evidence(
|
|
43
|
-
source="git_file",
|
|
44
|
-
source_id="src/utils.py",
|
|
45
|
-
title="Utils",
|
|
46
|
-
content="def util():\n # FIXME: broken logic\n pass",
|
|
47
|
-
content_hash="hash2",
|
|
48
|
-
status=EvidenceStatus.FOUND,
|
|
49
|
-
),
|
|
50
|
-
],
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
@pytest.fixture
|
|
55
|
-
def empty_evidence_bundle():
|
|
56
|
-
"""Create an empty evidence bundle for edge case testing."""
|
|
57
|
-
return EvidenceBundle(
|
|
58
|
-
repository="empty-repo",
|
|
59
|
-
git_evidence=[],
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
@pytest.fixture
|
|
64
|
-
def single_file_evidence_bundle():
|
|
65
|
-
"""Create a single file evidence bundle."""
|
|
66
|
-
return EvidenceBundle(
|
|
67
|
-
repository="single-file-repo",
|
|
68
|
-
git_evidence=[
|
|
69
|
-
Evidence(
|
|
70
|
-
source="git_file",
|
|
71
|
-
source_id="README.md",
|
|
72
|
-
title="Readme",
|
|
73
|
-
content="# My Project\n\nA simple project with one file.",
|
|
74
|
-
content_hash="hash3",
|
|
75
|
-
status=EvidenceStatus.FOUND,
|
|
76
|
-
),
|
|
77
|
-
],
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
@pytest.fixture
|
|
82
|
-
def large_evidence_bundle():
|
|
83
|
-
"""Create a large evidence bundle with many files."""
|
|
84
|
-
return EvidenceBundle(
|
|
85
|
-
repository="large-repo",
|
|
86
|
-
git_evidence=[
|
|
87
|
-
Evidence(
|
|
88
|
-
source="git_file",
|
|
89
|
-
source_id=f"src/module_{i}.py",
|
|
90
|
-
title=f"Module {i}",
|
|
91
|
-
content=f"def function_{i}():\n pass",
|
|
92
|
-
content_hash=f"hash{i}",
|
|
93
|
-
status=EvidenceStatus.FOUND,
|
|
94
|
-
)
|
|
95
|
-
for i in range(100)
|
|
96
|
-
],
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
@pytest.fixture
|
|
101
|
-
def varied_severity_bundle():
|
|
102
|
-
"""Create evidence bundle with various severity patterns."""
|
|
103
|
-
return EvidenceBundle(
|
|
104
|
-
repository="severity-test-repo",
|
|
105
|
-
git_evidence=[
|
|
106
|
-
Evidence(
|
|
107
|
-
source="git_file",
|
|
108
|
-
source_id="src/high_severity.py",
|
|
109
|
-
title="High Severity",
|
|
110
|
-
content="def risky():\n except:\n pass # Bare except",
|
|
111
|
-
content_hash="hash_high",
|
|
112
|
-
status=EvidenceStatus.FOUND,
|
|
113
|
-
),
|
|
114
|
-
Evidence(
|
|
115
|
-
source="git_file",
|
|
116
|
-
source_id="src/medium_severity.py",
|
|
117
|
-
title="Medium Severity",
|
|
118
|
-
content="def medium():\n # FIXME: fix this later\n pass",
|
|
119
|
-
content_hash="hash_med",
|
|
120
|
-
status=EvidenceStatus.FOUND,
|
|
121
|
-
),
|
|
122
|
-
Evidence(
|
|
123
|
-
source="git_file",
|
|
124
|
-
source_id="src/low_severity.py",
|
|
125
|
-
title="Low Severity",
|
|
126
|
-
content="def minor():\n # TODO: add documentation\n pass",
|
|
127
|
-
content_hash="hash_low",
|
|
128
|
-
status=EvidenceStatus.FOUND,
|
|
129
|
-
),
|
|
130
|
-
Evidence(
|
|
131
|
-
source="git_file",
|
|
132
|
-
source_id="src/info_severity.py",
|
|
133
|
-
title="Info Severity",
|
|
134
|
-
content="def ignore():\n x = 1 # type: ignore\n pass",
|
|
135
|
-
content_hash="hash_info",
|
|
136
|
-
status=EvidenceStatus.FOUND,
|
|
137
|
-
),
|
|
138
|
-
],
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
@pytest.mark.asyncio
|
|
143
|
-
async def test_pattern_scanner_logged_in_metadata(monkeypatch, mock_evidence_bundle, tmp_path):
|
|
144
|
-
"""Ensure SecurityPatternScanner usage is recorded in agent metadata.
|
|
145
|
-
|
|
146
|
-
Phase 23 Refinement: Updated to test pattern_scanner instead of grepai.
|
|
147
|
-
"""
|
|
148
|
-
# Create a mock repo path
|
|
149
|
-
repo_path = tmp_path / "test-repo"
|
|
150
|
-
repo_path.mkdir()
|
|
151
|
-
|
|
152
|
-
# Create a test file with a security pattern
|
|
153
|
-
test_file = repo_path / "test.py"
|
|
154
|
-
test_file.write_text("password = 'secret123'")
|
|
155
|
-
|
|
156
|
-
# Mock _get_repo_path to return our test repo
|
|
157
|
-
agent = CodeAnalysisAgent(settings=LLMSettings(enabled=False))
|
|
158
|
-
agent._get_repo_path = lambda evidence, profile: repo_path
|
|
159
|
-
|
|
160
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
161
|
-
|
|
162
|
-
assert result.metadata.get("pattern_scanner_used") is True
|
|
163
|
-
assert "pattern_scanner_findings" in result.metadata
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
class TestCodeAnalysisAgent:
|
|
167
|
-
"""Tests for CodeAnalysisAgent."""
|
|
168
|
-
|
|
169
|
-
# ============================================================================
|
|
170
|
-
# BASIC FUNCTIONALITY TESTS (Original)
|
|
171
|
-
# ============================================================================
|
|
172
|
-
|
|
173
|
-
@pytest.mark.asyncio
|
|
174
|
-
async def test_analyze_bundle_missing(self):
|
|
175
|
-
"""Test handling of missing evidence bundle."""
|
|
176
|
-
agent = CodeAnalysisAgent()
|
|
177
|
-
result = await agent.analyze({})
|
|
178
|
-
assert result.success is False
|
|
179
|
-
assert result.error and "Evidence bundle missing" in result.error
|
|
180
|
-
|
|
181
|
-
@pytest.mark.asyncio
|
|
182
|
-
async def test_analyze_patterns(self, mock_evidence_bundle):
|
|
183
|
-
"""Test pattern matching analysis.
|
|
184
|
-
|
|
185
|
-
Phase 23 Refinement: Removed grepai mock, pattern scanner is skipped
|
|
186
|
-
when repo_path is not available.
|
|
187
|
-
"""
|
|
188
|
-
agent = CodeAnalysisAgent()
|
|
189
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
190
|
-
|
|
191
|
-
assert result.success is True
|
|
192
|
-
findings = result.findings
|
|
193
|
-
|
|
194
|
-
# Should find TODO and FIXME
|
|
195
|
-
todos = [f for f in findings if "TODO" in f["description"]]
|
|
196
|
-
fixmes = [f for f in findings if "FIXME" in f["description"]]
|
|
197
|
-
|
|
198
|
-
assert len(todos) == 1
|
|
199
|
-
assert todos[0]["location"] == "src/main.py"
|
|
200
|
-
assert todos[0]["type"] == "technical_debt"
|
|
201
|
-
|
|
202
|
-
assert len(fixmes) == 1
|
|
203
|
-
assert fixmes[0]["location"] == "src/utils.py"
|
|
204
|
-
|
|
205
|
-
@pytest.mark.asyncio
|
|
206
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
207
|
-
async def test_analyze_security_patterns(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
208
|
-
"""Test integration with SecurityPatternScanner.
|
|
209
|
-
|
|
210
|
-
Phase 23 Refinement: Updated to use SecurityPatternScanner instead of grepai.
|
|
211
|
-
"""
|
|
212
|
-
# Create mock scan results
|
|
213
|
-
mock_scanner = MagicMock()
|
|
214
|
-
mock_scanner.scan.return_value = [
|
|
215
|
-
ScanResult(
|
|
216
|
-
pattern_name="hardcoded_password",
|
|
217
|
-
severity="CRITICAL",
|
|
218
|
-
description="Hardcoded password detected",
|
|
219
|
-
file_path="src/auth.py",
|
|
220
|
-
line_number=10,
|
|
221
|
-
line_content="password = '123456'",
|
|
222
|
-
match_text="password = '123456'",
|
|
223
|
-
)
|
|
224
|
-
]
|
|
225
|
-
mock_scanner_class.return_value = mock_scanner
|
|
226
|
-
|
|
227
|
-
# Create a mock repo path
|
|
228
|
-
repo_path = tmp_path / "test-repo"
|
|
229
|
-
repo_path.mkdir()
|
|
230
|
-
|
|
231
|
-
agent = CodeAnalysisAgent()
|
|
232
|
-
# Mock _get_repo_path to return our test repo
|
|
233
|
-
agent._get_repo_path = lambda evidence, profile: repo_path
|
|
234
|
-
|
|
235
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
236
|
-
|
|
237
|
-
assert result.success is True
|
|
238
|
-
findings = result.findings
|
|
239
|
-
|
|
240
|
-
security_findings = [f for f in findings if f.get("source") == "pattern_scanner"]
|
|
241
|
-
assert len(security_findings) >= 1
|
|
242
|
-
assert security_findings[0]["type"] == "security_hardcoded_password"
|
|
243
|
-
assert security_findings[0]["severity"] == "critical"
|
|
244
|
-
|
|
245
|
-
@pytest.mark.asyncio
|
|
246
|
-
async def test_analyze_llm(self, mock_evidence_bundle):
|
|
247
|
-
"""Test LLM-based analysis.
|
|
248
|
-
|
|
249
|
-
Phase 23 Refinement: Removed grepai mock, pattern scanner is skipped
|
|
250
|
-
when repo_path is not available.
|
|
251
|
-
"""
|
|
252
|
-
mock_settings = MagicMock()
|
|
253
|
-
mock_settings.enabled = True
|
|
254
|
-
|
|
255
|
-
llm_output = CodeFindings(
|
|
256
|
-
score=8.0,
|
|
257
|
-
issues=[
|
|
258
|
-
CodeIssue(
|
|
259
|
-
severity="low",
|
|
260
|
-
category="quality",
|
|
261
|
-
description="Good structure",
|
|
262
|
-
file_path="src/main.py",
|
|
263
|
-
)
|
|
264
|
-
],
|
|
265
|
-
patterns=[],
|
|
266
|
-
confidence=0.85,
|
|
267
|
-
reasoning="Code follows good practices",
|
|
268
|
-
files_analyzed=2,
|
|
269
|
-
tech_stack=["python"],
|
|
270
|
-
)
|
|
271
|
-
|
|
272
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
273
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
|
|
274
|
-
|
|
275
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
276
|
-
|
|
277
|
-
assert result.success is True
|
|
278
|
-
llm_findings = [f for f in result.findings if f.get("source") == "pydantic_ai_analysis"]
|
|
279
|
-
assert len(llm_findings) == 1
|
|
280
|
-
assert llm_findings[0]["type"] == "quality" # Uses issue.category, not issue.type
|
|
281
|
-
assert result.metadata["llm_summary"]["score"] == 8.0
|
|
282
|
-
|
|
283
|
-
# ============================================================================
|
|
284
|
-
# EDGE CASE TESTS
|
|
285
|
-
# ============================================================================
|
|
286
|
-
|
|
287
|
-
@pytest.mark.asyncio
|
|
288
|
-
async def test_empty_repository(self, empty_evidence_bundle):
|
|
289
|
-
"""Test analysis of empty repository with no files.
|
|
290
|
-
|
|
291
|
-
Phase 23 Refinement: Removed grepai mock, pattern scanner is skipped
|
|
292
|
-
when repo_path is not available.
|
|
293
|
-
"""
|
|
294
|
-
agent = CodeAnalysisAgent()
|
|
295
|
-
result = await agent.analyze(empty_evidence_bundle)
|
|
296
|
-
|
|
297
|
-
assert result.success is True
|
|
298
|
-
assert result.findings == []
|
|
299
|
-
assert result.metadata["files_analyzed"] == 0
|
|
300
|
-
assert result.metadata["total_findings"] == 0
|
|
301
|
-
|
|
302
|
-
@pytest.mark.asyncio
|
|
303
|
-
async def test_llm_skips_empty_placeholder_files(self):
|
|
304
|
-
"""LLM analysis should not run when evidence files have empty content only."""
|
|
305
|
-
bundle = EvidenceBundle(
|
|
306
|
-
repository="placeholder-repo",
|
|
307
|
-
git_evidence=[
|
|
308
|
-
Evidence(
|
|
309
|
-
source="git_file",
|
|
310
|
-
source_id="README.md",
|
|
311
|
-
title="README.md",
|
|
312
|
-
content="",
|
|
313
|
-
content_hash="",
|
|
314
|
-
status=EvidenceStatus.MISSING,
|
|
315
|
-
),
|
|
316
|
-
Evidence(
|
|
317
|
-
source="git_file",
|
|
318
|
-
source_id="docs/architecture.md",
|
|
319
|
-
title="architecture.md",
|
|
320
|
-
content=" ",
|
|
321
|
-
content_hash="",
|
|
322
|
-
status=EvidenceStatus.MISSING,
|
|
323
|
-
),
|
|
324
|
-
],
|
|
325
|
-
)
|
|
326
|
-
settings = MagicMock()
|
|
327
|
-
settings.enabled = True
|
|
328
|
-
agent = CodeAnalysisAgent(settings=settings)
|
|
329
|
-
agent._run_pydantic_agent = AsyncMock(side_effect=AssertionError("LLM should not be called"))
|
|
330
|
-
|
|
331
|
-
result = await agent.analyze(bundle)
|
|
332
|
-
|
|
333
|
-
assert result.success is True
|
|
334
|
-
assert "llm_summary" not in result.metadata
|
|
335
|
-
assert "llm_error" not in result.metadata
|
|
336
|
-
assert result.metadata["files_analyzed"] == 2
|
|
337
|
-
|
|
338
|
-
@pytest.mark.asyncio
|
|
339
|
-
async def test_single_file_repository(self, single_file_evidence_bundle):
|
|
340
|
-
"""Test analysis of repository with single file.
|
|
341
|
-
|
|
342
|
-
Phase 23 Refinement: Removed grepai mock, pattern scanner is skipped
|
|
343
|
-
when repo_path is not available.
|
|
344
|
-
"""
|
|
345
|
-
agent = CodeAnalysisAgent()
|
|
346
|
-
result = await agent.analyze(single_file_evidence_bundle)
|
|
347
|
-
|
|
348
|
-
assert result.success is True
|
|
349
|
-
assert result.metadata["files_analyzed"] == 1
|
|
350
|
-
# Single clean file should have no pattern findings
|
|
351
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
352
|
-
assert len(pattern_findings) == 0
|
|
353
|
-
|
|
354
|
-
@pytest.mark.asyncio
|
|
355
|
-
async def test_none_evidence_bundle(self):
|
|
356
|
-
"""Test handling of None as evidence bundle.
|
|
357
|
-
|
|
358
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
359
|
-
"""
|
|
360
|
-
agent = CodeAnalysisAgent()
|
|
361
|
-
result = await agent.analyze(None)
|
|
362
|
-
|
|
363
|
-
assert result.success is False
|
|
364
|
-
assert result.error and "Evidence bundle missing" in result.error
|
|
365
|
-
|
|
366
|
-
@pytest.mark.asyncio
|
|
367
|
-
async def test_dict_with_evidence_bundle_key(self, mock_evidence_bundle):
|
|
368
|
-
"""Test dictionary input with evidence_bundle key.
|
|
369
|
-
|
|
370
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
371
|
-
"""
|
|
372
|
-
agent = CodeAnalysisAgent()
|
|
373
|
-
result = await agent.analyze({"evidence_bundle": mock_evidence_bundle})
|
|
374
|
-
|
|
375
|
-
assert result.success is True
|
|
376
|
-
assert result.metadata["files_analyzed"] == 2
|
|
377
|
-
|
|
378
|
-
@pytest.mark.asyncio
|
|
379
|
-
async def test_dict_with_evidence_key(self, mock_evidence_bundle):
|
|
380
|
-
"""Test dictionary input with evidence key.
|
|
381
|
-
|
|
382
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
383
|
-
"""
|
|
384
|
-
agent = CodeAnalysisAgent()
|
|
385
|
-
result = await agent.analyze({"evidence": mock_evidence_bundle})
|
|
386
|
-
|
|
387
|
-
assert result.success is True
|
|
388
|
-
assert result.metadata["files_analyzed"] == 2
|
|
389
|
-
|
|
390
|
-
# ============================================================================
|
|
391
|
-
# PATTERN SCANNER FAILURE AND ERROR HANDLING TESTS
|
|
392
|
-
# ============================================================================
|
|
393
|
-
|
|
394
|
-
@pytest.mark.asyncio
|
|
395
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
396
|
-
async def test_pattern_scanner_exception(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
397
|
-
"""Test handling when SecurityPatternScanner raises an exception.
|
|
398
|
-
|
|
399
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of grepai.
|
|
400
|
-
"""
|
|
401
|
-
mock_scanner_class.side_effect = Exception("Scanner not available")
|
|
402
|
-
|
|
403
|
-
# Create a mock repo path
|
|
404
|
-
repo_path = tmp_path / "test-repo"
|
|
405
|
-
repo_path.mkdir()
|
|
406
|
-
|
|
407
|
-
agent = CodeAnalysisAgent()
|
|
408
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
409
|
-
|
|
410
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
411
|
-
|
|
412
|
-
# Should continue with pattern matching despite scanner failure
|
|
413
|
-
assert result.success is True
|
|
414
|
-
scanner_findings = [f for f in result.findings if f.get("source") == "pattern_scanner"]
|
|
415
|
-
assert len(scanner_findings) == 0
|
|
416
|
-
# Pattern findings should still be present
|
|
417
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
418
|
-
assert len(pattern_findings) > 0
|
|
419
|
-
|
|
420
|
-
@pytest.mark.asyncio
|
|
421
|
-
async def test_pattern_scanner_no_repo_path(self, mock_evidence_bundle):
|
|
422
|
-
"""Test handling when repo_path is not available.
|
|
423
|
-
|
|
424
|
-
Phase 23 Refinement: Tests graceful handling when repo_path cannot be determined.
|
|
425
|
-
"""
|
|
426
|
-
agent = CodeAnalysisAgent()
|
|
427
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
428
|
-
|
|
429
|
-
# Should continue with pattern matching despite missing repo_path
|
|
430
|
-
assert result.success is True
|
|
431
|
-
assert result.metadata.get("pattern_scanner_skipped") == "repo_path not available"
|
|
432
|
-
# Pattern findings should still be present
|
|
433
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
434
|
-
assert len(pattern_findings) > 0
|
|
435
|
-
|
|
436
|
-
@pytest.mark.asyncio
|
|
437
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
438
|
-
async def test_pattern_scanner_returns_empty_list(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
439
|
-
"""Test when SecurityPatternScanner returns empty results.
|
|
440
|
-
|
|
441
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of grepai.
|
|
442
|
-
"""
|
|
443
|
-
mock_scanner = MagicMock()
|
|
444
|
-
mock_scanner.scan.return_value = []
|
|
445
|
-
mock_scanner_class.return_value = mock_scanner
|
|
446
|
-
|
|
447
|
-
# Create a mock repo path
|
|
448
|
-
repo_path = tmp_path / "test-repo"
|
|
449
|
-
repo_path.mkdir()
|
|
450
|
-
|
|
451
|
-
agent = CodeAnalysisAgent()
|
|
452
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
453
|
-
|
|
454
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
455
|
-
|
|
456
|
-
assert result.success is True
|
|
457
|
-
scanner_findings = [f for f in result.findings if f.get("source") == "pattern_scanner"]
|
|
458
|
-
assert len(scanner_findings) == 0
|
|
459
|
-
# Should still have pattern findings
|
|
460
|
-
assert len(result.findings) > 0
|
|
461
|
-
|
|
462
|
-
@pytest.mark.asyncio
|
|
463
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
464
|
-
async def test_pattern_scanner_multiple_security_patterns(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
465
|
-
"""Test SecurityPatternScanner detecting multiple security issues.
|
|
466
|
-
|
|
467
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of grepai.
|
|
468
|
-
"""
|
|
469
|
-
mock_scanner = MagicMock()
|
|
470
|
-
mock_scanner.scan.return_value = [
|
|
471
|
-
ScanResult(
|
|
472
|
-
pattern_name="hardcoded_password",
|
|
473
|
-
severity="CRITICAL",
|
|
474
|
-
description="Hardcoded password detected",
|
|
475
|
-
file_path="src/auth.py",
|
|
476
|
-
line_number=10,
|
|
477
|
-
line_content="password = 'secret'",
|
|
478
|
-
match_text="password = 'secret'",
|
|
479
|
-
),
|
|
480
|
-
ScanResult(
|
|
481
|
-
pattern_name="sql_string_concat",
|
|
482
|
-
severity="HIGH",
|
|
483
|
-
description="Potential SQL injection via string concatenation",
|
|
484
|
-
file_path="src/db.py",
|
|
485
|
-
line_number=25,
|
|
486
|
-
line_content='query = f"SELECT * FROM {user_input}"',
|
|
487
|
-
match_text='query = f"SELECT * FROM {user_input}"',
|
|
488
|
-
),
|
|
489
|
-
ScanResult(
|
|
490
|
-
pattern_name="ssl_verify_false",
|
|
491
|
-
severity="HIGH",
|
|
492
|
-
description="SSL verification disabled",
|
|
493
|
-
file_path="src/api.py",
|
|
494
|
-
line_number=15,
|
|
495
|
-
line_content="verify=False",
|
|
496
|
-
match_text="verify=False",
|
|
497
|
-
),
|
|
498
|
-
]
|
|
499
|
-
mock_scanner_class.return_value = mock_scanner
|
|
500
|
-
|
|
501
|
-
# Create a mock repo path
|
|
502
|
-
repo_path = tmp_path / "test-repo"
|
|
503
|
-
repo_path.mkdir()
|
|
504
|
-
|
|
505
|
-
agent = CodeAnalysisAgent()
|
|
506
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
507
|
-
|
|
508
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
509
|
-
|
|
510
|
-
assert result.success is True
|
|
511
|
-
scanner_findings = [f for f in result.findings if f.get("source") == "pattern_scanner"]
|
|
512
|
-
assert len(scanner_findings) == 3
|
|
513
|
-
|
|
514
|
-
finding_types = {f["type"] for f in scanner_findings}
|
|
515
|
-
assert "security_hardcoded_password" in finding_types
|
|
516
|
-
assert "security_sql_string_concat" in finding_types
|
|
517
|
-
assert "security_ssl_verify_false" in finding_types
|
|
518
|
-
|
|
519
|
-
# ============================================================================
|
|
520
|
-
# LARGE CODEBASE HANDLING TESTS
|
|
521
|
-
# ============================================================================
|
|
522
|
-
|
|
523
|
-
@pytest.mark.asyncio
|
|
524
|
-
async def test_large_codebase_pattern_scan(self, large_evidence_bundle):
|
|
525
|
-
"""Test pattern scanning on large codebase (100 files).
|
|
526
|
-
|
|
527
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
528
|
-
"""
|
|
529
|
-
agent = CodeAnalysisAgent()
|
|
530
|
-
result = await agent.analyze(large_evidence_bundle)
|
|
531
|
-
|
|
532
|
-
assert result.success is True
|
|
533
|
-
assert result.metadata["files_analyzed"] == 100
|
|
534
|
-
# Each file has a "pass" statement, check findings were generated
|
|
535
|
-
# The pass pattern only triggers with comment, so let's check total findings
|
|
536
|
-
assert len(result.findings) >= 0 # Files may not trigger any patterns if clean
|
|
537
|
-
|
|
538
|
-
@pytest.mark.asyncio
|
|
539
|
-
async def test_large_codebase_llm_sampling(self, large_evidence_bundle):
|
|
540
|
-
"""Test LLM analysis samples only subset of large codebase.
|
|
541
|
-
|
|
542
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
543
|
-
"""
|
|
544
|
-
mock_settings = MagicMock()
|
|
545
|
-
mock_settings.enabled = True
|
|
546
|
-
|
|
547
|
-
llm_output = CodeFindings(
|
|
548
|
-
score=8.0,
|
|
549
|
-
issues=[
|
|
550
|
-
CodeIssue(
|
|
551
|
-
type="structure",
|
|
552
|
-
severity="low",
|
|
553
|
-
category="quality",
|
|
554
|
-
description="Test",
|
|
555
|
-
file_path="src/module_0.py",
|
|
556
|
-
)
|
|
557
|
-
],
|
|
558
|
-
patterns=[],
|
|
559
|
-
confidence=0.85,
|
|
560
|
-
reasoning="Large codebase analyzed",
|
|
561
|
-
files_analyzed=100,
|
|
562
|
-
tech_stack=["python"],
|
|
563
|
-
)
|
|
564
|
-
|
|
565
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
566
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
|
|
567
|
-
|
|
568
|
-
result = await agent.analyze(large_evidence_bundle)
|
|
569
|
-
|
|
570
|
-
assert result.success is True
|
|
571
|
-
assert result.metadata["files_analyzed"] == 100
|
|
572
|
-
llm_findings = [f for f in result.findings if f.get("source") == "pydantic_ai_analysis"]
|
|
573
|
-
assert len(llm_findings) == 1
|
|
574
|
-
|
|
575
|
-
# ============================================================================
|
|
576
|
-
# CONCURRENCY AND ASYNC EXECUTION TESTS
|
|
577
|
-
# ============================================================================
|
|
578
|
-
|
|
579
|
-
@pytest.mark.asyncio
|
|
580
|
-
async def test_concurrent_analyses(self, mock_evidence_bundle):
|
|
581
|
-
"""Test multiple concurrent analysis executions.
|
|
582
|
-
|
|
583
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
584
|
-
"""
|
|
585
|
-
agent = CodeAnalysisAgent()
|
|
586
|
-
|
|
587
|
-
# Run multiple analyses concurrently
|
|
588
|
-
results = await asyncio.gather(
|
|
589
|
-
agent.analyze(mock_evidence_bundle),
|
|
590
|
-
agent.analyze(mock_evidence_bundle),
|
|
591
|
-
agent.analyze(mock_evidence_bundle),
|
|
592
|
-
)
|
|
593
|
-
|
|
594
|
-
# All should succeed
|
|
595
|
-
for result in results:
|
|
596
|
-
assert result.success is True
|
|
597
|
-
assert len(result.findings) > 0
|
|
598
|
-
|
|
599
|
-
@pytest.mark.asyncio
|
|
600
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
601
|
-
async def test_async_pattern_scanner_calls(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
602
|
-
"""Test that SecurityPatternScanner calls are handled properly in async context.
|
|
603
|
-
|
|
604
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of grepai.
|
|
605
|
-
"""
|
|
606
|
-
call_count = [0]
|
|
607
|
-
|
|
608
|
-
def mock_scan(*args, **kwargs):
|
|
609
|
-
call_count[0] += 1
|
|
610
|
-
return []
|
|
611
|
-
|
|
612
|
-
mock_scanner = MagicMock()
|
|
613
|
-
mock_scanner.scan = MagicMock(side_effect=mock_scan)
|
|
614
|
-
mock_scanner_class.return_value = mock_scanner
|
|
615
|
-
|
|
616
|
-
# Create a mock repo path
|
|
617
|
-
repo_path = tmp_path / "test-repo"
|
|
618
|
-
repo_path.mkdir()
|
|
619
|
-
|
|
620
|
-
agent = CodeAnalysisAgent()
|
|
621
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
622
|
-
|
|
623
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
624
|
-
|
|
625
|
-
assert result.success is True
|
|
626
|
-
# Should have called scanner once
|
|
627
|
-
assert call_count[0] == 1
|
|
628
|
-
|
|
629
|
-
# ============================================================================
|
|
630
|
-
# ERROR SCENARIOS WHEN PATTERN SCANNER FAILS
|
|
631
|
-
# ============================================================================
|
|
632
|
-
|
|
633
|
-
@pytest.mark.asyncio
|
|
634
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
635
|
-
async def test_pattern_scanner_attribute_error(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
636
|
-
"""Test handling when SecurityPatternScanner has attribute errors.
|
|
637
|
-
|
|
638
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of SkillExecutor.
|
|
639
|
-
"""
|
|
640
|
-
mock_scanner_class.side_effect = AttributeError("Module not found")
|
|
641
|
-
|
|
642
|
-
# Create a mock repo path
|
|
643
|
-
repo_path = tmp_path / "test-repo"
|
|
644
|
-
repo_path.mkdir()
|
|
645
|
-
|
|
646
|
-
agent = CodeAnalysisAgent()
|
|
647
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
648
|
-
|
|
649
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
650
|
-
|
|
651
|
-
# Should gracefully handle the error
|
|
652
|
-
assert result.success is True
|
|
653
|
-
scanner_findings = [f for f in result.findings if f.get("source") == "pattern_scanner"]
|
|
654
|
-
assert len(scanner_findings) == 0
|
|
655
|
-
|
|
656
|
-
@pytest.mark.asyncio
|
|
657
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
658
|
-
async def test_pattern_scanner_invalid_response(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
659
|
-
"""Test handling when SecurityPatternScanner returns invalid data.
|
|
660
|
-
|
|
661
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of SkillExecutor.
|
|
662
|
-
"""
|
|
663
|
-
# Return invalid data structure
|
|
664
|
-
mock_scanner = MagicMock()
|
|
665
|
-
mock_scanner.scan.return_value = "invalid string instead of list"
|
|
666
|
-
mock_scanner_class.return_value = mock_scanner
|
|
667
|
-
|
|
668
|
-
# Create a mock repo path
|
|
669
|
-
repo_path = tmp_path / "test-repo"
|
|
670
|
-
repo_path.mkdir()
|
|
671
|
-
|
|
672
|
-
agent = CodeAnalysisAgent()
|
|
673
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
674
|
-
|
|
675
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
676
|
-
|
|
677
|
-
# Should handle gracefully
|
|
678
|
-
assert result.success is True
|
|
679
|
-
# Pattern findings should still work
|
|
680
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
681
|
-
assert len(pattern_findings) > 0
|
|
682
|
-
|
|
683
|
-
# ============================================================================
|
|
684
|
-
# EMPTY FINDINGS SCENARIOS
|
|
685
|
-
# ============================================================================
|
|
686
|
-
|
|
687
|
-
@pytest.mark.asyncio
|
|
688
|
-
async def test_empty_findings_all_clean(self):
|
|
689
|
-
"""Test repository with clean code (no issues found).
|
|
690
|
-
|
|
691
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
692
|
-
"""
|
|
693
|
-
clean_bundle = EvidenceBundle(
|
|
694
|
-
repository="clean-repo",
|
|
695
|
-
git_evidence=[
|
|
696
|
-
Evidence(
|
|
697
|
-
source="git_file",
|
|
698
|
-
source_id="src/clean.py",
|
|
699
|
-
title="Clean Code",
|
|
700
|
-
content='''def hello():
|
|
701
|
-
"""Say hello."""
|
|
702
|
-
print("Hello, World!")
|
|
703
|
-
|
|
704
|
-
if __name__ == "__main__":
|
|
705
|
-
hello()
|
|
706
|
-
''',
|
|
707
|
-
content_hash="clean_hash",
|
|
708
|
-
status=EvidenceStatus.FOUND,
|
|
709
|
-
),
|
|
710
|
-
],
|
|
711
|
-
)
|
|
712
|
-
|
|
713
|
-
agent = CodeAnalysisAgent()
|
|
714
|
-
result = await agent.analyze(clean_bundle)
|
|
715
|
-
|
|
716
|
-
assert result.success is True
|
|
717
|
-
# Clean code should have minimal or no findings
|
|
718
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
719
|
-
# Might have minimal findings but should be very limited
|
|
720
|
-
assert len(pattern_findings) == 0
|
|
721
|
-
|
|
722
|
-
@pytest.mark.asyncio
|
|
723
|
-
async def test_empty_scanner_with_pattern_findings(self, mock_evidence_bundle):
|
|
724
|
-
"""Test when SecurityPatternScanner finds nothing but patterns do.
|
|
725
|
-
|
|
726
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of grepai.
|
|
727
|
-
"""
|
|
728
|
-
agent = CodeAnalysisAgent()
|
|
729
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
730
|
-
|
|
731
|
-
assert result.success is True
|
|
732
|
-
assert result.metadata["total_findings"] > 0
|
|
733
|
-
scanner_findings = [f for f in result.findings if f.get("source") == "pattern_scanner"]
|
|
734
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
735
|
-
|
|
736
|
-
# Scanner findings may be 0 if repo_path not available
|
|
737
|
-
assert len(scanner_findings) >= 0
|
|
738
|
-
assert len(pattern_findings) > 0
|
|
739
|
-
|
|
740
|
-
# ============================================================================
|
|
741
|
-
# VARIOUS SEVERITY LEVELS TESTS
|
|
742
|
-
# ============================================================================
|
|
743
|
-
|
|
744
|
-
@pytest.mark.asyncio
|
|
745
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
746
|
-
async def test_all_severity_levels(self, mock_scanner_class, varied_severity_bundle, tmp_path):
|
|
747
|
-
"""Test detection of findings across all severity levels.
|
|
748
|
-
|
|
749
|
-
Phase 23 Refinement: Updated to test SecurityPatternScanner instead of grepai.
|
|
750
|
-
"""
|
|
751
|
-
mock_scanner = MagicMock()
|
|
752
|
-
mock_scanner.scan.return_value = [
|
|
753
|
-
# Return a critical severity security finding
|
|
754
|
-
ScanResult(
|
|
755
|
-
pattern_name="hardcoded_password",
|
|
756
|
-
severity="CRITICAL",
|
|
757
|
-
description="Hardcoded password detected",
|
|
758
|
-
file_path="src/auth.py",
|
|
759
|
-
line_number=1,
|
|
760
|
-
line_content="hardcoded password",
|
|
761
|
-
match_text="hardcoded password",
|
|
762
|
-
)
|
|
763
|
-
]
|
|
764
|
-
mock_scanner_class.return_value = mock_scanner
|
|
765
|
-
|
|
766
|
-
# Create a mock repo path
|
|
767
|
-
repo_path = tmp_path / "test-repo"
|
|
768
|
-
repo_path.mkdir()
|
|
769
|
-
|
|
770
|
-
agent = CodeAnalysisAgent()
|
|
771
|
-
agent._get_repo_path = lambda evidence, profile: repo_path
|
|
772
|
-
|
|
773
|
-
result = await agent.analyze(varied_severity_bundle)
|
|
774
|
-
|
|
775
|
-
assert result.success is True
|
|
776
|
-
|
|
777
|
-
# Check all severity levels are present
|
|
778
|
-
severities = {f.get("severity") for f in result.findings}
|
|
779
|
-
# critical comes from pattern scanner security
|
|
780
|
-
assert "critical" in severities
|
|
781
|
-
assert "medium" in severities
|
|
782
|
-
assert "low" in severities
|
|
783
|
-
assert "info" in severities
|
|
784
|
-
|
|
785
|
-
@pytest.mark.asyncio
|
|
786
|
-
async def test_high_severity_bare_except(self):
|
|
787
|
-
"""Test detection of high-severity bare except clauses.
|
|
788
|
-
|
|
789
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
790
|
-
"""
|
|
791
|
-
bundle = EvidenceBundle(
|
|
792
|
-
repository="except-test",
|
|
793
|
-
git_evidence=[
|
|
794
|
-
Evidence(
|
|
795
|
-
source="git_file",
|
|
796
|
-
source_id="bad.py",
|
|
797
|
-
title="Bad Error Handling",
|
|
798
|
-
content="try:\n risky()\nexcept:\n pass",
|
|
799
|
-
content_hash="hash1",
|
|
800
|
-
status=EvidenceStatus.FOUND,
|
|
801
|
-
),
|
|
802
|
-
],
|
|
803
|
-
)
|
|
804
|
-
|
|
805
|
-
agent = CodeAnalysisAgent()
|
|
806
|
-
result = await agent.analyze(bundle)
|
|
807
|
-
|
|
808
|
-
assert result.success is True
|
|
809
|
-
bare_except = [f for f in result.findings if "bare except" in f.get("description", "").lower()]
|
|
810
|
-
assert len(bare_except) == 1
|
|
811
|
-
assert bare_except[0]["severity"] == "medium"
|
|
812
|
-
|
|
813
|
-
@pytest.mark.asyncio
|
|
814
|
-
async def test_info_severity_suppressions(self):
|
|
815
|
-
"""Test detection of info-level code quality suppressions.
|
|
816
|
-
|
|
817
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
818
|
-
"""
|
|
819
|
-
bundle = EvidenceBundle(
|
|
820
|
-
repository="suppression-test",
|
|
821
|
-
git_evidence=[
|
|
822
|
-
Evidence(
|
|
823
|
-
source="git_file",
|
|
824
|
-
source_id="suppressed.py",
|
|
825
|
-
title="Suppressed Code",
|
|
826
|
-
content="x = 1 # type: ignore\ny = 2 # noqa",
|
|
827
|
-
content_hash="hash1",
|
|
828
|
-
status=EvidenceStatus.FOUND,
|
|
829
|
-
),
|
|
830
|
-
],
|
|
831
|
-
)
|
|
832
|
-
|
|
833
|
-
agent = CodeAnalysisAgent()
|
|
834
|
-
result = await agent.analyze(bundle)
|
|
835
|
-
|
|
836
|
-
assert result.success is True
|
|
837
|
-
info_findings = [f for f in result.findings if f.get("severity") == "info"]
|
|
838
|
-
assert len(info_findings) >= 2
|
|
839
|
-
|
|
840
|
-
# ============================================================================
|
|
841
|
-
# LLM ERROR HANDLING TESTS
|
|
842
|
-
# ============================================================================
|
|
843
|
-
|
|
844
|
-
@pytest.mark.asyncio
|
|
845
|
-
async def test_llm_client_unavailable(self, mock_evidence_bundle):
|
|
846
|
-
"""Test handling when LLM client is not available.
|
|
847
|
-
|
|
848
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
849
|
-
"""
|
|
850
|
-
# Create agent with LLM disabled
|
|
851
|
-
mock_settings = MagicMock()
|
|
852
|
-
mock_settings.enabled = False
|
|
853
|
-
|
|
854
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
855
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
856
|
-
|
|
857
|
-
assert result.success is True
|
|
858
|
-
# Should still have pattern findings
|
|
859
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
860
|
-
assert len(pattern_findings) > 0
|
|
861
|
-
# No LLM findings
|
|
862
|
-
llm_findings = [f for f in result.findings if f.get("source") == "llm_analysis"]
|
|
863
|
-
assert len(llm_findings) == 0
|
|
864
|
-
|
|
865
|
-
@pytest.mark.asyncio
|
|
866
|
-
async def test_llm_response_parse_error(self, mock_evidence_bundle):
|
|
867
|
-
"""Test handling when LLM response cannot be parsed.
|
|
868
|
-
|
|
869
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
870
|
-
"""
|
|
871
|
-
mock_settings = MagicMock()
|
|
872
|
-
mock_settings.enabled = True
|
|
873
|
-
|
|
874
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
875
|
-
agent._run_pydantic_ai_analysis = AsyncMock(side_effect=ValueError("Invalid LLM output"))
|
|
876
|
-
|
|
877
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
878
|
-
|
|
879
|
-
# When PydanticAI analysis fails, agent continues with other layers (graceful degradation)
|
|
880
|
-
assert result.success is True
|
|
881
|
-
# LLM error should be recorded in metadata
|
|
882
|
-
assert "llm_error" in result.metadata
|
|
883
|
-
assert "Invalid LLM output" in result.metadata["llm_error"]
|
|
884
|
-
|
|
885
|
-
@pytest.mark.asyncio
|
|
886
|
-
async def test_llm_json_in_markdown_fallback(self, mock_evidence_bundle):
|
|
887
|
-
"""Test structured LLM output handling.
|
|
888
|
-
|
|
889
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
890
|
-
"""
|
|
891
|
-
mock_settings = MagicMock()
|
|
892
|
-
mock_settings.enabled = True
|
|
893
|
-
|
|
894
|
-
llm_output = CodeFindings(
|
|
895
|
-
score=7.0,
|
|
896
|
-
issues=[
|
|
897
|
-
CodeIssue(
|
|
898
|
-
type="structure",
|
|
899
|
-
severity="low",
|
|
900
|
-
category="quality",
|
|
901
|
-
description="Test finding",
|
|
902
|
-
file_path="src/main.py",
|
|
903
|
-
)
|
|
904
|
-
],
|
|
905
|
-
patterns=[],
|
|
906
|
-
confidence=0.85,
|
|
907
|
-
reasoning="Test analysis",
|
|
908
|
-
files_analyzed=2,
|
|
909
|
-
tech_stack=["python"],
|
|
910
|
-
)
|
|
911
|
-
|
|
912
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
913
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
|
|
914
|
-
|
|
915
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
916
|
-
|
|
917
|
-
assert result.success is True
|
|
918
|
-
llm_findings = [f for f in result.findings if f.get("source") == "pydantic_ai_analysis"]
|
|
919
|
-
assert len(llm_findings) == 1
|
|
920
|
-
assert result.metadata["llm_summary"]["score"] == 7.0
|
|
921
|
-
|
|
922
|
-
# ============================================================================
|
|
923
|
-
# PATTERN MATCHING EDGE CASES
|
|
924
|
-
# ============================================================================
|
|
925
|
-
|
|
926
|
-
@pytest.mark.asyncio
|
|
927
|
-
async def test_multiple_patterns_same_file(self):
|
|
928
|
-
"""Test detection of multiple patterns in same file.
|
|
929
|
-
|
|
930
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
931
|
-
"""
|
|
932
|
-
bundle = EvidenceBundle(
|
|
933
|
-
repository="multi-pattern",
|
|
934
|
-
git_evidence=[
|
|
935
|
-
Evidence(
|
|
936
|
-
source="git_file",
|
|
937
|
-
source_id="complex.py",
|
|
938
|
-
title="Complex File",
|
|
939
|
-
content="""# TODO: Implement this
|
|
940
|
-
# FIXME: Fix that
|
|
941
|
-
# HACK: Quick workaround
|
|
942
|
-
# XXX: Review needed
|
|
943
|
-
try:
|
|
944
|
-
pass
|
|
945
|
-
except:
|
|
946
|
-
pass
|
|
947
|
-
""",
|
|
948
|
-
content_hash="hash1",
|
|
949
|
-
status=EvidenceStatus.FOUND,
|
|
950
|
-
),
|
|
951
|
-
],
|
|
952
|
-
)
|
|
953
|
-
|
|
954
|
-
agent = CodeAnalysisAgent()
|
|
955
|
-
result = await agent.analyze(bundle)
|
|
956
|
-
|
|
957
|
-
assert result.success is True
|
|
958
|
-
pattern_findings = [f for f in result.findings if f.get("source") == "pattern_scan"]
|
|
959
|
-
# Should find TODO, FIXME, HACK, XXX, bare except
|
|
960
|
-
assert len(pattern_findings) >= 5
|
|
961
|
-
|
|
962
|
-
@pytest.mark.asyncio
|
|
963
|
-
async def test_case_insensitive_pattern_matching(self):
|
|
964
|
-
"""Test that pattern matching is case-insensitive.
|
|
965
|
-
|
|
966
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
967
|
-
"""
|
|
968
|
-
bundle = EvidenceBundle(
|
|
969
|
-
repository="case-test",
|
|
970
|
-
git_evidence=[
|
|
971
|
-
Evidence(
|
|
972
|
-
source="git_file",
|
|
973
|
-
source_id="mixed.py",
|
|
974
|
-
title="Mixed Case",
|
|
975
|
-
content="todo: implement\nTodo: design\ntODO: test\nFIXME: bug\nfixme: error",
|
|
976
|
-
content_hash="hash1",
|
|
977
|
-
status=EvidenceStatus.FOUND,
|
|
978
|
-
),
|
|
979
|
-
],
|
|
980
|
-
)
|
|
981
|
-
|
|
982
|
-
agent = CodeAnalysisAgent()
|
|
983
|
-
result = await agent.analyze(bundle)
|
|
984
|
-
|
|
985
|
-
assert result.success is True
|
|
986
|
-
# All case variations should be detected
|
|
987
|
-
todo_findings = [f for f in result.findings if "todo" in f.get("description", "").lower()]
|
|
988
|
-
# Count should reflect all matches (case-insensitive)
|
|
989
|
-
total_todo_count = sum(f.get("count", 0) for f in todo_findings)
|
|
990
|
-
assert total_todo_count >= 3
|
|
991
|
-
|
|
992
|
-
# ============================================================================
|
|
993
|
-
# METADATA AND ANALYSIS LAYERS TESTS
|
|
994
|
-
# ============================================================================
|
|
995
|
-
|
|
996
|
-
@pytest.mark.asyncio
|
|
997
|
-
async def test_analysis_layers_metadata(self, mock_evidence_bundle):
|
|
998
|
-
"""Test that analysis layers are properly tracked in metadata.
|
|
999
|
-
|
|
1000
|
-
Phase 23 Refinement: Removed grepai mock.
|
|
1001
|
-
"""
|
|
1002
|
-
agent = CodeAnalysisAgent()
|
|
1003
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1004
|
-
|
|
1005
|
-
assert result.success is True
|
|
1006
|
-
assert "analysis_layers" in result.metadata
|
|
1007
|
-
# Should have pattern_matching at minimum
|
|
1008
|
-
assert "pattern_matching" in result.metadata["analysis_layers"]
|
|
1009
|
-
|
|
1010
|
-
@pytest.mark.asyncio
|
|
1011
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
1012
|
-
async def test_all_analysis_layers_active(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
1013
|
-
"""Test metadata when all analysis layers are active.
|
|
1014
|
-
|
|
1015
|
-
Phase 23 Refinement: Updated to use SecurityPatternScanner instead of grepai.
|
|
1016
|
-
"""
|
|
1017
|
-
# Enable pattern scanner - return results
|
|
1018
|
-
mock_scanner = MagicMock()
|
|
1019
|
-
mock_scanner.scan.return_value = [
|
|
1020
|
-
ScanResult(
|
|
1021
|
-
pattern_name="hardcoded_password",
|
|
1022
|
-
severity="CRITICAL",
|
|
1023
|
-
description="Hardcoded password detected",
|
|
1024
|
-
file_path="test.py",
|
|
1025
|
-
line_number=1,
|
|
1026
|
-
line_content="secret",
|
|
1027
|
-
match_text="secret",
|
|
1028
|
-
)
|
|
1029
|
-
]
|
|
1030
|
-
mock_scanner_class.return_value = mock_scanner
|
|
1031
|
-
|
|
1032
|
-
# Create a mock repo path
|
|
1033
|
-
repo_path = tmp_path / "test-repo"
|
|
1034
|
-
repo_path.mkdir()
|
|
1035
|
-
|
|
1036
|
-
mock_settings = MagicMock()
|
|
1037
|
-
mock_settings.enabled = True
|
|
1038
|
-
|
|
1039
|
-
# Mock PydanticAI analysis to return findings
|
|
1040
|
-
llm_output = CodeFindings(
|
|
1041
|
-
score=7.5,
|
|
1042
|
-
issues=[
|
|
1043
|
-
CodeIssue(
|
|
1044
|
-
severity="low",
|
|
1045
|
-
category="quality",
|
|
1046
|
-
description="Test finding from LLM",
|
|
1047
|
-
file_path="test.py",
|
|
1048
|
-
)
|
|
1049
|
-
],
|
|
1050
|
-
patterns=[],
|
|
1051
|
-
confidence=0.85,
|
|
1052
|
-
reasoning="All layers active",
|
|
1053
|
-
files_analyzed=2,
|
|
1054
|
-
tech_stack=["python"],
|
|
1055
|
-
)
|
|
1056
|
-
|
|
1057
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
1058
|
-
agent._get_repo_path = lambda evidence, profile: repo_path
|
|
1059
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
|
|
1060
|
-
|
|
1061
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1062
|
-
|
|
1063
|
-
assert result.success is True
|
|
1064
|
-
assert "pattern_scanner_security" in result.metadata["analysis_layers"]
|
|
1065
|
-
assert "pattern_matching" in result.metadata["analysis_layers"]
|
|
1066
|
-
# LLM layer should be present (PydanticAI quality analysis)
|
|
1067
|
-
assert "pydantic_ai_quality" in result.metadata["analysis_layers"]
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
# Import at end for Python 3.8 compatibility
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
# =============================================================================
|
|
1074
|
-
# LLM CODE REVIEW AND DEDUPLICATION TESTS (FR-1.3)
|
|
1075
|
-
# =============================================================================
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
class TestLLMCodeReviewAndDeduplication:
|
|
1079
|
-
"""Tests for LLM-based code review and finding deduplication (FR-1.3)."""
|
|
1080
|
-
|
|
1081
|
-
@pytest.mark.asyncio
|
|
1082
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
1083
|
-
async def test_llm_code_review_enabled(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
1084
|
-
"""Test that LLM code review is called when enabled.
|
|
1085
|
-
|
|
1086
|
-
FR-1.3: LLM analysis of pre-collected code evidence pack.
|
|
1087
|
-
"""
|
|
1088
|
-
mock_scanner = MagicMock()
|
|
1089
|
-
mock_scanner.scan.return_value = []
|
|
1090
|
-
mock_scanner_class.return_value = mock_scanner
|
|
1091
|
-
|
|
1092
|
-
repo_path = tmp_path / "test-repo"
|
|
1093
|
-
repo_path.mkdir()
|
|
1094
|
-
|
|
1095
|
-
# Create a test file for code pack
|
|
1096
|
-
(repo_path / "README.md").write_text("# Test Project")
|
|
1097
|
-
|
|
1098
|
-
mock_settings = MagicMock()
|
|
1099
|
-
mock_settings.enabled = True
|
|
1100
|
-
|
|
1101
|
-
llm_output = CodeFindings(
|
|
1102
|
-
score=7.0,
|
|
1103
|
-
issues=[
|
|
1104
|
-
CodeIssue(
|
|
1105
|
-
severity="high",
|
|
1106
|
-
category="security",
|
|
1107
|
-
description="Potential security issue found by LLM",
|
|
1108
|
-
file_path="src/auth.py",
|
|
1109
|
-
line_number=15,
|
|
1110
|
-
recommendation="Use environment variables for secrets",
|
|
1111
|
-
)
|
|
1112
|
-
],
|
|
1113
|
-
patterns=[],
|
|
1114
|
-
confidence=0.85,
|
|
1115
|
-
reasoning="LLM code review analysis",
|
|
1116
|
-
files_analyzed=1,
|
|
1117
|
-
tech_stack=["python"],
|
|
1118
|
-
)
|
|
1119
|
-
|
|
1120
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
1121
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1122
|
-
agent._get_runtime_config = lambda: SimpleNamespace(
|
|
1123
|
-
agentic=SimpleNamespace(enabled=False),
|
|
1124
|
-
llm=SimpleNamespace(
|
|
1125
|
-
code_review_layer_enabled=True,
|
|
1126
|
-
code_review_max_files=20,
|
|
1127
|
-
code_review_max_total_chars=120000,
|
|
1128
|
-
),
|
|
1129
|
-
)
|
|
1130
|
-
agent._analyze_code_with_llm = AsyncMock(
|
|
1131
|
-
return_value=[
|
|
1132
|
-
{
|
|
1133
|
-
"type": "security_security",
|
|
1134
|
-
"severity": "high",
|
|
1135
|
-
"description": "Potential security issue found by LLM",
|
|
1136
|
-
"location": "src/auth.py:15",
|
|
1137
|
-
"details": {
|
|
1138
|
-
"file_path": "src/auth.py",
|
|
1139
|
-
"line_number": 15,
|
|
1140
|
-
"recommendation": "Use environment variables for secrets",
|
|
1141
|
-
},
|
|
1142
|
-
"source": "llm_code_review",
|
|
1143
|
-
}
|
|
1144
|
-
]
|
|
1145
|
-
)
|
|
1146
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=llm_output)
|
|
1147
|
-
|
|
1148
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1149
|
-
|
|
1150
|
-
assert result.success is True
|
|
1151
|
-
assert result.metadata.get("llm_code_review_used") is True
|
|
1152
|
-
assert result.metadata.get("code_pack_included") == 1
|
|
1153
|
-
assert result.metadata.get("code_pack_scanned") == 1
|
|
1154
|
-
assert result.metadata.get("code_pack_files") == ["README.md"]
|
|
1155
|
-
llm_review_findings = [f for f in result.findings if f.get("source") == "llm_code_review"]
|
|
1156
|
-
assert len(llm_review_findings) >= 1
|
|
1157
|
-
|
|
1158
|
-
@pytest.mark.asyncio
|
|
1159
|
-
async def test_llm_code_review_disabled_when_llm_disabled(self, mock_evidence_bundle, tmp_path):
|
|
1160
|
-
"""Test that LLM code review is skipped when LLM is disabled."""
|
|
1161
|
-
repo_path = tmp_path / "test-repo"
|
|
1162
|
-
repo_path.mkdir()
|
|
1163
|
-
|
|
1164
|
-
mock_settings = MagicMock()
|
|
1165
|
-
mock_settings.enabled = False
|
|
1166
|
-
|
|
1167
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
1168
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1169
|
-
|
|
1170
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1171
|
-
|
|
1172
|
-
assert result.success is True
|
|
1173
|
-
assert result.metadata.get("llm_code_review_used") is not True
|
|
1174
|
-
llm_review_findings = [f for f in result.findings if f.get("source") == "llm_code_review"]
|
|
1175
|
-
assert len(llm_review_findings) == 0
|
|
1176
|
-
|
|
1177
|
-
@pytest.mark.asyncio
|
|
1178
|
-
async def test_merge_findings_deduplication_keeps_highest_severity(self):
|
|
1179
|
-
"""Test that deduplication keeps the highest severity finding.
|
|
1180
|
-
|
|
1181
|
-
FR-1.3: Merge pattern scanner + LLM findings with deduplication,
|
|
1182
|
-
preserving highest severity when merging duplicates.
|
|
1183
|
-
"""
|
|
1184
|
-
agent = CodeAnalysisAgent()
|
|
1185
|
-
|
|
1186
|
-
pattern_findings = [
|
|
1187
|
-
{
|
|
1188
|
-
"type": "security_hardcoded_password",
|
|
1189
|
-
"severity": "medium",
|
|
1190
|
-
"description": "Hardcoded password from pattern scanner",
|
|
1191
|
-
"location": "src/auth.py:10",
|
|
1192
|
-
"source": "pattern_scanner",
|
|
1193
|
-
}
|
|
1194
|
-
]
|
|
1195
|
-
|
|
1196
|
-
llm_findings = [
|
|
1197
|
-
{
|
|
1198
|
-
"type": "security_hardcoded_password",
|
|
1199
|
-
"severity": "critical", # Higher severity
|
|
1200
|
-
"description": "Hardcoded password from LLM review",
|
|
1201
|
-
"location": "src/auth.py:10",
|
|
1202
|
-
"source": "llm_code_review",
|
|
1203
|
-
}
|
|
1204
|
-
]
|
|
1205
|
-
|
|
1206
|
-
merged = agent._merge_findings_with_deduplication(pattern_findings, llm_findings)
|
|
1207
|
-
|
|
1208
|
-
assert len(merged) == 1
|
|
1209
|
-
# Should keep the critical severity (from LLM)
|
|
1210
|
-
assert merged[0]["severity"] == "critical"
|
|
1211
|
-
assert merged[0]["source"] == "llm_code_review"
|
|
1212
|
-
|
|
1213
|
-
@pytest.mark.asyncio
|
|
1214
|
-
async def test_merge_findings_deduplication_keeps_pattern_when_higher(self):
|
|
1215
|
-
"""Test that deduplication keeps pattern scanner finding when it has higher severity."""
|
|
1216
|
-
agent = CodeAnalysisAgent()
|
|
1217
|
-
|
|
1218
|
-
pattern_findings = [
|
|
1219
|
-
{
|
|
1220
|
-
"type": "security_sql_injection",
|
|
1221
|
-
"severity": "critical", # Higher severity
|
|
1222
|
-
"description": "SQL injection from pattern scanner",
|
|
1223
|
-
"location": "src/db.py:25",
|
|
1224
|
-
"source": "pattern_scanner",
|
|
1225
|
-
}
|
|
1226
|
-
]
|
|
1227
|
-
|
|
1228
|
-
llm_findings = [
|
|
1229
|
-
{
|
|
1230
|
-
"type": "security_sql_injection",
|
|
1231
|
-
"severity": "high", # Lower severity
|
|
1232
|
-
"description": "SQL injection from LLM review",
|
|
1233
|
-
"location": "src/db.py:25",
|
|
1234
|
-
"source": "llm_code_review",
|
|
1235
|
-
}
|
|
1236
|
-
]
|
|
1237
|
-
|
|
1238
|
-
merged = agent._merge_findings_with_deduplication(pattern_findings, llm_findings)
|
|
1239
|
-
|
|
1240
|
-
assert len(merged) == 1
|
|
1241
|
-
# Should keep the critical severity (from pattern scanner)
|
|
1242
|
-
assert merged[0]["severity"] == "critical"
|
|
1243
|
-
assert merged[0]["source"] == "pattern_scanner"
|
|
1244
|
-
|
|
1245
|
-
@pytest.mark.asyncio
|
|
1246
|
-
async def test_merge_findings_no_duplicates(self):
|
|
1247
|
-
"""Test that non-duplicate findings are all preserved."""
|
|
1248
|
-
agent = CodeAnalysisAgent()
|
|
1249
|
-
|
|
1250
|
-
pattern_findings = [
|
|
1251
|
-
{
|
|
1252
|
-
"type": "security_hardcoded_password",
|
|
1253
|
-
"severity": "critical",
|
|
1254
|
-
"description": "Hardcoded password",
|
|
1255
|
-
"location": "src/auth.py:10",
|
|
1256
|
-
"source": "pattern_scanner",
|
|
1257
|
-
}
|
|
1258
|
-
]
|
|
1259
|
-
|
|
1260
|
-
llm_findings = [
|
|
1261
|
-
{
|
|
1262
|
-
"type": "security_sql_injection",
|
|
1263
|
-
"severity": "high",
|
|
1264
|
-
"description": "SQL injection",
|
|
1265
|
-
"location": "src/db.py:25",
|
|
1266
|
-
"source": "llm_code_review",
|
|
1267
|
-
}
|
|
1268
|
-
]
|
|
1269
|
-
|
|
1270
|
-
merged = agent._merge_findings_with_deduplication(pattern_findings, llm_findings)
|
|
1271
|
-
|
|
1272
|
-
assert len(merged) == 2
|
|
1273
|
-
types = {f["type"] for f in merged}
|
|
1274
|
-
assert "security_hardcoded_password" in types
|
|
1275
|
-
assert "security_sql_injection" in types
|
|
1276
|
-
|
|
1277
|
-
@pytest.mark.asyncio
|
|
1278
|
-
async def test_merge_findings_empty_inputs(self):
|
|
1279
|
-
"""Test merging with empty inputs."""
|
|
1280
|
-
agent = CodeAnalysisAgent()
|
|
1281
|
-
|
|
1282
|
-
# Both empty
|
|
1283
|
-
merged = agent._merge_findings_with_deduplication([], [])
|
|
1284
|
-
assert len(merged) == 0
|
|
1285
|
-
|
|
1286
|
-
# Only pattern findings
|
|
1287
|
-
pattern_findings = [{"type": "test", "severity": "low", "location": "test.py"}]
|
|
1288
|
-
merged = agent._merge_findings_with_deduplication(pattern_findings, [])
|
|
1289
|
-
assert len(merged) == 1
|
|
1290
|
-
|
|
1291
|
-
# Only LLM findings
|
|
1292
|
-
llm_findings = [{"type": "test2", "severity": "medium", "location": "test2.py"}]
|
|
1293
|
-
merged = agent._merge_findings_with_deduplication([], llm_findings)
|
|
1294
|
-
assert len(merged) == 1
|
|
1295
|
-
|
|
1296
|
-
@pytest.mark.asyncio
|
|
1297
|
-
async def test_merge_findings_multiple_duplicates(self):
|
|
1298
|
-
"""Test merging with multiple duplicate findings."""
|
|
1299
|
-
agent = CodeAnalysisAgent()
|
|
1300
|
-
|
|
1301
|
-
pattern_findings = [
|
|
1302
|
-
{"type": "security_a", "severity": "low", "location": "a.py"},
|
|
1303
|
-
{"type": "security_b", "severity": "medium", "location": "b.py"},
|
|
1304
|
-
{"type": "security_c", "severity": "high", "location": "c.py"},
|
|
1305
|
-
]
|
|
1306
|
-
|
|
1307
|
-
llm_findings = [
|
|
1308
|
-
{"type": "security_a", "severity": "critical", "location": "a.py"}, # Upgrade
|
|
1309
|
-
{"type": "security_b", "severity": "low", "location": "b.py"}, # Downgrade (keep original)
|
|
1310
|
-
{"type": "security_d", "severity": "medium", "location": "d.py"}, # New
|
|
1311
|
-
]
|
|
1312
|
-
|
|
1313
|
-
merged = agent._merge_findings_with_deduplication(pattern_findings, llm_findings)
|
|
1314
|
-
|
|
1315
|
-
assert len(merged) == 4 # a, b, c, d
|
|
1316
|
-
|
|
1317
|
-
# Find each finding
|
|
1318
|
-
findings_by_type = {f["type"]: f for f in merged}
|
|
1319
|
-
|
|
1320
|
-
# security_a should be critical (upgraded from LLM)
|
|
1321
|
-
assert findings_by_type["security_a"]["severity"] == "critical"
|
|
1322
|
-
|
|
1323
|
-
# security_b should be medium (kept from pattern scanner)
|
|
1324
|
-
assert findings_by_type["security_b"]["severity"] == "medium"
|
|
1325
|
-
|
|
1326
|
-
# security_c should be high (only from pattern scanner)
|
|
1327
|
-
assert findings_by_type["security_c"]["severity"] == "high"
|
|
1328
|
-
|
|
1329
|
-
# security_d should be medium (only from LLM)
|
|
1330
|
-
assert findings_by_type["security_d"]["severity"] == "medium"
|
|
1331
|
-
|
|
1332
|
-
@pytest.mark.asyncio
|
|
1333
|
-
@patch("vds_audit_orchestrator.agents.code_agent.SecurityPatternScanner")
|
|
1334
|
-
async def test_llm_code_review_error_handling(self, mock_scanner_class, mock_evidence_bundle, tmp_path):
|
|
1335
|
-
"""Test graceful handling when LLM code review fails."""
|
|
1336
|
-
mock_scanner = MagicMock()
|
|
1337
|
-
mock_scanner.scan.return_value = [
|
|
1338
|
-
ScanResult(
|
|
1339
|
-
pattern_name="hardcoded_password",
|
|
1340
|
-
severity="CRITICAL",
|
|
1341
|
-
description="Hardcoded password",
|
|
1342
|
-
file_path="test.py",
|
|
1343
|
-
line_number=1,
|
|
1344
|
-
line_content="secret",
|
|
1345
|
-
match_text="secret",
|
|
1346
|
-
)
|
|
1347
|
-
]
|
|
1348
|
-
mock_scanner_class.return_value = mock_scanner
|
|
1349
|
-
|
|
1350
|
-
repo_path = tmp_path / "test-repo"
|
|
1351
|
-
repo_path.mkdir()
|
|
1352
|
-
(repo_path / "README.md").write_text("# Test")
|
|
1353
|
-
|
|
1354
|
-
mock_settings = MagicMock()
|
|
1355
|
-
mock_settings.enabled = True
|
|
1356
|
-
|
|
1357
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
1358
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1359
|
-
agent._get_runtime_config = lambda: SimpleNamespace(
|
|
1360
|
-
agentic=SimpleNamespace(enabled=False),
|
|
1361
|
-
llm=SimpleNamespace(
|
|
1362
|
-
code_review_layer_enabled=True,
|
|
1363
|
-
code_review_max_files=20,
|
|
1364
|
-
code_review_max_total_chars=120000,
|
|
1365
|
-
),
|
|
1366
|
-
)
|
|
1367
|
-
agent._analyze_code_with_llm = AsyncMock(side_effect=Exception("LLM service unavailable"))
|
|
1368
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=None)
|
|
1369
|
-
|
|
1370
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1371
|
-
|
|
1372
|
-
# Should still succeed with pattern scanner findings
|
|
1373
|
-
assert result.success is True
|
|
1374
|
-
assert "llm_code_review_error" in result.metadata
|
|
1375
|
-
# Pattern scanner findings should still be present
|
|
1376
|
-
scanner_findings = [f for f in result.findings if f.get("source") == "pattern_scanner"]
|
|
1377
|
-
assert len(scanner_findings) >= 1
|
|
1378
|
-
|
|
1379
|
-
@pytest.mark.asyncio
|
|
1380
|
-
async def test_format_code_pack_for_review(self, tmp_path):
|
|
1381
|
-
"""Test code pack formatting for LLM review."""
|
|
1382
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1383
|
-
|
|
1384
|
-
code_pack = CodeEvidencePack(
|
|
1385
|
-
repo_path=str(tmp_path),
|
|
1386
|
-
files=[
|
|
1387
|
-
CodeEvidence(
|
|
1388
|
-
file_path="README.md",
|
|
1389
|
-
content="# Test Project\n\nDescription here.",
|
|
1390
|
-
truncated=False,
|
|
1391
|
-
original_lines=3,
|
|
1392
|
-
original_bytes=35,
|
|
1393
|
-
priority=1,
|
|
1394
|
-
),
|
|
1395
|
-
CodeEvidence(
|
|
1396
|
-
file_path="src/main.py",
|
|
1397
|
-
content="def main():\n pass",
|
|
1398
|
-
truncated=True,
|
|
1399
|
-
original_lines=100,
|
|
1400
|
-
original_bytes=5000,
|
|
1401
|
-
priority=8,
|
|
1402
|
-
),
|
|
1403
|
-
],
|
|
1404
|
-
total_files_scanned=10,
|
|
1405
|
-
total_files_included=2,
|
|
1406
|
-
)
|
|
1407
|
-
|
|
1408
|
-
agent = CodeAnalysisAgent()
|
|
1409
|
-
formatted = agent._format_code_pack_for_review(code_pack)
|
|
1410
|
-
|
|
1411
|
-
assert "Code Evidence Pack" in formatted
|
|
1412
|
-
assert "README.md" in formatted
|
|
1413
|
-
assert "HIGH PRIORITY" in formatted
|
|
1414
|
-
assert "src/main.py" in formatted
|
|
1415
|
-
assert "[TRUNCATED]" in formatted
|
|
1416
|
-
assert "NORMAL" in formatted
|
|
1417
|
-
|
|
1418
|
-
@pytest.mark.asyncio
|
|
1419
|
-
async def test_select_files_for_llm_prefers_source(self):
|
|
1420
|
-
"""LLM input should prioritize source files while preserving infra context."""
|
|
1421
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1422
|
-
|
|
1423
|
-
code_pack = CodeEvidencePack(
|
|
1424
|
-
repo_path="/tmp/test",
|
|
1425
|
-
files=[
|
|
1426
|
-
CodeEvidence(
|
|
1427
|
-
file_path="README.md",
|
|
1428
|
-
content="# Project",
|
|
1429
|
-
truncated=False,
|
|
1430
|
-
original_lines=1,
|
|
1431
|
-
original_bytes=9,
|
|
1432
|
-
priority=1,
|
|
1433
|
-
),
|
|
1434
|
-
CodeEvidence(
|
|
1435
|
-
file_path="pyproject.toml",
|
|
1436
|
-
content="[project]",
|
|
1437
|
-
truncated=False,
|
|
1438
|
-
original_lines=1,
|
|
1439
|
-
original_bytes=9,
|
|
1440
|
-
priority=5,
|
|
1441
|
-
),
|
|
1442
|
-
CodeEvidence(
|
|
1443
|
-
file_path="src/core/service.py",
|
|
1444
|
-
content="def run(): pass",
|
|
1445
|
-
truncated=False,
|
|
1446
|
-
original_lines=1,
|
|
1447
|
-
original_bytes=15,
|
|
1448
|
-
priority=9,
|
|
1449
|
-
),
|
|
1450
|
-
CodeEvidence(
|
|
1451
|
-
file_path="src/core/handler.py",
|
|
1452
|
-
content="def handler(): pass",
|
|
1453
|
-
truncated=False,
|
|
1454
|
-
original_lines=1,
|
|
1455
|
-
original_bytes=19,
|
|
1456
|
-
priority=9,
|
|
1457
|
-
),
|
|
1458
|
-
],
|
|
1459
|
-
total_files_scanned=4,
|
|
1460
|
-
total_files_included=4,
|
|
1461
|
-
)
|
|
1462
|
-
|
|
1463
|
-
agent = CodeAnalysisAgent()
|
|
1464
|
-
selected = agent._select_files_for_llm(
|
|
1465
|
-
code_pack,
|
|
1466
|
-
max_files=3,
|
|
1467
|
-
max_infra_files=1,
|
|
1468
|
-
min_source_files=2,
|
|
1469
|
-
)
|
|
1470
|
-
selected_paths = [file_ev.file_path for file_ev in selected]
|
|
1471
|
-
assert "pyproject.toml" in selected_paths
|
|
1472
|
-
assert "src/core/service.py" in selected_paths
|
|
1473
|
-
assert "src/core/handler.py" in selected_paths
|
|
1474
|
-
|
|
1475
|
-
@pytest.mark.asyncio
|
|
1476
|
-
async def test_build_llm_code_review_prompt(self):
|
|
1477
|
-
"""Test LLM code review prompt building."""
|
|
1478
|
-
agent = CodeAnalysisAgent()
|
|
1479
|
-
|
|
1480
|
-
code_context = "## Code Evidence Pack\n\n### File: test.py\n```\nprint('hello')\n```"
|
|
1481
|
-
profile = {"domain": "insurance", "criticality": "high"}
|
|
1482
|
-
|
|
1483
|
-
prompt = agent._build_llm_code_review_prompt(code_context, profile)
|
|
1484
|
-
|
|
1485
|
-
assert "insurance" in prompt
|
|
1486
|
-
assert "high" in prompt
|
|
1487
|
-
assert "security" in prompt.lower()
|
|
1488
|
-
assert "test.py" in prompt
|
|
1489
|
-
|
|
1490
|
-
@pytest.mark.asyncio
|
|
1491
|
-
async def test_metadata_includes_merged_findings_count(self, mock_evidence_bundle, tmp_path):
|
|
1492
|
-
"""Test that metadata includes merged findings count."""
|
|
1493
|
-
repo_path = tmp_path / "test-repo"
|
|
1494
|
-
repo_path.mkdir()
|
|
1495
|
-
|
|
1496
|
-
mock_settings = MagicMock()
|
|
1497
|
-
mock_settings.enabled = False # Disable LLM to simplify test
|
|
1498
|
-
|
|
1499
|
-
agent = CodeAnalysisAgent(settings=mock_settings)
|
|
1500
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1501
|
-
|
|
1502
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1503
|
-
|
|
1504
|
-
assert result.success is True
|
|
1505
|
-
assert "merged_security_findings" in result.metadata
|
|
1506
|
-
|
|
1507
|
-
@pytest.mark.asyncio
|
|
1508
|
-
async def test_select_files_for_llm_respects_char_budget(self):
|
|
1509
|
-
"""_select_files_for_llm stops adding files when total chars exceed budget.
|
|
1510
|
-
|
|
1511
|
-
Phase 64+: Budget guard prevents prompt bloat for non-agentic LLM calls.
|
|
1512
|
-
"""
|
|
1513
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1514
|
-
|
|
1515
|
-
# Create files that exceed a small budget
|
|
1516
|
-
files = []
|
|
1517
|
-
for i in range(10):
|
|
1518
|
-
files.append(
|
|
1519
|
-
CodeEvidence(
|
|
1520
|
-
file_path=f"src/module_{i}.py",
|
|
1521
|
-
content="x" * 5000, # 5K chars each → 50K total
|
|
1522
|
-
truncated=False,
|
|
1523
|
-
original_lines=100,
|
|
1524
|
-
original_bytes=5000,
|
|
1525
|
-
priority=9,
|
|
1526
|
-
)
|
|
1527
|
-
)
|
|
1528
|
-
|
|
1529
|
-
code_pack = CodeEvidencePack(
|
|
1530
|
-
repo_path="/tmp/test",
|
|
1531
|
-
files=files,
|
|
1532
|
-
total_files_scanned=10,
|
|
1533
|
-
total_files_included=10,
|
|
1534
|
-
)
|
|
1535
|
-
|
|
1536
|
-
agent = CodeAnalysisAgent()
|
|
1537
|
-
|
|
1538
|
-
# With a 12K budget, per-file caps allow a few files while enforcing total budget
|
|
1539
|
-
selected = agent._select_files_for_llm(
|
|
1540
|
-
code_pack,
|
|
1541
|
-
max_files=20,
|
|
1542
|
-
max_infra_files=0,
|
|
1543
|
-
min_source_files=1,
|
|
1544
|
-
max_total_chars=12_000,
|
|
1545
|
-
)
|
|
1546
|
-
assert len(selected) >= 1 # first file always included
|
|
1547
|
-
assert len(selected) <= 5 # budget + per-file caps bound the final selection
|
|
1548
|
-
total_chars = sum(len(f.content) for f in selected)
|
|
1549
|
-
assert total_chars <= 12_000
|
|
1550
|
-
|
|
1551
|
-
@pytest.mark.asyncio
|
|
1552
|
-
async def test_select_files_for_llm_default_budget_caps_large_packs(self):
|
|
1553
|
-
"""_select_files_for_llm uses MAX_TOTAL_CODE_CONTEXT_CHARS to cap large packs.
|
|
1554
|
-
|
|
1555
|
-
Phase 64+: Prevents the 240K+ char prompts observed in real runs when
|
|
1556
|
-
auditing repos with many source files.
|
|
1557
|
-
"""
|
|
1558
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1559
|
-
|
|
1560
|
-
# Create many large files that would exceed 30K default budget
|
|
1561
|
-
files = []
|
|
1562
|
-
for i in range(20):
|
|
1563
|
-
files.append(
|
|
1564
|
-
CodeEvidence(
|
|
1565
|
-
file_path=f"src/large_{i}.py",
|
|
1566
|
-
content="y" * 10_000, # 10K chars each → 200K total uncapped
|
|
1567
|
-
truncated=False,
|
|
1568
|
-
original_lines=200,
|
|
1569
|
-
original_bytes=10_000,
|
|
1570
|
-
priority=9,
|
|
1571
|
-
)
|
|
1572
|
-
)
|
|
1573
|
-
|
|
1574
|
-
code_pack = CodeEvidencePack(
|
|
1575
|
-
repo_path="/tmp/test",
|
|
1576
|
-
files=files,
|
|
1577
|
-
total_files_scanned=20,
|
|
1578
|
-
total_files_included=20,
|
|
1579
|
-
)
|
|
1580
|
-
|
|
1581
|
-
agent = CodeAnalysisAgent()
|
|
1582
|
-
selected = agent._select_files_for_llm(code_pack)
|
|
1583
|
-
total_chars = sum(len(f.content) for f in selected)
|
|
1584
|
-
|
|
1585
|
-
# Should be hard-capped at MAX_TOTAL_CODE_CONTEXT_CHARS (30K)
|
|
1586
|
-
assert total_chars <= agent.MAX_TOTAL_CODE_CONTEXT_CHARS
|
|
1587
|
-
assert len(selected) < 20 # Not all 20 files — budget stopped early
|
|
1588
|
-
|
|
1589
|
-
@pytest.mark.asyncio
|
|
1590
|
-
async def test_select_files_for_llm_small_files_all_included(self):
|
|
1591
|
-
"""Small files that fit within budget are all included."""
|
|
1592
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1593
|
-
|
|
1594
|
-
files = []
|
|
1595
|
-
for i in range(5):
|
|
1596
|
-
files.append(
|
|
1597
|
-
CodeEvidence(
|
|
1598
|
-
file_path=f"src/small_{i}.py",
|
|
1599
|
-
content="print('hi')", # ~11 chars each → 55 total
|
|
1600
|
-
truncated=False,
|
|
1601
|
-
original_lines=1,
|
|
1602
|
-
original_bytes=11,
|
|
1603
|
-
priority=9,
|
|
1604
|
-
)
|
|
1605
|
-
)
|
|
1606
|
-
|
|
1607
|
-
code_pack = CodeEvidencePack(
|
|
1608
|
-
repo_path="/tmp/test",
|
|
1609
|
-
files=files,
|
|
1610
|
-
total_files_scanned=5,
|
|
1611
|
-
total_files_included=5,
|
|
1612
|
-
)
|
|
1613
|
-
|
|
1614
|
-
agent = CodeAnalysisAgent()
|
|
1615
|
-
selected = agent._select_files_for_llm(code_pack)
|
|
1616
|
-
|
|
1617
|
-
# All 5 small files should be included — well within 30K budget
|
|
1618
|
-
assert len(selected) == 5
|
|
1619
|
-
|
|
1620
|
-
@pytest.mark.asyncio
|
|
1621
|
-
async def test_select_files_for_llm_mixed_sizes_respects_budget(self):
|
|
1622
|
-
"""Mixed file sizes: small infra files + large source files stay within budget.
|
|
1623
|
-
|
|
1624
|
-
Phase 64+: Verifies the realistic scenario where infra files (README,
|
|
1625
|
-
pyproject.toml) are small but source files can be large.
|
|
1626
|
-
"""
|
|
1627
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1628
|
-
|
|
1629
|
-
files = [
|
|
1630
|
-
# Small infra files (always included)
|
|
1631
|
-
CodeEvidence(
|
|
1632
|
-
file_path="README.md",
|
|
1633
|
-
content="# Project\nSmall readme.",
|
|
1634
|
-
truncated=False,
|
|
1635
|
-
original_lines=2,
|
|
1636
|
-
original_bytes=25,
|
|
1637
|
-
priority=1,
|
|
1638
|
-
),
|
|
1639
|
-
CodeEvidence(
|
|
1640
|
-
file_path="pyproject.toml",
|
|
1641
|
-
content='[project]\nname = "test"',
|
|
1642
|
-
truncated=False,
|
|
1643
|
-
original_lines=2,
|
|
1644
|
-
original_bytes=28,
|
|
1645
|
-
priority=5,
|
|
1646
|
-
),
|
|
1647
|
-
]
|
|
1648
|
-
# Add large source files
|
|
1649
|
-
for i in range(15):
|
|
1650
|
-
files.append(
|
|
1651
|
-
CodeEvidence(
|
|
1652
|
-
file_path=f"src/service_{i}.py",
|
|
1653
|
-
content="z" * 8_000, # 8K chars each → 120K total for source
|
|
1654
|
-
truncated=False,
|
|
1655
|
-
original_lines=200,
|
|
1656
|
-
original_bytes=8_000,
|
|
1657
|
-
priority=9,
|
|
1658
|
-
)
|
|
1659
|
-
)
|
|
1660
|
-
|
|
1661
|
-
code_pack = CodeEvidencePack(
|
|
1662
|
-
repo_path="/tmp/test",
|
|
1663
|
-
files=files,
|
|
1664
|
-
total_files_scanned=17,
|
|
1665
|
-
total_files_included=17,
|
|
1666
|
-
)
|
|
1667
|
-
|
|
1668
|
-
agent = CodeAnalysisAgent()
|
|
1669
|
-
selected = agent._select_files_for_llm(code_pack, max_total_chars=25_000)
|
|
1670
|
-
selected_paths = [f.file_path for f in selected]
|
|
1671
|
-
total_chars = sum(len(f.content) for f in selected)
|
|
1672
|
-
|
|
1673
|
-
# At least one infra file should be included (they're small)
|
|
1674
|
-
assert "pyproject.toml" in selected_paths
|
|
1675
|
-
# Total should be within configured budget
|
|
1676
|
-
assert total_chars <= 25_000
|
|
1677
|
-
# Should NOT include all 15 source files
|
|
1678
|
-
source_selected = [p for p in selected_paths if p.startswith("src/")]
|
|
1679
|
-
assert len(source_selected) < 15
|
|
1680
|
-
|
|
1681
|
-
@pytest.mark.asyncio
|
|
1682
|
-
async def test_select_files_for_llm_keeps_source_on_tight_budget(self):
|
|
1683
|
-
"""Tight budgets should still retain at least one source file when available."""
|
|
1684
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1685
|
-
|
|
1686
|
-
code_pack = CodeEvidencePack(
|
|
1687
|
-
repo_path="/tmp/test",
|
|
1688
|
-
files=[
|
|
1689
|
-
CodeEvidence(
|
|
1690
|
-
file_path="README.md",
|
|
1691
|
-
content="r" * 50_000,
|
|
1692
|
-
truncated=False,
|
|
1693
|
-
original_lines=1000,
|
|
1694
|
-
original_bytes=50_000,
|
|
1695
|
-
priority=1,
|
|
1696
|
-
),
|
|
1697
|
-
CodeEvidence(
|
|
1698
|
-
file_path="src/service.py",
|
|
1699
|
-
content="s" * 8_000,
|
|
1700
|
-
truncated=False,
|
|
1701
|
-
original_lines=300,
|
|
1702
|
-
original_bytes=8_000,
|
|
1703
|
-
priority=9,
|
|
1704
|
-
),
|
|
1705
|
-
],
|
|
1706
|
-
total_files_scanned=2,
|
|
1707
|
-
total_files_included=2,
|
|
1708
|
-
)
|
|
1709
|
-
|
|
1710
|
-
agent = CodeAnalysisAgent()
|
|
1711
|
-
selected = agent._select_files_for_llm(
|
|
1712
|
-
code_pack,
|
|
1713
|
-
max_files=4,
|
|
1714
|
-
max_total_chars=12_000,
|
|
1715
|
-
)
|
|
1716
|
-
|
|
1717
|
-
selected_paths = [f.file_path for f in selected]
|
|
1718
|
-
assert any(path.startswith("src/") for path in selected_paths)
|
|
1719
|
-
assert sum(len(f.content) for f in selected) <= 12_000
|
|
1720
|
-
|
|
1721
|
-
@pytest.mark.asyncio
|
|
1722
|
-
async def test_select_files_for_llm_skips_oversized_and_keeps_smaller_followups(self):
|
|
1723
|
-
"""Selection should skip oversized candidates and continue filling with smaller files."""
|
|
1724
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1725
|
-
|
|
1726
|
-
code_pack = CodeEvidencePack(
|
|
1727
|
-
repo_path="/tmp/test",
|
|
1728
|
-
files=[
|
|
1729
|
-
CodeEvidence(
|
|
1730
|
-
file_path="README.md",
|
|
1731
|
-
content="r" * 500,
|
|
1732
|
-
truncated=False,
|
|
1733
|
-
original_lines=20,
|
|
1734
|
-
original_bytes=500,
|
|
1735
|
-
priority=1,
|
|
1736
|
-
),
|
|
1737
|
-
CodeEvidence(
|
|
1738
|
-
file_path="src/huge.py",
|
|
1739
|
-
content="h" * 20_000,
|
|
1740
|
-
truncated=False,
|
|
1741
|
-
original_lines=500,
|
|
1742
|
-
original_bytes=20_000,
|
|
1743
|
-
priority=9,
|
|
1744
|
-
),
|
|
1745
|
-
CodeEvidence(
|
|
1746
|
-
file_path="src/small.py",
|
|
1747
|
-
content="s" * 1200,
|
|
1748
|
-
truncated=False,
|
|
1749
|
-
original_lines=40,
|
|
1750
|
-
original_bytes=1200,
|
|
1751
|
-
priority=9,
|
|
1752
|
-
),
|
|
1753
|
-
],
|
|
1754
|
-
total_files_scanned=3,
|
|
1755
|
-
total_files_included=3,
|
|
1756
|
-
)
|
|
1757
|
-
|
|
1758
|
-
agent = CodeAnalysisAgent()
|
|
1759
|
-
selected = agent._select_files_for_llm(
|
|
1760
|
-
code_pack,
|
|
1761
|
-
max_files=4,
|
|
1762
|
-
max_total_chars=2_500,
|
|
1763
|
-
max_infra_files=1,
|
|
1764
|
-
min_source_files=2,
|
|
1765
|
-
)
|
|
1766
|
-
selected_paths = [f.file_path for f in selected]
|
|
1767
|
-
assert "src/small.py" in selected_paths
|
|
1768
|
-
assert sum(len(f.content) for f in selected) <= 2_500
|
|
1769
|
-
|
|
1770
|
-
@pytest.mark.asyncio
|
|
1771
|
-
async def test_select_files_for_llm_prefers_non_truncated_source_when_available(self):
|
|
1772
|
-
"""Non-truncated source files should be preferred over truncated source files."""
|
|
1773
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1774
|
-
|
|
1775
|
-
code_pack = CodeEvidencePack(
|
|
1776
|
-
repo_path="/tmp/test",
|
|
1777
|
-
files=[
|
|
1778
|
-
CodeEvidence(
|
|
1779
|
-
file_path="src/security_guard.py",
|
|
1780
|
-
content="x" * 5000,
|
|
1781
|
-
truncated=True,
|
|
1782
|
-
original_lines=900,
|
|
1783
|
-
original_bytes=5000,
|
|
1784
|
-
priority=9,
|
|
1785
|
-
),
|
|
1786
|
-
CodeEvidence(
|
|
1787
|
-
file_path="src/safe_path.py",
|
|
1788
|
-
content="def safe_path():\n return True\n",
|
|
1789
|
-
truncated=False,
|
|
1790
|
-
original_lines=2,
|
|
1791
|
-
original_bytes=30,
|
|
1792
|
-
priority=9,
|
|
1793
|
-
),
|
|
1794
|
-
CodeEvidence(
|
|
1795
|
-
file_path="src/input_validation.py",
|
|
1796
|
-
content="def validate(v):\n return bool(v)\n",
|
|
1797
|
-
truncated=False,
|
|
1798
|
-
original_lines=2,
|
|
1799
|
-
original_bytes=36,
|
|
1800
|
-
priority=9,
|
|
1801
|
-
),
|
|
1802
|
-
CodeEvidence(
|
|
1803
|
-
file_path="Dockerfile",
|
|
1804
|
-
content="FROM python:3.14-slim\n",
|
|
1805
|
-
truncated=False,
|
|
1806
|
-
original_lines=1,
|
|
1807
|
-
original_bytes=22,
|
|
1808
|
-
priority=3,
|
|
1809
|
-
),
|
|
1810
|
-
],
|
|
1811
|
-
total_files_scanned=4,
|
|
1812
|
-
total_files_included=4,
|
|
1813
|
-
)
|
|
1814
|
-
|
|
1815
|
-
agent = CodeAnalysisAgent()
|
|
1816
|
-
selected = agent._select_files_for_llm(
|
|
1817
|
-
code_pack,
|
|
1818
|
-
max_files=3,
|
|
1819
|
-
min_source_files=2,
|
|
1820
|
-
max_total_chars=20_000,
|
|
1821
|
-
)
|
|
1822
|
-
selected_paths = [f.file_path for f in selected]
|
|
1823
|
-
assert "src/safe_path.py" in selected_paths
|
|
1824
|
-
assert "src/input_validation.py" in selected_paths
|
|
1825
|
-
|
|
1826
|
-
@pytest.mark.asyncio
|
|
1827
|
-
async def test_analyze_uses_runtime_code_review_prompt_budget(self, mock_evidence_bundle, tmp_path):
|
|
1828
|
-
"""Code review file selection should use runtime-configured prompt budget."""
|
|
1829
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1830
|
-
|
|
1831
|
-
repo_path = tmp_path / "repo"
|
|
1832
|
-
repo_path.mkdir()
|
|
1833
|
-
code_pack = CodeEvidencePack(
|
|
1834
|
-
repo_path=str(repo_path),
|
|
1835
|
-
files=[
|
|
1836
|
-
CodeEvidence(
|
|
1837
|
-
file_path="src/main.py",
|
|
1838
|
-
content="print('ok')",
|
|
1839
|
-
truncated=False,
|
|
1840
|
-
original_lines=1,
|
|
1841
|
-
original_bytes=11,
|
|
1842
|
-
priority=9,
|
|
1843
|
-
)
|
|
1844
|
-
],
|
|
1845
|
-
total_files_scanned=1,
|
|
1846
|
-
total_files_included=1,
|
|
1847
|
-
)
|
|
1848
|
-
|
|
1849
|
-
mock_settings = MagicMock()
|
|
1850
|
-
mock_settings.enabled = True
|
|
1851
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
1852
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1853
|
-
agent._build_code_pack = lambda p: code_pack
|
|
1854
|
-
agent._scan_security_patterns = AsyncMock(return_value=[])
|
|
1855
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=None)
|
|
1856
|
-
|
|
1857
|
-
selected_files = [code_pack.files[0]]
|
|
1858
|
-
select_mock = MagicMock(return_value=selected_files)
|
|
1859
|
-
agent._select_files_for_llm = select_mock
|
|
1860
|
-
agent._analyze_code_with_llm = AsyncMock(return_value=[])
|
|
1861
|
-
|
|
1862
|
-
runtime_cfg = MagicMock()
|
|
1863
|
-
runtime_cfg.llm.code_review_max_files = 3
|
|
1864
|
-
runtime_cfg.llm.code_review_max_total_chars = 12_000
|
|
1865
|
-
agent._get_runtime_config = lambda: runtime_cfg
|
|
1866
|
-
|
|
1867
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
1868
|
-
|
|
1869
|
-
assert result.success is True
|
|
1870
|
-
select_mock.assert_called_once_with(
|
|
1871
|
-
code_pack,
|
|
1872
|
-
max_files=3,
|
|
1873
|
-
max_total_chars=12_000,
|
|
1874
|
-
)
|
|
1875
|
-
|
|
1876
|
-
@pytest.mark.asyncio
|
|
1877
|
-
async def test_pydantic_analysis_uses_runtime_code_review_prompt_budget(self, mock_evidence_bundle, tmp_path):
|
|
1878
|
-
"""Pydantic analysis path should use runtime-configured prompt budget."""
|
|
1879
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1880
|
-
|
|
1881
|
-
repo_path = tmp_path / "repo"
|
|
1882
|
-
repo_path.mkdir()
|
|
1883
|
-
code_pack = CodeEvidencePack(
|
|
1884
|
-
repo_path=str(repo_path),
|
|
1885
|
-
files=[
|
|
1886
|
-
CodeEvidence(
|
|
1887
|
-
file_path="src/main.py",
|
|
1888
|
-
content="print('ok')",
|
|
1889
|
-
truncated=False,
|
|
1890
|
-
original_lines=1,
|
|
1891
|
-
original_bytes=11,
|
|
1892
|
-
priority=9,
|
|
1893
|
-
)
|
|
1894
|
-
],
|
|
1895
|
-
total_files_scanned=1,
|
|
1896
|
-
total_files_included=1,
|
|
1897
|
-
)
|
|
1898
|
-
|
|
1899
|
-
agent = CodeAnalysisAgent(agentic_mode="off")
|
|
1900
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1901
|
-
select_mock = MagicMock(return_value=[code_pack.files[0]])
|
|
1902
|
-
agent._select_files_for_llm = select_mock
|
|
1903
|
-
agent._format_code_pack = MagicMock(return_value="### File: src/main.py\n```\nprint('ok')\n```")
|
|
1904
|
-
agent._run_pydantic_agent = AsyncMock(return_value=None)
|
|
1905
|
-
agent.settings.protocol = LLMProtocolType.ANTHROPIC
|
|
1906
|
-
|
|
1907
|
-
runtime_cfg = MagicMock()
|
|
1908
|
-
runtime_cfg.llm.code_review_max_files = 2
|
|
1909
|
-
runtime_cfg.llm.code_review_max_total_chars = 9_000
|
|
1910
|
-
agent._get_runtime_config = lambda: runtime_cfg
|
|
1911
|
-
|
|
1912
|
-
with patch("vds_audit_orchestrator.agents.agentic_investigator.CodePackBuilder") as builder_cls:
|
|
1913
|
-
builder = builder_cls.return_value
|
|
1914
|
-
builder.build.return_value = code_pack
|
|
1915
|
-
_ = await agent._run_pydantic_ai_analysis(mock_evidence_bundle)
|
|
1916
|
-
|
|
1917
|
-
select_mock.assert_called_once_with(
|
|
1918
|
-
code_pack,
|
|
1919
|
-
max_files=2,
|
|
1920
|
-
max_total_chars=9_000,
|
|
1921
|
-
)
|
|
1922
|
-
|
|
1923
|
-
@pytest.mark.asyncio
|
|
1924
|
-
async def test_pydantic_analysis_uses_direct_ollama_client(self, mock_evidence_bundle, tmp_path):
|
|
1925
|
-
"""OLLAMA code analysis should use direct client path to avoid OpenAI-compat message-shape issues."""
|
|
1926
|
-
from vds_audit_orchestrator.evidence.code_pack import CodeEvidence, CodeEvidencePack
|
|
1927
|
-
|
|
1928
|
-
repo_path = tmp_path / "repo"
|
|
1929
|
-
repo_path.mkdir()
|
|
1930
|
-
code_pack = CodeEvidencePack(
|
|
1931
|
-
repo_path=str(repo_path),
|
|
1932
|
-
files=[
|
|
1933
|
-
CodeEvidence(
|
|
1934
|
-
file_path="src/main.py",
|
|
1935
|
-
content="print('ok')",
|
|
1936
|
-
truncated=False,
|
|
1937
|
-
original_lines=1,
|
|
1938
|
-
original_bytes=11,
|
|
1939
|
-
priority=9,
|
|
1940
|
-
)
|
|
1941
|
-
],
|
|
1942
|
-
total_files_scanned=1,
|
|
1943
|
-
total_files_included=1,
|
|
1944
|
-
)
|
|
1945
|
-
|
|
1946
|
-
agent = CodeAnalysisAgent(agentic_mode="off")
|
|
1947
|
-
agent._get_repo_path = lambda e, p: repo_path
|
|
1948
|
-
agent._run_pydantic_agent = AsyncMock(return_value=None)
|
|
1949
|
-
agent.settings.protocol = LLMProtocolType.OPENAI
|
|
1950
|
-
agent.settings.model_standard = "glm-4.7-flash"
|
|
1951
|
-
agent.settings.base_url = "http://127.0.0.1:11434"
|
|
1952
|
-
agent.settings.max_tokens_per_request = 512
|
|
1953
|
-
|
|
1954
|
-
mock_client = MagicMock()
|
|
1955
|
-
mock_message = MagicMock()
|
|
1956
|
-
mock_block = MagicMock()
|
|
1957
|
-
mock_block.text = (
|
|
1958
|
-
'{"score":7.5,"issues":[{"file_path":"src/main.py","line_number":1,'
|
|
1959
|
-
'"severity":"low","category":"quality","description":"sample","recommendation":"fix"}],'
|
|
1960
|
-
'"patterns":[],"confidence":0.7,"reasoning":"ok","files_analyzed":1,"tech_stack":["python"]}'
|
|
1961
|
-
)
|
|
1962
|
-
mock_message.content = [mock_block]
|
|
1963
|
-
mock_client.messages.create.return_value = mock_message
|
|
1964
|
-
|
|
1965
|
-
runtime_cfg = MagicMock()
|
|
1966
|
-
runtime_cfg.llm.code_review_max_files = 2
|
|
1967
|
-
runtime_cfg.llm.code_review_max_total_chars = 9_000
|
|
1968
|
-
agent._get_runtime_config = lambda: runtime_cfg
|
|
1969
|
-
|
|
1970
|
-
with patch.object(type(agent.settings), "get_client", return_value=mock_client):
|
|
1971
|
-
with patch("vds_audit_orchestrator.agents.agentic_investigator.CodePackBuilder") as builder_cls:
|
|
1972
|
-
builder = builder_cls.return_value
|
|
1973
|
-
builder.build.return_value = code_pack
|
|
1974
|
-
output = await agent._run_pydantic_ai_analysis(mock_evidence_bundle)
|
|
1975
|
-
|
|
1976
|
-
assert isinstance(output, CodeFindings)
|
|
1977
|
-
assert output.score == 7.5
|
|
1978
|
-
assert output.files_analyzed == 1
|
|
1979
|
-
agent._run_pydantic_agent.assert_not_awaited()
|
|
1980
|
-
assert mock_client.messages.create.call_count == 1
|
|
1981
|
-
call_kwargs = mock_client.messages.create.call_args.kwargs
|
|
1982
|
-
assert call_kwargs["temperature"] == 0.0
|
|
1983
|
-
assert call_kwargs["format"] == "json"
|
|
1984
|
-
assert call_kwargs["options"] == {}
|
|
1985
|
-
|
|
1986
|
-
@pytest.mark.asyncio
|
|
1987
|
-
async def test_layer2_skipped_metadata_when_agentic(self, mock_evidence_bundle):
|
|
1988
|
-
"""Layer 2 is skipped with reason 'agentic_tool_first' when agentic mode active."""
|
|
1989
|
-
mock_settings = MagicMock()
|
|
1990
|
-
mock_settings.enabled = True
|
|
1991
|
-
|
|
1992
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="on")
|
|
1993
|
-
# Agentic runtime must resolve for agentic to activate
|
|
1994
|
-
agent._resolve_agentic_runtime = lambda: {
|
|
1995
|
-
"enabled": True,
|
|
1996
|
-
"max_turns": 5,
|
|
1997
|
-
"max_tool_calls": 10,
|
|
1998
|
-
"tool_timeout_sec": 5,
|
|
1999
|
-
"safe_extensions": (".py",),
|
|
2000
|
-
"max_read_bytes": 1024,
|
|
2001
|
-
}
|
|
2002
|
-
agent._get_repo_path = lambda e, p: None
|
|
2003
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=None)
|
|
2004
|
-
|
|
2005
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
2006
|
-
|
|
2007
|
-
assert result.success is True
|
|
2008
|
-
assert result.metadata.get("llm_code_review_skipped") == "agentic_tool_first"
|
|
2009
|
-
|
|
2010
|
-
@pytest.mark.asyncio
|
|
2011
|
-
async def test_layer2_skipped_metadata_when_disabled_by_config(self, mock_evidence_bundle):
|
|
2012
|
-
"""Layer 2 is skipped with reason 'disabled_by_config' when runtime config disables it."""
|
|
2013
|
-
mock_settings = MagicMock()
|
|
2014
|
-
mock_settings.enabled = True
|
|
2015
|
-
|
|
2016
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
2017
|
-
agent._get_repo_path = lambda e, p: None
|
|
2018
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=None)
|
|
2019
|
-
|
|
2020
|
-
runtime_cfg = MagicMock()
|
|
2021
|
-
runtime_cfg.llm.code_review_layer_enabled = False
|
|
2022
|
-
runtime_cfg.llm.code_review_max_files = 4
|
|
2023
|
-
runtime_cfg.llm.code_review_max_total_chars = 12_000
|
|
2024
|
-
agent._get_runtime_config = lambda: runtime_cfg
|
|
2025
|
-
|
|
2026
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
2027
|
-
|
|
2028
|
-
assert result.success is True
|
|
2029
|
-
assert result.metadata.get("llm_code_review_skipped") == "disabled_by_config"
|
|
2030
|
-
|
|
2031
|
-
@pytest.mark.asyncio
|
|
2032
|
-
async def test_ollama_skips_redundant_layer4_after_successful_layer2(self, mock_evidence_bundle):
|
|
2033
|
-
"""Ollama non-agentic flow should not run duplicate deep pass after layer-2 findings."""
|
|
2034
|
-
from pathlib import Path
|
|
2035
|
-
|
|
2036
|
-
from vds_agent_core.config import LLMProtocolType
|
|
2037
|
-
|
|
2038
|
-
mock_settings = MagicMock()
|
|
2039
|
-
mock_settings.enabled = True
|
|
2040
|
-
mock_settings.protocol = LLMProtocolType.OPENAI
|
|
2041
|
-
|
|
2042
|
-
agent = CodeAnalysisAgent(settings=mock_settings, agentic_mode="off")
|
|
2043
|
-
agent._get_repo_path = lambda e, p: Path("/tmp/repo")
|
|
2044
|
-
agent._resolve_agentic_runtime = lambda: None
|
|
2045
|
-
agent._scan_security_patterns = AsyncMock(return_value=[])
|
|
2046
|
-
agent._scan_for_patterns = MagicMock(return_value=[])
|
|
2047
|
-
agent._build_code_pack = MagicMock(
|
|
2048
|
-
return_value=MagicMock(total_files_included=1, total_files_scanned=1, files=[])
|
|
2049
|
-
)
|
|
2050
|
-
agent._select_files_for_llm = MagicMock(return_value=[])
|
|
2051
|
-
agent._analyze_code_with_llm = AsyncMock(
|
|
2052
|
-
return_value=[
|
|
2053
|
-
{
|
|
2054
|
-
"type": "quality",
|
|
2055
|
-
"severity": "medium",
|
|
2056
|
-
"description": "Layer2 finding",
|
|
2057
|
-
"location": "src/main.py:1",
|
|
2058
|
-
"source": "llm_code_review",
|
|
2059
|
-
}
|
|
2060
|
-
]
|
|
2061
|
-
)
|
|
2062
|
-
agent._run_pydantic_ai_analysis = AsyncMock(return_value=None)
|
|
2063
|
-
|
|
2064
|
-
runtime_cfg = MagicMock()
|
|
2065
|
-
runtime_cfg.llm.code_review_layer_enabled = True
|
|
2066
|
-
runtime_cfg.llm.code_review_max_files = 4
|
|
2067
|
-
runtime_cfg.llm.code_review_max_total_chars = 12_000
|
|
2068
|
-
agent._get_runtime_config = lambda: runtime_cfg
|
|
2069
|
-
|
|
2070
|
-
result = await agent.analyze(mock_evidence_bundle)
|
|
2071
|
-
|
|
2072
|
-
assert result.success is True
|
|
2073
|
-
assert result.metadata.get("pydantic_ai_quality_skipped") == "local_openai_non_agentic_layer2_sufficient"
|
|
2074
|
-
agent._analyze_code_with_llm.assert_awaited_once()
|
|
2075
|
-
agent._run_pydantic_ai_analysis.assert_not_awaited()
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
def test_tool_efficiency_kpi_detects_high_repetition() -> None:
|
|
2079
|
-
"""FR-78: KPI gate should fail high-repetition runs."""
|
|
2080
|
-
summary = {
|
|
2081
|
-
"tool_calls_completed": 10,
|
|
2082
|
-
"tool_repetition_rate": 0.7,
|
|
2083
|
-
"skill_calls_total": 0,
|
|
2084
|
-
}
|
|
2085
|
-
assert CodeAnalysisAgent._is_tool_efficiency_kpi_unsatisfied(summary) is True
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
def test_tool_efficiency_kpi_detects_low_effective_skill_rate() -> None:
|
|
2089
|
-
"""FR-78: KPI gate should fail when skill calls are mostly ineffective."""
|
|
2090
|
-
summary = {
|
|
2091
|
-
"tool_calls_completed": 9,
|
|
2092
|
-
"tool_repetition_rate": 0.3,
|
|
2093
|
-
"skill_calls_total": 4,
|
|
2094
|
-
"skill_effective_rate": 0.25,
|
|
2095
|
-
}
|
|
2096
|
-
assert CodeAnalysisAgent._is_tool_efficiency_kpi_unsatisfied(summary) is True
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
def test_tool_efficiency_kpi_passes_efficient_usage() -> None:
|
|
2100
|
-
"""FR-78: efficient tool usage should pass KPI gate."""
|
|
2101
|
-
summary = {
|
|
2102
|
-
"tool_calls_completed": 10,
|
|
2103
|
-
"tool_repetition_rate": 0.3,
|
|
2104
|
-
"skill_calls_total": 2,
|
|
2105
|
-
"skill_effective_rate": 1.0,
|
|
2106
|
-
}
|
|
2107
|
-
assert CodeAnalysisAgent._is_tool_efficiency_kpi_unsatisfied(summary) is False
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
def test_tool_efficiency_kpi_threshold_boundaries_are_stable() -> None:
|
|
2111
|
-
"""TSK-660.75: KPI guard stays strict only above configured thresholds."""
|
|
2112
|
-
summary = {
|
|
2113
|
-
"tool_calls_completed": 10,
|
|
2114
|
-
"tool_repetition_rate": 0.6, # strict comparison is > 0.6
|
|
2115
|
-
"skill_calls_total": 3,
|
|
2116
|
-
"skill_effective_rate": 0.5, # strict comparison is < 0.5
|
|
2117
|
-
}
|
|
2118
|
-
assert CodeAnalysisAgent._is_tool_efficiency_kpi_unsatisfied(summary) is False
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
def test_repetitive_non_progress_detects_signature_churn() -> None:
|
|
2122
|
-
"""TSK-660.75: signature churn should trigger corrective non-progress path."""
|
|
2123
|
-
telemetry = {
|
|
2124
|
-
"event_tool_calls_completed": 9,
|
|
2125
|
-
"event_tool_names": ["grep_search", "read_file"],
|
|
2126
|
-
"event_tool_count_by_name": {"grep_search": 6, "read_file": 3},
|
|
2127
|
-
"event_tool_signatures": [
|
|
2128
|
-
'grep_search|{"pattern":"auth"}',
|
|
2129
|
-
'grep_search|{"pattern":"auth"}',
|
|
2130
|
-
'grep_search|{"pattern":"auth"}',
|
|
2131
|
-
'grep_search|{"pattern":"jwt"}',
|
|
2132
|
-
'grep_search|{"pattern":"jwt"}',
|
|
2133
|
-
'read_file|{"path":"a.py"}',
|
|
2134
|
-
'read_file|{"path":"a.py"}',
|
|
2135
|
-
'read_file|{"path":"b.py"}',
|
|
2136
|
-
'read_file|{"path":"b.py"}',
|
|
2137
|
-
],
|
|
2138
|
-
}
|
|
2139
|
-
assert CodeAnalysisAgent._is_repetitive_non_progress_tool_usage(telemetry) is True
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
def test_repetitive_non_progress_allows_productive_high_signal_mix() -> None:
|
|
2143
|
-
"""TSK-660.75: diverse high-signal tool usage should avoid false corrective pivots."""
|
|
2144
|
-
telemetry = {
|
|
2145
|
-
"event_tool_calls_completed": 9,
|
|
2146
|
-
"event_tool_names": ["grep_search", "read_file", "get_definition", "find_references", "workspace_symbol"],
|
|
2147
|
-
"event_tool_count_by_name": {
|
|
2148
|
-
"grep_search": 2,
|
|
2149
|
-
"read_file": 2,
|
|
2150
|
-
"get_definition": 2,
|
|
2151
|
-
"find_references": 2,
|
|
2152
|
-
"workspace_symbol": 1,
|
|
2153
|
-
},
|
|
2154
|
-
"event_tool_signatures": [
|
|
2155
|
-
'grep_search|{"pattern":"auth"}',
|
|
2156
|
-
'grep_search|{"pattern":"jwt"}',
|
|
2157
|
-
'read_file|{"path":"src/auth.py"}',
|
|
2158
|
-
'read_file|{"path":"src/jwt.py"}',
|
|
2159
|
-
'get_definition|{"symbol":"validate_token"}',
|
|
2160
|
-
'get_definition|{"symbol":"parse_claims"}',
|
|
2161
|
-
'find_references|{"symbol":"validate_token"}',
|
|
2162
|
-
'find_references|{"symbol":"parse_claims"}',
|
|
2163
|
-
'workspace_symbol|{"query":"Security"}',
|
|
2164
|
-
],
|
|
2165
|
-
}
|
|
2166
|
-
assert CodeAnalysisAgent._is_repetitive_non_progress_tool_usage(telemetry) is False
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
def test_repetitive_non_progress_detects_mixed_signature_churn_with_low_read_progress() -> None:
|
|
2170
|
-
"""Mixed search/read loops with repeated signatures should be treated as non-progress."""
|
|
2171
|
-
telemetry = {
|
|
2172
|
-
"event_tool_calls_completed": 10,
|
|
2173
|
-
"event_tool_names": ["grep_search", "read_file", "search_evidence", "list_directory"],
|
|
2174
|
-
"event_tool_count_by_name": {
|
|
2175
|
-
"grep_search": 4,
|
|
2176
|
-
"search_evidence": 2,
|
|
2177
|
-
"list_directory": 2,
|
|
2178
|
-
"read_file": 1,
|
|
2179
|
-
"read_evidence_document": 0,
|
|
2180
|
-
"get_definition": 0,
|
|
2181
|
-
"find_references": 0,
|
|
2182
|
-
"workspace_symbol": 0,
|
|
2183
|
-
},
|
|
2184
|
-
"event_tool_signatures": [
|
|
2185
|
-
'grep_search|{"pattern":"auth"}',
|
|
2186
|
-
'grep_search|{"pattern":"auth"}',
|
|
2187
|
-
'grep_search|{"pattern":"auth"}',
|
|
2188
|
-
'search_evidence|{"query":"auth flow"}',
|
|
2189
|
-
'search_evidence|{"query":"auth flow"}',
|
|
2190
|
-
'list_directory|{"path":"src"}',
|
|
2191
|
-
'list_directory|{"path":"src"}',
|
|
2192
|
-
'read_file|{"path":"src/auth/service.py"}',
|
|
2193
|
-
'grep_search|{"pattern":"token"}',
|
|
2194
|
-
'grep_search|{"pattern":"token"}',
|
|
2195
|
-
],
|
|
2196
|
-
}
|
|
2197
|
-
assert CodeAnalysisAgent._is_repetitive_non_progress_tool_usage(telemetry) is True
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
def test_tool_efficiency_corrective_prompt_contains_required_guidance() -> None:
|
|
2201
|
-
"""FR-78: corrective path appends concrete efficiency instructions."""
|
|
2202
|
-
base = "investigate repo"
|
|
2203
|
-
corrected = CodeAnalysisAgent._build_tool_efficiency_corrective_prompt(base)
|
|
2204
|
-
assert "TOOL EFFICIENCY KPI CORRECTIVE PATH" in corrected
|
|
2205
|
-
assert corrected.startswith(base)
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
def test_agentic_mode_on_overrides_disabled_runtime_flag() -> None:
|
|
2209
|
-
"""Explicit agentic_mode='on' should force-enable runtime even when config flag is false."""
|
|
2210
|
-
|
|
2211
|
-
class _Policy:
|
|
2212
|
-
def model_dump(self) -> dict[str, float]:
|
|
2213
|
-
return {"min_calls": 6, "dominance_ratio": 0.6}
|
|
2214
|
-
|
|
2215
|
-
agent = CodeAnalysisAgent(agentic_mode="on")
|
|
2216
|
-
agent._get_runtime_config = lambda: SimpleNamespace(
|
|
2217
|
-
llm=SimpleNamespace(enabled=True),
|
|
2218
|
-
agentic=SimpleNamespace(
|
|
2219
|
-
enabled=False,
|
|
2220
|
-
safe_extensions=[".py", ".md"],
|
|
2221
|
-
max_turns=6,
|
|
2222
|
-
max_tool_calls=24,
|
|
2223
|
-
tool_timeout_sec=30,
|
|
2224
|
-
max_read_bytes=12000,
|
|
2225
|
-
max_read_lines=500,
|
|
2226
|
-
strict_no_fallback=False,
|
|
2227
|
-
non_progress_policy=_Policy(),
|
|
2228
|
-
tool_allowlists={"code": ["grep_search", "read_file"]},
|
|
2229
|
-
),
|
|
2230
|
-
)
|
|
2231
|
-
|
|
2232
|
-
runtime = agent._resolve_agentic_runtime()
|
|
2233
|
-
|
|
2234
|
-
assert isinstance(runtime, dict)
|
|
2235
|
-
assert runtime["enabled"] is True
|
|
2236
|
-
assert runtime["max_turns"] == 12
|
|
2237
|
-
assert runtime["max_tool_calls"] == 40
|
|
2238
|
-
assert runtime["tool_allowlist"] == ["grep_search", "read_file"]
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
def test_normalize_evidence_promotes_row_context_requirement_interpretation() -> None:
|
|
2242
|
-
"""Row context payload should populate state_context requirement interpretation for planner routing."""
|
|
2243
|
-
agent = CodeAnalysisAgent(settings=LLMSettings(enabled=False))
|
|
2244
|
-
bundle = EvidenceBundle(repository="demo-repo", git_evidence=[])
|
|
2245
|
-
task = AuditTask(
|
|
2246
|
-
type="code_analysis",
|
|
2247
|
-
description="Analyze code",
|
|
2248
|
-
assignee="code",
|
|
2249
|
-
input_data={
|
|
2250
|
-
"evidence_bundle": bundle,
|
|
2251
|
-
"state_context": {"project_key": "demo"},
|
|
2252
|
-
"row_context": {
|
|
2253
|
-
"row_id": "CL-001:row_12",
|
|
2254
|
-
"context": {
|
|
2255
|
-
"requirement_interpretation": {
|
|
2256
|
-
"intent": "Validate workflow runbook orchestration",
|
|
2257
|
-
"control_objective": "workflow",
|
|
2258
|
-
"evidence_targets": ["docs"],
|
|
2259
|
-
}
|
|
2260
|
-
},
|
|
2261
|
-
},
|
|
2262
|
-
},
|
|
2263
|
-
)
|
|
2264
|
-
|
|
2265
|
-
normalized = agent._normalize_evidence(task)
|
|
2266
|
-
|
|
2267
|
-
assert normalized is bundle
|
|
2268
|
-
assert isinstance(agent._state_context.get("requirement_interpretation"), dict)
|
|
2269
|
-
assert agent._state_context["requirement_interpretation"]["intent"] == "Validate workflow runbook orchestration"
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
def test_requirement_skill_decision_reads_wrapped_row_context_interpretation() -> None:
|
|
2273
|
-
"""Skill activation should use requirement interpretation from row_context.context payload shape."""
|
|
2274
|
-
decision = CodeAnalysisAgent._resolve_requirement_skill_activation_decision(
|
|
2275
|
-
state_context={
|
|
2276
|
-
"row_context": {
|
|
2277
|
-
"row_id": "CL-001:row_12",
|
|
2278
|
-
"context": {
|
|
2279
|
-
"requirement_interpretation": {
|
|
2280
|
-
"intent": "Validate workflow runbook orchestration",
|
|
2281
|
-
"control_objective": "workflow",
|
|
2282
|
-
"evidence_targets": ["docs"],
|
|
2283
|
-
"skill_objectives": ["Use vds-scripts-skill to validate command usage"],
|
|
2284
|
-
}
|
|
2285
|
-
},
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
)
|
|
2289
|
-
|
|
2290
|
-
assert decision["skills_needed"] is True
|
|
2291
|
-
assert decision["reason"] == "requirement_interpretation_skill_objectives_present"
|
|
2292
|
-
assert decision["decision_source"] == "requirement_interpretation"
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
def test_requirement_skill_decision_marks_operational_script_keywords_as_skill_needed() -> None:
|
|
2296
|
-
"""Operational keywords like script should remain skill-needed even with code-focused targets."""
|
|
2297
|
-
decision = CodeAnalysisAgent._resolve_requirement_skill_activation_decision(
|
|
2298
|
-
state_context={
|
|
2299
|
-
"requirement_interpretation": {
|
|
2300
|
-
"intent": "Implement script load Docker Image from offline tar",
|
|
2301
|
-
"control_objective": "deployment",
|
|
2302
|
-
"evidence_targets": ["code"],
|
|
2303
|
-
"code_targets": ["scripts/load-image.sh"],
|
|
2304
|
-
"acceptance_signals": ["Provide offline load procedure"],
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
)
|
|
2308
|
-
|
|
2309
|
-
assert decision["skills_needed"] is True
|
|
2310
|
-
assert decision["reason"] == "requirement_interpretation_operational_keyword:script"
|
|
2311
|
-
assert decision["decision_source"] == "heuristic"
|