@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,2072 +0,0 @@
|
|
|
1
|
-
"""Tests for LangGraph workflow (TSK-050, TSK-073).
|
|
2
|
-
|
|
3
|
-
This module tests the LangGraph-based audit workflow including:
|
|
4
|
-
- StateGraph initialization with AuditState
|
|
5
|
-
- Node execution order (profile -> evidence -> seed_tasks -> dispatcher -> execute_tasks -> synthesize)
|
|
6
|
-
- Checkpointing with MemorySaver
|
|
7
|
-
- Human-in-loop interrupt/resume flow
|
|
8
|
-
- State persistence across checkpoints
|
|
9
|
-
- Error handling in nodes
|
|
10
|
-
- Conditional edge routing
|
|
11
|
-
- Workflow export to Mermaid
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
|
|
16
|
-
from pathlib import Path
|
|
17
|
-
from typing import TYPE_CHECKING, Any
|
|
18
|
-
from unittest.mock import AsyncMock, MagicMock, patch
|
|
19
|
-
|
|
20
|
-
import pytest
|
|
21
|
-
from langgraph.checkpoint.memory import MemorySaver
|
|
22
|
-
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
|
|
23
|
-
from vds_audit_orchestrator.agents.base import AgentResult
|
|
24
|
-
from vds_audit_orchestrator.agents.langgraph_workflow import (
|
|
25
|
-
_VALID_CHECKPOINTER_TYPES,
|
|
26
|
-
_build_agent_operation_log_context,
|
|
27
|
-
_extract_agent_efficiency_metrics,
|
|
28
|
-
_extract_critical_findings,
|
|
29
|
-
_get_checkpointer,
|
|
30
|
-
_is_row_unified_single_row_no_task_state,
|
|
31
|
-
analyze_node,
|
|
32
|
-
build_audit_graph,
|
|
33
|
-
dispatcher_node,
|
|
34
|
-
evidence_node,
|
|
35
|
-
execute_tasks_node,
|
|
36
|
-
export_workflow_mermaid,
|
|
37
|
-
get_pending_reviews,
|
|
38
|
-
human_review_node,
|
|
39
|
-
profile_node,
|
|
40
|
-
resume_audit_with_human_input,
|
|
41
|
-
route_after_evidence,
|
|
42
|
-
route_after_execute,
|
|
43
|
-
run_audit_with_langgraph,
|
|
44
|
-
seed_tasks_node,
|
|
45
|
-
should_human_review,
|
|
46
|
-
synthesize_node,
|
|
47
|
-
)
|
|
48
|
-
from vds_audit_orchestrator.evidence.corpus import EvidenceCorpus
|
|
49
|
-
from vds_audit_orchestrator.models.evidence import (
|
|
50
|
-
Evidence,
|
|
51
|
-
EvidenceBundle,
|
|
52
|
-
EvidenceStatus,
|
|
53
|
-
)
|
|
54
|
-
from vds_audit_orchestrator.models.task import AuditTask, TaskStatus
|
|
55
|
-
|
|
56
|
-
if TYPE_CHECKING:
|
|
57
|
-
from vds_audit_orchestrator.agents.audit_state import AuditState
|
|
58
|
-
|
|
59
|
-
# =============================================================================
|
|
60
|
-
# Test Fixtures
|
|
61
|
-
# =============================================================================
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@pytest.fixture
|
|
65
|
-
def sample_repo_path(tmp_path: Path) -> Path:
|
|
66
|
-
"""Create a sample repository path for testing."""
|
|
67
|
-
repo = tmp_path / "test-repo"
|
|
68
|
-
repo.mkdir()
|
|
69
|
-
(repo / "README.md").write_text("# Test Repository")
|
|
70
|
-
(repo / "pyproject.toml").write_text("[tool.poetry]\nname = 'test-repo'")
|
|
71
|
-
return repo
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
@pytest.fixture
|
|
75
|
-
def sample_evidence_bundle(sample_repo_path: Path) -> EvidenceBundle:
|
|
76
|
-
"""Create a sample evidence bundle for testing."""
|
|
77
|
-
return EvidenceBundle(
|
|
78
|
-
repository="test-repo",
|
|
79
|
-
git_evidence=[
|
|
80
|
-
Evidence(
|
|
81
|
-
source="git_file",
|
|
82
|
-
source_id="README.md",
|
|
83
|
-
title="README",
|
|
84
|
-
content="# Test Repository",
|
|
85
|
-
content_hash="hash123",
|
|
86
|
-
status=EvidenceStatus.FOUND,
|
|
87
|
-
),
|
|
88
|
-
],
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
@pytest.fixture
|
|
93
|
-
def sample_audit_state(sample_repo_path: Path) -> AuditState:
|
|
94
|
-
"""Create a sample audit state for testing."""
|
|
95
|
-
return {
|
|
96
|
-
"repository": "test-repo",
|
|
97
|
-
"repo_path": str(sample_repo_path),
|
|
98
|
-
"project_id": "test-repo",
|
|
99
|
-
"step": "start",
|
|
100
|
-
"profile": {},
|
|
101
|
-
"evidence": None,
|
|
102
|
-
"evidence_dir": None,
|
|
103
|
-
"evidence_corpus": None,
|
|
104
|
-
"agent_results": [],
|
|
105
|
-
"synthesis": None,
|
|
106
|
-
"errors": [],
|
|
107
|
-
"human_approved": None,
|
|
108
|
-
"human_feedback": None,
|
|
109
|
-
"tasks": {},
|
|
110
|
-
"task_queue": [],
|
|
111
|
-
"active_workers": {},
|
|
112
|
-
"row_unified_mode": "off",
|
|
113
|
-
"single_row_targeted": False,
|
|
114
|
-
"row_state_context": None,
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
@pytest.fixture
|
|
119
|
-
def mock_agent_results() -> list[dict[str, Any]]:
|
|
120
|
-
"""Create mock agent results for testing."""
|
|
121
|
-
return [
|
|
122
|
-
{
|
|
123
|
-
"agent": "code",
|
|
124
|
-
"success": True,
|
|
125
|
-
"findings": [
|
|
126
|
-
{
|
|
127
|
-
"type": "technical_debt",
|
|
128
|
-
"severity": "medium",
|
|
129
|
-
"description": "TODO found in code",
|
|
130
|
-
"location": "src/main.py",
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
"metadata": {"llm_score": 85},
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"agent": "docs",
|
|
137
|
-
"success": True,
|
|
138
|
-
"findings": [
|
|
139
|
-
{
|
|
140
|
-
"type": "doc_quality",
|
|
141
|
-
"severity": "low",
|
|
142
|
-
"description": "README exists but needs improvement",
|
|
143
|
-
"location": "README.md",
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"metadata": {"llm_score": 90},
|
|
147
|
-
},
|
|
148
|
-
]
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
# =============================================================================
|
|
152
|
-
# Efficiency Metric Extraction Tests
|
|
153
|
-
# =============================================================================
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
class TestEfficiencyMetricExtraction:
|
|
157
|
-
"""Tests for workflow-level agent efficiency log payload extraction."""
|
|
158
|
-
|
|
159
|
-
def test_extracts_agentic_efficiency_and_skill_executor_usage(self) -> None:
|
|
160
|
-
metadata = {
|
|
161
|
-
"agentic_tool_efficiency": {
|
|
162
|
-
"tool_calls_completed": 6,
|
|
163
|
-
"tool_repetition_rate": 0.5,
|
|
164
|
-
"skill_calls_total": 4,
|
|
165
|
-
"skill_effective_rate": 0.75,
|
|
166
|
-
},
|
|
167
|
-
"tool_usage": [
|
|
168
|
-
{"tool": "load_skill", "success": True},
|
|
169
|
-
{"tool": "read_skill_resource", "success": False},
|
|
170
|
-
{"tool": "run_skill_script", "success": True},
|
|
171
|
-
],
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
extracted = _extract_agent_efficiency_metrics(metadata)
|
|
175
|
-
assert extracted["tool_calls_completed"] == 6
|
|
176
|
-
assert extracted["tool_repetition_rate"] == 0.5
|
|
177
|
-
assert extracted["skill_calls_total"] == 4
|
|
178
|
-
assert extracted["skill_effective_rate"] == 0.75
|
|
179
|
-
assert extracted["skill_executor_calls_total"] == 3
|
|
180
|
-
assert extracted["skill_executor_success_rate"] == 0.667
|
|
181
|
-
|
|
182
|
-
def test_uses_tool_efficiency_fallback_when_agentic_summary_absent(self) -> None:
|
|
183
|
-
metadata = {
|
|
184
|
-
"tool_efficiency": {
|
|
185
|
-
"tool_calls_started": 2,
|
|
186
|
-
"tool_calls_completed": 2,
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
extracted = _extract_agent_efficiency_metrics(metadata)
|
|
191
|
-
assert extracted == {
|
|
192
|
-
"tool_calls_started": 2,
|
|
193
|
-
"tool_calls_completed": 2,
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
class _EventRecorder:
|
|
198
|
-
"""Capture structured logger events with bound context."""
|
|
199
|
-
|
|
200
|
-
def __init__(
|
|
201
|
-
self, events: list[tuple[str, str, dict[str, Any]]] | None = None, bound: dict[str, Any] | None = None
|
|
202
|
-
) -> None:
|
|
203
|
-
self.events = events if events is not None else []
|
|
204
|
-
self._bound = bound if bound is not None else {}
|
|
205
|
-
|
|
206
|
-
def bind(self, **kwargs): # type: ignore[no-untyped-def]
|
|
207
|
-
return _EventRecorder(self.events, {**self._bound, **kwargs})
|
|
208
|
-
|
|
209
|
-
def _record(self, level: str, event: str, **kwargs: Any) -> None:
|
|
210
|
-
payload = {**self._bound, **kwargs}
|
|
211
|
-
self.events.append((level, event, payload))
|
|
212
|
-
|
|
213
|
-
def info(self, event: str, **kwargs: Any) -> None:
|
|
214
|
-
self._record("info", event, **kwargs)
|
|
215
|
-
|
|
216
|
-
def warning(self, event: str, **kwargs: Any) -> None:
|
|
217
|
-
self._record("warning", event, **kwargs)
|
|
218
|
-
|
|
219
|
-
def debug(self, event: str, **kwargs: Any) -> None:
|
|
220
|
-
self._record("debug", event, **kwargs)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
class TestAgentOperationTelemetry:
|
|
224
|
-
"""Focused telemetry coverage for per-agent operation lifecycle logs."""
|
|
225
|
-
|
|
226
|
-
def test_build_agent_operation_log_context_prefers_row_state_page_id(self, sample_audit_state: AuditState) -> None:
|
|
227
|
-
state = sample_audit_state.copy()
|
|
228
|
-
state["project_id"] = "legacy-project-alias"
|
|
229
|
-
state["row_state_context"] = {"page_id": "88718940"}
|
|
230
|
-
|
|
231
|
-
context = _build_agent_operation_log_context(
|
|
232
|
-
state,
|
|
233
|
-
operation_scope="analyze_node",
|
|
234
|
-
agent_name="code",
|
|
235
|
-
task_id="task-123",
|
|
236
|
-
)
|
|
237
|
-
|
|
238
|
-
assert context["operation_scope"] == "analyze_node"
|
|
239
|
-
assert context["agent"] == "code"
|
|
240
|
-
assert context["task_id"] == "task-123"
|
|
241
|
-
assert context["page_id"] == "88718940"
|
|
242
|
-
assert context["project_page_id"] == "88718940"
|
|
243
|
-
assert context["project_id"] == "legacy-project-alias"
|
|
244
|
-
assert isinstance(context["operation_id"], str)
|
|
245
|
-
assert len(context["operation_id"]) > 10
|
|
246
|
-
|
|
247
|
-
@pytest.mark.asyncio
|
|
248
|
-
async def test_analyze_node_emits_agent_operation_lifecycle_logs_with_page_id(
|
|
249
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle, monkeypatch: pytest.MonkeyPatch
|
|
250
|
-
) -> None:
|
|
251
|
-
state_with_evidence = sample_audit_state.copy()
|
|
252
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
253
|
-
state_with_evidence["row_state_context"] = {"page_id": "88718940"}
|
|
254
|
-
|
|
255
|
-
recorder = _EventRecorder()
|
|
256
|
-
monkeypatch.setattr("vds_audit_orchestrator.agents.langgraph_workflow.logger", recorder)
|
|
257
|
-
|
|
258
|
-
with (
|
|
259
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
260
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
261
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
262
|
-
):
|
|
263
|
-
mock_code.return_value.analyze = AsyncMock(
|
|
264
|
-
return_value=AgentResult(agent_name="CodeAnalysisAgent", success=True, findings=[], metadata={})
|
|
265
|
-
)
|
|
266
|
-
mock_docs.return_value.analyze = AsyncMock(
|
|
267
|
-
return_value=AgentResult(agent_name="DocumentationAgent", success=True, findings=[], metadata={})
|
|
268
|
-
)
|
|
269
|
-
mock_security.return_value.analyze = AsyncMock(
|
|
270
|
-
return_value=AgentResult(agent_name="SecurityAgent", success=True, findings=[], metadata={})
|
|
271
|
-
)
|
|
272
|
-
|
|
273
|
-
await analyze_node(state_with_evidence)
|
|
274
|
-
|
|
275
|
-
started = [payload for _, event, payload in recorder.events if event == "agent_operation_started"]
|
|
276
|
-
completed = [payload for _, event, payload in recorder.events if event == "agent_operation_complete"]
|
|
277
|
-
|
|
278
|
-
assert len(started) == 3
|
|
279
|
-
assert len(completed) == 3
|
|
280
|
-
assert all(entry.get("operation_scope") == "analyze_node" for entry in started + completed)
|
|
281
|
-
assert all(entry.get("page_id") == "88718940" for entry in started + completed)
|
|
282
|
-
|
|
283
|
-
@pytest.mark.asyncio
|
|
284
|
-
async def test_execute_tasks_node_emits_agent_operation_failure_logs_with_page_id(
|
|
285
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle, monkeypatch: pytest.MonkeyPatch
|
|
286
|
-
) -> None:
|
|
287
|
-
task = AuditTask(
|
|
288
|
-
id="task-code-telemetry",
|
|
289
|
-
type="code_analysis",
|
|
290
|
-
description="Analyze code quality",
|
|
291
|
-
assignee="code",
|
|
292
|
-
status=TaskStatus.RUNNING,
|
|
293
|
-
input_data={"evidence_bundle": sample_evidence_bundle, "profile": {"domain": "insurance"}},
|
|
294
|
-
)
|
|
295
|
-
state_with_task = sample_audit_state.copy()
|
|
296
|
-
state_with_task["tasks"] = {task.id: task.model_dump()}
|
|
297
|
-
state_with_task["active_workers"] = {"code": task.id}
|
|
298
|
-
state_with_task["row_state_context"] = {"project_page_id": "88718940"}
|
|
299
|
-
|
|
300
|
-
recorder = _EventRecorder()
|
|
301
|
-
monkeypatch.setattr("vds_audit_orchestrator.agents.langgraph_workflow.logger", recorder)
|
|
302
|
-
|
|
303
|
-
with (
|
|
304
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
305
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
306
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
307
|
-
):
|
|
308
|
-
mock_code.return_value.analyze = AsyncMock(side_effect=RuntimeError("telemetry failure"))
|
|
309
|
-
mock_docs.return_value.analyze = AsyncMock()
|
|
310
|
-
mock_security.return_value.analyze = AsyncMock()
|
|
311
|
-
|
|
312
|
-
await execute_tasks_node(state_with_task)
|
|
313
|
-
|
|
314
|
-
started = [payload for _, event, payload in recorder.events if event == "agent_operation_started"]
|
|
315
|
-
failed = [payload for _, event, payload in recorder.events if event == "agent_operation_failed"]
|
|
316
|
-
|
|
317
|
-
assert len(started) == 1
|
|
318
|
-
assert len(failed) == 1
|
|
319
|
-
assert started[0].get("operation_scope") == "execute_tasks_node"
|
|
320
|
-
assert failed[0].get("operation_scope") == "execute_tasks_node"
|
|
321
|
-
assert started[0].get("task_id") == task.id
|
|
322
|
-
assert failed[0].get("task_id") == task.id
|
|
323
|
-
assert started[0].get("page_id") == "88718940"
|
|
324
|
-
assert failed[0].get("page_id") == "88718940"
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
@pytest.fixture
|
|
328
|
-
def critical_agent_results() -> list[dict[str, Any]]:
|
|
329
|
-
"""Create agent results with critical findings."""
|
|
330
|
-
return [
|
|
331
|
-
{
|
|
332
|
-
"agent": "security",
|
|
333
|
-
"success": True,
|
|
334
|
-
"findings": [
|
|
335
|
-
{
|
|
336
|
-
"type": "security_vulnerability",
|
|
337
|
-
"severity": "critical",
|
|
338
|
-
"description": "Hardcoded secret detected",
|
|
339
|
-
"location": "src/config.py",
|
|
340
|
-
}
|
|
341
|
-
],
|
|
342
|
-
"metadata": {"llm_score": 30},
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
"agent": "code",
|
|
346
|
-
"success": False,
|
|
347
|
-
"error": "Analysis failed: timeout",
|
|
348
|
-
"findings": [],
|
|
349
|
-
"metadata": {},
|
|
350
|
-
},
|
|
351
|
-
]
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
# =============================================================================
|
|
355
|
-
# StateGraph Initialization Tests
|
|
356
|
-
# =============================================================================
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
class TestStateGraphInitialization:
|
|
360
|
-
"""Tests for StateGraph initialization with AuditState."""
|
|
361
|
-
|
|
362
|
-
@pytest.mark.asyncio
|
|
363
|
-
async def test_build_graph_with_audit_state(self):
|
|
364
|
-
"""Test that StateGraph is initialized with correct AuditState."""
|
|
365
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
366
|
-
|
|
367
|
-
# Verify graph is compiled
|
|
368
|
-
assert graph is not None
|
|
369
|
-
assert hasattr(graph, "nodes")
|
|
370
|
-
|
|
371
|
-
# Check that all expected workflow nodes are present
|
|
372
|
-
nodes = list(graph.nodes.keys())
|
|
373
|
-
expected_nodes = [
|
|
374
|
-
"profile",
|
|
375
|
-
"evidence",
|
|
376
|
-
"seed_tasks",
|
|
377
|
-
"dispatcher",
|
|
378
|
-
"execute_tasks",
|
|
379
|
-
"human_review",
|
|
380
|
-
"synthesize",
|
|
381
|
-
]
|
|
382
|
-
for node in expected_nodes:
|
|
383
|
-
assert node in nodes, f"Node {node} not found in graph"
|
|
384
|
-
|
|
385
|
-
# __start__ should be present, __end__ may not be a node
|
|
386
|
-
assert "__start__" in nodes
|
|
387
|
-
|
|
388
|
-
@pytest.mark.asyncio
|
|
389
|
-
async def test_graph_with_memory_saver(self):
|
|
390
|
-
"""Test that graph is compiled with MemorySaver checkpointer."""
|
|
391
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
392
|
-
|
|
393
|
-
# Verify checkpointer is configured
|
|
394
|
-
assert graph.checkpointer is not None
|
|
395
|
-
assert isinstance(graph.checkpointer, MemorySaver)
|
|
396
|
-
|
|
397
|
-
@pytest.mark.asyncio
|
|
398
|
-
async def test_unknown_checkpointer_type_raises_value_error(self):
|
|
399
|
-
"""Test that unknown checkpointer types raise ValueError instead of silently falling back."""
|
|
400
|
-
with pytest.raises(ValueError, match="Unknown checkpointer type"):
|
|
401
|
-
await _get_checkpointer("postgrse", None) # typo
|
|
402
|
-
|
|
403
|
-
@pytest.mark.asyncio
|
|
404
|
-
async def test_unknown_checkpointer_type_invalid_value(self):
|
|
405
|
-
"""Test that arbitrary strings are rejected as checkpointer types."""
|
|
406
|
-
with pytest.raises(ValueError, match="Unknown checkpointer type"):
|
|
407
|
-
await _get_checkpointer("sqlite", None)
|
|
408
|
-
|
|
409
|
-
@pytest.mark.asyncio
|
|
410
|
-
async def test_valid_checkpointer_types_constant(self):
|
|
411
|
-
"""Test that valid checkpointer types are strictly postgres and memory."""
|
|
412
|
-
assert frozenset({"postgres", "memory"}) == _VALID_CHECKPOINTER_TYPES
|
|
413
|
-
|
|
414
|
-
@pytest.mark.asyncio
|
|
415
|
-
async def test_memory_checkpointer_explicit(self):
|
|
416
|
-
"""Test that explicitly passing 'memory' returns MemorySaver."""
|
|
417
|
-
saver = await _get_checkpointer("memory", None)
|
|
418
|
-
assert isinstance(saver, MemorySaver)
|
|
419
|
-
|
|
420
|
-
@pytest.mark.asyncio
|
|
421
|
-
async def test_none_checkpointer_defaults_to_memory(self):
|
|
422
|
-
"""Test that None checkpointer defaults to MemorySaver."""
|
|
423
|
-
saver = await _get_checkpointer(None, None)
|
|
424
|
-
assert isinstance(saver, MemorySaver)
|
|
425
|
-
|
|
426
|
-
@pytest.mark.asyncio
|
|
427
|
-
async def test_postgres_checkpointer_requires_dsn(self):
|
|
428
|
-
"""Test that postgres checkpointer raises ValueError without DSN."""
|
|
429
|
-
with pytest.raises(ValueError, match="postgres checkpointer requires postgres_dsn"):
|
|
430
|
-
await _get_checkpointer("postgres", None)
|
|
431
|
-
|
|
432
|
-
@pytest.mark.asyncio
|
|
433
|
-
async def test_postgres_checkpointer_configures_msgpack_allowlist(self, monkeypatch: pytest.MonkeyPatch):
|
|
434
|
-
"""Test postgres checkpointer uses explicit serializer allowlist for evidence checkpoint types."""
|
|
435
|
-
|
|
436
|
-
captured: dict[str, object] = {}
|
|
437
|
-
|
|
438
|
-
class _DummyCM:
|
|
439
|
-
async def __aenter__(self):
|
|
440
|
-
class _DummySaver:
|
|
441
|
-
async def setup(self):
|
|
442
|
-
return None
|
|
443
|
-
|
|
444
|
-
return _DummySaver()
|
|
445
|
-
|
|
446
|
-
class _DummyPostgresSaver:
|
|
447
|
-
@staticmethod
|
|
448
|
-
def from_conn_string(conn_string: str, *, pipeline: bool = False, serde=None):
|
|
449
|
-
captured["conn_string"] = conn_string
|
|
450
|
-
captured["pipeline"] = pipeline
|
|
451
|
-
captured["serde"] = serde
|
|
452
|
-
return _DummyCM()
|
|
453
|
-
|
|
454
|
-
monkeypatch.setattr(
|
|
455
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.PostgresSaver",
|
|
456
|
-
_DummyPostgresSaver,
|
|
457
|
-
)
|
|
458
|
-
monkeypatch.setattr(
|
|
459
|
-
"vds_audit_orchestrator.agents.langgraph_workflow._postgres_saver_import_error",
|
|
460
|
-
None,
|
|
461
|
-
)
|
|
462
|
-
|
|
463
|
-
saver = await _get_checkpointer("postgres", "postgresql://user:pass@localhost:5432/db")
|
|
464
|
-
|
|
465
|
-
assert saver is not None
|
|
466
|
-
serde = captured["serde"]
|
|
467
|
-
assert isinstance(serde, JsonPlusSerializer)
|
|
468
|
-
assert getattr(serde, "_allowed_msgpack_modules", None) == {
|
|
469
|
-
("vds_audit_orchestrator.models.evidence", "EvidenceStatus"),
|
|
470
|
-
("vds_audit_orchestrator.models.evidence", "EvidenceBundle"),
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
@pytest.mark.asyncio
|
|
474
|
-
async def test_graph_entry_point(self):
|
|
475
|
-
"""Test that graph has correct entry point."""
|
|
476
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
477
|
-
|
|
478
|
-
# Entry point should be profile node
|
|
479
|
-
# The builder.set_entry_point("profile") was called
|
|
480
|
-
assert "profile" in graph.nodes
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
# =============================================================================
|
|
484
|
-
# Node Execution Order Tests
|
|
485
|
-
# =============================================================================
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
class TestNodeExecutionOrder:
|
|
489
|
-
"""Tests for correct node execution order."""
|
|
490
|
-
|
|
491
|
-
@pytest.mark.asyncio
|
|
492
|
-
async def test_profile_node_execution(self, sample_repo_path: Path, sample_audit_state: AuditState):
|
|
493
|
-
"""Test profile node executes correctly."""
|
|
494
|
-
with patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async") as mock_resolve:
|
|
495
|
-
# Mock profile resolution
|
|
496
|
-
mock_resolution = MagicMock()
|
|
497
|
-
mock_profile = MagicMock()
|
|
498
|
-
mock_profile.model_dump.return_value = {
|
|
499
|
-
"domain": "insurance",
|
|
500
|
-
"criticality": "medium",
|
|
501
|
-
"tech_stack": "python",
|
|
502
|
-
}
|
|
503
|
-
mock_resolution.profile = mock_profile
|
|
504
|
-
mock_resolution.source = "detection"
|
|
505
|
-
mock_resolve.return_value = mock_resolution
|
|
506
|
-
|
|
507
|
-
result = await profile_node(sample_audit_state)
|
|
508
|
-
|
|
509
|
-
assert result["profile"]["domain"] == "insurance"
|
|
510
|
-
assert result["step"] == "profile_done"
|
|
511
|
-
assert "errors" not in result or len(result.get("errors", [])) == 0
|
|
512
|
-
|
|
513
|
-
@pytest.mark.asyncio
|
|
514
|
-
async def test_evidence_node_execution(self, sample_repo_path: Path, sample_audit_state: AuditState):
|
|
515
|
-
"""Test evidence node executes correctly."""
|
|
516
|
-
# Create bundle directly in test instead of calling fixture
|
|
517
|
-
mock_bundle = EvidenceBundle(
|
|
518
|
-
repository="test-repo",
|
|
519
|
-
git_evidence=[
|
|
520
|
-
Evidence(
|
|
521
|
-
source="git_file",
|
|
522
|
-
source_id="README.md",
|
|
523
|
-
title="README",
|
|
524
|
-
content="# Test Repository",
|
|
525
|
-
content_hash="hash123",
|
|
526
|
-
status=EvidenceStatus.FOUND,
|
|
527
|
-
),
|
|
528
|
-
],
|
|
529
|
-
)
|
|
530
|
-
|
|
531
|
-
def state_manifest_loader(_dsn: str) -> dict[str, object]:
|
|
532
|
-
return {"project": {"project_name": "test", "pages": [], "documents": []}}
|
|
533
|
-
|
|
534
|
-
state_with_dsn = {
|
|
535
|
-
**sample_audit_state,
|
|
536
|
-
"state_dsn": "postgresql://state",
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
with (
|
|
540
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector") as mock_collector_cls,
|
|
541
|
-
patch("vds_audit_orchestrator.evidence.loader.EvidenceManifestLoader") as mock_loader_cls,
|
|
542
|
-
patch("vds_audit_orchestrator.agents.langgraph_workflow._check_evidence_readiness") as mock_gate,
|
|
543
|
-
):
|
|
544
|
-
# Mock evidence collector
|
|
545
|
-
mock_collector = AsyncMock()
|
|
546
|
-
mock_collector.collect_all.return_value = mock_bundle
|
|
547
|
-
mock_collector_cls.return_value = mock_collector
|
|
548
|
-
|
|
549
|
-
# Mock manifest loader
|
|
550
|
-
mock_loader = MagicMock()
|
|
551
|
-
mock_loader.load_runtime_corpus.return_value = EvidenceCorpus()
|
|
552
|
-
mock_loader_cls.return_value = mock_loader
|
|
553
|
-
|
|
554
|
-
# Phase 94: bypass evidence readiness gate for unit test
|
|
555
|
-
mock_gate_result = MagicMock()
|
|
556
|
-
mock_gate_result.ready = True
|
|
557
|
-
mock_gate_result.missing = []
|
|
558
|
-
mock_gate_result.warnings = []
|
|
559
|
-
mock_gate_result.confluence_docs_count = 1
|
|
560
|
-
mock_gate_result.code_files_count = 0
|
|
561
|
-
mock_gate.return_value = mock_gate_result
|
|
562
|
-
|
|
563
|
-
result = await evidence_node(state_with_dsn, state_manifest_loader=state_manifest_loader)
|
|
564
|
-
|
|
565
|
-
assert result["evidence"] is not None
|
|
566
|
-
assert result["step"] == "evidence_done"
|
|
567
|
-
assert "errors" not in result or len(result.get("errors", [])) == 0
|
|
568
|
-
|
|
569
|
-
@pytest.mark.asyncio
|
|
570
|
-
async def test_evidence_node_uses_state_manifest_loader_when_state_dsn_present(
|
|
571
|
-
self,
|
|
572
|
-
sample_audit_state: AuditState,
|
|
573
|
-
):
|
|
574
|
-
"""Evidence loader should use centralized state args when state_dsn is provided."""
|
|
575
|
-
mock_bundle = EvidenceBundle(repository="test-repo")
|
|
576
|
-
|
|
577
|
-
def state_manifest_loader(_dsn: str) -> dict[str, object]:
|
|
578
|
-
return {"project": {"project_name": "demo", "pages": [], "documents": []}}
|
|
579
|
-
|
|
580
|
-
state_with_dsn = {
|
|
581
|
-
**sample_audit_state,
|
|
582
|
-
"evidence_dir": "/tmp/evidence",
|
|
583
|
-
"state_dsn": "postgresql://state",
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
with (
|
|
587
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector") as mock_collector_cls,
|
|
588
|
-
patch("vds_audit_orchestrator.evidence.loader.EvidenceManifestLoader") as mock_loader_cls,
|
|
589
|
-
):
|
|
590
|
-
mock_collector = AsyncMock()
|
|
591
|
-
mock_collector.collect_all.return_value = mock_bundle
|
|
592
|
-
mock_collector_cls.return_value = mock_collector
|
|
593
|
-
|
|
594
|
-
mock_loader = MagicMock()
|
|
595
|
-
mock_loader.load_runtime_corpus.return_value = EvidenceCorpus()
|
|
596
|
-
mock_loader_cls.return_value = mock_loader
|
|
597
|
-
|
|
598
|
-
await evidence_node(
|
|
599
|
-
state_with_dsn,
|
|
600
|
-
state_manifest_loader=state_manifest_loader,
|
|
601
|
-
)
|
|
602
|
-
|
|
603
|
-
mock_loader_cls.assert_called_once()
|
|
604
|
-
assert mock_loader_cls.call_args.kwargs["state_dsn"] == "postgresql://state"
|
|
605
|
-
assert mock_loader_cls.call_args.kwargs["state_manifest_loader"] is state_manifest_loader
|
|
606
|
-
mock_loader.load_runtime_corpus.assert_called_once()
|
|
607
|
-
|
|
608
|
-
@pytest.mark.asyncio
|
|
609
|
-
async def test_analyze_node_execution(self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle):
|
|
610
|
-
"""Test analyze node runs agents in parallel."""
|
|
611
|
-
# Update state with evidence
|
|
612
|
-
state_with_evidence = sample_audit_state.copy()
|
|
613
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
614
|
-
|
|
615
|
-
with (
|
|
616
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
617
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
618
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
619
|
-
):
|
|
620
|
-
# Mock agent analyze methods - use explicit agent names
|
|
621
|
-
mock_code.return_value.analyze = AsyncMock(
|
|
622
|
-
return_value=AgentResult(
|
|
623
|
-
agent_name="CodeAnalysisAgent",
|
|
624
|
-
success=True,
|
|
625
|
-
findings=[{"type": "test_finding", "severity": "low"}],
|
|
626
|
-
metadata={"llm_score": 90},
|
|
627
|
-
)
|
|
628
|
-
)
|
|
629
|
-
mock_docs.return_value.analyze = AsyncMock(
|
|
630
|
-
return_value=AgentResult(
|
|
631
|
-
agent_name="DocumentationAgent",
|
|
632
|
-
success=True,
|
|
633
|
-
findings=[{"type": "test_finding", "severity": "low"}],
|
|
634
|
-
metadata={"llm_score": 90},
|
|
635
|
-
)
|
|
636
|
-
)
|
|
637
|
-
mock_security.return_value.analyze = AsyncMock(
|
|
638
|
-
return_value=AgentResult(
|
|
639
|
-
agent_name="SecurityAgent",
|
|
640
|
-
success=True,
|
|
641
|
-
findings=[{"type": "test_finding", "severity": "low"}],
|
|
642
|
-
metadata={"llm_score": 90},
|
|
643
|
-
)
|
|
644
|
-
)
|
|
645
|
-
|
|
646
|
-
result = await analyze_node(state_with_evidence)
|
|
647
|
-
|
|
648
|
-
assert "agent_results" in result
|
|
649
|
-
assert result["step"] == "analyze_done"
|
|
650
|
-
assert len(result["agent_results"]) == 3
|
|
651
|
-
assert mock_code.call_count == 1
|
|
652
|
-
assert mock_code.call_args.kwargs["agentic_mode"] == "auto"
|
|
653
|
-
|
|
654
|
-
@pytest.mark.asyncio
|
|
655
|
-
async def test_analyze_node_propagates_row_state_context(
|
|
656
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
657
|
-
) -> None:
|
|
658
|
-
"""Single-row state context should be forwarded into analyze payload state_context."""
|
|
659
|
-
state_with_evidence = sample_audit_state.copy()
|
|
660
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
661
|
-
state_with_evidence["row_state_context"] = {
|
|
662
|
-
"requirement_text": "Validate workflow runbook usage",
|
|
663
|
-
"requirement_interpretation": {"intent": "Validate workflow runbook usage", "evidence_targets": ["docs"]},
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
with (
|
|
667
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
668
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
669
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
670
|
-
):
|
|
671
|
-
mock_code.return_value.analyze = AsyncMock(
|
|
672
|
-
return_value=AgentResult(agent_name="CodeAnalysisAgent", success=True, findings=[], metadata={})
|
|
673
|
-
)
|
|
674
|
-
mock_docs.return_value.analyze = AsyncMock(
|
|
675
|
-
return_value=AgentResult(agent_name="DocumentationAgent", success=True, findings=[], metadata={})
|
|
676
|
-
)
|
|
677
|
-
mock_security.return_value.analyze = AsyncMock(
|
|
678
|
-
return_value=AgentResult(agent_name="SecurityAgent", success=True, findings=[], metadata={})
|
|
679
|
-
)
|
|
680
|
-
|
|
681
|
-
await analyze_node(state_with_evidence)
|
|
682
|
-
|
|
683
|
-
code_payload = mock_code.return_value.analyze.await_args.args[0]
|
|
684
|
-
state_context = code_payload.get("state_context")
|
|
685
|
-
assert isinstance(state_context, dict)
|
|
686
|
-
assert state_context.get("requirement_text") == "Validate workflow runbook usage"
|
|
687
|
-
interpretation = state_context.get("requirement_interpretation")
|
|
688
|
-
assert isinstance(interpretation, dict)
|
|
689
|
-
assert interpretation.get("intent") == "Validate workflow runbook usage"
|
|
690
|
-
|
|
691
|
-
@pytest.mark.asyncio
|
|
692
|
-
async def test_seed_tasks_node_execution(
|
|
693
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
694
|
-
):
|
|
695
|
-
"""Test seed_tasks node creates baseline tasks."""
|
|
696
|
-
state_with_evidence = sample_audit_state.copy()
|
|
697
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
698
|
-
state_with_evidence["profile"] = {"domain": "insurance"}
|
|
699
|
-
|
|
700
|
-
result = await seed_tasks_node(state_with_evidence)
|
|
701
|
-
|
|
702
|
-
assert result["step"] == "tasks_seeded"
|
|
703
|
-
assert "tasks" in result
|
|
704
|
-
assert len(result["tasks"]) == 3
|
|
705
|
-
|
|
706
|
-
@pytest.mark.asyncio
|
|
707
|
-
async def test_seed_tasks_node_includes_row_state_context(
|
|
708
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
709
|
-
) -> None:
|
|
710
|
-
"""Seeded task payload should include single-row state context for requirement routing."""
|
|
711
|
-
state_with_evidence = sample_audit_state.copy()
|
|
712
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
713
|
-
state_with_evidence["profile"] = {"domain": "insurance"}
|
|
714
|
-
state_with_evidence["row_state_context"] = {
|
|
715
|
-
"requirement_text": "Validate workflow runbook usage",
|
|
716
|
-
"requirement_interpretation": {"intent": "Validate workflow runbook usage", "evidence_targets": ["docs"]},
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
result = await seed_tasks_node(state_with_evidence)
|
|
720
|
-
|
|
721
|
-
assert len(result["tasks"]) == 3
|
|
722
|
-
first_task = next(iter(result["tasks"].values()))
|
|
723
|
-
payload = first_task.get("input_data", {})
|
|
724
|
-
state_context = payload.get("state_context")
|
|
725
|
-
assert isinstance(state_context, dict)
|
|
726
|
-
assert state_context.get("requirement_text") == "Validate workflow runbook usage"
|
|
727
|
-
|
|
728
|
-
@pytest.mark.asyncio
|
|
729
|
-
async def test_seed_tasks_node_skips_baseline_tasks_for_row_unified_single_row_target(
|
|
730
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
731
|
-
):
|
|
732
|
-
"""Guarded rollout: when row_unified_mode=on for a single-row target, do not seed baseline tasks."""
|
|
733
|
-
state_with_evidence = sample_audit_state.copy()
|
|
734
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
735
|
-
state_with_evidence["profile"] = {"domain": "insurance"}
|
|
736
|
-
state_with_evidence["row_unified_mode"] = "on"
|
|
737
|
-
state_with_evidence["single_row_targeted"] = True
|
|
738
|
-
|
|
739
|
-
result = await seed_tasks_node(state_with_evidence)
|
|
740
|
-
|
|
741
|
-
assert result["step"] == "tasks_seeded"
|
|
742
|
-
assert "tasks" in result
|
|
743
|
-
assert len(result["tasks"]) == 0
|
|
744
|
-
|
|
745
|
-
@pytest.mark.asyncio
|
|
746
|
-
async def test_seed_tasks_node_does_not_emit_single_row_legacy_marker_for_multi_row_target(
|
|
747
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle, capsys: pytest.CaptureFixture[str]
|
|
748
|
-
) -> None:
|
|
749
|
-
"""Row-unified multi-row targets should not emit the deprecated single-row telemetry marker."""
|
|
750
|
-
state_with_evidence = sample_audit_state.copy()
|
|
751
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
752
|
-
state_with_evidence["profile"] = {"domain": "insurance"}
|
|
753
|
-
state_with_evidence["row_unified_mode"] = "on"
|
|
754
|
-
state_with_evidence["single_row_targeted"] = False
|
|
755
|
-
|
|
756
|
-
result = await seed_tasks_node(state_with_evidence)
|
|
757
|
-
|
|
758
|
-
assert result["step"] == "tasks_seeded"
|
|
759
|
-
assert len(result["tasks"]) == 0
|
|
760
|
-
output = capsys.readouterr().out
|
|
761
|
-
assert "task_seed_skipped_for_row_unified_mode" in output
|
|
762
|
-
assert "task_seed_skipped_for_row_unified_single_row" not in output
|
|
763
|
-
|
|
764
|
-
@pytest.mark.asyncio
|
|
765
|
-
async def test_row_unified_single_row_path_converges_without_baseline_task_fanout(
|
|
766
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
767
|
-
):
|
|
768
|
-
"""Row-unified single-row execution should not fan out baseline security/code/docs tasks."""
|
|
769
|
-
initial_state = sample_audit_state.copy()
|
|
770
|
-
initial_state["evidence"] = sample_evidence_bundle
|
|
771
|
-
initial_state["profile"] = {"domain": "insurance"}
|
|
772
|
-
initial_state["row_unified_mode"] = "on"
|
|
773
|
-
initial_state["single_row_targeted"] = True
|
|
774
|
-
|
|
775
|
-
seeded = await seed_tasks_node(initial_state)
|
|
776
|
-
assert seeded["step"] == "tasks_seeded"
|
|
777
|
-
assert seeded["tasks"] == {}
|
|
778
|
-
assert seeded["task_queue"] == []
|
|
779
|
-
assert seeded["active_workers"] == {}
|
|
780
|
-
|
|
781
|
-
dispatch_state = {**initial_state, **seeded}
|
|
782
|
-
dispatched = await dispatcher_node(dispatch_state)
|
|
783
|
-
assert dispatched["step"] == "dispatch_done"
|
|
784
|
-
assert dispatched["tasks"] == {}
|
|
785
|
-
assert dispatched["task_queue"] == []
|
|
786
|
-
assert dispatched["active_workers"] == {}
|
|
787
|
-
|
|
788
|
-
execute_state = {**dispatch_state, **dispatched}
|
|
789
|
-
executed = await execute_tasks_node(execute_state)
|
|
790
|
-
assert executed["step"] == "tasks_executed"
|
|
791
|
-
assert executed["tasks"] == {}
|
|
792
|
-
assert executed["active_workers"] == {}
|
|
793
|
-
assert executed["errors"] == []
|
|
794
|
-
|
|
795
|
-
route = route_after_execute({**execute_state, **executed})
|
|
796
|
-
assert route == "synthesize"
|
|
797
|
-
|
|
798
|
-
@pytest.mark.asyncio
|
|
799
|
-
async def test_execute_tasks_node_execution(
|
|
800
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
801
|
-
):
|
|
802
|
-
"""Test execute_tasks node completes assigned tasks and captures results."""
|
|
803
|
-
task = AuditTask(
|
|
804
|
-
id="task-code-001",
|
|
805
|
-
type="code_analysis",
|
|
806
|
-
description="Analyze code quality",
|
|
807
|
-
assignee="code",
|
|
808
|
-
status=TaskStatus.RUNNING,
|
|
809
|
-
input_data={"evidence_bundle": sample_evidence_bundle, "profile": {"domain": "insurance"}},
|
|
810
|
-
)
|
|
811
|
-
|
|
812
|
-
state_with_task = sample_audit_state.copy()
|
|
813
|
-
state_with_task["tasks"] = {task.id: task.model_dump()}
|
|
814
|
-
state_with_task["active_workers"] = {"code": task.id}
|
|
815
|
-
|
|
816
|
-
with (
|
|
817
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
818
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
819
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
820
|
-
):
|
|
821
|
-
mock_code.return_value.analyze = AsyncMock(
|
|
822
|
-
return_value=AgentResult(
|
|
823
|
-
agent_name="CodeAnalysisAgent",
|
|
824
|
-
success=True,
|
|
825
|
-
findings=[{"type": "test_finding", "severity": "low"}],
|
|
826
|
-
metadata={"llm_score": 90},
|
|
827
|
-
spawned_tasks=[
|
|
828
|
-
{
|
|
829
|
-
"type": "verify_finding",
|
|
830
|
-
"description": "Verify code finding",
|
|
831
|
-
"assignee": "code",
|
|
832
|
-
"input_data": {"evidence_bundle": sample_evidence_bundle},
|
|
833
|
-
"priority": 100,
|
|
834
|
-
}
|
|
835
|
-
],
|
|
836
|
-
)
|
|
837
|
-
)
|
|
838
|
-
mock_docs.return_value.analyze = AsyncMock()
|
|
839
|
-
mock_security.return_value.analyze = AsyncMock()
|
|
840
|
-
|
|
841
|
-
result = await execute_tasks_node(state_with_task)
|
|
842
|
-
|
|
843
|
-
assert result["step"] == "tasks_executed"
|
|
844
|
-
assert len(result["agent_results"]) == 1
|
|
845
|
-
assert result["tasks"][task.id]["status"] == TaskStatus.COMPLETED.value
|
|
846
|
-
assert len(result["tasks"]) == 2
|
|
847
|
-
assert mock_code.call_count == 1
|
|
848
|
-
assert mock_code.call_args.kwargs["agentic_mode"] == "auto"
|
|
849
|
-
|
|
850
|
-
@pytest.mark.asyncio
|
|
851
|
-
async def test_synthesize_node_execution(
|
|
852
|
-
self, sample_audit_state: AuditState, mock_agent_results: list[dict[str, Any]]
|
|
853
|
-
):
|
|
854
|
-
"""Test synthesize node aggregates results correctly."""
|
|
855
|
-
state_with_results = sample_audit_state.copy()
|
|
856
|
-
state_with_results["agent_results"] = mock_agent_results
|
|
857
|
-
state_with_results["human_approved"] = None
|
|
858
|
-
|
|
859
|
-
result = await synthesize_node(state_with_results)
|
|
860
|
-
|
|
861
|
-
assert result["synthesis"]["status"] == "complete"
|
|
862
|
-
assert result["synthesis"]["total_findings"] == 2
|
|
863
|
-
# agent_scores contains scores for each successful agent (from SynthesisResult.to_dict)
|
|
864
|
-
assert len(result["synthesis"]["agent_scores"]) == 2
|
|
865
|
-
assert result["step"] == "complete"
|
|
866
|
-
|
|
867
|
-
@pytest.mark.asyncio
|
|
868
|
-
async def test_synthesize_node_no_task_branch_for_row_unified_single_row_target(
|
|
869
|
-
self, sample_audit_state: AuditState, monkeypatch: pytest.MonkeyPatch
|
|
870
|
-
) -> None:
|
|
871
|
-
"""FR-127: deterministic no-task synthesis in row-unified single-row mode."""
|
|
872
|
-
state_with_no_tasks = sample_audit_state.copy()
|
|
873
|
-
state_with_no_tasks["row_unified_mode"] = "on"
|
|
874
|
-
state_with_no_tasks["single_row_targeted"] = True
|
|
875
|
-
state_with_no_tasks["tasks"] = {}
|
|
876
|
-
state_with_no_tasks["agent_results"] = []
|
|
877
|
-
state_with_no_tasks["human_approved"] = None
|
|
878
|
-
|
|
879
|
-
events: list[str] = []
|
|
880
|
-
|
|
881
|
-
class _LogRecorder:
|
|
882
|
-
def bind(self, **_kwargs): # type: ignore[no-untyped-def]
|
|
883
|
-
return self
|
|
884
|
-
|
|
885
|
-
def info(self, event: str, **_kwargs) -> None: # type: ignore[no-untyped-def]
|
|
886
|
-
events.append(event)
|
|
887
|
-
|
|
888
|
-
monkeypatch.setattr("vds_audit_orchestrator.agents.langgraph_workflow.logger", _LogRecorder())
|
|
889
|
-
|
|
890
|
-
with patch(
|
|
891
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.SynthesisAgent.synthesize",
|
|
892
|
-
new_callable=AsyncMock,
|
|
893
|
-
) as mock_synthesize:
|
|
894
|
-
result = await synthesize_node(state_with_no_tasks)
|
|
895
|
-
|
|
896
|
-
mock_synthesize.assert_not_awaited()
|
|
897
|
-
synthesis = result["synthesis"]
|
|
898
|
-
assert synthesis["status"] == "complete"
|
|
899
|
-
assert synthesis["overall_score"] == 0.0
|
|
900
|
-
assert synthesis["maturity_level"] == "Critical"
|
|
901
|
-
assert synthesis["total_findings"] == 0
|
|
902
|
-
assert synthesis["recommendations"] == []
|
|
903
|
-
assert "no analysis tasks were executed" in synthesis["executive_summary"].lower()
|
|
904
|
-
assert "cannot provide evidence-based recommendations" in synthesis["executive_summary"].lower()
|
|
905
|
-
assert synthesis["rows_evaluated"] == 0
|
|
906
|
-
assert synthesis["rows_with_tool_activity"] == 0
|
|
907
|
-
assert "workflow_no_task_synthesis_dynamic_only" in events
|
|
908
|
-
assert "workflow_no_task_synthesis_path" not in events
|
|
909
|
-
assert "synthesis_row_unified_single_row_no_task" not in events
|
|
910
|
-
assert result["step"] == "complete"
|
|
911
|
-
|
|
912
|
-
@pytest.mark.asyncio
|
|
913
|
-
async def test_synthesize_node_row_unified_single_row_with_results_uses_standard_path(
|
|
914
|
-
self, sample_audit_state: AuditState, mock_agent_results: list[dict[str, Any]]
|
|
915
|
-
) -> None:
|
|
916
|
-
"""Row-unified single-row mode must still run normal synthesis when results exist."""
|
|
917
|
-
state_with_results = sample_audit_state.copy()
|
|
918
|
-
state_with_results["row_unified_mode"] = "on"
|
|
919
|
-
state_with_results["single_row_targeted"] = True
|
|
920
|
-
state_with_results["tasks"] = {}
|
|
921
|
-
state_with_results["agent_results"] = mock_agent_results
|
|
922
|
-
|
|
923
|
-
result = await synthesize_node(state_with_results)
|
|
924
|
-
|
|
925
|
-
assert result["synthesis"]["status"] == "complete"
|
|
926
|
-
assert result["synthesis"]["total_findings"] == 2
|
|
927
|
-
assert len(result["synthesis"]["agent_scores"]) == 2
|
|
928
|
-
assert "no analysis tasks were executed" not in result["synthesis"]["executive_summary"].lower()
|
|
929
|
-
assert result["step"] == "complete"
|
|
930
|
-
|
|
931
|
-
def test_no_task_state_guard_rejects_row_context_artifacts(self, sample_audit_state: AuditState) -> None:
|
|
932
|
-
state_with_row_context = sample_audit_state.copy()
|
|
933
|
-
state_with_row_context["row_unified_mode"] = "on"
|
|
934
|
-
state_with_row_context["single_row_targeted"] = True
|
|
935
|
-
state_with_row_context["tasks"] = {}
|
|
936
|
-
state_with_row_context["agent_results"] = []
|
|
937
|
-
state_with_row_context["row_state_context"] = {"check_id": "CL-030"}
|
|
938
|
-
|
|
939
|
-
assert _is_row_unified_single_row_no_task_state(state_with_row_context) is False
|
|
940
|
-
|
|
941
|
-
def test_no_task_state_guard_rejects_row_results_with_evidence_refs(self, sample_audit_state: AuditState) -> None:
|
|
942
|
-
state_with_row_results = sample_audit_state.copy()
|
|
943
|
-
state_with_row_results["row_unified_mode"] = "on"
|
|
944
|
-
state_with_row_results["single_row_targeted"] = True
|
|
945
|
-
state_with_row_results["tasks"] = {}
|
|
946
|
-
state_with_row_results["agent_results"] = []
|
|
947
|
-
state_with_row_results["row_results"] = [
|
|
948
|
-
{
|
|
949
|
-
"row_id": "row_1",
|
|
950
|
-
"check_id": "CL-001",
|
|
951
|
-
"status": "partial",
|
|
952
|
-
"evidence_anchors": [{"ref_type": "doc_path", "ref_value": "docs/security.md"}],
|
|
953
|
-
}
|
|
954
|
-
]
|
|
955
|
-
|
|
956
|
-
assert _is_row_unified_single_row_no_task_state(state_with_row_results) is False
|
|
957
|
-
|
|
958
|
-
def test_no_task_state_guard_rejects_retrieval_trace_activity(self, sample_audit_state: AuditState) -> None:
|
|
959
|
-
state_with_trace_activity = sample_audit_state.copy()
|
|
960
|
-
state_with_trace_activity["row_unified_mode"] = "on"
|
|
961
|
-
state_with_trace_activity["single_row_targeted"] = True
|
|
962
|
-
state_with_trace_activity["tasks"] = {}
|
|
963
|
-
state_with_trace_activity["agent_results"] = []
|
|
964
|
-
state_with_trace_activity["retrieval_trace_rows"] = [
|
|
965
|
-
{
|
|
966
|
-
"row_id": "row_1",
|
|
967
|
-
"retrieval_trace": {
|
|
968
|
-
"tool_first_loop": {
|
|
969
|
-
"docs_search_count": 1,
|
|
970
|
-
"code_search_count": 0,
|
|
971
|
-
"docs_read_count": 0,
|
|
972
|
-
"code_read_count": 0,
|
|
973
|
-
}
|
|
974
|
-
},
|
|
975
|
-
}
|
|
976
|
-
]
|
|
977
|
-
|
|
978
|
-
assert _is_row_unified_single_row_no_task_state(state_with_trace_activity) is False
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
# =============================================================================
|
|
982
|
-
# Checkpointing Tests
|
|
983
|
-
# =============================================================================
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
class TestCheckpointing:
|
|
987
|
-
"""Tests for checkpointing with MemorySaver."""
|
|
988
|
-
|
|
989
|
-
@pytest.mark.asyncio
|
|
990
|
-
async def test_checkpoint_persists_state(self, sample_repo_path: Path):
|
|
991
|
-
"""Test that state is persisted across checkpoints."""
|
|
992
|
-
thread_id = "test-thread-001"
|
|
993
|
-
|
|
994
|
-
with (
|
|
995
|
-
patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async") as mock_resolve,
|
|
996
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector") as mock_collector,
|
|
997
|
-
):
|
|
998
|
-
# Mock to return quickly and allow partial execution
|
|
999
|
-
mock_resolution = MagicMock()
|
|
1000
|
-
mock_profile = MagicMock()
|
|
1001
|
-
mock_profile.model_dump.return_value = {"domain": "insurance"}
|
|
1002
|
-
mock_resolution.profile = mock_profile
|
|
1003
|
-
mock_resolution.source = "test"
|
|
1004
|
-
mock_resolve.return_value = mock_resolution
|
|
1005
|
-
|
|
1006
|
-
mock_collector_instance = AsyncMock()
|
|
1007
|
-
mock_collector_instance.collect_all.return_value = EvidenceBundle(repository="test-repo")
|
|
1008
|
-
mock_collector.return_value = mock_collector_instance
|
|
1009
|
-
|
|
1010
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1011
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1012
|
-
|
|
1013
|
-
initial_state = {
|
|
1014
|
-
"repository": "test-repo",
|
|
1015
|
-
"repo_path": str(sample_repo_path),
|
|
1016
|
-
"project_id": "test-repo",
|
|
1017
|
-
"step": "start",
|
|
1018
|
-
"profile": {},
|
|
1019
|
-
"evidence": None,
|
|
1020
|
-
"agent_results": [],
|
|
1021
|
-
"synthesis": None,
|
|
1022
|
-
"errors": [],
|
|
1023
|
-
"human_approved": None,
|
|
1024
|
-
"human_feedback": None,
|
|
1025
|
-
"tasks": {},
|
|
1026
|
-
"task_queue": [],
|
|
1027
|
-
"active_workers": {},
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
# Run graph to completion
|
|
1031
|
-
async for _ in graph.astream(initial_state, config):
|
|
1032
|
-
pass
|
|
1033
|
-
|
|
1034
|
-
# Check that state was persisted
|
|
1035
|
-
state = await graph.aget_state(config)
|
|
1036
|
-
assert state.values.get("repository") == "test-repo"
|
|
1037
|
-
# "profile" is no longer an AuditState field; verify agent_results persisted instead
|
|
1038
|
-
assert state.values.get("agent_results") is not None
|
|
1039
|
-
|
|
1040
|
-
@pytest.mark.asyncio
|
|
1041
|
-
async def test_multiple_threads_isolated(self, sample_repo_path: Path):
|
|
1042
|
-
"""Test that different threads maintain isolated state."""
|
|
1043
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1044
|
-
|
|
1045
|
-
config1 = {"configurable": {"thread_id": "thread-1"}}
|
|
1046
|
-
config2 = {"configurable": {"thread_id": "thread-2"}}
|
|
1047
|
-
|
|
1048
|
-
state1 = {
|
|
1049
|
-
"repository": "repo1",
|
|
1050
|
-
"repo_path": str(sample_repo_path),
|
|
1051
|
-
"project_id": "repo1",
|
|
1052
|
-
"step": "custom",
|
|
1053
|
-
"profile": {"domain": "insurance"},
|
|
1054
|
-
"evidence": None,
|
|
1055
|
-
"agent_results": [],
|
|
1056
|
-
"synthesis": None,
|
|
1057
|
-
"errors": [],
|
|
1058
|
-
"human_approved": None,
|
|
1059
|
-
"human_feedback": None,
|
|
1060
|
-
"tasks": {},
|
|
1061
|
-
"task_queue": [],
|
|
1062
|
-
"active_workers": {},
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
state2 = {
|
|
1066
|
-
"repository": "repo2",
|
|
1067
|
-
"repo_path": str(sample_repo_path),
|
|
1068
|
-
"project_id": "repo2",
|
|
1069
|
-
"step": "other",
|
|
1070
|
-
"profile": {"domain": "lending"},
|
|
1071
|
-
"evidence": None,
|
|
1072
|
-
"agent_results": [],
|
|
1073
|
-
"synthesis": None,
|
|
1074
|
-
"errors": [],
|
|
1075
|
-
"human_approved": None,
|
|
1076
|
-
"human_feedback": None,
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
# Set different states for each thread
|
|
1080
|
-
await graph.aupdate_state(config1, state1)
|
|
1081
|
-
await graph.aupdate_state(config2, state2)
|
|
1082
|
-
|
|
1083
|
-
# Verify isolation
|
|
1084
|
-
retrieved1 = await graph.aget_state(config1)
|
|
1085
|
-
retrieved2 = await graph.aget_state(config2)
|
|
1086
|
-
|
|
1087
|
-
assert retrieved1.values.get("repository") == "repo1"
|
|
1088
|
-
assert retrieved2.values.get("repository") == "repo2"
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
# =============================================================================
|
|
1092
|
-
# Human-in-Loop Interrupt/Resume Tests
|
|
1093
|
-
# =============================================================================
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
class TestHumanInLoop:
|
|
1097
|
-
"""Tests for human-in-loop interrupt/resume flow."""
|
|
1098
|
-
|
|
1099
|
-
@pytest.mark.asyncio
|
|
1100
|
-
async def test_human_review_interrupt(
|
|
1101
|
-
self, sample_audit_state: AuditState, critical_agent_results: list[dict[str, Any]]
|
|
1102
|
-
):
|
|
1103
|
-
"""Test that human_review node interrupts workflow."""
|
|
1104
|
-
state_with_critical = sample_audit_state.copy()
|
|
1105
|
-
state_with_critical["agent_results"] = critical_agent_results
|
|
1106
|
-
|
|
1107
|
-
# Call human_review_node - should call interrupt()
|
|
1108
|
-
# In test, we'll catch the interrupt behavior
|
|
1109
|
-
with patch("vds_audit_orchestrator.agents.langgraph_workflow.interrupt") as mock_interrupt:
|
|
1110
|
-
mock_interrupt.return_value = {
|
|
1111
|
-
"question": "Critical findings detected. Approve continuation?",
|
|
1112
|
-
"critical_issues": _extract_critical_findings(state_with_critical),
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
_ = await human_review_node(state_with_critical)
|
|
1116
|
-
|
|
1117
|
-
# Verify interrupt was called with proper payload
|
|
1118
|
-
mock_interrupt.assert_called_once()
|
|
1119
|
-
call_args = mock_interrupt.call_args[0][0]
|
|
1120
|
-
assert "critical_issues" in call_args
|
|
1121
|
-
assert "review_instructions" in call_args
|
|
1122
|
-
assert len(call_args["critical_issues"]) > 0
|
|
1123
|
-
|
|
1124
|
-
@pytest.mark.asyncio
|
|
1125
|
-
async def test_resume_with_approval(self, sample_repo_path: Path):
|
|
1126
|
-
"""Test resuming workflow with human approval."""
|
|
1127
|
-
thread_id = "test-resume-approve"
|
|
1128
|
-
|
|
1129
|
-
with (
|
|
1130
|
-
patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async"),
|
|
1131
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector"),
|
|
1132
|
-
):
|
|
1133
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1134
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1135
|
-
|
|
1136
|
-
# Set up state as if paused at human_review
|
|
1137
|
-
paused_state = {
|
|
1138
|
-
"repository": "test-repo",
|
|
1139
|
-
"repo_path": str(sample_repo_path),
|
|
1140
|
-
"project_id": "test-repo",
|
|
1141
|
-
"step": "awaiting_human",
|
|
1142
|
-
"profile": {},
|
|
1143
|
-
"evidence": EvidenceBundle(repository="test-repo"),
|
|
1144
|
-
"agent_results": [{"agent": "test", "success": True, "findings": [], "metadata": {}}],
|
|
1145
|
-
"synthesis": None,
|
|
1146
|
-
"errors": [],
|
|
1147
|
-
"human_approved": None,
|
|
1148
|
-
"human_feedback": None,
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
await graph.aupdate_state(config, paused_state)
|
|
1152
|
-
|
|
1153
|
-
# Simulate resume with approval
|
|
1154
|
-
# Note: In real scenario, the graph.next would indicate paused state
|
|
1155
|
-
result = await synthesize_node(
|
|
1156
|
-
{
|
|
1157
|
-
**paused_state,
|
|
1158
|
-
"human_approved": True,
|
|
1159
|
-
"human_feedback": "Approved to proceed",
|
|
1160
|
-
}
|
|
1161
|
-
)
|
|
1162
|
-
|
|
1163
|
-
assert result["synthesis"]["status"] == "complete"
|
|
1164
|
-
assert result["synthesis"]["human_approved"] is True
|
|
1165
|
-
assert result["synthesis"]["human_feedback"] == "Approved to proceed"
|
|
1166
|
-
|
|
1167
|
-
@pytest.mark.asyncio
|
|
1168
|
-
async def test_resume_with_rejection(self, sample_repo_path: Path):
|
|
1169
|
-
"""Test resuming workflow with human rejection."""
|
|
1170
|
-
state_with_rejection = {
|
|
1171
|
-
"repository": "test-repo",
|
|
1172
|
-
"repo_path": str(sample_repo_path),
|
|
1173
|
-
"project_id": "test-repo",
|
|
1174
|
-
"step": "awaiting_human",
|
|
1175
|
-
"profile": {},
|
|
1176
|
-
"evidence": EvidenceBundle(repository="test-repo"),
|
|
1177
|
-
"agent_results": [{"agent": "test", "success": True, "findings": [], "metadata": {}}],
|
|
1178
|
-
"synthesis": None,
|
|
1179
|
-
"errors": [],
|
|
1180
|
-
"human_approved": False,
|
|
1181
|
-
"human_feedback": "Critical issues must be fixed",
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
result = await synthesize_node(state_with_rejection)
|
|
1185
|
-
|
|
1186
|
-
assert result["synthesis"]["status"] == "rejected"
|
|
1187
|
-
assert result["synthesis"]["human_approved"] is False
|
|
1188
|
-
assert "rejected" in result["synthesis"]["message"].lower()
|
|
1189
|
-
assert result["step"] == "complete"
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
# =============================================================================
|
|
1193
|
-
# State Persistence Tests
|
|
1194
|
-
# =============================================================================
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
class TestStatePersistence:
|
|
1198
|
-
"""Tests for state persistence across checkpoints."""
|
|
1199
|
-
|
|
1200
|
-
@pytest.mark.asyncio
|
|
1201
|
-
async def test_state_preserved_across_nodes(self, sample_repo_path: Path):
|
|
1202
|
-
"""Test that state accumulates correctly across node execution."""
|
|
1203
|
-
thread_id = "persistence-test"
|
|
1204
|
-
|
|
1205
|
-
with (
|
|
1206
|
-
patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async") as mock_resolve,
|
|
1207
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector") as mock_collector,
|
|
1208
|
-
):
|
|
1209
|
-
# Mock profile resolution
|
|
1210
|
-
mock_resolution = MagicMock()
|
|
1211
|
-
mock_profile = MagicMock()
|
|
1212
|
-
mock_profile.model_dump.return_value = {
|
|
1213
|
-
"domain": "insurance",
|
|
1214
|
-
"criticality": "high",
|
|
1215
|
-
}
|
|
1216
|
-
mock_resolution.profile = mock_profile
|
|
1217
|
-
mock_resolution.source = "test"
|
|
1218
|
-
mock_resolve.return_value = mock_resolution
|
|
1219
|
-
|
|
1220
|
-
# Mock evidence collection
|
|
1221
|
-
mock_collector_instance = AsyncMock()
|
|
1222
|
-
mock_bundle = EvidenceBundle(
|
|
1223
|
-
repository="test-repo",
|
|
1224
|
-
git_evidence=[
|
|
1225
|
-
Evidence(
|
|
1226
|
-
source="git_file",
|
|
1227
|
-
source_id="test.py",
|
|
1228
|
-
title="Test",
|
|
1229
|
-
content="pass",
|
|
1230
|
-
content_hash="hash",
|
|
1231
|
-
status=EvidenceStatus.FOUND,
|
|
1232
|
-
),
|
|
1233
|
-
],
|
|
1234
|
-
)
|
|
1235
|
-
mock_collector_instance.collect_all.return_value = mock_bundle
|
|
1236
|
-
mock_collector.return_value = mock_collector_instance
|
|
1237
|
-
|
|
1238
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1239
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1240
|
-
|
|
1241
|
-
initial_state = {
|
|
1242
|
-
"repository": "test-repo",
|
|
1243
|
-
"repo_path": str(sample_repo_path),
|
|
1244
|
-
"project_id": "test-repo",
|
|
1245
|
-
"step": "start",
|
|
1246
|
-
"profile": {},
|
|
1247
|
-
"evidence": None,
|
|
1248
|
-
"agent_results": [],
|
|
1249
|
-
"synthesis": None,
|
|
1250
|
-
"errors": [],
|
|
1251
|
-
"human_approved": None,
|
|
1252
|
-
"human_feedback": None,
|
|
1253
|
-
"tasks": {},
|
|
1254
|
-
"task_queue": [],
|
|
1255
|
-
"active_workers": {},
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
# Execute partial workflow
|
|
1259
|
-
async for event in graph.astream(initial_state, config):
|
|
1260
|
-
# Stop after profile node
|
|
1261
|
-
if any(
|
|
1262
|
-
node_output.get("step") == "profile_done"
|
|
1263
|
-
for node_output in event.values()
|
|
1264
|
-
if isinstance(node_output, dict)
|
|
1265
|
-
):
|
|
1266
|
-
break
|
|
1267
|
-
|
|
1268
|
-
# Check state was persisted (profile is no longer an AuditState field)
|
|
1269
|
-
state = await graph.aget_state(config)
|
|
1270
|
-
assert state.values.get("repository") == "test-repo"
|
|
1271
|
-
assert state.values.get("agent_results") is not None
|
|
1272
|
-
|
|
1273
|
-
@pytest.mark.asyncio
|
|
1274
|
-
async def test_errors_accumulate_in_state(self, sample_audit_state: AuditState):
|
|
1275
|
-
"""Test that errors are accumulated in state."""
|
|
1276
|
-
state = sample_audit_state.copy()
|
|
1277
|
-
|
|
1278
|
-
# Simulate errors from multiple nodes
|
|
1279
|
-
state["errors"] = ["Profile detection warning"]
|
|
1280
|
-
state["profile"] = {}
|
|
1281
|
-
state["step"] = "profile_done"
|
|
1282
|
-
|
|
1283
|
-
# Add more errors
|
|
1284
|
-
state["errors"].append("Evidence collection failed")
|
|
1285
|
-
|
|
1286
|
-
assert len(state["errors"]) == 2
|
|
1287
|
-
assert "Profile detection warning" in state["errors"]
|
|
1288
|
-
assert "Evidence collection failed" in state["errors"]
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
# =============================================================================
|
|
1292
|
-
# Error Handling Tests
|
|
1293
|
-
# =============================================================================
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
class TestErrorHandling:
|
|
1297
|
-
"""Tests for error handling in nodes."""
|
|
1298
|
-
|
|
1299
|
-
@pytest.mark.asyncio
|
|
1300
|
-
async def test_profile_node_error_handling(self, sample_audit_state: AuditState):
|
|
1301
|
-
"""Test profile node handles errors gracefully."""
|
|
1302
|
-
with patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async") as mock_resolve:
|
|
1303
|
-
mock_resolve.side_effect = Exception("Detection failed")
|
|
1304
|
-
|
|
1305
|
-
result = await profile_node(sample_audit_state)
|
|
1306
|
-
|
|
1307
|
-
assert result["profile"] == {}
|
|
1308
|
-
assert result["step"] == "profile_done"
|
|
1309
|
-
assert len(result.get("errors", [])) > 0
|
|
1310
|
-
assert "Profile detection failed" in result["errors"][0]
|
|
1311
|
-
|
|
1312
|
-
@pytest.mark.asyncio
|
|
1313
|
-
async def test_evidence_node_error_handling(self, sample_audit_state: AuditState):
|
|
1314
|
-
"""Test evidence node handles errors gracefully."""
|
|
1315
|
-
with patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector") as mock_collector_cls:
|
|
1316
|
-
mock_collector = AsyncMock()
|
|
1317
|
-
mock_collector.collect_all.side_effect = Exception("Collection failed")
|
|
1318
|
-
mock_collector_cls.return_value = mock_collector
|
|
1319
|
-
|
|
1320
|
-
result = await evidence_node(sample_audit_state)
|
|
1321
|
-
|
|
1322
|
-
assert result["evidence"] is not None
|
|
1323
|
-
assert isinstance(result["evidence"], EvidenceBundle)
|
|
1324
|
-
assert result["step"] == "evidence_done"
|
|
1325
|
-
assert len(result.get("errors", [])) > 0
|
|
1326
|
-
|
|
1327
|
-
@pytest.mark.asyncio
|
|
1328
|
-
async def test_analyze_node_agent_failure(
|
|
1329
|
-
self, sample_audit_state: AuditState, sample_evidence_bundle: EvidenceBundle
|
|
1330
|
-
):
|
|
1331
|
-
"""Test analyze node handles individual agent failures."""
|
|
1332
|
-
state_with_evidence = sample_audit_state.copy()
|
|
1333
|
-
state_with_evidence["evidence"] = sample_evidence_bundle
|
|
1334
|
-
|
|
1335
|
-
with (
|
|
1336
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
1337
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
1338
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
1339
|
-
):
|
|
1340
|
-
# Make one agent fail
|
|
1341
|
-
mock_code.return_value.analyze = AsyncMock(side_effect=Exception("Agent crash"))
|
|
1342
|
-
mock_docs.return_value.analyze = AsyncMock(
|
|
1343
|
-
return_value=AgentResult(
|
|
1344
|
-
agent_name="DocumentationAgent",
|
|
1345
|
-
success=True,
|
|
1346
|
-
findings=[],
|
|
1347
|
-
metadata={},
|
|
1348
|
-
)
|
|
1349
|
-
)
|
|
1350
|
-
mock_security.return_value.analyze = AsyncMock(
|
|
1351
|
-
return_value=AgentResult(
|
|
1352
|
-
agent_name="SecurityAgent",
|
|
1353
|
-
success=True,
|
|
1354
|
-
findings=[],
|
|
1355
|
-
metadata={},
|
|
1356
|
-
)
|
|
1357
|
-
)
|
|
1358
|
-
|
|
1359
|
-
result = await analyze_node(state_with_evidence)
|
|
1360
|
-
|
|
1361
|
-
# Should have 3 results, one with error
|
|
1362
|
-
assert len(result["agent_results"]) == 3
|
|
1363
|
-
failed_result = next(r for r in result["agent_results"] if r.get("error"))
|
|
1364
|
-
assert "Agent crash" in failed_result["error"]
|
|
1365
|
-
assert len(result.get("errors", [])) > 0
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
# =============================================================================
|
|
1369
|
-
# Conditional Edge Routing Tests
|
|
1370
|
-
# =============================================================================
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
class TestConditionalEdgeRouting:
|
|
1374
|
-
"""Tests for conditional edge routing based on findings."""
|
|
1375
|
-
|
|
1376
|
-
def test_route_after_evidence_terminates_when_readiness_failed(self):
|
|
1377
|
-
"""Evidence gating should terminate workflow before task seeding."""
|
|
1378
|
-
state: AuditState = {
|
|
1379
|
-
"repository": "test",
|
|
1380
|
-
"repo_path": "/tmp/test",
|
|
1381
|
-
"project_id": "test",
|
|
1382
|
-
"step": "evidence_failed",
|
|
1383
|
-
"state_dsn": None,
|
|
1384
|
-
"repo_storage_key": None,
|
|
1385
|
-
"evidence": None,
|
|
1386
|
-
"evidence_corpus": None,
|
|
1387
|
-
"agent_results": [],
|
|
1388
|
-
"synthesis": None,
|
|
1389
|
-
"errors": [],
|
|
1390
|
-
"human_approved": None,
|
|
1391
|
-
"human_feedback": None,
|
|
1392
|
-
"tasks": {},
|
|
1393
|
-
"task_queue": [],
|
|
1394
|
-
"active_workers": {},
|
|
1395
|
-
"agentic_mode": "auto",
|
|
1396
|
-
"row_unified_mode": "off",
|
|
1397
|
-
"single_row_targeted": False,
|
|
1398
|
-
"row_state_context": None,
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
assert route_after_evidence(state) == "end"
|
|
1402
|
-
|
|
1403
|
-
@pytest.mark.asyncio
|
|
1404
|
-
async def test_graph_stops_before_seed_tasks_when_evidence_failed(self, sample_repo_path: Path):
|
|
1405
|
-
"""Graph should not execute seed_tasks when evidence node sets evidence_failed."""
|
|
1406
|
-
initial_state: AuditState = {
|
|
1407
|
-
"repository": "test-repo",
|
|
1408
|
-
"repo_path": str(sample_repo_path),
|
|
1409
|
-
"project_id": "test-repo",
|
|
1410
|
-
"step": "start",
|
|
1411
|
-
"state_dsn": None,
|
|
1412
|
-
"repo_storage_key": None,
|
|
1413
|
-
"evidence": None,
|
|
1414
|
-
"evidence_corpus": None,
|
|
1415
|
-
"agent_results": [],
|
|
1416
|
-
"synthesis": None,
|
|
1417
|
-
"errors": [],
|
|
1418
|
-
"human_approved": None,
|
|
1419
|
-
"human_feedback": None,
|
|
1420
|
-
"tasks": {},
|
|
1421
|
-
"task_queue": [],
|
|
1422
|
-
"active_workers": {},
|
|
1423
|
-
"agentic_mode": "auto",
|
|
1424
|
-
"row_unified_mode": "off",
|
|
1425
|
-
"single_row_targeted": False,
|
|
1426
|
-
"row_state_context": None,
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
with (
|
|
1430
|
-
patch(
|
|
1431
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.profile_node",
|
|
1432
|
-
new=AsyncMock(return_value={"profile": {}, "step": "profile_done"}),
|
|
1433
|
-
),
|
|
1434
|
-
patch(
|
|
1435
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.evidence_node",
|
|
1436
|
-
new=AsyncMock(
|
|
1437
|
-
return_value={
|
|
1438
|
-
"step": "evidence_failed",
|
|
1439
|
-
"errors": ["Evidence readiness gate failed"],
|
|
1440
|
-
}
|
|
1441
|
-
),
|
|
1442
|
-
),
|
|
1443
|
-
patch(
|
|
1444
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.seed_tasks_node",
|
|
1445
|
-
new=AsyncMock(return_value={"step": "tasks_seeded"}),
|
|
1446
|
-
) as mock_seed_tasks,
|
|
1447
|
-
):
|
|
1448
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1449
|
-
config = {"configurable": {"thread_id": "evidence-failed-route"}}
|
|
1450
|
-
async for _ in graph.astream(initial_state, config):
|
|
1451
|
-
pass
|
|
1452
|
-
|
|
1453
|
-
mock_seed_tasks.assert_not_awaited()
|
|
1454
|
-
saved_state = await graph.aget_state(config)
|
|
1455
|
-
assert saved_state.values.get("step") == "evidence_failed"
|
|
1456
|
-
|
|
1457
|
-
def test_should_route_to_human_review_with_critical_findings(self):
|
|
1458
|
-
"""Test routing to human_review when critical findings exist."""
|
|
1459
|
-
state: AuditState = {
|
|
1460
|
-
"repository": "test",
|
|
1461
|
-
"repo_path": "/tmp/test",
|
|
1462
|
-
"project_id": "test",
|
|
1463
|
-
"step": "analyze_done",
|
|
1464
|
-
"profile": {},
|
|
1465
|
-
"evidence": None,
|
|
1466
|
-
"agent_results": [
|
|
1467
|
-
{
|
|
1468
|
-
"agent": "security",
|
|
1469
|
-
"success": True,
|
|
1470
|
-
"findings": [{"type": "security_vulnerability", "severity": "critical"}],
|
|
1471
|
-
"metadata": {"llm_score": 25},
|
|
1472
|
-
}
|
|
1473
|
-
],
|
|
1474
|
-
"synthesis": None,
|
|
1475
|
-
"errors": [],
|
|
1476
|
-
"human_approved": None,
|
|
1477
|
-
"human_feedback": None,
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
route = should_human_review(state)
|
|
1481
|
-
assert route == "human_review"
|
|
1482
|
-
|
|
1483
|
-
def test_should_route_to_synthesize_with_clean_results(self):
|
|
1484
|
-
"""Test routing to synthesize when no critical findings."""
|
|
1485
|
-
state: AuditState = {
|
|
1486
|
-
"repository": "test",
|
|
1487
|
-
"repo_path": "/tmp/test",
|
|
1488
|
-
"project_id": "test",
|
|
1489
|
-
"step": "analyze_done",
|
|
1490
|
-
"profile": {},
|
|
1491
|
-
"evidence": None,
|
|
1492
|
-
"agent_results": [
|
|
1493
|
-
{
|
|
1494
|
-
"agent": "code",
|
|
1495
|
-
"success": True,
|
|
1496
|
-
"findings": [{"type": "technical_debt", "severity": "low"}],
|
|
1497
|
-
"metadata": {"llm_score": 85},
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
"agent": "docs",
|
|
1501
|
-
"success": True,
|
|
1502
|
-
"findings": [],
|
|
1503
|
-
"metadata": {"llm_score": 90},
|
|
1504
|
-
},
|
|
1505
|
-
],
|
|
1506
|
-
"synthesis": None,
|
|
1507
|
-
"errors": [],
|
|
1508
|
-
"human_approved": None,
|
|
1509
|
-
"human_feedback": None,
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
route = should_human_review(state)
|
|
1513
|
-
assert route == "synthesize"
|
|
1514
|
-
|
|
1515
|
-
def test_route_after_execute_dispatches_when_tasks_pending(self):
|
|
1516
|
-
"""Test route_after_execute returns dispatch when work remains."""
|
|
1517
|
-
state: AuditState = {
|
|
1518
|
-
"repository": "test",
|
|
1519
|
-
"repo_path": "/tmp/test",
|
|
1520
|
-
"project_id": "test",
|
|
1521
|
-
"step": "tasks_executed",
|
|
1522
|
-
"profile": {},
|
|
1523
|
-
"evidence": None,
|
|
1524
|
-
"agent_results": [],
|
|
1525
|
-
"synthesis": None,
|
|
1526
|
-
"errors": [],
|
|
1527
|
-
"human_approved": None,
|
|
1528
|
-
"human_feedback": None,
|
|
1529
|
-
"tasks": {
|
|
1530
|
-
"task-pending": {
|
|
1531
|
-
"id": "task-pending",
|
|
1532
|
-
"type": "code_analysis",
|
|
1533
|
-
"description": "Pending task",
|
|
1534
|
-
"assignee": "code",
|
|
1535
|
-
"status": TaskStatus.PENDING.value,
|
|
1536
|
-
"dependencies": [],
|
|
1537
|
-
"priority": 100,
|
|
1538
|
-
"input_data": {},
|
|
1539
|
-
}
|
|
1540
|
-
},
|
|
1541
|
-
"task_queue": [],
|
|
1542
|
-
"active_workers": {},
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
route = route_after_execute(state)
|
|
1546
|
-
assert route == "dispatch"
|
|
1547
|
-
|
|
1548
|
-
def test_route_after_execute_human_review_when_tasks_complete(self):
|
|
1549
|
-
"""Test route_after_execute routes to human_review for critical findings."""
|
|
1550
|
-
state: AuditState = {
|
|
1551
|
-
"repository": "test",
|
|
1552
|
-
"repo_path": "/tmp/test",
|
|
1553
|
-
"project_id": "test",
|
|
1554
|
-
"step": "tasks_executed",
|
|
1555
|
-
"profile": {},
|
|
1556
|
-
"evidence": None,
|
|
1557
|
-
"agent_results": [
|
|
1558
|
-
{
|
|
1559
|
-
"agent": "security",
|
|
1560
|
-
"success": True,
|
|
1561
|
-
"findings": [{"type": "security_vulnerability", "severity": "critical"}],
|
|
1562
|
-
"metadata": {"llm_score": 25},
|
|
1563
|
-
}
|
|
1564
|
-
],
|
|
1565
|
-
"synthesis": None,
|
|
1566
|
-
"errors": [],
|
|
1567
|
-
"human_approved": None,
|
|
1568
|
-
"human_feedback": None,
|
|
1569
|
-
"tasks": {
|
|
1570
|
-
"task-complete": {
|
|
1571
|
-
"id": "task-complete",
|
|
1572
|
-
"type": "security_analysis",
|
|
1573
|
-
"description": "Complete task",
|
|
1574
|
-
"assignee": "security",
|
|
1575
|
-
"status": TaskStatus.COMPLETED.value,
|
|
1576
|
-
"dependencies": [],
|
|
1577
|
-
"priority": 100,
|
|
1578
|
-
"input_data": {},
|
|
1579
|
-
}
|
|
1580
|
-
},
|
|
1581
|
-
"task_queue": [],
|
|
1582
|
-
"active_workers": {},
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
route = route_after_execute(state)
|
|
1586
|
-
assert route == "human_review"
|
|
1587
|
-
|
|
1588
|
-
def test_extract_critical_findings_low_llm_score(self):
|
|
1589
|
-
"""Test critical findings extraction for low LLM scores."""
|
|
1590
|
-
state: AuditState = {
|
|
1591
|
-
"repository": "test",
|
|
1592
|
-
"repo_path": "/tmp/test",
|
|
1593
|
-
"project_id": "test",
|
|
1594
|
-
"step": "analyze_done",
|
|
1595
|
-
"profile": {},
|
|
1596
|
-
"evidence": None,
|
|
1597
|
-
"agent_results": [
|
|
1598
|
-
{
|
|
1599
|
-
"agent": "code",
|
|
1600
|
-
"success": True,
|
|
1601
|
-
"findings": [],
|
|
1602
|
-
"metadata": {"llm_score": 45},
|
|
1603
|
-
}
|
|
1604
|
-
],
|
|
1605
|
-
"synthesis": None,
|
|
1606
|
-
"errors": [],
|
|
1607
|
-
"human_approved": None,
|
|
1608
|
-
"human_feedback": None,
|
|
1609
|
-
"tasks": {},
|
|
1610
|
-
"task_queue": [],
|
|
1611
|
-
"active_workers": {},
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
critical = _extract_critical_findings(state)
|
|
1615
|
-
assert len(critical) == 1
|
|
1616
|
-
assert critical[0]["reason"] == "low_llm_score"
|
|
1617
|
-
assert critical[0]["llm_score"] == 45
|
|
1618
|
-
|
|
1619
|
-
def test_extract_critical_findings_security_vulnerability(self):
|
|
1620
|
-
"""Test critical findings extraction for security vulnerabilities."""
|
|
1621
|
-
state: AuditState = {
|
|
1622
|
-
"repository": "test",
|
|
1623
|
-
"repo_path": "/tmp/test",
|
|
1624
|
-
"project_id": "test",
|
|
1625
|
-
"step": "analyze_done",
|
|
1626
|
-
"profile": {},
|
|
1627
|
-
"evidence": None,
|
|
1628
|
-
"agent_results": [
|
|
1629
|
-
{
|
|
1630
|
-
"agent": "security",
|
|
1631
|
-
"success": True,
|
|
1632
|
-
"findings": [
|
|
1633
|
-
{"type": "security_vulnerability", "id": "vuln-1", "severity": "critical"},
|
|
1634
|
-
],
|
|
1635
|
-
"metadata": {"llm_score": 80},
|
|
1636
|
-
}
|
|
1637
|
-
],
|
|
1638
|
-
"synthesis": None,
|
|
1639
|
-
"errors": [],
|
|
1640
|
-
"human_approved": None,
|
|
1641
|
-
"human_feedback": None,
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
critical = _extract_critical_findings(state)
|
|
1645
|
-
assert len(critical) == 1
|
|
1646
|
-
assert critical[0]["reason"] == "security_vulnerability"
|
|
1647
|
-
|
|
1648
|
-
def test_extract_critical_findings_agent_error(self):
|
|
1649
|
-
"""Test critical findings extraction for agent errors."""
|
|
1650
|
-
state: AuditState = {
|
|
1651
|
-
"repository": "test",
|
|
1652
|
-
"repo_path": "/tmp/test",
|
|
1653
|
-
"project_id": "test",
|
|
1654
|
-
"step": "analyze_done",
|
|
1655
|
-
"profile": {},
|
|
1656
|
-
"evidence": None,
|
|
1657
|
-
"agent_results": [
|
|
1658
|
-
{
|
|
1659
|
-
"agent": "code",
|
|
1660
|
-
"success": False,
|
|
1661
|
-
"error": "Analysis timeout",
|
|
1662
|
-
"findings": [],
|
|
1663
|
-
"metadata": {},
|
|
1664
|
-
}
|
|
1665
|
-
],
|
|
1666
|
-
"synthesis": None,
|
|
1667
|
-
"errors": [],
|
|
1668
|
-
"human_approved": None,
|
|
1669
|
-
"human_feedback": None,
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
critical = _extract_critical_findings(state)
|
|
1673
|
-
assert len(critical) == 1
|
|
1674
|
-
assert critical[0]["reason"] == "agent_error"
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
# =============================================================================
|
|
1678
|
-
# Workflow Export Tests
|
|
1679
|
-
# =============================================================================
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
class TestWorkflowExport:
|
|
1683
|
-
"""Tests for workflow export to Mermaid."""
|
|
1684
|
-
|
|
1685
|
-
@pytest.mark.asyncio
|
|
1686
|
-
async def test_export_mermaid_success(self, tmp_path: Path):
|
|
1687
|
-
"""Test successful Mermaid export."""
|
|
1688
|
-
output_path = tmp_path / "workflow.mmd"
|
|
1689
|
-
|
|
1690
|
-
result_path = await export_workflow_mermaid(output_path, checkpointer="memory")
|
|
1691
|
-
|
|
1692
|
-
assert result_path == output_path
|
|
1693
|
-
assert output_path.exists()
|
|
1694
|
-
content = output_path.read_text()
|
|
1695
|
-
assert "graph TD" in content or "graph LR" in content
|
|
1696
|
-
|
|
1697
|
-
@pytest.mark.asyncio
|
|
1698
|
-
async def test_export_mermaid_unavailable(self, tmp_path: Path):
|
|
1699
|
-
"""Test Mermaid export when unavailable."""
|
|
1700
|
-
output_path = tmp_path / "workflow.mmd"
|
|
1701
|
-
|
|
1702
|
-
with patch("vds_audit_orchestrator.agents.langgraph_workflow.build_audit_graph") as mock_build:
|
|
1703
|
-
mock_graph = AsyncMock()
|
|
1704
|
-
mock_compiled = MagicMock()
|
|
1705
|
-
# Mock that draw_mermaid is not available
|
|
1706
|
-
del mock_compiled.draw_mermaid
|
|
1707
|
-
mock_graph.get_graph.return_value = mock_compiled
|
|
1708
|
-
mock_build.return_value = mock_graph
|
|
1709
|
-
|
|
1710
|
-
with pytest.raises(RuntimeError, match="mermaid export not available"):
|
|
1711
|
-
await export_workflow_mermaid(output_path, checkpointer="memory")
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
# =============================================================================
|
|
1715
|
-
# Pending Reviews Tests
|
|
1716
|
-
# =============================================================================
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
class TestPendingReviews:
|
|
1720
|
-
"""Tests for getting pending human reviews."""
|
|
1721
|
-
|
|
1722
|
-
@pytest.mark.asyncio
|
|
1723
|
-
async def test_get_pending_reviews_with_thread(self, sample_repo_path: Path):
|
|
1724
|
-
"""Test getting pending reviews for specific thread."""
|
|
1725
|
-
thread_id = "pending-review-test"
|
|
1726
|
-
|
|
1727
|
-
with (
|
|
1728
|
-
patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async"),
|
|
1729
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector"),
|
|
1730
|
-
):
|
|
1731
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1732
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1733
|
-
|
|
1734
|
-
# Set up paused state - use a step that get_pending_reviews checks for
|
|
1735
|
-
paused_state = {
|
|
1736
|
-
"repository": "test-repo",
|
|
1737
|
-
"repo_path": str(sample_repo_path),
|
|
1738
|
-
"project_id": "test-repo",
|
|
1739
|
-
"step": "human_review", # Changed from "awaiting_human" to match get_pending_reviews check
|
|
1740
|
-
"profile": {},
|
|
1741
|
-
"evidence": EvidenceBundle(repository="test-repo"),
|
|
1742
|
-
"agent_results": [
|
|
1743
|
-
{
|
|
1744
|
-
"agent": "security",
|
|
1745
|
-
"success": True,
|
|
1746
|
-
"findings": [{"type": "security_vulnerability"}],
|
|
1747
|
-
"metadata": {"llm_score": 30},
|
|
1748
|
-
}
|
|
1749
|
-
],
|
|
1750
|
-
"synthesis": None,
|
|
1751
|
-
"errors": [],
|
|
1752
|
-
"human_approved": None,
|
|
1753
|
-
"human_feedback": None,
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
# We need to make the graph think it's paused (has next nodes)
|
|
1757
|
-
# For MemorySaver, get_pending_reviews checks if state.next exists
|
|
1758
|
-
# Let's manually verify the logic by setting up state differently
|
|
1759
|
-
await graph.aupdate_state(config, paused_state)
|
|
1760
|
-
|
|
1761
|
-
# The get_pending_reviews function checks state.next to determine if paused
|
|
1762
|
-
# For MemorySaver, we can't easily simulate a paused state without actual interrupt
|
|
1763
|
-
# Let's test the function with a check that it returns empty for non-paused state
|
|
1764
|
-
pending = await get_pending_reviews(thread_id, checkpointer="memory")
|
|
1765
|
-
|
|
1766
|
-
# Since the state is not actually paused (no next nodes), expect empty list
|
|
1767
|
-
# This validates the function correctly identifies non-paused workflows
|
|
1768
|
-
assert isinstance(pending, list)
|
|
1769
|
-
|
|
1770
|
-
@pytest.mark.asyncio
|
|
1771
|
-
async def test_get_pending_reviews_none_completed(self, sample_repo_path: Path):
|
|
1772
|
-
"""Test getting pending reviews when workflow is complete."""
|
|
1773
|
-
thread_id = "completed-workflow"
|
|
1774
|
-
|
|
1775
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
1776
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1777
|
-
|
|
1778
|
-
# Set up completed state
|
|
1779
|
-
completed_state = {
|
|
1780
|
-
"repository": "test-repo",
|
|
1781
|
-
"repo_path": str(sample_repo_path),
|
|
1782
|
-
"project_id": "test-repo",
|
|
1783
|
-
"step": "complete",
|
|
1784
|
-
"profile": {},
|
|
1785
|
-
"evidence": None,
|
|
1786
|
-
"agent_results": [],
|
|
1787
|
-
"synthesis": {"status": "complete"},
|
|
1788
|
-
"errors": [],
|
|
1789
|
-
"human_approved": True,
|
|
1790
|
-
"human_feedback": None,
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
await graph.aupdate_state(config, completed_state)
|
|
1794
|
-
|
|
1795
|
-
pending = await get_pending_reviews(thread_id, checkpointer="memory")
|
|
1796
|
-
|
|
1797
|
-
# Should return empty list since workflow is complete
|
|
1798
|
-
assert len(pending) == 0
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
# =============================================================================
|
|
1802
|
-
# Full Workflow Integration Tests
|
|
1803
|
-
# =============================================================================
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
class TestFullWorkflow:
|
|
1807
|
-
"""Tests for complete workflow execution."""
|
|
1808
|
-
|
|
1809
|
-
@pytest.mark.asyncio
|
|
1810
|
-
async def test_run_audit_full_workflow(self, sample_repo_path: Path):
|
|
1811
|
-
"""Test running complete audit workflow without human review."""
|
|
1812
|
-
thread_id = "full-workflow-test"
|
|
1813
|
-
|
|
1814
|
-
with (
|
|
1815
|
-
patch("vds_audit_orchestrator.profiles.detection.resolve_profile_async") as mock_resolve,
|
|
1816
|
-
patch("vds_audit_orchestrator.engine.evidence_collector.EvidenceCollector") as mock_collector,
|
|
1817
|
-
patch("vds_audit_orchestrator.agents.code_agent.CodeAnalysisAgent") as mock_code,
|
|
1818
|
-
patch("vds_audit_orchestrator.agents.docs_agent.DocumentationAgent") as mock_docs,
|
|
1819
|
-
patch("vds_audit_orchestrator.agents.security_agent.SecurityAgent") as mock_security,
|
|
1820
|
-
patch("vds_audit_orchestrator.evidence.loader.EvidenceManifestLoader") as mock_loader_cls,
|
|
1821
|
-
patch("vds_audit_orchestrator.agents.langgraph_workflow._check_evidence_readiness") as mock_gate,
|
|
1822
|
-
):
|
|
1823
|
-
# Mock profile
|
|
1824
|
-
mock_resolution = MagicMock()
|
|
1825
|
-
mock_profile = MagicMock()
|
|
1826
|
-
mock_profile.model_dump.return_value = {"domain": "insurance", "criticality": "medium"}
|
|
1827
|
-
mock_resolution.profile = mock_profile
|
|
1828
|
-
mock_resolution.source = "test"
|
|
1829
|
-
mock_resolve.return_value = mock_resolution
|
|
1830
|
-
|
|
1831
|
-
# Mock evidence
|
|
1832
|
-
mock_collector_instance = AsyncMock()
|
|
1833
|
-
mock_collector_instance.collect_all.return_value = EvidenceBundle(repository="test-repo")
|
|
1834
|
-
mock_collector.return_value = mock_collector_instance
|
|
1835
|
-
|
|
1836
|
-
# Mock manifest loader
|
|
1837
|
-
mock_loader = MagicMock()
|
|
1838
|
-
mock_loader.load.return_value = MagicMock(documents=[])
|
|
1839
|
-
mock_loader_cls.return_value = mock_loader
|
|
1840
|
-
|
|
1841
|
-
# Phase 94: bypass evidence readiness gate for unit test
|
|
1842
|
-
mock_gate_result = MagicMock()
|
|
1843
|
-
mock_gate_result.ready = True
|
|
1844
|
-
mock_gate_result.missing = []
|
|
1845
|
-
mock_gate_result.warnings = []
|
|
1846
|
-
mock_gate_result.confluence_docs_count = 1
|
|
1847
|
-
mock_gate_result.code_files_count = 0
|
|
1848
|
-
mock_gate.return_value = mock_gate_result
|
|
1849
|
-
|
|
1850
|
-
# Mock agents - all pass with no critical findings - use explicit names
|
|
1851
|
-
mock_code.return_value.analyze = AsyncMock(
|
|
1852
|
-
return_value=AgentResult(
|
|
1853
|
-
agent_name="CodeAnalysisAgent",
|
|
1854
|
-
success=True,
|
|
1855
|
-
findings=[{"type": "minor", "severity": "low"}],
|
|
1856
|
-
metadata={"llm_score": 90},
|
|
1857
|
-
)
|
|
1858
|
-
)
|
|
1859
|
-
mock_docs.return_value.analyze = AsyncMock(
|
|
1860
|
-
return_value=AgentResult(
|
|
1861
|
-
agent_name="DocumentationAgent",
|
|
1862
|
-
success=True,
|
|
1863
|
-
findings=[{"type": "minor", "severity": "low"}],
|
|
1864
|
-
metadata={"llm_score": 90},
|
|
1865
|
-
)
|
|
1866
|
-
)
|
|
1867
|
-
mock_security.return_value.analyze = AsyncMock(
|
|
1868
|
-
return_value=AgentResult(
|
|
1869
|
-
agent_name="SecurityAgent",
|
|
1870
|
-
success=True,
|
|
1871
|
-
findings=[{"type": "minor", "severity": "low"}],
|
|
1872
|
-
metadata={"llm_score": 90},
|
|
1873
|
-
)
|
|
1874
|
-
)
|
|
1875
|
-
|
|
1876
|
-
def _mock_state_manifest_loader(_dsn: str) -> dict:
|
|
1877
|
-
return {"project": {"project_name": "test", "pages": [], "documents": []}}
|
|
1878
|
-
|
|
1879
|
-
result = await run_audit_with_langgraph(
|
|
1880
|
-
repo_path=str(sample_repo_path),
|
|
1881
|
-
thread_id=thread_id,
|
|
1882
|
-
checkpointer="memory",
|
|
1883
|
-
state_dsn="postgresql://mock-state",
|
|
1884
|
-
state_manifest_loader=_mock_state_manifest_loader,
|
|
1885
|
-
)
|
|
1886
|
-
|
|
1887
|
-
assert result is not None
|
|
1888
|
-
# Workflow should still complete with synthesis under mocked dependencies.
|
|
1889
|
-
assert result.get("synthesis") is not None
|
|
1890
|
-
assert result["synthesis"]["status"] == "complete"
|
|
1891
|
-
|
|
1892
|
-
@pytest.mark.asyncio
|
|
1893
|
-
async def test_run_audit_requires_thread_id(self, sample_repo_path: Path):
|
|
1894
|
-
"""Test that run_audit requires thread_id."""
|
|
1895
|
-
with pytest.raises(ValueError, match="thread_id is required"):
|
|
1896
|
-
await run_audit_with_langgraph(
|
|
1897
|
-
repo_path=str(sample_repo_path),
|
|
1898
|
-
thread_id=None,
|
|
1899
|
-
checkpointer="memory",
|
|
1900
|
-
)
|
|
1901
|
-
|
|
1902
|
-
@pytest.mark.asyncio
|
|
1903
|
-
async def test_run_audit_passes_state_dsn_to_initial_state(self, sample_repo_path: Path):
|
|
1904
|
-
"""run_audit_with_langgraph should include state_dsn and default agentic_mode in initial state."""
|
|
1905
|
-
captured_initial_state: dict[str, Any] = {}
|
|
1906
|
-
|
|
1907
|
-
class _FakeGraph:
|
|
1908
|
-
async def astream(self, initial_state: dict[str, Any], _config: dict[str, Any]):
|
|
1909
|
-
captured_initial_state.update(initial_state)
|
|
1910
|
-
yield {"profile": {"step": "profile_done"}}
|
|
1911
|
-
|
|
1912
|
-
async def aget_state(self, _config: dict[str, Any]):
|
|
1913
|
-
return type(
|
|
1914
|
-
"_State",
|
|
1915
|
-
(),
|
|
1916
|
-
{
|
|
1917
|
-
"values": {"step": "complete"},
|
|
1918
|
-
"next": (),
|
|
1919
|
-
},
|
|
1920
|
-
)()
|
|
1921
|
-
|
|
1922
|
-
with patch(
|
|
1923
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.build_audit_graph",
|
|
1924
|
-
new=AsyncMock(return_value=_FakeGraph()),
|
|
1925
|
-
):
|
|
1926
|
-
await run_audit_with_langgraph(
|
|
1927
|
-
repo_path=str(sample_repo_path),
|
|
1928
|
-
thread_id="state-dsn-test",
|
|
1929
|
-
state_dsn="postgresql://state",
|
|
1930
|
-
)
|
|
1931
|
-
|
|
1932
|
-
assert captured_initial_state["state_dsn"] == "postgresql://state"
|
|
1933
|
-
assert captured_initial_state["agentic_mode"] == "auto"
|
|
1934
|
-
assert captured_initial_state["row_unified_mode"] == "on"
|
|
1935
|
-
assert captured_initial_state["single_row_targeted"] is False
|
|
1936
|
-
assert captured_initial_state["row_state_context"] is None
|
|
1937
|
-
|
|
1938
|
-
@pytest.mark.asyncio
|
|
1939
|
-
async def test_run_audit_passes_explicit_agentic_mode_to_initial_state(self, sample_repo_path: Path):
|
|
1940
|
-
"""run_audit_with_langgraph should preserve explicit agentic_mode override."""
|
|
1941
|
-
captured_initial_state: dict[str, Any] = {}
|
|
1942
|
-
|
|
1943
|
-
class _FakeGraph:
|
|
1944
|
-
async def astream(self, initial_state: dict[str, Any], _config: dict[str, Any]):
|
|
1945
|
-
captured_initial_state.update(initial_state)
|
|
1946
|
-
yield {"profile": {"step": "profile_done"}}
|
|
1947
|
-
|
|
1948
|
-
async def aget_state(self, _config: dict[str, Any]):
|
|
1949
|
-
return type(
|
|
1950
|
-
"_State",
|
|
1951
|
-
(),
|
|
1952
|
-
{
|
|
1953
|
-
"values": {"step": "complete"},
|
|
1954
|
-
"next": (),
|
|
1955
|
-
},
|
|
1956
|
-
)()
|
|
1957
|
-
|
|
1958
|
-
with patch(
|
|
1959
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.build_audit_graph",
|
|
1960
|
-
new=AsyncMock(return_value=_FakeGraph()),
|
|
1961
|
-
):
|
|
1962
|
-
await run_audit_with_langgraph(
|
|
1963
|
-
repo_path=str(sample_repo_path),
|
|
1964
|
-
thread_id="state-agentic-mode-test",
|
|
1965
|
-
agentic_mode="off",
|
|
1966
|
-
row_unified_mode="on",
|
|
1967
|
-
single_row_targeted=True,
|
|
1968
|
-
)
|
|
1969
|
-
|
|
1970
|
-
assert captured_initial_state["agentic_mode"] == "off"
|
|
1971
|
-
assert captured_initial_state["row_unified_mode"] == "on"
|
|
1972
|
-
assert captured_initial_state["single_row_targeted"] is True
|
|
1973
|
-
|
|
1974
|
-
@pytest.mark.asyncio
|
|
1975
|
-
async def test_run_audit_passes_row_state_context_to_initial_state(self, sample_repo_path: Path):
|
|
1976
|
-
"""run_audit_with_langgraph should propagate row_state_context payload to initial state."""
|
|
1977
|
-
captured_initial_state: dict[str, Any] = {}
|
|
1978
|
-
|
|
1979
|
-
class _FakeGraph:
|
|
1980
|
-
async def astream(self, initial_state: dict[str, Any], _config: dict[str, Any]):
|
|
1981
|
-
captured_initial_state.update(initial_state)
|
|
1982
|
-
yield {"profile": {"step": "profile_done"}}
|
|
1983
|
-
|
|
1984
|
-
async def aget_state(self, _config: dict[str, Any]):
|
|
1985
|
-
return type(
|
|
1986
|
-
"_State",
|
|
1987
|
-
(),
|
|
1988
|
-
{
|
|
1989
|
-
"values": {"step": "complete"},
|
|
1990
|
-
"next": (),
|
|
1991
|
-
},
|
|
1992
|
-
)()
|
|
1993
|
-
|
|
1994
|
-
with patch(
|
|
1995
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.build_audit_graph",
|
|
1996
|
-
new=AsyncMock(return_value=_FakeGraph()),
|
|
1997
|
-
):
|
|
1998
|
-
await run_audit_with_langgraph(
|
|
1999
|
-
repo_path=str(sample_repo_path),
|
|
2000
|
-
thread_id="state-row-context-test",
|
|
2001
|
-
row_state_context={
|
|
2002
|
-
"requirement_text": "Validate workflow runbook usage",
|
|
2003
|
-
"requirement_interpretation": {"intent": "Validate workflow runbook usage"},
|
|
2004
|
-
},
|
|
2005
|
-
)
|
|
2006
|
-
|
|
2007
|
-
row_state_context = captured_initial_state.get("row_state_context")
|
|
2008
|
-
assert isinstance(row_state_context, dict)
|
|
2009
|
-
assert row_state_context.get("requirement_text") == "Validate workflow runbook usage"
|
|
2010
|
-
|
|
2011
|
-
@pytest.mark.asyncio
|
|
2012
|
-
async def test_run_audit_uses_last_known_values_when_checkpoint_state_read_fails(self, sample_repo_path: Path):
|
|
2013
|
-
"""run_audit_with_langgraph should not fail hard when aget_state raises."""
|
|
2014
|
-
|
|
2015
|
-
class _FakeGraph:
|
|
2016
|
-
async def astream(self, _initial_state: dict[str, Any], _config: dict[str, Any]):
|
|
2017
|
-
yield {
|
|
2018
|
-
"synthesize": {
|
|
2019
|
-
"step": "complete",
|
|
2020
|
-
"synthesis": {"status": "complete", "overall_score": 7.5},
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
async def aget_state(self, _config: dict[str, Any]):
|
|
2025
|
-
raise RuntimeError("invalid memory alloc request size 1073741824")
|
|
2026
|
-
|
|
2027
|
-
with patch(
|
|
2028
|
-
"vds_audit_orchestrator.agents.langgraph_workflow.build_audit_graph",
|
|
2029
|
-
new=AsyncMock(return_value=_FakeGraph()),
|
|
2030
|
-
):
|
|
2031
|
-
result = await run_audit_with_langgraph(
|
|
2032
|
-
repo_path=str(sample_repo_path),
|
|
2033
|
-
thread_id="state-read-failure",
|
|
2034
|
-
checkpointer="postgres",
|
|
2035
|
-
)
|
|
2036
|
-
|
|
2037
|
-
assert result["step"] == "complete"
|
|
2038
|
-
assert result["synthesis"]["status"] == "complete"
|
|
2039
|
-
# postgres_checkpoint_payload_guard skips aget_state entirely for
|
|
2040
|
-
# checkpointer="postgres", so checkpoint_state_error is never set.
|
|
2041
|
-
|
|
2042
|
-
@pytest.mark.asyncio
|
|
2043
|
-
async def test_resume_audit_not_paused_raises_error(self, sample_repo_path: Path):
|
|
2044
|
-
"""Test that resuming non-paused workflow raises error."""
|
|
2045
|
-
thread_id = "not-paused-thread"
|
|
2046
|
-
|
|
2047
|
-
graph = await build_audit_graph(checkpointer="memory")
|
|
2048
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
2049
|
-
|
|
2050
|
-
# Set up state that's NOT paused (no next nodes)
|
|
2051
|
-
completed_state = {
|
|
2052
|
-
"repository": "test-repo",
|
|
2053
|
-
"repo_path": str(sample_repo_path),
|
|
2054
|
-
"project_id": "test-repo",
|
|
2055
|
-
"step": "complete",
|
|
2056
|
-
"profile": {},
|
|
2057
|
-
"evidence": None,
|
|
2058
|
-
"agent_results": [],
|
|
2059
|
-
"synthesis": {"status": "complete"},
|
|
2060
|
-
"errors": [],
|
|
2061
|
-
"human_approved": True,
|
|
2062
|
-
"human_feedback": None,
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
await graph.aupdate_state(config, completed_state)
|
|
2066
|
-
|
|
2067
|
-
with pytest.raises(RuntimeError, match="is not paused"):
|
|
2068
|
-
await resume_audit_with_human_input(
|
|
2069
|
-
thread_id=thread_id,
|
|
2070
|
-
human_approved=True,
|
|
2071
|
-
checkpointer="memory",
|
|
2072
|
-
)
|