@ngocsangairvds/vsaf 3.2.14 → 3.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/vsaf.js +18 -4
- package/package.json +1 -1
- package/src/config.js +167 -0
- package/src/global.js +1 -48
- package/src/project.js +1 -0
- 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
package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/langgraph_workflow.py
DELETED
|
@@ -1,2002 +0,0 @@
|
|
|
1
|
-
"""LangGraph Workflow for Audit Orchestrator (TSK-050, TSK-073).
|
|
2
|
-
|
|
3
|
-
This module implements the LangGraph-based workflow for running audits
|
|
4
|
-
with checkpointing, human-in-the-loop approval gates, and parallel agent execution.
|
|
5
|
-
|
|
6
|
-
Reference: design.md Section 5 (LangGraph Integration), Section 8.2.1
|
|
7
|
-
|
|
8
|
-
Human-in-the-loop approval gates (TSK-073):
|
|
9
|
-
- Workflow pauses at human_review node when critical findings exist
|
|
10
|
-
- Uses LangGraph interrupt() for durable pause/resume
|
|
11
|
-
- Interrupt payload is persisted in checkpoint for review
|
|
12
|
-
- Resume via Command(resume=...) pattern with approval decision
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
from __future__ import annotations
|
|
16
|
-
|
|
17
|
-
import asyncio
|
|
18
|
-
import inspect
|
|
19
|
-
from collections.abc import Callable
|
|
20
|
-
from pathlib import Path
|
|
21
|
-
from time import monotonic
|
|
22
|
-
from typing import TYPE_CHECKING, Any
|
|
23
|
-
from uuid import uuid4
|
|
24
|
-
|
|
25
|
-
from langgraph.checkpoint.memory import MemorySaver
|
|
26
|
-
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
|
|
27
|
-
from langgraph.graph import END, StateGraph
|
|
28
|
-
from langgraph.types import Command, interrupt
|
|
29
|
-
from structlog import get_logger
|
|
30
|
-
|
|
31
|
-
from vds_audit_orchestrator.agents.audit_state import AuditState
|
|
32
|
-
from vds_audit_orchestrator.agents.base import AgentResult
|
|
33
|
-
from vds_audit_orchestrator.agents.synthesis_agent import SynthesisAgent
|
|
34
|
-
from vds_audit_orchestrator.evidence.corpus import (
|
|
35
|
-
EvidenceCorpus,
|
|
36
|
-
EvidenceDocument,
|
|
37
|
-
deserialize_evidence_corpus,
|
|
38
|
-
)
|
|
39
|
-
from vds_audit_orchestrator.evidence.readiness import check_evidence_readiness as _check_evidence_readiness
|
|
40
|
-
from vds_audit_orchestrator.logging_config import audit_otel_span as trace_span
|
|
41
|
-
from vds_audit_orchestrator.logging_config import log_context
|
|
42
|
-
from vds_audit_orchestrator.models.evidence import EvidenceBundle
|
|
43
|
-
from vds_audit_orchestrator.models.task import AuditTask, TaskPriority, TaskQueue, TaskStatus
|
|
44
|
-
from vds_audit_orchestrator.observability import metrics
|
|
45
|
-
|
|
46
|
-
if TYPE_CHECKING:
|
|
47
|
-
from langgraph.graph.state import CompiledStateGraph
|
|
48
|
-
|
|
49
|
-
logger = get_logger()
|
|
50
|
-
|
|
51
|
-
# Optional PostgresSaver import (lazy-loaded only when postgres checkpointer is requested).
|
|
52
|
-
PostgresSaver = None
|
|
53
|
-
_postgres_saver_import_error: Exception | None = None
|
|
54
|
-
|
|
55
|
-
StateManifestLoader = Callable[[str], dict[str, object] | None]
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def _redact_postgres_dsn(dsn: str) -> str:
|
|
59
|
-
"""Redact password in DSN for logs."""
|
|
60
|
-
# postgresql://user:pass@host:port/db -> postgresql://user:***@host:port/db
|
|
61
|
-
try:
|
|
62
|
-
from urllib.parse import urlparse
|
|
63
|
-
|
|
64
|
-
u = urlparse(dsn)
|
|
65
|
-
if not u.username:
|
|
66
|
-
return dsn
|
|
67
|
-
netloc = u.hostname or ""
|
|
68
|
-
if u.port:
|
|
69
|
-
netloc = f"{netloc}:{u.port}"
|
|
70
|
-
auth = u.username
|
|
71
|
-
if u.password is not None:
|
|
72
|
-
auth = f"{auth}:***"
|
|
73
|
-
if auth:
|
|
74
|
-
netloc = f"{auth}@{netloc}"
|
|
75
|
-
return u._replace(netloc=netloc).geturl()
|
|
76
|
-
except Exception:
|
|
77
|
-
return "postgresql://***"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
def _extract_agent_efficiency_metrics(metadata: dict[str, Any] | None) -> dict[str, Any]:
|
|
81
|
-
"""Extract compact tool/skill efficiency metrics from agent metadata for logs."""
|
|
82
|
-
if not isinstance(metadata, dict):
|
|
83
|
-
return {}
|
|
84
|
-
|
|
85
|
-
summary: dict[str, Any] = {}
|
|
86
|
-
tool_efficiency = metadata.get("agentic_tool_efficiency")
|
|
87
|
-
if not isinstance(tool_efficiency, dict):
|
|
88
|
-
fallback = metadata.get("tool_efficiency")
|
|
89
|
-
tool_efficiency = fallback if isinstance(fallback, dict) else {}
|
|
90
|
-
|
|
91
|
-
numeric_keys = (
|
|
92
|
-
"tool_calls_started",
|
|
93
|
-
"tool_calls_completed",
|
|
94
|
-
"tool_calls_unique",
|
|
95
|
-
"tool_calls_repeated",
|
|
96
|
-
"tool_completion_rate",
|
|
97
|
-
"tool_repetition_rate",
|
|
98
|
-
"skill_calls_total",
|
|
99
|
-
"skill_calls_effective",
|
|
100
|
-
"skill_effective_rate",
|
|
101
|
-
"skill_discovery_ratio",
|
|
102
|
-
"tool_latency_avg_ms",
|
|
103
|
-
"tool_latency_p95_ms",
|
|
104
|
-
)
|
|
105
|
-
for key in numeric_keys:
|
|
106
|
-
value = tool_efficiency.get(key)
|
|
107
|
-
if isinstance(value, bool):
|
|
108
|
-
continue
|
|
109
|
-
if isinstance(value, int):
|
|
110
|
-
summary[key] = value
|
|
111
|
-
elif isinstance(value, float):
|
|
112
|
-
summary[key] = round(value, 3)
|
|
113
|
-
|
|
114
|
-
tool_usage = metadata.get("tool_usage")
|
|
115
|
-
if isinstance(tool_usage, list):
|
|
116
|
-
total_calls = len(tool_usage)
|
|
117
|
-
summary["skill_executor_calls_total"] = total_calls
|
|
118
|
-
if total_calls > 0:
|
|
119
|
-
successful_calls = sum(
|
|
120
|
-
1 for entry in tool_usage if isinstance(entry, dict) and entry.get("success") is True
|
|
121
|
-
)
|
|
122
|
-
summary["skill_executor_success_rate"] = round(successful_calls / total_calls, 3)
|
|
123
|
-
return summary
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
def _serialize_evidence_corpus(corpus: EvidenceCorpus | None) -> dict[str, Any] | None:
|
|
127
|
-
if not isinstance(corpus, EvidenceCorpus):
|
|
128
|
-
return None
|
|
129
|
-
documents: list[dict[str, Any]] = []
|
|
130
|
-
for doc in corpus.documents:
|
|
131
|
-
documents.append(
|
|
132
|
-
{
|
|
133
|
-
"title": doc.title,
|
|
134
|
-
"content": doc.content,
|
|
135
|
-
"source_path": doc.source_path,
|
|
136
|
-
"doc_type": doc.doc_type,
|
|
137
|
-
"project_name": doc.project_name,
|
|
138
|
-
"source_url": doc.source_url,
|
|
139
|
-
"source_type": doc.source_type,
|
|
140
|
-
"doc_class": doc.doc_class,
|
|
141
|
-
"generated_flag": doc.generated_flag,
|
|
142
|
-
"historical_flag": doc.historical_flag,
|
|
143
|
-
"role": doc.role,
|
|
144
|
-
"content_hash": doc.content_hash,
|
|
145
|
-
"checksum_valid": doc.checksum_valid,
|
|
146
|
-
"chunk_id": doc.chunk_id,
|
|
147
|
-
"chunk_ordinal": doc.chunk_ordinal,
|
|
148
|
-
"heading_path": list(doc.heading_path),
|
|
149
|
-
"page_id": doc.page_id,
|
|
150
|
-
"metadata": doc.metadata,
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
return {"documents": documents}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
def _deserialize_evidence_corpus(payload: Any) -> EvidenceCorpus | None:
|
|
157
|
-
if isinstance(payload, EvidenceCorpus):
|
|
158
|
-
return payload
|
|
159
|
-
if not isinstance(payload, dict):
|
|
160
|
-
return None
|
|
161
|
-
raw_documents = payload.get("documents")
|
|
162
|
-
if not isinstance(raw_documents, list):
|
|
163
|
-
return None
|
|
164
|
-
corpus = EvidenceCorpus()
|
|
165
|
-
for item in raw_documents:
|
|
166
|
-
if not isinstance(item, dict):
|
|
167
|
-
continue
|
|
168
|
-
try:
|
|
169
|
-
corpus.add_document(
|
|
170
|
-
EvidenceDocument(
|
|
171
|
-
title=str(item.get("title") or ""),
|
|
172
|
-
content=str(item.get("content") or ""),
|
|
173
|
-
source_path=str(item.get("source_path") or ""),
|
|
174
|
-
doc_type=str(item.get("doc_type") or "OTHER"),
|
|
175
|
-
project_name=str(item.get("project_name") or ""),
|
|
176
|
-
source_url=item.get("source_url"),
|
|
177
|
-
source_type=str(item.get("source_type") or "confluence"),
|
|
178
|
-
doc_class=str(item.get("doc_class") or "canonical_doc"),
|
|
179
|
-
generated_flag=bool(item.get("generated_flag", False)),
|
|
180
|
-
historical_flag=bool(item.get("historical_flag", False)),
|
|
181
|
-
role=(str(item["role"]) if item.get("role") is not None else None),
|
|
182
|
-
content_hash=(str(item["content_hash"]) if item.get("content_hash") is not None else None),
|
|
183
|
-
checksum_valid=item.get("checksum_valid"),
|
|
184
|
-
chunk_id=(str(item["chunk_id"]) if item.get("chunk_id") is not None else None),
|
|
185
|
-
chunk_ordinal=item.get("chunk_ordinal"),
|
|
186
|
-
heading_path=tuple(item.get("heading_path") or ()),
|
|
187
|
-
page_id=(str(item["page_id"]) if item.get("page_id") is not None else None),
|
|
188
|
-
metadata=item.get("metadata") if isinstance(item.get("metadata"), dict) else {},
|
|
189
|
-
)
|
|
190
|
-
)
|
|
191
|
-
except Exception:
|
|
192
|
-
continue
|
|
193
|
-
return corpus
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
def _resolve_page_id_for_agent_operations(state: AuditState) -> str | None:
|
|
197
|
-
"""Resolve canonical page identity for agent-operation telemetry."""
|
|
198
|
-
row_state_context = state.get("row_state_context")
|
|
199
|
-
if isinstance(row_state_context, dict):
|
|
200
|
-
for key in ("page_id", "project_page_id", "project_id"):
|
|
201
|
-
raw = row_state_context.get(key)
|
|
202
|
-
value = str(raw or "").strip()
|
|
203
|
-
if value:
|
|
204
|
-
return value
|
|
205
|
-
for key in ("page_id", "project_page_id", "project_storage_key", "project_id"):
|
|
206
|
-
raw = state.get(key)
|
|
207
|
-
value = str(raw or "").strip()
|
|
208
|
-
if value:
|
|
209
|
-
return value
|
|
210
|
-
return None
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
def _build_agent_operation_log_context(
|
|
214
|
-
state: AuditState,
|
|
215
|
-
*,
|
|
216
|
-
operation_scope: str,
|
|
217
|
-
agent_name: str,
|
|
218
|
-
task_id: str | None = None,
|
|
219
|
-
) -> dict[str, Any]:
|
|
220
|
-
"""Build stable operation context for structured agent lifecycle logs."""
|
|
221
|
-
page_id = _resolve_page_id_for_agent_operations(state)
|
|
222
|
-
context: dict[str, Any] = {
|
|
223
|
-
"operation_id": uuid4().hex,
|
|
224
|
-
"operation_scope": operation_scope,
|
|
225
|
-
"agent": agent_name,
|
|
226
|
-
"repo_key": state.get("repository"),
|
|
227
|
-
"repo_storage_key": state.get("repo_storage_key"),
|
|
228
|
-
}
|
|
229
|
-
if page_id:
|
|
230
|
-
context["page_id"] = page_id
|
|
231
|
-
context["project_page_id"] = page_id
|
|
232
|
-
project_id = str(state.get("project_id") or "").strip()
|
|
233
|
-
if project_id:
|
|
234
|
-
context["project_id"] = project_id
|
|
235
|
-
if task_id:
|
|
236
|
-
context["task_id"] = task_id
|
|
237
|
-
return context
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
def _build_state_context_payload(state: AuditState) -> dict[str, Any]:
|
|
241
|
-
"""Build normalized state_context payload for agent task/analyze handoff."""
|
|
242
|
-
payload: dict[str, Any] = {
|
|
243
|
-
"state_dsn": state.get("state_dsn"),
|
|
244
|
-
"project_id": state.get("project_id"),
|
|
245
|
-
"project_key": state.get("project_id"),
|
|
246
|
-
"repo_storage_key": state.get("repo_storage_key"),
|
|
247
|
-
"repo_key": state.get("repository"),
|
|
248
|
-
}
|
|
249
|
-
page_id = _resolve_page_id_for_agent_operations(state)
|
|
250
|
-
if page_id:
|
|
251
|
-
payload["page_id"] = page_id
|
|
252
|
-
payload["project_page_id"] = page_id
|
|
253
|
-
row_state_context = state.get("row_state_context")
|
|
254
|
-
if isinstance(row_state_context, dict):
|
|
255
|
-
payload.update(dict(row_state_context))
|
|
256
|
-
return payload
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
# =============================================================================
|
|
260
|
-
# State Definition
|
|
261
|
-
# =============================================================================
|
|
262
|
-
|
|
263
|
-
# AuditState is defined in agents/audit_state.py
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
# =============================================================================
|
|
267
|
-
# Node Functions
|
|
268
|
-
# =============================================================================
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
async def profile_node(state: AuditState) -> dict[str, Any]:
|
|
272
|
-
"""Detect project profile.
|
|
273
|
-
|
|
274
|
-
Uses the profile detection system to analyze the repository
|
|
275
|
-
and determine its characteristics (domain, risk level, etc.).
|
|
276
|
-
|
|
277
|
-
Args:
|
|
278
|
-
state: Current workflow state.
|
|
279
|
-
|
|
280
|
-
Returns:
|
|
281
|
-
State update with detected profile and step marker.
|
|
282
|
-
"""
|
|
283
|
-
from vds_audit_orchestrator.profiles.detection import resolve_profile_async
|
|
284
|
-
|
|
285
|
-
log = logger.bind(step="profile", repo_path=state["repo_path"])
|
|
286
|
-
log.info("profile_detection_started")
|
|
287
|
-
|
|
288
|
-
with trace_span("audit.profile", {"repo": state["repo_path"]}):
|
|
289
|
-
try:
|
|
290
|
-
resolution = await resolve_profile_async(
|
|
291
|
-
repo_path=Path(state["repo_path"]),
|
|
292
|
-
project_id=state["project_id"],
|
|
293
|
-
cli_profile=None,
|
|
294
|
-
profile_map_path=None,
|
|
295
|
-
)
|
|
296
|
-
profile_dict = resolution.profile.model_dump()
|
|
297
|
-
log.info("profile_detection_complete", source=resolution.source)
|
|
298
|
-
return {"profile": profile_dict, "step": "profile_done"}
|
|
299
|
-
except Exception as e:
|
|
300
|
-
log.exception("profile_detection_failed", error=str(e))
|
|
301
|
-
return {
|
|
302
|
-
"profile": {},
|
|
303
|
-
"step": "profile_done",
|
|
304
|
-
"errors": [f"Profile detection failed: {e}"],
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
async def evidence_node(
|
|
309
|
-
state: AuditState,
|
|
310
|
-
*,
|
|
311
|
-
state_manifest_loader: StateManifestLoader | None = None,
|
|
312
|
-
) -> dict[str, Any]:
|
|
313
|
-
"""Collect evidence from sources.
|
|
314
|
-
|
|
315
|
-
Gathers evidence from git files, Confluence, SonarQube, and other
|
|
316
|
-
sources based on common requirements.
|
|
317
|
-
|
|
318
|
-
Args:
|
|
319
|
-
state: Current workflow state.
|
|
320
|
-
|
|
321
|
-
Returns:
|
|
322
|
-
State update with collected evidence bundle and step marker.
|
|
323
|
-
"""
|
|
324
|
-
from vds_audit_orchestrator.collectors.requirements import COMMON_REQUIREMENTS
|
|
325
|
-
from vds_audit_orchestrator.engine.evidence_collector import EvidenceCollector
|
|
326
|
-
from vds_audit_orchestrator.evidence.loader import EvidenceManifestLoader
|
|
327
|
-
|
|
328
|
-
log = logger.bind(step="evidence", repo_path=state["repo_path"])
|
|
329
|
-
log.info("evidence_collection_started")
|
|
330
|
-
|
|
331
|
-
with trace_span("audit.evidence", {"repo": state["repo_path"]}):
|
|
332
|
-
try:
|
|
333
|
-
repo_path = Path(state["repo_path"])
|
|
334
|
-
collector = EvidenceCollector(repo_path=repo_path)
|
|
335
|
-
bundle = await collector.collect_all(
|
|
336
|
-
repository=str(repo_path), requirements=list(COMMON_REQUIREMENTS.values())
|
|
337
|
-
)
|
|
338
|
-
log.info(
|
|
339
|
-
"evidence_collection_complete",
|
|
340
|
-
total_evidence=bundle.total_evidence,
|
|
341
|
-
found=bundle.found_count,
|
|
342
|
-
missing=bundle.missing_count,
|
|
343
|
-
)
|
|
344
|
-
evidence_corpus = None
|
|
345
|
-
state_dsn = state.get("state_dsn")
|
|
346
|
-
log.info(
|
|
347
|
-
"evidence_manifest_context",
|
|
348
|
-
state_dsn_present=bool(isinstance(state_dsn, str) and state_dsn.strip()),
|
|
349
|
-
state_manifest_loader_present=state_manifest_loader is not None,
|
|
350
|
-
)
|
|
351
|
-
if not isinstance(state_dsn, str) or not state_dsn.strip() or state_manifest_loader is None:
|
|
352
|
-
raise RuntimeError("Centralized state is required for evidence loading.")
|
|
353
|
-
loader = EvidenceManifestLoader(
|
|
354
|
-
state_dsn=state_dsn,
|
|
355
|
-
state_manifest_loader=state_manifest_loader,
|
|
356
|
-
)
|
|
357
|
-
project_scope = str(state.get("project_id") or "").strip() or None
|
|
358
|
-
evidence_corpus = loader.load_runtime_corpus(project_storage_key=project_scope)
|
|
359
|
-
log.info(
|
|
360
|
-
"evidence_manifest_loaded",
|
|
361
|
-
document_count=len(getattr(evidence_corpus, "documents", [])),
|
|
362
|
-
)
|
|
363
|
-
# --- Evidence readiness gate (GAP-2) ---
|
|
364
|
-
try:
|
|
365
|
-
manifest_payload = loader.last_manifest_payload
|
|
366
|
-
manifest_diagnostics = manifest_payload if isinstance(manifest_payload, dict) else {}
|
|
367
|
-
code_chunk_count = manifest_diagnostics.get("code_chunk_count")
|
|
368
|
-
code_chunk_ready = manifest_diagnostics.get("code_chunk_ready")
|
|
369
|
-
docs_chunk_count = manifest_diagnostics.get("docs_chunk_count")
|
|
370
|
-
docs_chunk_ready = manifest_diagnostics.get("docs_chunk_ready")
|
|
371
|
-
readiness_result = _check_evidence_readiness(
|
|
372
|
-
min_docs=1,
|
|
373
|
-
min_code_files=0,
|
|
374
|
-
manifest_payloads=[manifest_payload] if manifest_payload else None,
|
|
375
|
-
evidence_project=project_scope,
|
|
376
|
-
evidence_project_key=project_scope,
|
|
377
|
-
)
|
|
378
|
-
if not readiness_result.ready:
|
|
379
|
-
log.warning(
|
|
380
|
-
"evidence_readiness_gate_failed",
|
|
381
|
-
missing=readiness_result.missing,
|
|
382
|
-
warnings=readiness_result.warnings,
|
|
383
|
-
)
|
|
384
|
-
return {
|
|
385
|
-
"evidence": bundle,
|
|
386
|
-
"evidence_corpus": _serialize_evidence_corpus(evidence_corpus),
|
|
387
|
-
"step": "evidence_failed",
|
|
388
|
-
"errors": [f"Evidence readiness gate failed: {'; '.join(readiness_result.missing)}"],
|
|
389
|
-
}
|
|
390
|
-
log.info(
|
|
391
|
-
"evidence_readiness_gate_passed",
|
|
392
|
-
confluence_docs=readiness_result.confluence_docs_count,
|
|
393
|
-
code_files_checked=False,
|
|
394
|
-
code_files=None,
|
|
395
|
-
docs_chunk_count=docs_chunk_count,
|
|
396
|
-
docs_chunk_ready=docs_chunk_ready,
|
|
397
|
-
code_chunk_count=code_chunk_count,
|
|
398
|
-
code_chunk_ready=code_chunk_ready,
|
|
399
|
-
)
|
|
400
|
-
except Exception as e:
|
|
401
|
-
log.warning("evidence_readiness_gate_error", error=str(e))
|
|
402
|
-
|
|
403
|
-
return {
|
|
404
|
-
"evidence": bundle,
|
|
405
|
-
"evidence_corpus": _serialize_evidence_corpus(evidence_corpus),
|
|
406
|
-
"step": "evidence_done",
|
|
407
|
-
}
|
|
408
|
-
except Exception as e:
|
|
409
|
-
log.exception("evidence_collection_failed", error=str(e))
|
|
410
|
-
# Create minimal bundle on failure
|
|
411
|
-
empty_bundle = EvidenceBundle(repository=state.get("repository", "unknown"))
|
|
412
|
-
return {
|
|
413
|
-
"evidence": empty_bundle,
|
|
414
|
-
"evidence_corpus": None,
|
|
415
|
-
"step": "evidence_done",
|
|
416
|
-
"errors": [f"Evidence collection failed: {e}"],
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
def route_after_evidence(state: AuditState) -> str:
|
|
421
|
-
"""Route after evidence node: continue or terminate on readiness failure."""
|
|
422
|
-
if state.get("step") == "evidence_failed":
|
|
423
|
-
return "end"
|
|
424
|
-
return "seed_tasks"
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
async def analyze_node(state: AuditState) -> dict[str, Any]:
|
|
428
|
-
"""Run analysis agents in parallel.
|
|
429
|
-
|
|
430
|
-
Executes CodeAnalysisAgent, DocumentationAgent, and SecurityAgent
|
|
431
|
-
concurrently to analyze the collected evidence.
|
|
432
|
-
|
|
433
|
-
Args:
|
|
434
|
-
state: Current workflow state.
|
|
435
|
-
|
|
436
|
-
Returns:
|
|
437
|
-
State update with accumulated agent results and step marker.
|
|
438
|
-
"""
|
|
439
|
-
from vds_audit_orchestrator.agents.code_agent import CodeAnalysisAgent
|
|
440
|
-
from vds_audit_orchestrator.agents.docs_agent import DocumentationAgent
|
|
441
|
-
from vds_audit_orchestrator.agents.security_agent import SecurityAgent
|
|
442
|
-
from vds_audit_orchestrator.llm.provider import LLMSettings
|
|
443
|
-
|
|
444
|
-
log = logger.bind(step="analyze")
|
|
445
|
-
log.info("agent_analysis_started")
|
|
446
|
-
|
|
447
|
-
with trace_span("audit.analyze", {"repo": state["repo_path"]}):
|
|
448
|
-
# Load LLM settings from the effective audit config file resolved through the shared VDS path/config layer
|
|
449
|
-
# This ensures agents use the configured LLM protocol/runtime.
|
|
450
|
-
llm_settings = LLMSettings.from_config()
|
|
451
|
-
protocol = getattr(llm_settings, "protocol", None)
|
|
452
|
-
protocol_value = str(getattr(protocol, "value", protocol) or "").strip()
|
|
453
|
-
log.debug("llm_settings_loaded", enabled=llm_settings.enabled, protocol=protocol_value)
|
|
454
|
-
|
|
455
|
-
# Phase 41: Resolve agentic mode from workflow state or global config.
|
|
456
|
-
agentic_mode = state.get("agentic_mode", "auto")
|
|
457
|
-
|
|
458
|
-
agents = {
|
|
459
|
-
"code": CodeAnalysisAgent(settings=llm_settings, agentic_mode=agentic_mode),
|
|
460
|
-
"docs": DocumentationAgent(settings=llm_settings),
|
|
461
|
-
"security": SecurityAgent(settings=llm_settings),
|
|
462
|
-
}
|
|
463
|
-
operation_context_by_agent = {
|
|
464
|
-
name: _build_agent_operation_log_context(
|
|
465
|
-
state,
|
|
466
|
-
operation_scope="analyze_node",
|
|
467
|
-
agent_name=name,
|
|
468
|
-
)
|
|
469
|
-
for name in agents
|
|
470
|
-
}
|
|
471
|
-
operation_started_at = {name: monotonic() for name in agents}
|
|
472
|
-
for name in agents:
|
|
473
|
-
log.info("agent_operation_started", **operation_context_by_agent[name])
|
|
474
|
-
|
|
475
|
-
evidence = state.get("evidence")
|
|
476
|
-
profile = state.get("profile", {})
|
|
477
|
-
# Phase 41: Inject repo_path into profile so _get_repo_path can resolve it
|
|
478
|
-
# for agentic toolset scoping.
|
|
479
|
-
if "repo_path" not in profile and state.get("repo_path"):
|
|
480
|
-
profile = {**profile, "repo_path": state["repo_path"]}
|
|
481
|
-
state_context = _build_state_context_payload(state)
|
|
482
|
-
payload = {
|
|
483
|
-
"evidence_bundle": evidence,
|
|
484
|
-
"profile": profile,
|
|
485
|
-
"evidence_corpus": _deserialize_evidence_corpus(state.get("evidence_corpus")),
|
|
486
|
-
"state_context": state_context,
|
|
487
|
-
}
|
|
488
|
-
log.info(
|
|
489
|
-
"analyze_payload_context",
|
|
490
|
-
evidence_corpus_present=payload["evidence_corpus"] is not None,
|
|
491
|
-
evidence_corpus_docs=(
|
|
492
|
-
len(payload["evidence_corpus"].documents) if hasattr(payload["evidence_corpus"], "documents") else 0
|
|
493
|
-
),
|
|
494
|
-
state_dsn_present=bool(isinstance(state.get("state_dsn"), str) and str(state.get("state_dsn")).strip()),
|
|
495
|
-
)
|
|
496
|
-
|
|
497
|
-
# Run agents in parallel
|
|
498
|
-
tasks = [agents[name].analyze(payload) for name in agents]
|
|
499
|
-
results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
500
|
-
|
|
501
|
-
# Accumulate results
|
|
502
|
-
agent_results: list[dict[str, Any]] = []
|
|
503
|
-
errors: list[str] = []
|
|
504
|
-
|
|
505
|
-
for name, result in zip(agents.keys(), results, strict=True):
|
|
506
|
-
operation_context = operation_context_by_agent[name]
|
|
507
|
-
elapsed_sec = round(max(0.0, monotonic() - operation_started_at[name]), 3)
|
|
508
|
-
if isinstance(result, BaseException):
|
|
509
|
-
metrics.count_check_failure(name, state["repository"])
|
|
510
|
-
log.warning(
|
|
511
|
-
"agent_operation_failed",
|
|
512
|
-
elapsed_sec=elapsed_sec,
|
|
513
|
-
error=str(result),
|
|
514
|
-
**operation_context,
|
|
515
|
-
)
|
|
516
|
-
log.warning("agent_failed", agent=name, error=str(result))
|
|
517
|
-
agent_results.append({"agent": name, "error": str(result), "success": False})
|
|
518
|
-
errors.append(f"Agent {name} failed: {result}")
|
|
519
|
-
else:
|
|
520
|
-
# the result is AgentResult here
|
|
521
|
-
agent_result = result # type: AgentResult
|
|
522
|
-
if not agent_result.success:
|
|
523
|
-
metrics.count_check_failure(name, state["repository"])
|
|
524
|
-
|
|
525
|
-
efficiency_metrics = _extract_agent_efficiency_metrics(agent_result.metadata)
|
|
526
|
-
operation_event = "agent_operation_complete" if agent_result.success else "agent_operation_failed"
|
|
527
|
-
operation_log = log.info if agent_result.success else log.warning
|
|
528
|
-
operation_log(
|
|
529
|
-
operation_event,
|
|
530
|
-
elapsed_sec=elapsed_sec,
|
|
531
|
-
success=agent_result.success,
|
|
532
|
-
findings_count=len(agent_result.findings),
|
|
533
|
-
**efficiency_metrics,
|
|
534
|
-
**operation_context,
|
|
535
|
-
)
|
|
536
|
-
log.info(
|
|
537
|
-
"agent_complete",
|
|
538
|
-
agent=name,
|
|
539
|
-
success=agent_result.success,
|
|
540
|
-
findings_count=len(agent_result.findings),
|
|
541
|
-
**efficiency_metrics,
|
|
542
|
-
)
|
|
543
|
-
agent_results.append(
|
|
544
|
-
{
|
|
545
|
-
"agent": name,
|
|
546
|
-
"success": agent_result.success,
|
|
547
|
-
"findings": agent_result.findings,
|
|
548
|
-
"metadata": agent_result.metadata,
|
|
549
|
-
}
|
|
550
|
-
)
|
|
551
|
-
|
|
552
|
-
return {"agent_results": agent_results, "errors": errors, "step": "analyze_done"}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
# =============================================================================
|
|
556
|
-
# Phase 11: Dynamic Task Orchestration Nodes
|
|
557
|
-
# =============================================================================
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
async def seed_tasks_node(state: AuditState) -> dict[str, Any]:
|
|
561
|
-
"""Seed the initial task list for dynamic orchestration (Phase 11).
|
|
562
|
-
|
|
563
|
-
Creates the baseline tasks that previously ran in the static analyze step.
|
|
564
|
-
Each task carries the evidence bundle and profile for downstream agents.
|
|
565
|
-
|
|
566
|
-
Args:
|
|
567
|
-
state: Current workflow state.
|
|
568
|
-
|
|
569
|
-
Returns:
|
|
570
|
-
State update with seeded tasks and step marker.
|
|
571
|
-
"""
|
|
572
|
-
log = logger.bind(step="seed_tasks")
|
|
573
|
-
log.info("task_seed_started")
|
|
574
|
-
|
|
575
|
-
evidence = state.get("evidence")
|
|
576
|
-
profile = state.get("profile", {})
|
|
577
|
-
row_unified_mode = str(state.get("row_unified_mode", "on")).strip().lower()
|
|
578
|
-
single_row_targeted = bool(state.get("single_row_targeted", False))
|
|
579
|
-
|
|
580
|
-
if evidence is None:
|
|
581
|
-
log.warning("task_seed_missing_evidence")
|
|
582
|
-
base_payload = {
|
|
583
|
-
"evidence_bundle": evidence,
|
|
584
|
-
"profile": profile,
|
|
585
|
-
# Keep serialized corpus in task payload so all task-assigned agents
|
|
586
|
-
# can reconstruct corpus-backed retrieval context during analyze().
|
|
587
|
-
"evidence_corpus": state.get("evidence_corpus"),
|
|
588
|
-
"state_context": _build_state_context_payload(state),
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
tasks: list[AuditTask] = []
|
|
592
|
-
dispatch_skip_reason: str | None = None
|
|
593
|
-
if row_unified_mode == "on":
|
|
594
|
-
dispatch_skip_reason = "row_unified_mode"
|
|
595
|
-
log.info(
|
|
596
|
-
"task_seed_skipped_for_row_unified_mode",
|
|
597
|
-
row_unified_mode=row_unified_mode,
|
|
598
|
-
single_row_targeted=single_row_targeted,
|
|
599
|
-
)
|
|
600
|
-
else:
|
|
601
|
-
tasks = [
|
|
602
|
-
AuditTask(
|
|
603
|
-
type="code_analysis",
|
|
604
|
-
description="Analyze code quality and architecture",
|
|
605
|
-
assignee="code",
|
|
606
|
-
input_data=base_payload,
|
|
607
|
-
priority=TaskPriority.NORMAL.value,
|
|
608
|
-
),
|
|
609
|
-
AuditTask(
|
|
610
|
-
type="docs_analysis",
|
|
611
|
-
description="Analyze documentation quality and completeness",
|
|
612
|
-
assignee="docs",
|
|
613
|
-
input_data=base_payload,
|
|
614
|
-
priority=TaskPriority.NORMAL.value,
|
|
615
|
-
),
|
|
616
|
-
AuditTask(
|
|
617
|
-
type="security_analysis",
|
|
618
|
-
description="Analyze security posture and vulnerability indicators",
|
|
619
|
-
assignee="security",
|
|
620
|
-
input_data=base_payload,
|
|
621
|
-
priority=TaskPriority.HIGH.value,
|
|
622
|
-
),
|
|
623
|
-
]
|
|
624
|
-
|
|
625
|
-
tasks_dict = {task.id: task.model_dump() for task in tasks}
|
|
626
|
-
|
|
627
|
-
log.info("task_seed_complete", total_tasks=len(tasks_dict))
|
|
628
|
-
|
|
629
|
-
return {
|
|
630
|
-
"tasks": tasks_dict,
|
|
631
|
-
"task_queue": [],
|
|
632
|
-
"active_workers": {},
|
|
633
|
-
"dispatch_skip_reason": dispatch_skip_reason,
|
|
634
|
-
"step": "tasks_seeded",
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
async def dispatcher_node(state: AuditState) -> dict[str, Any]:
|
|
639
|
-
"""Dispatch runnable tasks to available agents (Phase 11).
|
|
640
|
-
|
|
641
|
-
This node evaluates task dependencies, finds runnable tasks (PENDING with
|
|
642
|
-
all dependencies COMPLETED), prioritizes by task.priority, and assigns
|
|
643
|
-
tasks to available agents.
|
|
644
|
-
|
|
645
|
-
The dispatcher loops until all tasks complete, then routes to synthesis.
|
|
646
|
-
|
|
647
|
-
Args:
|
|
648
|
-
state: Current workflow state containing tasks dict.
|
|
649
|
-
|
|
650
|
-
Returns:
|
|
651
|
-
State update with modified tasks dict, task_queue, and active_workers.
|
|
652
|
-
"""
|
|
653
|
-
log = logger.bind(step="dispatcher")
|
|
654
|
-
started_at = monotonic()
|
|
655
|
-
log.info("dispatcher_started")
|
|
656
|
-
|
|
657
|
-
with trace_span("audit.dispatcher", {"repo": state.get("repo_path", "")}):
|
|
658
|
-
# Get current tasks from state (may be empty on first run)
|
|
659
|
-
tasks_dict: dict[str, Any] = dict(state.get("tasks", {}))
|
|
660
|
-
active_workers: dict[str, str] = dict(state.get("active_workers", {}))
|
|
661
|
-
errors: list[str] = list(state.get("errors", []))
|
|
662
|
-
|
|
663
|
-
# Build TaskQueue from state for easier management
|
|
664
|
-
task_queue = TaskQueue(
|
|
665
|
-
tasks={tid: (t if isinstance(t, AuditTask) else AuditTask(**t)) for tid, t in tasks_dict.items()},
|
|
666
|
-
active_workers=active_workers,
|
|
667
|
-
)
|
|
668
|
-
|
|
669
|
-
# Get set of completed task IDs for dependency checking
|
|
670
|
-
completed_ids = {tid for tid, task in task_queue.tasks.items() if task.status == TaskStatus.COMPLETED}
|
|
671
|
-
|
|
672
|
-
# Clear satisfied dependencies so assign_task can mark tasks runnable
|
|
673
|
-
for task in task_queue.tasks.values():
|
|
674
|
-
if not task.dependencies:
|
|
675
|
-
continue
|
|
676
|
-
for dep_id in list(task.dependencies):
|
|
677
|
-
if dep_id in completed_ids:
|
|
678
|
-
task.unblock(dep_id)
|
|
679
|
-
|
|
680
|
-
# Find runnable tasks: PENDING with all dependencies COMPLETED
|
|
681
|
-
runnable_tasks: list[AuditTask] = []
|
|
682
|
-
for task in task_queue.tasks.values():
|
|
683
|
-
if task.status != TaskStatus.PENDING:
|
|
684
|
-
continue
|
|
685
|
-
# Check if all dependencies are completed
|
|
686
|
-
deps_met = all(dep_id in completed_ids for dep_id in task.dependencies)
|
|
687
|
-
if deps_met:
|
|
688
|
-
runnable_tasks.append(task)
|
|
689
|
-
|
|
690
|
-
# Sort by priority (lower number = higher priority)
|
|
691
|
-
runnable_tasks.sort(key=lambda t: t.priority)
|
|
692
|
-
|
|
693
|
-
log.info(
|
|
694
|
-
"dispatcher_found_runnable",
|
|
695
|
-
runnable_count=len(runnable_tasks),
|
|
696
|
-
total_tasks=len(task_queue.tasks),
|
|
697
|
-
completed=len(completed_ids),
|
|
698
|
-
active_workers=len(task_queue.active_workers),
|
|
699
|
-
)
|
|
700
|
-
|
|
701
|
-
# Get list of available agents (not currently working on a task)
|
|
702
|
-
known_agents = {"code", "docs", "security"}
|
|
703
|
-
busy_agents = set(task_queue.active_workers.keys())
|
|
704
|
-
available_agents = list(known_agents - busy_agents)
|
|
705
|
-
|
|
706
|
-
# Assign runnable tasks to available agents
|
|
707
|
-
assigned_count = 0
|
|
708
|
-
task_queue_ids: list[str] = []
|
|
709
|
-
|
|
710
|
-
for task in runnable_tasks:
|
|
711
|
-
# Check if the task's assigned agent is available
|
|
712
|
-
if task.assignee in available_agents:
|
|
713
|
-
# Assign and start the task
|
|
714
|
-
if task_queue.assign_task(task.id, task.assignee):
|
|
715
|
-
available_agents.remove(task.assignee)
|
|
716
|
-
assigned_count += 1
|
|
717
|
-
log.info(
|
|
718
|
-
"task_assigned",
|
|
719
|
-
task_id=task.id,
|
|
720
|
-
task_type=task.type,
|
|
721
|
-
agent=task.assignee,
|
|
722
|
-
priority=task.priority,
|
|
723
|
-
)
|
|
724
|
-
else:
|
|
725
|
-
# Task is runnable but agent is busy - add to queue for next iteration
|
|
726
|
-
task_queue_ids.append(task.id)
|
|
727
|
-
|
|
728
|
-
# Convert tasks back to dict for state update
|
|
729
|
-
updated_tasks = {tid: task.model_dump() for tid, task in task_queue.tasks.items()}
|
|
730
|
-
|
|
731
|
-
log.info(
|
|
732
|
-
"dispatcher_complete",
|
|
733
|
-
assigned=assigned_count,
|
|
734
|
-
queued=len(task_queue_ids),
|
|
735
|
-
pending=task_queue.pending_count,
|
|
736
|
-
running=task_queue.running_count,
|
|
737
|
-
completed=task_queue.completed_count,
|
|
738
|
-
failed=task_queue.failed_count,
|
|
739
|
-
elapsed_sec=round(max(0.0, monotonic() - started_at), 3),
|
|
740
|
-
)
|
|
741
|
-
|
|
742
|
-
return {
|
|
743
|
-
"tasks": updated_tasks,
|
|
744
|
-
"task_queue": task_queue_ids,
|
|
745
|
-
"active_workers": dict(task_queue.active_workers),
|
|
746
|
-
"step": "dispatch_done",
|
|
747
|
-
"errors": errors,
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
async def execute_tasks_node(state: AuditState) -> dict[str, Any]:
|
|
752
|
-
"""Execute tasks assigned to agents and capture results (Phase 11)."""
|
|
753
|
-
from vds_audit_orchestrator.agents.code_agent import CodeAnalysisAgent
|
|
754
|
-
from vds_audit_orchestrator.agents.docs_agent import DocumentationAgent
|
|
755
|
-
from vds_audit_orchestrator.agents.security_agent import SecurityAgent
|
|
756
|
-
from vds_audit_orchestrator.llm.provider import LLMSettings
|
|
757
|
-
|
|
758
|
-
log = logger.bind(step="execute_tasks")
|
|
759
|
-
started_at = monotonic()
|
|
760
|
-
|
|
761
|
-
tasks_dict: dict[str, Any] = dict(state.get("tasks", {}))
|
|
762
|
-
active_workers: dict[str, str] = dict(state.get("active_workers", {}))
|
|
763
|
-
errors: list[str] = list(state.get("errors", []))
|
|
764
|
-
agent_results: list[dict[str, Any]] = list(state.get("agent_results", []))
|
|
765
|
-
|
|
766
|
-
task_queue = TaskQueue(
|
|
767
|
-
tasks={tid: (t if isinstance(t, AuditTask) else AuditTask(**t)) for tid, t in tasks_dict.items()},
|
|
768
|
-
active_workers=active_workers,
|
|
769
|
-
)
|
|
770
|
-
|
|
771
|
-
if not task_queue.active_workers:
|
|
772
|
-
log.info("tasks_execution_skipped", reason="no_active_workers")
|
|
773
|
-
runnable_ids = [task.id for task in task_queue.get_runnable_tasks()]
|
|
774
|
-
return {
|
|
775
|
-
"tasks": {tid: task.model_dump() for tid, task in task_queue.tasks.items()},
|
|
776
|
-
"task_queue": runnable_ids,
|
|
777
|
-
"active_workers": dict(task_queue.active_workers),
|
|
778
|
-
"agent_results": agent_results,
|
|
779
|
-
"errors": errors,
|
|
780
|
-
"step": "tasks_executed",
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
llm_settings = LLMSettings.from_config()
|
|
784
|
-
agentic_mode = state.get("agentic_mode", "auto")
|
|
785
|
-
agents = {
|
|
786
|
-
"code": CodeAnalysisAgent(settings=llm_settings, agentic_mode=agentic_mode),
|
|
787
|
-
"docs": DocumentationAgent(settings=llm_settings),
|
|
788
|
-
"security": SecurityAgent(settings=llm_settings),
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
pending_calls: list[tuple[str, str, Any]] = []
|
|
792
|
-
|
|
793
|
-
for agent_name, task_id in task_queue.active_workers.items():
|
|
794
|
-
task = task_queue.get_task(task_id)
|
|
795
|
-
if task is None:
|
|
796
|
-
errors.append(f"Active task {task_id} not found")
|
|
797
|
-
continue
|
|
798
|
-
agent = agents.get(agent_name)
|
|
799
|
-
if agent is None:
|
|
800
|
-
errors.append(f"No agent registered for task {task_id} (assignee={agent_name})")
|
|
801
|
-
task_queue.fail_task(task_id, f"No agent registered for {agent_name}")
|
|
802
|
-
continue
|
|
803
|
-
# Phase 41: Inject repo_path into profile for agentic toolset scoping.
|
|
804
|
-
task_profile = state.get("profile", {})
|
|
805
|
-
if "repo_path" not in task_profile and state.get("repo_path"):
|
|
806
|
-
task_profile = {**task_profile, "repo_path": state["repo_path"]}
|
|
807
|
-
analyze_kwargs: dict[str, Any] = {"profile": task_profile}
|
|
808
|
-
analyze_signature = inspect.signature(agent.analyze)
|
|
809
|
-
if "evidence_corpus" in analyze_signature.parameters:
|
|
810
|
-
analyze_kwargs["evidence_corpus"] = _deserialize_evidence_corpus(state.get("evidence_corpus"))
|
|
811
|
-
pending_calls.append((agent_name, task_id, agent.analyze(task, **analyze_kwargs)))
|
|
812
|
-
|
|
813
|
-
# Run assigned agent tasks sequentially to reduce provider-side burst 429s.
|
|
814
|
-
# Quality/stability is prioritized over throughput for audit workflows.
|
|
815
|
-
for agent_name, task_id, coroutine in pending_calls:
|
|
816
|
-
operation_started_at = monotonic()
|
|
817
|
-
operation_context = _build_agent_operation_log_context(
|
|
818
|
-
state,
|
|
819
|
-
operation_scope="execute_tasks_node",
|
|
820
|
-
agent_name=agent_name,
|
|
821
|
-
task_id=task_id,
|
|
822
|
-
)
|
|
823
|
-
log.info("agent_operation_started", **operation_context)
|
|
824
|
-
try:
|
|
825
|
-
result = await coroutine
|
|
826
|
-
except BaseException as exc:
|
|
827
|
-
result = exc
|
|
828
|
-
|
|
829
|
-
if isinstance(result, BaseException):
|
|
830
|
-
metrics.count_check_failure(agent_name, state["repository"])
|
|
831
|
-
log.warning(
|
|
832
|
-
"agent_operation_failed",
|
|
833
|
-
elapsed_sec=round(max(0.0, monotonic() - operation_started_at), 3),
|
|
834
|
-
error=str(result),
|
|
835
|
-
**operation_context,
|
|
836
|
-
)
|
|
837
|
-
errors.append(f"Task {task_id} failed: {result}")
|
|
838
|
-
task_queue.fail_task(task_id, str(result))
|
|
839
|
-
agent_results.append(
|
|
840
|
-
{
|
|
841
|
-
"agent": agent_name,
|
|
842
|
-
"success": False,
|
|
843
|
-
"findings": [],
|
|
844
|
-
"metadata": {},
|
|
845
|
-
"error": str(result),
|
|
846
|
-
}
|
|
847
|
-
)
|
|
848
|
-
continue
|
|
849
|
-
|
|
850
|
-
agent_result = result # type: AgentResult
|
|
851
|
-
if not agent_result.success:
|
|
852
|
-
metrics.count_check_failure(agent_name, state["repository"])
|
|
853
|
-
error_message = str(agent_result.error) if agent_result.error is not None else "Agent reported failure"
|
|
854
|
-
task_queue.fail_task(task_id, error_message)
|
|
855
|
-
efficiency_metrics = _extract_agent_efficiency_metrics(agent_result.metadata)
|
|
856
|
-
log.warning(
|
|
857
|
-
"agent_operation_failed",
|
|
858
|
-
elapsed_sec=round(max(0.0, monotonic() - operation_started_at), 3),
|
|
859
|
-
success=False,
|
|
860
|
-
error=error_message,
|
|
861
|
-
findings_count=len(agent_result.findings),
|
|
862
|
-
**efficiency_metrics,
|
|
863
|
-
**operation_context,
|
|
864
|
-
)
|
|
865
|
-
log.warning(
|
|
866
|
-
"task_agent_failed",
|
|
867
|
-
agent=agent_name,
|
|
868
|
-
task_id=task_id,
|
|
869
|
-
error=error_message,
|
|
870
|
-
findings_count=len(agent_result.findings),
|
|
871
|
-
**efficiency_metrics,
|
|
872
|
-
)
|
|
873
|
-
else:
|
|
874
|
-
task_queue.complete_task(
|
|
875
|
-
task_id,
|
|
876
|
-
output={
|
|
877
|
-
"findings": agent_result.findings,
|
|
878
|
-
"metadata": agent_result.metadata,
|
|
879
|
-
},
|
|
880
|
-
)
|
|
881
|
-
efficiency_metrics = _extract_agent_efficiency_metrics(agent_result.metadata)
|
|
882
|
-
log.info(
|
|
883
|
-
"agent_operation_complete",
|
|
884
|
-
elapsed_sec=round(max(0.0, monotonic() - operation_started_at), 3),
|
|
885
|
-
success=True,
|
|
886
|
-
findings_count=len(agent_result.findings),
|
|
887
|
-
**efficiency_metrics,
|
|
888
|
-
**operation_context,
|
|
889
|
-
)
|
|
890
|
-
log.info(
|
|
891
|
-
"task_agent_complete",
|
|
892
|
-
agent=agent_name,
|
|
893
|
-
task_id=task_id,
|
|
894
|
-
findings_count=len(agent_result.findings),
|
|
895
|
-
**efficiency_metrics,
|
|
896
|
-
)
|
|
897
|
-
|
|
898
|
-
agent_results.append(
|
|
899
|
-
{
|
|
900
|
-
"agent": agent_name,
|
|
901
|
-
"success": agent_result.success,
|
|
902
|
-
"findings": agent_result.findings,
|
|
903
|
-
"metadata": agent_result.metadata,
|
|
904
|
-
"error": str(agent_result.error) if agent_result.error is not None else None,
|
|
905
|
-
}
|
|
906
|
-
)
|
|
907
|
-
|
|
908
|
-
for spawned in agent_result.spawned_tasks:
|
|
909
|
-
try:
|
|
910
|
-
dependencies = spawned.get("dependencies") if isinstance(spawned, dict) else None
|
|
911
|
-
new_task = AuditTask(
|
|
912
|
-
type=spawned.get("type") or "unknown",
|
|
913
|
-
description=spawned.get("description") or "",
|
|
914
|
-
assignee=spawned.get("assignee") or "unassigned",
|
|
915
|
-
input_data=spawned.get("input_data") or {},
|
|
916
|
-
priority=spawned.get("priority", TaskPriority.NORMAL.value),
|
|
917
|
-
created_by=spawned.get("created_by", agent_name),
|
|
918
|
-
dependencies=dependencies or [task_id],
|
|
919
|
-
)
|
|
920
|
-
task_queue.add_task(new_task)
|
|
921
|
-
except Exception as exc:
|
|
922
|
-
errors.append(f"Failed to spawn task from {agent_name}: {exc}")
|
|
923
|
-
|
|
924
|
-
runnable_ids = [task.id for task in task_queue.get_runnable_tasks()]
|
|
925
|
-
|
|
926
|
-
log.info(
|
|
927
|
-
"tasks_execution_complete",
|
|
928
|
-
elapsed_sec=round(max(0.0, monotonic() - started_at), 3),
|
|
929
|
-
total_tasks=len(task_queue.tasks),
|
|
930
|
-
active_workers=len(task_queue.active_workers),
|
|
931
|
-
runnable=len(runnable_ids),
|
|
932
|
-
completed=task_queue.completed_count,
|
|
933
|
-
failed=task_queue.failed_count,
|
|
934
|
-
)
|
|
935
|
-
|
|
936
|
-
log.info(
|
|
937
|
-
"tasks_execution_complete",
|
|
938
|
-
completed=task_queue.completed_count,
|
|
939
|
-
failed=task_queue.failed_count,
|
|
940
|
-
pending=task_queue.pending_count,
|
|
941
|
-
running=task_queue.running_count,
|
|
942
|
-
spawned=len(task_queue.tasks) - len(tasks_dict),
|
|
943
|
-
)
|
|
944
|
-
|
|
945
|
-
return {
|
|
946
|
-
"tasks": {tid: task.model_dump() for tid, task in task_queue.tasks.items()},
|
|
947
|
-
"task_queue": runnable_ids,
|
|
948
|
-
"active_workers": dict(task_queue.active_workers),
|
|
949
|
-
"agent_results": agent_results,
|
|
950
|
-
"errors": errors,
|
|
951
|
-
"step": "tasks_executed",
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
def should_continue_dispatch(state: AuditState) -> str:
|
|
956
|
-
"""Determine if dispatching should continue or move to synthesis.
|
|
957
|
-
|
|
958
|
-
Routes to:
|
|
959
|
-
- "dispatch": If there are pending/running tasks remaining
|
|
960
|
-
- "synthesize": If all tasks are in terminal states (completed/failed/skipped)
|
|
961
|
-
|
|
962
|
-
Args:
|
|
963
|
-
state: Current workflow state.
|
|
964
|
-
|
|
965
|
-
Returns:
|
|
966
|
-
Route name: "dispatch" or "synthesize".
|
|
967
|
-
"""
|
|
968
|
-
tasks_dict: dict[str, Any] = state.get("tasks", {})
|
|
969
|
-
|
|
970
|
-
# If no tasks exist, go straight to synthesize
|
|
971
|
-
if not tasks_dict:
|
|
972
|
-
row_unified_mode = str(state.get("row_unified_mode", "")).strip().lower()
|
|
973
|
-
single_row_targeted = bool(state.get("single_row_targeted", False))
|
|
974
|
-
dispatch_skip_reason = str(state.get("dispatch_skip_reason") or "").strip() or None
|
|
975
|
-
if row_unified_mode == "on":
|
|
976
|
-
logger.info(
|
|
977
|
-
"should_continue_dispatch",
|
|
978
|
-
decision="synthesize",
|
|
979
|
-
reason=dispatch_skip_reason or "row_unified_mode",
|
|
980
|
-
row_unified_mode=row_unified_mode,
|
|
981
|
-
single_row_targeted=single_row_targeted,
|
|
982
|
-
)
|
|
983
|
-
else:
|
|
984
|
-
logger.info("should_continue_dispatch", decision="synthesize", reason="no_tasks")
|
|
985
|
-
return "synthesize"
|
|
986
|
-
|
|
987
|
-
# Count tasks by status
|
|
988
|
-
pending_count = 0
|
|
989
|
-
running_count = 0
|
|
990
|
-
terminal_count = 0
|
|
991
|
-
|
|
992
|
-
for task_data in tasks_dict.values():
|
|
993
|
-
# Handle both AuditTask objects and dicts
|
|
994
|
-
if isinstance(task_data, AuditTask):
|
|
995
|
-
status = task_data.status
|
|
996
|
-
else:
|
|
997
|
-
status_value = task_data.get("status", "pending")
|
|
998
|
-
status = TaskStatus(status_value) if isinstance(status_value, str) else status_value
|
|
999
|
-
|
|
1000
|
-
if status == TaskStatus.PENDING:
|
|
1001
|
-
pending_count += 1
|
|
1002
|
-
elif status == TaskStatus.RUNNING:
|
|
1003
|
-
running_count += 1
|
|
1004
|
-
elif status in (TaskStatus.COMPLETED, TaskStatus.FAILED, TaskStatus.SKIPPED):
|
|
1005
|
-
terminal_count += 1
|
|
1006
|
-
|
|
1007
|
-
total_tasks = len(tasks_dict)
|
|
1008
|
-
has_work_remaining = pending_count > 0 or running_count > 0
|
|
1009
|
-
|
|
1010
|
-
if has_work_remaining:
|
|
1011
|
-
logger.info(
|
|
1012
|
-
"should_continue_dispatch",
|
|
1013
|
-
decision="dispatch",
|
|
1014
|
-
pending=pending_count,
|
|
1015
|
-
running=running_count,
|
|
1016
|
-
terminal=terminal_count,
|
|
1017
|
-
total=total_tasks,
|
|
1018
|
-
)
|
|
1019
|
-
return "dispatch"
|
|
1020
|
-
|
|
1021
|
-
logger.info(
|
|
1022
|
-
"should_continue_dispatch",
|
|
1023
|
-
decision="synthesize",
|
|
1024
|
-
reason="all_tasks_terminal",
|
|
1025
|
-
terminal=terminal_count,
|
|
1026
|
-
total=total_tasks,
|
|
1027
|
-
)
|
|
1028
|
-
return "synthesize"
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
def route_after_execute(state: AuditState) -> str:
|
|
1032
|
-
"""Route after executing tasks based on task status and findings."""
|
|
1033
|
-
if should_continue_dispatch(state) == "dispatch":
|
|
1034
|
-
return "dispatch"
|
|
1035
|
-
return should_human_review(state)
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
def _extract_critical_findings(state: AuditState) -> list[dict[str, Any]]:
|
|
1039
|
-
"""Extract critical findings from agent results.
|
|
1040
|
-
|
|
1041
|
-
Critical findings are those with:
|
|
1042
|
-
- LLM score < 50 (indicates significant issues)
|
|
1043
|
-
- Type is security_vulnerability
|
|
1044
|
-
- Explicit error in agent result
|
|
1045
|
-
|
|
1046
|
-
Args:
|
|
1047
|
-
state: Current workflow state.
|
|
1048
|
-
|
|
1049
|
-
Returns:
|
|
1050
|
-
List of critical finding dictionaries.
|
|
1051
|
-
"""
|
|
1052
|
-
critical_issues: list[dict[str, Any]] = []
|
|
1053
|
-
|
|
1054
|
-
for result in state.get("agent_results", []):
|
|
1055
|
-
# Check for critical issues based on LLM score
|
|
1056
|
-
metadata = result.get("metadata", {})
|
|
1057
|
-
llm_score = metadata.get("llm_score", 100)
|
|
1058
|
-
|
|
1059
|
-
if llm_score < 50:
|
|
1060
|
-
critical_issues.append(
|
|
1061
|
-
{
|
|
1062
|
-
"agent": result.get("agent"),
|
|
1063
|
-
"reason": "low_llm_score",
|
|
1064
|
-
"llm_score": llm_score,
|
|
1065
|
-
"findings": result.get("findings", []),
|
|
1066
|
-
}
|
|
1067
|
-
)
|
|
1068
|
-
|
|
1069
|
-
# Check for explicit errors
|
|
1070
|
-
if result.get("error"):
|
|
1071
|
-
critical_issues.append(
|
|
1072
|
-
{
|
|
1073
|
-
"agent": result.get("agent"),
|
|
1074
|
-
"reason": "agent_error",
|
|
1075
|
-
"error": result.get("error"),
|
|
1076
|
-
}
|
|
1077
|
-
)
|
|
1078
|
-
|
|
1079
|
-
# Check for security vulnerabilities
|
|
1080
|
-
for finding in result.get("findings", []):
|
|
1081
|
-
if finding.get("type") == "security_vulnerability" and not any(f.get("id") == finding.get("id") for f in critical_issues):
|
|
1082
|
-
critical_issues.append(
|
|
1083
|
-
{
|
|
1084
|
-
"agent": result.get("agent"),
|
|
1085
|
-
"reason": "security_vulnerability",
|
|
1086
|
-
"finding": finding,
|
|
1087
|
-
}
|
|
1088
|
-
)
|
|
1089
|
-
|
|
1090
|
-
return critical_issues
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
def should_human_review(state: AuditState) -> str:
|
|
1094
|
-
"""Determine if human review is needed based on findings.
|
|
1095
|
-
|
|
1096
|
-
Routes to human_review node if critical findings exist that require
|
|
1097
|
-
human judgment before proceeding to synthesis.
|
|
1098
|
-
|
|
1099
|
-
Critical findings criteria:
|
|
1100
|
-
- LLM score < 50 (indicates significant quality/security issues)
|
|
1101
|
-
- Security vulnerabilities detected
|
|
1102
|
-
- Agent execution errors
|
|
1103
|
-
|
|
1104
|
-
Args:
|
|
1105
|
-
state: Current workflow state.
|
|
1106
|
-
|
|
1107
|
-
Returns:
|
|
1108
|
-
Route name: "human_review" or "synthesize".
|
|
1109
|
-
"""
|
|
1110
|
-
critical_issues = _extract_critical_findings(state)
|
|
1111
|
-
|
|
1112
|
-
if critical_issues:
|
|
1113
|
-
logger.info(
|
|
1114
|
-
"human_review_required",
|
|
1115
|
-
critical_count=len(critical_issues),
|
|
1116
|
-
reasons=[issue.get("reason") for issue in critical_issues],
|
|
1117
|
-
)
|
|
1118
|
-
return "human_review"
|
|
1119
|
-
|
|
1120
|
-
return "synthesize"
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
def _count_explicit_findings(agent_results: list[Any]) -> int:
|
|
1124
|
-
"""Count explicit findings from agent payloads without inferred synthesis artifacts."""
|
|
1125
|
-
total_findings = 0
|
|
1126
|
-
for result in agent_results:
|
|
1127
|
-
if isinstance(result, AgentResult):
|
|
1128
|
-
total_findings += len(result.findings)
|
|
1129
|
-
continue
|
|
1130
|
-
if not isinstance(result, dict):
|
|
1131
|
-
continue
|
|
1132
|
-
findings = result.get("findings")
|
|
1133
|
-
if isinstance(findings, list):
|
|
1134
|
-
total_findings += len(findings)
|
|
1135
|
-
return total_findings
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
_TOOL_ACTIVITY_COUNTER_KEYS: tuple[str, ...] = (
|
|
1139
|
-
"docs_search_count",
|
|
1140
|
-
"docs_read_count",
|
|
1141
|
-
"code_search_count",
|
|
1142
|
-
"code_read_count",
|
|
1143
|
-
)
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
def _coerce_non_negative_int(value: Any) -> int:
|
|
1147
|
-
if isinstance(value, bool):
|
|
1148
|
-
return int(value)
|
|
1149
|
-
if isinstance(value, int):
|
|
1150
|
-
return max(0, value)
|
|
1151
|
-
if isinstance(value, float):
|
|
1152
|
-
return max(0, int(value))
|
|
1153
|
-
if isinstance(value, str):
|
|
1154
|
-
try:
|
|
1155
|
-
return max(0, int(float(value.strip())))
|
|
1156
|
-
except ValueError:
|
|
1157
|
-
return 0
|
|
1158
|
-
if isinstance(value, list | tuple | set | dict):
|
|
1159
|
-
return len(value)
|
|
1160
|
-
return 0
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
def _normalize_state_artifact_rows(payload: Any) -> list[dict[str, Any]]:
|
|
1164
|
-
if isinstance(payload, list):
|
|
1165
|
-
return [row for row in payload if isinstance(row, dict)]
|
|
1166
|
-
if isinstance(payload, dict):
|
|
1167
|
-
row_keys = {"row_id", "check_id", "status", "retrieval_trace", "evidence_anchors", "evidence_refs"}
|
|
1168
|
-
if any(key in payload for key in row_keys):
|
|
1169
|
-
return [payload]
|
|
1170
|
-
return [value for value in payload.values() if isinstance(value, dict)]
|
|
1171
|
-
return []
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
def _extract_retrieval_trace_payload(payload: dict[str, Any]) -> dict[str, Any] | None:
|
|
1175
|
-
trace = payload.get("retrieval_trace")
|
|
1176
|
-
if isinstance(trace, dict):
|
|
1177
|
-
return trace
|
|
1178
|
-
return payload if isinstance(payload, dict) else None
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
def _trace_has_tool_activity(trace: dict[str, Any] | None) -> bool:
|
|
1182
|
-
if not isinstance(trace, dict):
|
|
1183
|
-
return False
|
|
1184
|
-
containers: list[dict[str, Any]] = [trace]
|
|
1185
|
-
loop_trace = trace.get("tool_first_loop")
|
|
1186
|
-
if isinstance(loop_trace, dict):
|
|
1187
|
-
containers.append(loop_trace)
|
|
1188
|
-
for container in containers:
|
|
1189
|
-
if any(_coerce_non_negative_int(container.get(key)) > 0 for key in _TOOL_ACTIVITY_COUNTER_KEYS):
|
|
1190
|
-
return True
|
|
1191
|
-
return False
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
def _count_payload_evidence_refs(payload: dict[str, Any]) -> int:
|
|
1195
|
-
refs_count = _coerce_non_negative_int(payload.get("evidence_refs"))
|
|
1196
|
-
refs_count += _coerce_non_negative_int(payload.get("evidence_anchors"))
|
|
1197
|
-
trace = _extract_retrieval_trace_payload(payload)
|
|
1198
|
-
if isinstance(trace, dict):
|
|
1199
|
-
refs_count += _coerce_non_negative_int(trace.get("evidence_refs"))
|
|
1200
|
-
refs_count += _coerce_non_negative_int(trace.get("evidence_anchors"))
|
|
1201
|
-
loop_trace = trace.get("tool_first_loop")
|
|
1202
|
-
if isinstance(loop_trace, dict):
|
|
1203
|
-
refs_count += _coerce_non_negative_int(loop_trace.get("evidence_refs"))
|
|
1204
|
-
refs_count += _coerce_non_negative_int(loop_trace.get("evidence_anchors"))
|
|
1205
|
-
return refs_count
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
def _collect_row_unified_no_task_guard_telemetry(state: AuditState) -> dict[str, int]:
|
|
1209
|
-
row_payloads = _normalize_state_artifact_rows(state.get("row_results"))
|
|
1210
|
-
if not row_payloads:
|
|
1211
|
-
row_payloads = _normalize_state_artifact_rows(state.get("checklist_results"))
|
|
1212
|
-
|
|
1213
|
-
retrieval_trace_rows = _normalize_state_artifact_rows(state.get("retrieval_trace_rows"))
|
|
1214
|
-
rows_evaluated = len(row_payloads)
|
|
1215
|
-
rows_with_tool_activity = 0
|
|
1216
|
-
evidence_refs_count = 0
|
|
1217
|
-
|
|
1218
|
-
for payload in row_payloads:
|
|
1219
|
-
trace = _extract_retrieval_trace_payload(payload)
|
|
1220
|
-
if _trace_has_tool_activity(trace):
|
|
1221
|
-
rows_with_tool_activity += 1
|
|
1222
|
-
evidence_refs_count += _count_payload_evidence_refs(payload)
|
|
1223
|
-
|
|
1224
|
-
if rows_evaluated == 0:
|
|
1225
|
-
for payload in retrieval_trace_rows:
|
|
1226
|
-
trace = _extract_retrieval_trace_payload(payload)
|
|
1227
|
-
if _trace_has_tool_activity(trace):
|
|
1228
|
-
rows_with_tool_activity += 1
|
|
1229
|
-
|
|
1230
|
-
for payload in retrieval_trace_rows:
|
|
1231
|
-
evidence_refs_count += _count_payload_evidence_refs(payload)
|
|
1232
|
-
|
|
1233
|
-
evidence_refs_count += _coerce_non_negative_int(state.get("evidence_refs"))
|
|
1234
|
-
evidence_refs_count += _coerce_non_negative_int(state.get("evidence_anchors"))
|
|
1235
|
-
|
|
1236
|
-
return {
|
|
1237
|
-
"rows_evaluated": rows_evaluated,
|
|
1238
|
-
"rows_with_tool_activity": rows_with_tool_activity,
|
|
1239
|
-
"retrieval_trace_rows": len(retrieval_trace_rows),
|
|
1240
|
-
"evidence_refs_count": evidence_refs_count,
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
def _is_row_unified_single_row_no_task_state(
|
|
1245
|
-
state: AuditState,
|
|
1246
|
-
*,
|
|
1247
|
-
guard_telemetry: dict[str, int] | None = None,
|
|
1248
|
-
) -> bool:
|
|
1249
|
-
"""Detect no-task synthesis conditions for row-unified dynamic runs."""
|
|
1250
|
-
row_unified_mode = str(state.get("row_unified_mode", "on")).strip().lower()
|
|
1251
|
-
if row_unified_mode != "on":
|
|
1252
|
-
return False
|
|
1253
|
-
if not bool(state.get("single_row_targeted", False)):
|
|
1254
|
-
return False
|
|
1255
|
-
if state.get("tasks") or state.get("agent_results"):
|
|
1256
|
-
return False
|
|
1257
|
-
# Guard against false no-task synthesis when checklist-driven row evaluation
|
|
1258
|
-
# context or artifacts are already attached to the workflow state.
|
|
1259
|
-
if isinstance(state.get("row_state_context"), dict) and state.get("row_state_context"):
|
|
1260
|
-
return False
|
|
1261
|
-
for artifact_key in (
|
|
1262
|
-
"checklist_rows",
|
|
1263
|
-
"checklist_results",
|
|
1264
|
-
"retrieval_trace",
|
|
1265
|
-
"retrieval_trace_rows",
|
|
1266
|
-
"row_results",
|
|
1267
|
-
):
|
|
1268
|
-
artifact = state.get(artifact_key)
|
|
1269
|
-
if isinstance(artifact, dict) and artifact:
|
|
1270
|
-
return False
|
|
1271
|
-
if isinstance(artifact, list) and artifact:
|
|
1272
|
-
return False
|
|
1273
|
-
telemetry = guard_telemetry or _collect_row_unified_no_task_guard_telemetry(state)
|
|
1274
|
-
if telemetry.get("rows_evaluated", 0) > 0:
|
|
1275
|
-
return False
|
|
1276
|
-
if telemetry.get("retrieval_trace_rows", 0) > 0:
|
|
1277
|
-
return False
|
|
1278
|
-
return not telemetry.get("evidence_refs_count", 0) > 0
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
async def human_review_node(state: AuditState) -> dict[str, Any]:
|
|
1282
|
-
"""Pause for human review and approval (TSK-073).
|
|
1283
|
-
|
|
1284
|
-
This node uses LangGraph's interrupt() mechanism to pause execution
|
|
1285
|
-
when critical findings exist. The interrupt payload is persisted in
|
|
1286
|
-
the checkpoint and can be reviewed via CLI or API.
|
|
1287
|
-
|
|
1288
|
-
Workflow will pause here until human input is provided via:
|
|
1289
|
-
- CLI: vds-audit workflow-resume --thread-id <id> --approve/--reject
|
|
1290
|
-
- API: resume_audit_with_human_input() with approval decision
|
|
1291
|
-
|
|
1292
|
-
The interrupt payload includes:
|
|
1293
|
-
- agent_results: All agent findings
|
|
1294
|
-
- critical_issues: Filtered list of critical findings requiring review
|
|
1295
|
-
- errors: Any errors that occurred during analysis
|
|
1296
|
-
- profile: Project profile information
|
|
1297
|
-
|
|
1298
|
-
Args:
|
|
1299
|
-
state: Current workflow state.
|
|
1300
|
-
|
|
1301
|
-
Returns:
|
|
1302
|
-
State update with awaiting_human step marker.
|
|
1303
|
-
In normal execution, this function calls interrupt() which pauses
|
|
1304
|
-
the workflow. When resumed, the human_approved and human_feedback
|
|
1305
|
-
fields will be set in the state.
|
|
1306
|
-
"""
|
|
1307
|
-
with trace_span("audit.human_review"):
|
|
1308
|
-
critical_issues = _extract_critical_findings(state)
|
|
1309
|
-
|
|
1310
|
-
log = logger.bind(
|
|
1311
|
-
step="human_review",
|
|
1312
|
-
repo=state.get("repository"),
|
|
1313
|
-
critical_count=len(critical_issues),
|
|
1314
|
-
)
|
|
1315
|
-
log.info(
|
|
1316
|
-
"human_review_awaiting",
|
|
1317
|
-
critical_issues_count=len(critical_issues),
|
|
1318
|
-
agent_results_count=len(state.get("agent_results", [])),
|
|
1319
|
-
)
|
|
1320
|
-
|
|
1321
|
-
# Prepare the interrupt payload for human review
|
|
1322
|
-
# This payload will be persisted in the checkpoint
|
|
1323
|
-
interrupt_payload: dict[str, Any] = {
|
|
1324
|
-
"question": "Critical findings detected. Approve continuation to synthesis?",
|
|
1325
|
-
"repository": state.get("repository"),
|
|
1326
|
-
"repo_path": state.get("repo_path"),
|
|
1327
|
-
"project_id": state.get("project_id"),
|
|
1328
|
-
"critical_issues": critical_issues,
|
|
1329
|
-
"agent_results": state.get("agent_results", []),
|
|
1330
|
-
"errors": state.get("errors", []),
|
|
1331
|
-
"profile": state.get("profile", {}),
|
|
1332
|
-
"review_instructions": {
|
|
1333
|
-
"cli_approve": "vds-audit workflow-resume --thread-id <THREAD_ID> --approve",
|
|
1334
|
-
"cli_reject": "vds-audit workflow-resume --thread-id <THREAD_ID> --reject",
|
|
1335
|
-
"api_approve": "resume_audit_with_human_input(thread_id=..., human_approved=True)",
|
|
1336
|
-
"api_reject": "resume_audit_with_human_input(thread_id=..., human_approved=False)",
|
|
1337
|
-
},
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
# This call pauses execution and persists the payload
|
|
1341
|
-
# Workflow will resume when human input is provided
|
|
1342
|
-
return interrupt(interrupt_payload)
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
async def synthesize_node(state: AuditState) -> dict[str, Any]:
|
|
1346
|
-
"""Synthesize results from all agents.
|
|
1347
|
-
|
|
1348
|
-
Aggregates findings from all analysis agents into a final
|
|
1349
|
-
synthesis with overall scores and recommendations.
|
|
1350
|
-
|
|
1351
|
-
If human review was performed and rejected, synthesis will
|
|
1352
|
-
indicate the rejection and preserve findings for review.
|
|
1353
|
-
|
|
1354
|
-
Args:
|
|
1355
|
-
state: Current workflow state.
|
|
1356
|
-
|
|
1357
|
-
Returns:
|
|
1358
|
-
State update with synthesis results and completion marker.
|
|
1359
|
-
"""
|
|
1360
|
-
log = logger.bind(step="synthesize")
|
|
1361
|
-
started_at = monotonic()
|
|
1362
|
-
log.info("synthesis_started")
|
|
1363
|
-
|
|
1364
|
-
with trace_span("audit.synthesize", {"repo": state["repository"]}):
|
|
1365
|
-
agent_results = state.get("agent_results", [])
|
|
1366
|
-
total_findings = _count_explicit_findings(agent_results)
|
|
1367
|
-
no_task_guard_telemetry = _collect_row_unified_no_task_guard_telemetry(state)
|
|
1368
|
-
|
|
1369
|
-
# Check if human rejected the findings
|
|
1370
|
-
human_approved = state.get("human_approved")
|
|
1371
|
-
if human_approved is False:
|
|
1372
|
-
log.info("synthesis_skipped_rejected", human_feedback=state.get("human_feedback"))
|
|
1373
|
-
synthesis = {
|
|
1374
|
-
"repository": state["repository"],
|
|
1375
|
-
"status": "rejected",
|
|
1376
|
-
"human_approved": False,
|
|
1377
|
-
"human_feedback": state.get("human_feedback"),
|
|
1378
|
-
"agent_results": agent_results,
|
|
1379
|
-
"profile": state.get("profile", {}),
|
|
1380
|
-
"rows_evaluated": no_task_guard_telemetry.get("rows_evaluated", 0),
|
|
1381
|
-
"rows_with_tool_activity": no_task_guard_telemetry.get("rows_with_tool_activity", 0),
|
|
1382
|
-
"message": "Audit findings were rejected during human review. "
|
|
1383
|
-
"Review critical findings and address issues before re-running.",
|
|
1384
|
-
}
|
|
1385
|
-
# Record audit as completed (rejected)
|
|
1386
|
-
metrics.count_audit_run("rejected", state["repository"])
|
|
1387
|
-
log.info(
|
|
1388
|
-
"synthesis_complete",
|
|
1389
|
-
status="rejected",
|
|
1390
|
-
elapsed_sec=round(max(0.0, monotonic() - started_at), 3),
|
|
1391
|
-
total_findings=total_findings,
|
|
1392
|
-
)
|
|
1393
|
-
return {"synthesis": synthesis, "step": "complete"}
|
|
1394
|
-
|
|
1395
|
-
if _is_row_unified_single_row_no_task_state(state, guard_telemetry=no_task_guard_telemetry):
|
|
1396
|
-
log.info(
|
|
1397
|
-
"workflow_no_task_synthesis_dynamic_only",
|
|
1398
|
-
row_unified_mode=state.get("row_unified_mode"),
|
|
1399
|
-
single_row_targeted=bool(state.get("single_row_targeted", False)),
|
|
1400
|
-
rows_evaluated=no_task_guard_telemetry.get("rows_evaluated", 0),
|
|
1401
|
-
rows_with_tool_activity=no_task_guard_telemetry.get("rows_with_tool_activity", 0),
|
|
1402
|
-
retrieval_trace_rows=no_task_guard_telemetry.get("retrieval_trace_rows", 0),
|
|
1403
|
-
evidence_refs_count=no_task_guard_telemetry.get("evidence_refs_count", 0),
|
|
1404
|
-
)
|
|
1405
|
-
synthesis = {
|
|
1406
|
-
"repository": state["repository"],
|
|
1407
|
-
"status": "complete",
|
|
1408
|
-
"overall_score": 0.0,
|
|
1409
|
-
"maturity_level": "Critical",
|
|
1410
|
-
"agent_scores": {},
|
|
1411
|
-
"critical_gaps": [],
|
|
1412
|
-
"aligned_practices": [],
|
|
1413
|
-
"recommendations": [],
|
|
1414
|
-
"cross_cutting_concerns": [],
|
|
1415
|
-
"executive_summary": (
|
|
1416
|
-
"No analysis tasks were executed in row-unified dynamic mode. "
|
|
1417
|
-
"No agent findings were produced, so this run cannot provide evidence-based "
|
|
1418
|
-
"recommendations. The score remains 0.0 until explicit analysis tasks and "
|
|
1419
|
-
"findings are available."
|
|
1420
|
-
),
|
|
1421
|
-
"total_findings": total_findings,
|
|
1422
|
-
"human_approved": human_approved,
|
|
1423
|
-
"human_feedback": state.get("human_feedback"),
|
|
1424
|
-
"profile": state.get("profile", {}),
|
|
1425
|
-
"rows_evaluated": no_task_guard_telemetry.get("rows_evaluated", 0),
|
|
1426
|
-
"rows_with_tool_activity": no_task_guard_telemetry.get("rows_with_tool_activity", 0),
|
|
1427
|
-
"evidence_selection_history": [],
|
|
1428
|
-
"message": ("No baseline analysis tasks or agent results were available in row-unified dynamic mode."),
|
|
1429
|
-
}
|
|
1430
|
-
metrics.count_audit_run("complete", state["repository"])
|
|
1431
|
-
log.info(
|
|
1432
|
-
"synthesis_complete",
|
|
1433
|
-
status="complete_no_task",
|
|
1434
|
-
elapsed_sec=round(max(0.0, monotonic() - started_at), 3),
|
|
1435
|
-
total_findings=total_findings,
|
|
1436
|
-
)
|
|
1437
|
-
return {"synthesis": synthesis, "step": "complete"}
|
|
1438
|
-
|
|
1439
|
-
# Convert dict results into AgentResult for synthesis
|
|
1440
|
-
agent_result_objects: list[AgentResult] = []
|
|
1441
|
-
for result in agent_results:
|
|
1442
|
-
if isinstance(result, AgentResult):
|
|
1443
|
-
agent_result_objects.append(result)
|
|
1444
|
-
continue
|
|
1445
|
-
if isinstance(result, dict):
|
|
1446
|
-
findings = result.get("findings")
|
|
1447
|
-
metadata = result.get("metadata")
|
|
1448
|
-
agent_result_objects.append(
|
|
1449
|
-
AgentResult(
|
|
1450
|
-
agent_name=result.get("agent", "unknown"),
|
|
1451
|
-
success=bool(result.get("success")),
|
|
1452
|
-
findings=list(findings) if isinstance(findings, list) else [],
|
|
1453
|
-
metadata=dict(metadata) if isinstance(metadata, dict) else {},
|
|
1454
|
-
error=result.get("error"),
|
|
1455
|
-
)
|
|
1456
|
-
)
|
|
1457
|
-
|
|
1458
|
-
evidence_corpus_obj = deserialize_evidence_corpus(state.get("evidence_corpus"))
|
|
1459
|
-
synthesizer = SynthesisAgent(evidence_corpus=evidence_corpus_obj)
|
|
1460
|
-
synthesis_result = await synthesizer.synthesize(state["repository"], agent_result_objects)
|
|
1461
|
-
synthesis = synthesis_result.to_dict()
|
|
1462
|
-
|
|
1463
|
-
# TSK-169B: Include evidence selection history for debug/reproducibility
|
|
1464
|
-
evidence_corpus = evidence_corpus_obj
|
|
1465
|
-
evidence_selection_history = []
|
|
1466
|
-
if evidence_corpus and hasattr(evidence_corpus, "get_selection_history"):
|
|
1467
|
-
try:
|
|
1468
|
-
evidence_selection_history = evidence_corpus.get_selection_history()
|
|
1469
|
-
except Exception:
|
|
1470
|
-
pass # Non-critical, don't fail if history unavailable
|
|
1471
|
-
|
|
1472
|
-
synthesis.update(
|
|
1473
|
-
{
|
|
1474
|
-
"repository": state["repository"],
|
|
1475
|
-
"status": "complete",
|
|
1476
|
-
"total_findings": total_findings,
|
|
1477
|
-
"human_approved": human_approved,
|
|
1478
|
-
"human_feedback": state.get("human_feedback"),
|
|
1479
|
-
"profile": state.get("profile", {}),
|
|
1480
|
-
"rows_evaluated": no_task_guard_telemetry.get("rows_evaluated", 0),
|
|
1481
|
-
"rows_with_tool_activity": no_task_guard_telemetry.get("rows_with_tool_activity", 0),
|
|
1482
|
-
"evidence_selection_history": evidence_selection_history, # TSK-169B
|
|
1483
|
-
}
|
|
1484
|
-
)
|
|
1485
|
-
|
|
1486
|
-
log.info(
|
|
1487
|
-
"synthesis_complete",
|
|
1488
|
-
total_findings=total_findings,
|
|
1489
|
-
critical=len(synthesis.get("critical_gaps", [])),
|
|
1490
|
-
human_reviewed=human_approved,
|
|
1491
|
-
elapsed_sec=round(max(0.0, monotonic() - started_at), 3),
|
|
1492
|
-
)
|
|
1493
|
-
|
|
1494
|
-
# Record successful audit run
|
|
1495
|
-
metrics.count_audit_run("complete", state["repository"])
|
|
1496
|
-
|
|
1497
|
-
return {"synthesis": synthesis, "step": "complete"}
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
# =============================================================================
|
|
1501
|
-
# Graph Builder
|
|
1502
|
-
# =============================================================================
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
# Valid checkpointer types for strict PostgreSQL enforcement.
|
|
1506
|
-
_VALID_CHECKPOINTER_TYPES: frozenset[str] = frozenset({"postgres", "memory"})
|
|
1507
|
-
_CHECKPOINTER_ALLOWED_MSGPACK_MODULES: tuple[tuple[str, str], ...] = (
|
|
1508
|
-
("vds_audit_orchestrator.models.evidence", "EvidenceStatus"),
|
|
1509
|
-
("vds_audit_orchestrator.models.evidence", "EvidenceBundle"),
|
|
1510
|
-
)
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
async def _get_checkpointer(checkpointer: str | None, postgres_dsn: str | None) -> MemorySaver | Any:
|
|
1514
|
-
"""Resolve checkpointer instance with async setup for PostgresSaver.
|
|
1515
|
-
|
|
1516
|
-
Args:
|
|
1517
|
-
checkpointer: Type of checkpointer ('memory', 'postgres', or None for default memory)
|
|
1518
|
-
postgres_dsn: PostgreSQL connection string for PostgresSaver
|
|
1519
|
-
|
|
1520
|
-
Returns:
|
|
1521
|
-
Configured checkpointer instance (MemorySaver or PostgresSaver)
|
|
1522
|
-
|
|
1523
|
-
Raises:
|
|
1524
|
-
ValueError: If unknown checkpointer type or postgres requested without DSN
|
|
1525
|
-
RuntimeError: If langgraph-checkpoint-postgres not installed
|
|
1526
|
-
"""
|
|
1527
|
-
# Validate checkpointer type to prevent silent fallback on typos.
|
|
1528
|
-
normalized = (checkpointer or "memory").lower()
|
|
1529
|
-
if normalized not in _VALID_CHECKPOINTER_TYPES:
|
|
1530
|
-
raise ValueError(
|
|
1531
|
-
f"Unknown checkpointer type: {checkpointer!r}. Must be one of: {sorted(_VALID_CHECKPOINTER_TYPES)}"
|
|
1532
|
-
)
|
|
1533
|
-
if normalized == "postgres":
|
|
1534
|
-
log = logger.bind(checkpointer="postgres")
|
|
1535
|
-
# Lazy import avoids importing langchain/langgraph postgres deps for non-postgres runs.
|
|
1536
|
-
global PostgresSaver, _postgres_saver_import_error
|
|
1537
|
-
if PostgresSaver is None and _postgres_saver_import_error is None: # pragma: no branch
|
|
1538
|
-
try:
|
|
1539
|
-
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver as PostgresSaver
|
|
1540
|
-
except Exception as exc: # pragma: no cover
|
|
1541
|
-
_postgres_saver_import_error = exc
|
|
1542
|
-
|
|
1543
|
-
if not postgres_dsn:
|
|
1544
|
-
raise ValueError(
|
|
1545
|
-
"postgres checkpointer requires postgres_dsn or VDS_AUDIT_LANGGRAPH__POSTGRES_DSN environment variable"
|
|
1546
|
-
)
|
|
1547
|
-
if PostgresSaver is None: # pragma: no cover
|
|
1548
|
-
detail = ""
|
|
1549
|
-
if _postgres_saver_import_error is not None:
|
|
1550
|
-
detail = f" (import error: {_postgres_saver_import_error})"
|
|
1551
|
-
raise RuntimeError(
|
|
1552
|
-
"postgres checkpointer requested but PostgresSaver is unavailable. "
|
|
1553
|
-
"Ensure `langgraph-checkpoint-postgres` and `psycopg[binary]` are installed "
|
|
1554
|
-
"(or provide system `libpq`)." + detail
|
|
1555
|
-
)
|
|
1556
|
-
log.info("langgraph_postgres_checkpointer_enabled", dsn=_redact_postgres_dsn(postgres_dsn))
|
|
1557
|
-
serde = JsonPlusSerializer(allowed_msgpack_modules=_CHECKPOINTER_ALLOWED_MSGPACK_MODULES)
|
|
1558
|
-
# Create PostgresSaver from connection string.
|
|
1559
|
-
#
|
|
1560
|
-
# AsyncPostgresSaver.from_conn_string is an @asynccontextmanager that yields a saver.
|
|
1561
|
-
# We need to enter the context and keep it alive for the lifetime of the graph.
|
|
1562
|
-
cm = PostgresSaver.from_conn_string(postgres_dsn, serde=serde)
|
|
1563
|
-
saver = await cm.__aenter__()
|
|
1564
|
-
# Keep the contextmanager alive for the lifetime of the workflow.
|
|
1565
|
-
# If `cm` is GC'd, its finalizer can close the generator -> closed DB connection.
|
|
1566
|
-
saver._vds_audit_async_cm = cm # type: ignore[attr-defined]
|
|
1567
|
-
# Required: Call .setup() to initialize tables on first use
|
|
1568
|
-
await saver.setup()
|
|
1569
|
-
log.info("langgraph_postgres_checkpointer_ready")
|
|
1570
|
-
# NOTE: We intentionally do not __aexit__ here; the saver must remain usable while
|
|
1571
|
-
# the workflow runs. The process will clean up connections on exit.
|
|
1572
|
-
return saver
|
|
1573
|
-
# Explicit memory checkpointer for local development only.
|
|
1574
|
-
logger.info("langgraph_memory_checkpointer_enabled", note="workflow state is non-durable")
|
|
1575
|
-
return MemorySaver()
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
async def build_audit_graph(
|
|
1579
|
-
*,
|
|
1580
|
-
checkpointer: str | None = None,
|
|
1581
|
-
postgres_dsn: str | None = None,
|
|
1582
|
-
state_manifest_loader: StateManifestLoader | None = None,
|
|
1583
|
-
) -> CompiledStateGraph:
|
|
1584
|
-
"""Build and compile the audit workflow graph with checkpointing.
|
|
1585
|
-
|
|
1586
|
-
Creates a StateGraph with the following flow:
|
|
1587
|
-
profile -> evidence -> seed_tasks -> dispatcher -> execute_tasks -> (conditional) -> synthesize -> END
|
|
1588
|
-
|-> human_review -> synthesize -> END
|
|
1589
|
-
|
|
1590
|
-
Args:
|
|
1591
|
-
checkpointer: Type of checkpointer ('memory', 'postgres', or None)
|
|
1592
|
-
postgres_dsn: PostgreSQL connection string (required for postgres checkpointer)
|
|
1593
|
-
|
|
1594
|
-
Returns:
|
|
1595
|
-
Compiled StateGraph with configured checkpointer.
|
|
1596
|
-
|
|
1597
|
-
Note:
|
|
1598
|
-
When using 'postgres' checkpointer, this function is async to handle
|
|
1599
|
-
the required .setup() call for PostgresSaver.
|
|
1600
|
-
"""
|
|
1601
|
-
builder: StateGraph = StateGraph(AuditState)
|
|
1602
|
-
|
|
1603
|
-
# Add nodes
|
|
1604
|
-
builder.add_node("profile", profile_node)
|
|
1605
|
-
|
|
1606
|
-
async def _evidence_node_with_state_loader(state: AuditState) -> dict[str, Any]:
|
|
1607
|
-
return await evidence_node(state, state_manifest_loader=state_manifest_loader)
|
|
1608
|
-
|
|
1609
|
-
builder.add_node("evidence", _evidence_node_with_state_loader)
|
|
1610
|
-
builder.add_node("seed_tasks", seed_tasks_node)
|
|
1611
|
-
builder.add_node("dispatcher", dispatcher_node) # Phase 11: Dynamic task orchestration
|
|
1612
|
-
builder.add_node("execute_tasks", execute_tasks_node)
|
|
1613
|
-
builder.add_node("human_review", human_review_node)
|
|
1614
|
-
builder.add_node("synthesize", synthesize_node)
|
|
1615
|
-
|
|
1616
|
-
# Define edges
|
|
1617
|
-
builder.add_edge("profile", "evidence")
|
|
1618
|
-
builder.add_conditional_edges(
|
|
1619
|
-
"evidence",
|
|
1620
|
-
route_after_evidence,
|
|
1621
|
-
{
|
|
1622
|
-
"seed_tasks": "seed_tasks",
|
|
1623
|
-
"end": END,
|
|
1624
|
-
},
|
|
1625
|
-
)
|
|
1626
|
-
builder.add_edge("seed_tasks", "dispatcher")
|
|
1627
|
-
builder.add_edge("dispatcher", "execute_tasks")
|
|
1628
|
-
|
|
1629
|
-
# Conditional routing after task execution (Phase 11)
|
|
1630
|
-
builder.add_conditional_edges(
|
|
1631
|
-
"execute_tasks",
|
|
1632
|
-
route_after_execute,
|
|
1633
|
-
{
|
|
1634
|
-
"dispatch": "dispatcher",
|
|
1635
|
-
"human_review": "human_review",
|
|
1636
|
-
"synthesize": "synthesize",
|
|
1637
|
-
},
|
|
1638
|
-
)
|
|
1639
|
-
|
|
1640
|
-
builder.add_edge("human_review", "synthesize")
|
|
1641
|
-
builder.add_edge("synthesize", END)
|
|
1642
|
-
|
|
1643
|
-
# Set entry point
|
|
1644
|
-
builder.set_entry_point("profile")
|
|
1645
|
-
|
|
1646
|
-
# Compile with checkpointing (async for PostgresSaver setup)
|
|
1647
|
-
saver = await _get_checkpointer(checkpointer, postgres_dsn)
|
|
1648
|
-
compiled = builder.compile(checkpointer=saver)
|
|
1649
|
-
# Store for later cleanup in the public API functions.
|
|
1650
|
-
compiled._vds_audit_checkpointer = saver # type: ignore[attr-defined]
|
|
1651
|
-
return compiled
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
async def _maybe_close_checkpointer(graph: Any) -> None:
|
|
1655
|
-
"""Best-effort cleanup for Postgres checkpointer context manager."""
|
|
1656
|
-
saver = getattr(graph, "_vds_audit_checkpointer", None)
|
|
1657
|
-
cm = getattr(saver, "_vds_audit_async_cm", None)
|
|
1658
|
-
if cm is None:
|
|
1659
|
-
return
|
|
1660
|
-
# Prevent double-close (e.g. if multiple helpers are called).
|
|
1661
|
-
saver._vds_audit_async_cm = None # type: ignore[attr-defined]
|
|
1662
|
-
try:
|
|
1663
|
-
await cm.__aexit__(None, None, None)
|
|
1664
|
-
except Exception: # pragma: no cover - cleanup should never fail the workflow
|
|
1665
|
-
logger.warning("checkpointer_close_failed")
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
# =============================================================================
|
|
1669
|
-
# Public API
|
|
1670
|
-
# =============================================================================
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
async def run_audit_with_langgraph(
|
|
1674
|
-
repo_path: str,
|
|
1675
|
-
thread_id: str | None = None,
|
|
1676
|
-
project_id: str | None = None,
|
|
1677
|
-
repo_storage_key: str | None = None,
|
|
1678
|
-
state_dsn: str | None = None,
|
|
1679
|
-
*,
|
|
1680
|
-
checkpointer: str | None = None,
|
|
1681
|
-
postgres_dsn: str | None = None,
|
|
1682
|
-
state_manifest_loader: StateManifestLoader | None = None,
|
|
1683
|
-
agentic_mode: str = "auto",
|
|
1684
|
-
row_unified_mode: str = "on",
|
|
1685
|
-
single_row_targeted: bool = False,
|
|
1686
|
-
row_state_context: dict[str, Any] | None = None,
|
|
1687
|
-
) -> dict[str, Any]:
|
|
1688
|
-
"""Run audit using LangGraph workflow with checkpointing.
|
|
1689
|
-
|
|
1690
|
-
Executes the complete audit workflow including profile detection,
|
|
1691
|
-
evidence collection, agent analysis, optional human review, and synthesis.
|
|
1692
|
-
|
|
1693
|
-
If critical findings are detected, the workflow will pause at the
|
|
1694
|
-
human_review node and await human input. Use resume_audit_with_human_input()
|
|
1695
|
-
to continue the workflow.
|
|
1696
|
-
|
|
1697
|
-
Args:
|
|
1698
|
-
repo_path: Path to the repository to audit.
|
|
1699
|
-
thread_id: Thread ID for checkpointing. Required for durable execution.
|
|
1700
|
-
project_id: Optional project ID. Defaults to repository directory name.
|
|
1701
|
-
repo_storage_key: Optional canonical repository storage key for state-backed retrieval.
|
|
1702
|
-
state_dsn: Optional centralized state DSN for evidence manifest loading.
|
|
1703
|
-
checkpointer: Type of checkpointer ('memory', 'postgres', or None).
|
|
1704
|
-
postgres_dsn: PostgreSQL connection string (required for postgres checkpointer).
|
|
1705
|
-
state_manifest_loader: Optional centralized state manifest loader callback.
|
|
1706
|
-
agentic_mode: Agentic investigation mode for CodeAnalysisAgent (auto/off/on).
|
|
1707
|
-
row_unified_mode: Unified row execution mode (off/on, defaults to on).
|
|
1708
|
-
single_row_targeted: True when workflow is scoped to a single target row.
|
|
1709
|
-
row_state_context: Optional single-row requirement context for requirement-driven routing.
|
|
1710
|
-
|
|
1711
|
-
Returns:
|
|
1712
|
-
Final workflow state values including synthesis results.
|
|
1713
|
-
If workflow is paused for human review, the result will contain
|
|
1714
|
-
the interrupt payload with critical findings.
|
|
1715
|
-
|
|
1716
|
-
Raises:
|
|
1717
|
-
ValueError: If thread_id is not provided.
|
|
1718
|
-
|
|
1719
|
-
Example:
|
|
1720
|
-
>>> result = await run_audit_with_langgraph(
|
|
1721
|
-
... "/path/to/repo",
|
|
1722
|
-
... thread_id="audit-001",
|
|
1723
|
-
... checkpointer="memory"
|
|
1724
|
-
... )
|
|
1725
|
-
>>> if result.get("step") == "awaiting_human":
|
|
1726
|
-
... # Workflow paused for human review
|
|
1727
|
-
... print("Critical findings:", result["critical_issues"])
|
|
1728
|
-
"""
|
|
1729
|
-
if not thread_id:
|
|
1730
|
-
raise ValueError("thread_id is required for durable execution")
|
|
1731
|
-
|
|
1732
|
-
# Build graph with async checkpointer setup
|
|
1733
|
-
graph = await build_audit_graph(
|
|
1734
|
-
checkpointer=checkpointer,
|
|
1735
|
-
postgres_dsn=postgres_dsn,
|
|
1736
|
-
state_manifest_loader=state_manifest_loader,
|
|
1737
|
-
)
|
|
1738
|
-
try:
|
|
1739
|
-
repo_path_obj = Path(repo_path).resolve()
|
|
1740
|
-
|
|
1741
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1742
|
-
|
|
1743
|
-
initial_state: dict[str, Any] = {
|
|
1744
|
-
"repository": repo_path_obj.name,
|
|
1745
|
-
"repo_path": str(repo_path_obj.absolute()),
|
|
1746
|
-
"project_id": project_id or repo_path_obj.name,
|
|
1747
|
-
"repo_storage_key": repo_storage_key,
|
|
1748
|
-
"step": "start",
|
|
1749
|
-
"profile": {},
|
|
1750
|
-
"evidence": None,
|
|
1751
|
-
"evidence_corpus": None,
|
|
1752
|
-
"agent_results": [],
|
|
1753
|
-
"synthesis": None,
|
|
1754
|
-
"errors": [],
|
|
1755
|
-
"human_approved": None,
|
|
1756
|
-
"human_feedback": None,
|
|
1757
|
-
"state_dsn": state_dsn,
|
|
1758
|
-
"tasks": {},
|
|
1759
|
-
"task_queue": [],
|
|
1760
|
-
"active_workers": {},
|
|
1761
|
-
"agentic_mode": agentic_mode,
|
|
1762
|
-
"row_unified_mode": row_unified_mode,
|
|
1763
|
-
"single_row_targeted": single_row_targeted,
|
|
1764
|
-
"row_state_context": dict(row_state_context) if isinstance(row_state_context, dict) else None,
|
|
1765
|
-
}
|
|
1766
|
-
last_known_values: dict[str, Any] = dict(initial_state)
|
|
1767
|
-
|
|
1768
|
-
log = logger.bind(repository=repo_path_obj.name, thread_id=config["configurable"]["thread_id"])
|
|
1769
|
-
log.info("langgraph_audit_started", checkpointer=checkpointer or "memory")
|
|
1770
|
-
|
|
1771
|
-
with log_context(audit_id=thread_id, repo=repo_path_obj.name, phase="workflow"):
|
|
1772
|
-
# Run the graph until completion or interrupt
|
|
1773
|
-
async for event in graph.astream(initial_state, config): # type: ignore[arg-type]
|
|
1774
|
-
step = None
|
|
1775
|
-
# Extract step from event (event is dict with node name as key)
|
|
1776
|
-
for _node_name, node_output in event.items():
|
|
1777
|
-
if isinstance(node_output, dict):
|
|
1778
|
-
# Keep a compact best-effort state snapshot in case checkpoint
|
|
1779
|
-
# retrieval fails after execution due oversized persisted payload.
|
|
1780
|
-
last_known_values.update(node_output)
|
|
1781
|
-
step = node_output.get("step")
|
|
1782
|
-
|
|
1783
|
-
if step:
|
|
1784
|
-
log.info("workflow_step_complete", step=step)
|
|
1785
|
-
|
|
1786
|
-
final_values: dict[str, Any] = dict(last_known_values)
|
|
1787
|
-
if checkpointer == "postgres":
|
|
1788
|
-
# Avoid a heavy final checkpoint read for large workflows: retrieving
|
|
1789
|
-
# durable state can trigger oversized allocations on some Postgres savers.
|
|
1790
|
-
# We already maintain a compact in-memory last-known snapshot from events.
|
|
1791
|
-
log.info(
|
|
1792
|
-
"workflow_final_state_retrieval_skipped",
|
|
1793
|
-
reason="postgres_checkpoint_payload_guard",
|
|
1794
|
-
fallback="last_known_values",
|
|
1795
|
-
)
|
|
1796
|
-
else:
|
|
1797
|
-
try:
|
|
1798
|
-
# Get final durable state from checkpointer when available.
|
|
1799
|
-
final_state = await graph.aget_state(config) # type: ignore[arg-type]
|
|
1800
|
-
final_values = dict(final_state.values)
|
|
1801
|
-
|
|
1802
|
-
# Check if workflow is paused for human review
|
|
1803
|
-
if final_state.next:
|
|
1804
|
-
log.info(
|
|
1805
|
-
"workflow_paused",
|
|
1806
|
-
next_nodes=list(final_state.next),
|
|
1807
|
-
step=final_values.get("step"),
|
|
1808
|
-
)
|
|
1809
|
-
except Exception as exc: # pragma: no cover - defensive resilience path
|
|
1810
|
-
log.warning(
|
|
1811
|
-
"workflow_final_state_retrieval_failed",
|
|
1812
|
-
error=str(exc),
|
|
1813
|
-
fallback="last_known_values",
|
|
1814
|
-
)
|
|
1815
|
-
final_values["checkpoint_state_error"] = str(exc)
|
|
1816
|
-
|
|
1817
|
-
log.info("langgraph_audit_complete", step=final_values.get("step"))
|
|
1818
|
-
|
|
1819
|
-
return final_values
|
|
1820
|
-
finally:
|
|
1821
|
-
await _maybe_close_checkpointer(graph)
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
async def resume_audit_with_human_input(
|
|
1825
|
-
thread_id: str,
|
|
1826
|
-
human_approved: bool,
|
|
1827
|
-
human_feedback: str | None = None,
|
|
1828
|
-
*,
|
|
1829
|
-
checkpointer: str | None = None,
|
|
1830
|
-
postgres_dsn: str | None = None,
|
|
1831
|
-
) -> dict[str, Any]:
|
|
1832
|
-
"""Resume a paused audit with human input (TSK-073).
|
|
1833
|
-
|
|
1834
|
-
Called after human_review_node has paused the workflow with interrupt().
|
|
1835
|
-
Updates the state with human approval decision and feedback, then resumes
|
|
1836
|
-
execution from the paused node.
|
|
1837
|
-
|
|
1838
|
-
If human_approved=False, the synthesis will mark the audit as rejected
|
|
1839
|
-
but still preserve all findings for review.
|
|
1840
|
-
|
|
1841
|
-
Args:
|
|
1842
|
-
thread_id: Thread ID of the paused workflow.
|
|
1843
|
-
human_approved: Whether the human approved the findings.
|
|
1844
|
-
human_feedback: Optional feedback from the human reviewer.
|
|
1845
|
-
checkpointer: Type of checkpointer ('memory', 'postgres', or None).
|
|
1846
|
-
postgres_dsn: PostgreSQL connection string (required for postgres checkpointer).
|
|
1847
|
-
|
|
1848
|
-
Returns:
|
|
1849
|
-
Final workflow state values after resumption.
|
|
1850
|
-
|
|
1851
|
-
Raises:
|
|
1852
|
-
RuntimeError: If the workflow is not paused for human review.
|
|
1853
|
-
|
|
1854
|
-
Example:
|
|
1855
|
-
>>> # Approve and continue
|
|
1856
|
-
>>> result = await resume_audit_with_human_input(
|
|
1857
|
-
... thread_id="audit-123",
|
|
1858
|
-
... human_approved=True,
|
|
1859
|
-
... human_feedback="Findings look correct, proceeding."
|
|
1860
|
-
... )
|
|
1861
|
-
>>>
|
|
1862
|
-
>>> # Reject and stop
|
|
1863
|
-
>>> result = await resume_audit_with_human_input(
|
|
1864
|
-
... thread_id="audit-123",
|
|
1865
|
-
... human_approved=False,
|
|
1866
|
-
... human_feedback="Security issues must be addressed first."
|
|
1867
|
-
... )
|
|
1868
|
-
"""
|
|
1869
|
-
# Build graph with async checkpointer setup
|
|
1870
|
-
graph = await build_audit_graph(checkpointer=checkpointer, postgres_dsn=postgres_dsn)
|
|
1871
|
-
try:
|
|
1872
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1873
|
-
|
|
1874
|
-
log = logger.bind(thread_id=thread_id)
|
|
1875
|
-
log.info("audit_resuming_with_human_input", approved=human_approved)
|
|
1876
|
-
|
|
1877
|
-
# Check current state - verify workflow is paused
|
|
1878
|
-
current_state = await graph.aget_state(config) # type: ignore[arg-type]
|
|
1879
|
-
if not current_state.next:
|
|
1880
|
-
raise RuntimeError(f"Thread {thread_id} is not paused. Current step: {current_state.values.get('step')}")
|
|
1881
|
-
|
|
1882
|
-
# Use Command(resume=...) pattern to resume with human input
|
|
1883
|
-
# This is the proper LangGraph pattern for human-in-the-loop
|
|
1884
|
-
resume_command = Command(
|
|
1885
|
-
resume={
|
|
1886
|
-
"human_approved": human_approved,
|
|
1887
|
-
"human_feedback": human_feedback,
|
|
1888
|
-
}
|
|
1889
|
-
)
|
|
1890
|
-
|
|
1891
|
-
# Stream the resumption
|
|
1892
|
-
async for event in graph.astream(resume_command, config): # type: ignore[arg-type]
|
|
1893
|
-
for _node_name, node_output in event.items():
|
|
1894
|
-
if isinstance(node_output, dict):
|
|
1895
|
-
step = node_output.get("step")
|
|
1896
|
-
if step:
|
|
1897
|
-
log.info("workflow_step_complete", step=step)
|
|
1898
|
-
|
|
1899
|
-
# Get final state
|
|
1900
|
-
final_state = await graph.aget_state(config) # type: ignore[arg-type]
|
|
1901
|
-
final_values = dict(final_state.values)
|
|
1902
|
-
|
|
1903
|
-
log.info(
|
|
1904
|
-
"audit_resumed_complete",
|
|
1905
|
-
step=final_values.get("step"),
|
|
1906
|
-
human_approved=human_approved,
|
|
1907
|
-
)
|
|
1908
|
-
|
|
1909
|
-
return final_values
|
|
1910
|
-
finally:
|
|
1911
|
-
await _maybe_close_checkpointer(graph)
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
async def export_workflow_mermaid(
|
|
1915
|
-
output_path: str | Path,
|
|
1916
|
-
*,
|
|
1917
|
-
checkpointer: str | None = None,
|
|
1918
|
-
postgres_dsn: str | None = None,
|
|
1919
|
-
) -> Path:
|
|
1920
|
-
"""Export the LangGraph workflow as a Mermaid diagram.
|
|
1921
|
-
|
|
1922
|
-
Args:
|
|
1923
|
-
output_path: Path to save the Mermaid diagram file.
|
|
1924
|
-
checkpointer: Type of checkpointer ('memory', 'postgres', or None).
|
|
1925
|
-
postgres_dsn: PostgreSQL connection string (required for postgres checkpointer).
|
|
1926
|
-
|
|
1927
|
-
Returns:
|
|
1928
|
-
Path to the saved Mermaid diagram file.
|
|
1929
|
-
|
|
1930
|
-
Raises:
|
|
1931
|
-
RuntimeError: If LangGraph mermaid export not available.
|
|
1932
|
-
"""
|
|
1933
|
-
graph = await build_audit_graph(checkpointer=checkpointer, postgres_dsn=postgres_dsn)
|
|
1934
|
-
try:
|
|
1935
|
-
compiled = graph.get_graph()
|
|
1936
|
-
if not hasattr(compiled, "draw_mermaid"):
|
|
1937
|
-
raise RuntimeError("LangGraph mermaid export not available in this version")
|
|
1938
|
-
mermaid = compiled.draw_mermaid()
|
|
1939
|
-
output_path = Path(output_path)
|
|
1940
|
-
output_path.write_text(mermaid, encoding="utf-8")
|
|
1941
|
-
return output_path
|
|
1942
|
-
finally:
|
|
1943
|
-
await _maybe_close_checkpointer(graph)
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
async def get_pending_reviews(
|
|
1947
|
-
thread_id: str | None = None,
|
|
1948
|
-
*,
|
|
1949
|
-
checkpointer: str | None = None,
|
|
1950
|
-
postgres_dsn: str | None = None,
|
|
1951
|
-
) -> list[dict[str, Any]]:
|
|
1952
|
-
"""Get workflows pending human review.
|
|
1953
|
-
|
|
1954
|
-
Lists all paused workflows that are awaiting human approval.
|
|
1955
|
-
Useful for CLI commands that list pending reviews.
|
|
1956
|
-
|
|
1957
|
-
Args:
|
|
1958
|
-
thread_id: Optional specific thread ID to check. If None, returns all pending.
|
|
1959
|
-
checkpointer: Type of checkpointer ('memory', 'postgres', or None).
|
|
1960
|
-
postgres_dsn: PostgreSQL connection string (required for postgres checkpointer).
|
|
1961
|
-
|
|
1962
|
-
Returns:
|
|
1963
|
-
List of pending review info dictionaries with keys:
|
|
1964
|
-
- thread_id: Workflow thread ID
|
|
1965
|
-
- repository: Repository name
|
|
1966
|
-
- step: Current step (should be "awaiting_human")
|
|
1967
|
-
- next_nodes: Next nodes in workflow
|
|
1968
|
-
- critical_count: Number of critical findings (from state)
|
|
1969
|
-
- review_instructions: CLI/API commands for approval/rejection
|
|
1970
|
-
|
|
1971
|
-
Note:
|
|
1972
|
-
For MemorySaver, this only checks the specified thread_id.
|
|
1973
|
-
For PostgresSaver with thread_id=None, this would return all pending reviews
|
|
1974
|
-
(implementation depends on PostgresSaver capabilities).
|
|
1975
|
-
"""
|
|
1976
|
-
graph = await build_audit_graph(checkpointer=checkpointer, postgres_dsn=postgres_dsn)
|
|
1977
|
-
try:
|
|
1978
|
-
if thread_id:
|
|
1979
|
-
config = {"configurable": {"thread_id": thread_id}}
|
|
1980
|
-
state = await graph.aget_state(config) # type: ignore[arg-type]
|
|
1981
|
-
|
|
1982
|
-
if state.next and state.values.get("step") in ("awaiting_human", "human_review"):
|
|
1983
|
-
critical_issues = _extract_critical_findings(state.values) # type: ignore[arg-type]
|
|
1984
|
-
return [
|
|
1985
|
-
{
|
|
1986
|
-
"thread_id": thread_id,
|
|
1987
|
-
"repository": state.values.get("repository"),
|
|
1988
|
-
"step": state.values.get("step"),
|
|
1989
|
-
"next_nodes": list(state.next) if state.next else [],
|
|
1990
|
-
"critical_count": len(critical_issues),
|
|
1991
|
-
"review_instructions": {
|
|
1992
|
-
"cli_approve": f"vds-audit workflow-resume --thread-id {thread_id} --approve",
|
|
1993
|
-
"cli_reject": f"vds-audit workflow-resume --thread-id {thread_id} --reject",
|
|
1994
|
-
"api_approve": f"resume_audit_with_human_input(thread_id='{thread_id}', human_approved=True)",
|
|
1995
|
-
"api_reject": f"resume_audit_with_human_input(thread_id='{thread_id}', human_approved=False)",
|
|
1996
|
-
},
|
|
1997
|
-
}
|
|
1998
|
-
]
|
|
1999
|
-
|
|
2000
|
-
return []
|
|
2001
|
-
finally:
|
|
2002
|
-
await _maybe_close_checkpointer(graph)
|