@ngocsangairvds/vsaf 3.2.13 → 3.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/vsaf.js +13 -0
- package/package.json +1 -1
- package/src/config.js +167 -0
- package/src/global.js +34 -51
- package/src/utils.js +44 -1
- package/tools/vds-scripts/Makefile +9 -31
- package/tools/vds-scripts/docker/docker-compose.cli.yml +1 -117
- package/tools/vds-scripts/docker/docker-compose.services.yml +1 -40
- package/tools/vds-scripts/docker/infrastructure/init-schemas.sql +0 -34
- package/tools/vds-scripts/docker/infrastructure/pgbouncer/pgbouncer.ini +2 -6
- package/tools/vds-scripts/pyproject.toml +1 -33
- package/tools/vds-scripts/uv.lock +80 -1651
- package/tools/vds-scripts/vds_cli/pyproject.toml +3 -0
- package/tools/vds-scripts/vds_cli/src/vds_cli/cli.py +1 -127
- package/tools/vds-scripts/vds_cli/src/vds_cli/commands/lint_cli.py +1 -20
- package/tools/vds-scripts/vds_cli/src/vds_cli/router.py +0 -100
- package/tools/vds-scripts/vds_cli/tests/conftest.py +0 -2
- package/tools/vds-scripts/vds_cli/tests/unit/test_cli.py +0 -25
- package/tools/vds-scripts/vds_cli/tests/unit/test_lint_cli.py +2 -2
- package/tools/vds-scripts/vds_cli/tests/unit/test_router.py +0 -2
- package/tools/vds-scripts/CLOSURE.md +0 -340
- package/tools/vds-scripts/ECOSYSTEM-CHANGELOG.md +0 -52
- package/tools/vds-scripts/ECOSYSTEM-DOCS.md +0 -602
- package/tools/vds-scripts/ECOSYSTEM_ALIGNMENT.md +0 -133
- package/tools/vds-scripts/ENV-HYGIENE-OPS-NOTE.md +0 -65
- package/tools/vds-scripts/INVESTIGATION-cloud-401.md +0 -103
- package/tools/vds-scripts/MEM0_2.0_API_REFERENCE.md +0 -238
- package/tools/vds-scripts/PACKAGE_P125B_IMPLEMENTATION_SUMMARY.md +0 -131
- package/tools/vds-scripts/PHASE-MERGE-SUMMARY.md +0 -121
- package/tools/vds-scripts/PHASES-3-ARCHIVE.md +0 -59
- package/tools/vds-scripts/PROJECT_COMPLETION_SUMMARY.md +0 -45
- package/tools/vds-scripts/SEARCH-CRASH-REPRO.md +0 -51
- package/tools/vds-scripts/analyze_hexagonal.py +0 -217
- package/tools/vds-scripts/analyze_profiles.py +0 -60
- package/tools/vds-scripts/audit-checklist.xlsx +0 -0
- package/tools/vds-scripts/audit_orchestrator/.audit_approvals/approvals_index.json +0 -1
- package/tools/vds-scripts/audit_orchestrator/.env.example +0 -85
- package/tools/vds-scripts/audit_orchestrator/.github/workflows/audit.yml +0 -47
- package/tools/vds-scripts/audit_orchestrator/Dockerfile +0 -92
- package/tools/vds-scripts/audit_orchestrator/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +0 -218
- package/tools/vds-scripts/audit_orchestrator/PHASE3_INTEGRATION_SUMMARY.md +0 -268
- package/tools/vds-scripts/audit_orchestrator/PHASE7-MERGE-SUMMARY.md +0 -174
- package/tools/vds-scripts/audit_orchestrator/README.md +0 -1573
- package/tools/vds-scripts/audit_orchestrator/TSK-168-IMPLEMENTATION-SUMMARY.md +0 -191
- package/tools/vds-scripts/audit_orchestrator/TSK-196-IMPLEMENTATION-SUMMARY.md +0 -201
- package/tools/vds-scripts/audit_orchestrator/alembic/env.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/alembic/script.py.mako +0 -28
- package/tools/vds-scripts/audit_orchestrator/alembic/versions/0001_initial_audit_state_schema.py +0 -1260
- package/tools/vds-scripts/audit_orchestrator/alembic.ini +0 -68
- package/tools/vds-scripts/audit_orchestrator/config/category-mapping.json +0 -81
- package/tools/vds-scripts/audit_orchestrator/config/profile-timeouts.yaml +0 -17
- package/tools/vds-scripts/audit_orchestrator/create_sample.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/data/corpus_accuracy_report.json +0 -17
- package/tools/vds-scripts/audit_orchestrator/data/exemplar_quality_report.json +0 -1606
- package/tools/vds-scripts/audit_orchestrator/data/instruction_plan_fixtures.json +0 -163
- package/tools/vds-scripts/audit_orchestrator/data/requirement_exemplars.json +0 -3443
- package/tools/vds-scripts/audit_orchestrator/data/requirement_scope_fixtures.json +0 -172
- package/tools/vds-scripts/audit_orchestrator/debug_rg.py +0 -46
- package/tools/vds-scripts/audit_orchestrator/demo_code_pack.py +0 -127
- package/tools/vds-scripts/audit_orchestrator/docs/AGENT_SDK_SELECTION_SPEC.md +0 -720
- package/tools/vds-scripts/audit_orchestrator/docs/API.md +0 -804
- package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_ANALYSIS_APPROACH.md +0 -1041
- package/tools/vds-scripts/audit_orchestrator/docs/CONTENT_SCORING_EVOLUTION_SPEC.md +0 -868
- package/tools/vds-scripts/audit_orchestrator/docs/DEPLOYMENT.md +0 -778
- package/tools/vds-scripts/audit_orchestrator/docs/LLM_AGENT_AUDIT_SPEC.md +0 -721
- package/tools/vds-scripts/audit_orchestrator/docs/LLM_CONTENT_ANALYSIS_SPEC.md +0 -1143
- package/tools/vds-scripts/audit_orchestrator/docs/LSP_SETUP_GUIDE.md +0 -221
- package/tools/vds-scripts/audit_orchestrator/docs/MULTI_REPO_AUDIT_SPEC.md +0 -951
- package/tools/vds-scripts/audit_orchestrator/docs/OLLAMA_EMBEDDINGS_SETUP.md +0 -119
- package/tools/vds-scripts/audit_orchestrator/docs/PHASE32_REAL_BENCHMARK_2026-02-08.md +0 -66
- package/tools/vds-scripts/audit_orchestrator/docs/PHASE_64_TO_92_HISTORICAL_SPEC.md +0 -1772
- package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-flow-trace.md +0 -201
- package/tools/vds-scripts/audit_orchestrator/docs/TSK-193-verification.md +0 -124
- package/tools/vds-scripts/audit_orchestrator/docs/phase152-hierarchical-query-surface.md +0 -46
- package/tools/vds-scripts/audit_orchestrator/examples/bitbucket_metadata_example.json +0 -50
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/README.md +0 -68
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase117_phase118_shared_state.sql +0 -64
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase154_published_pages.sql +0 -28
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_dispatch_tables.sql +0 -94
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_events.sql +0 -91
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_scope_snapshots.sql +0 -24
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase157_status_view.sql +0 -22
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/phase169_dispatch_observability.sql +0 -55
- package/tools/vds-scripts/audit_orchestrator/legacy/migrations/state_repair_hardening.sql +0 -24
- package/tools/vds-scripts/audit_orchestrator/pyproject.toml +0 -211
- package/tools/vds-scripts/audit_orchestrator/pyrightconfig.json +0 -51
- package/tools/vds-scripts/audit_orchestrator/pytest.ini +0 -37
- package/tools/vds-scripts/audit_orchestrator/reproduce_scanner.py +0 -40
- package/tools/vds-scripts/audit_orchestrator/scripts/README.md +0 -116
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_crawl_modes.py +0 -455
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_dspy.py +0 -513
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_nlp_accuracy.py +0 -138
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_retrieval_modes.py +0 -176
- package/tools/vds-scripts/audit_orchestrator/scripts/benchmark_upload_update_mode.py +0 -167
- package/tools/vds-scripts/audit_orchestrator/scripts/build_check.py +0 -76
- package/tools/vds-scripts/audit_orchestrator/scripts/check_live_progress.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/scripts/cli_integration_test.py +0 -400
- package/tools/vds-scripts/audit_orchestrator/scripts/index_workspace.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/scripts/inspect_route_conformance.py +0 -196
- package/tools/vds-scripts/audit_orchestrator/scripts/monitor_postgres.py +0 -145
- package/tools/vds-scripts/audit_orchestrator/scripts/optimize_audit.py +0 -462
- package/tools/vds-scripts/audit_orchestrator/scripts/verify.py +0 -673
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase111_requirement_analysis.py +0 -375
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase117_cross_repo_evidence.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase121_short_circuit.py +0 -680
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase122_instruction_handling.py +0 -478
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase125_skill_integration.py +0 -832
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_36.py +0 -394
- package/tools/vds-scripts/audit_orchestrator/scripts/verify_phase_37.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/_langchain_warnings.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/agentic_investigator.py +0 -4130
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/approval.py +0 -490
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_loop_hooks.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/audit_state.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/base.py +0 -4035
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_agent.py +0 -667
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_helpers.py +0 -236
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/code_analysis_prompts.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/docs_agent.py +0 -1234
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/langgraph_workflow.py +0 -2002
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/pydantic_base.py +0 -1227
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/requirement_analysis_agent.py +0 -593
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_agent.py +0 -1829
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/security_scanner.py +0 -686
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/skill_tools.py +0 -204
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/synthesis_agent.py +0 -1463
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_efficiency_guard.py +0 -609
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/tool_registry.py +0 -3822
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/__init__.py +0 -52
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/evidence_corpus.py +0 -385
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/filesystem.py +0 -1134
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/lsp.py +0 -458
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/mcp_toolset.py +0 -491
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/skills_toolset.py +0 -997
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/toolsets/vector_evidence.py +0 -842
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/usage_tracker.py +0 -682
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/agents/visualization.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/analyze_cmds.py +0 -892
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/__init__.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checklist_query/service.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/__init__.py +0 -20
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/base.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/__init__.py +0 -6
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/bitbucket/checks.py +0 -257
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/__init__.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/confluence/checks.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/__init__.py +0 -6
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/git/file_checks.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/__init__.py +0 -17
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/api_docs_check.py +0 -80
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/readme_check.py +0 -76
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/llm_checks/security_docs_check.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/registry.py +0 -402
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/__init__.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/checks/sonarqube/checks.py +0 -276
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli.py +0 -12
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_common.py +0 -128
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/cli_impl.py +0 -9826
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/bitbucket_cli_client.py +0 -187
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/confluence_cli_client.py +0 -977
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/clients/sonarqube_cli_client.py +0 -28
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/__init__.py +0 -21
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/base.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_downloader.py +0 -644
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/bitbucket_metadata.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/checklist_parser.py +0 -180
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/__init__.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/bitbucket_probe.py +0 -443
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/confluence_probe.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/freshness_evaluator.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/completeness/material_completeness_service.py +0 -1079
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/confluence_collector.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/diagram_extractor.py +0 -280
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/enrichment_extractor.py +0 -200
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/evidence_cache.py +0 -35
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/git_collector.py +0 -148
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/graphify_collector.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/image_extractor.py +0 -359
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/linked_page_tracker.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/markdown_converter.py +0 -344
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_cache.py +0 -1252
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/material_downloader.py +0 -1165
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/orchestrator.py +0 -168
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/registry_parser.py +0 -3063
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/requirements.py +0 -70
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/runner.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/collectors/sonarqube_collector.py +0 -113
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config.py +0 -1943
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/__init__.py +0 -23
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/discovery.py +0 -90
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/environment_resolver.py +0 -56
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/evidence.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/models.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/precedence.py +0 -10
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/config_resolution/redaction.py +0 -20
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/confluence_connectivity.py +0 -140
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/corpus_cmds.py +0 -278
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/__init__.py +0 -7
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/db/alembic_filters.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/docs/diataxis_validator.py +0 -687
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/doctor_cmds.py +0 -3295
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/__init__.py +0 -5
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/evaluation.py +0 -301
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/modules.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/runtime.py +0 -836
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/dspy_modules/signatures.py +0 -406
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/__init__.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/ad_hoc_analyzer.py +0 -399
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/aggregator.py +0 -220
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/auditor.py +0 -504
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_evidence_cache.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/batch_processor.py +0 -4776
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/calibration.py +0 -217
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_generator.py +0 -1201
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_projection.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checklist_scoping.py +0 -221
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/checkpoint.py +0 -159
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cl003_shared_lib_guard.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/companion_context_service.py +0 -445
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/confluence_checklist_contract.py +0 -7425
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/cross_check_rules.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/deterministic_evaluator.py +0 -237
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/drift_detector.py +0 -157
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/dspy_requirement_classifier.py +0 -640
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_assembler.py +0 -407
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_collector.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/evidence_diversity.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/gap_analyzer.py +0 -549
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/graduated.py +0 -185
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/grounding_validator.py +0 -287
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_analyzer.py +0 -882
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/instruction_compliance.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/llm_row_evaluator.py +0 -9270
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/loader.py +0 -1070
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/manual_check_config.py +0 -136
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/mapping.py +0 -269
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/multi_judge.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/phase120_checklist_update.py +0 -416
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/profile_scorer.py +0 -427
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_evidence_context.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_query_service.py +0 -155
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_knowledge_store.py +0 -383
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/project_topology.py +0 -1920
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/provider_failure_classifier.py +0 -778
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_cli_helpers.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_extractor.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/readiness_synthesizer.py +0 -730
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/regression_guard.py +0 -138
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/repo_type_classifier.py +0 -297
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_analysis.py +0 -1433
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/requirement_classification.py +0 -1725
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/result_merger.py +0 -814
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/route_matrix.py +0 -267
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator.py +0 -9437
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_runtime.py +0 -1270
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/row_evaluator_types.py +0 -2102
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/rubric.py +0 -592
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/scorer.py +0 -1239
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/section_packs.py +0 -645
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/skill_recommendation.py +0 -1183
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/stability_harness.py +0 -207
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/target_selector.py +0 -841
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/telemetry.py +0 -347
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/template_analyzer.py +0 -469
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/token_tracker.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/tool_first_planner.py +0 -7905
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/topology_query_service.py +0 -80
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/validator.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/engine/weight_policy.py +0 -464
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/errors.py +0 -430
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/extract_cmds.py +0 -4887
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/identity.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/__init__.py +0 -52
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/baseline.py +0 -378
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/change_analyzer.py +0 -407
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/delta_report.py +0 -189
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/incremental/diff_detector.py +0 -301
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/integrations/__init__.py +0 -3
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/__init__.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/audit_schemas.py +0 -459
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/codex_oauth.py +0 -340
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/cost_tracker.py +0 -288
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/engine.py +0 -751
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/evaluator.py +0 -245
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/__init__.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/api_docs_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/gap_analysis.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/instruction_templates.py +0 -634
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/readme_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/row_evaluation.py +0 -247
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/security_docs_evaluation.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts/template_analysis.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/prompts.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/llm/provider.py +0 -626
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/logging_config.py +0 -577
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/__init__.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/default_checklist_mapping.json +0 -18
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/mappings/vietnamese_checklist_mapping.json +0 -38
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/misc_cmds.py +0 -4689
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/__init__.py +0 -153
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/calibration.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/checklist.py +0 -921
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/completeness.py +0 -309
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enrichment.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/enums.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/evidence.py +0 -351
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/findings.py +0 -381
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/gaps.py +0 -299
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/graph.py +0 -42
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/multi_judge.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/readiness.py +0 -309
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/registry.py +0 -386
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/reporting.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/task.py +0 -549
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/models/template.py +0 -477
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/__init__.py +0 -31
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/observability/metrics.py +0 -404
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/parse_cmds.py +0 -608
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/pdf_cmds.py +0 -208
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/performance_gates.py +0 -224
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/phase151_projection.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/__init__.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/detection.py +0 -842
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/profiles/models.py +0 -474
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/__init__.py +0 -1
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_confluence_macros.py +0 -145
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_field_sanitizer.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_table_builder.py +0 -63
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/_vietnamese_templates.py +0 -103
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/bitbucket_link_resolver.py +0 -34
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/checklist_renderer.py +0 -483
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/confluence_publisher.py +0 -3048
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/hierarchy_publisher.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/live_data_injector.py +0 -152
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/macro_builder.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/markdown_converter.py +0 -154
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/priority_renderer.py +0 -133
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/project_aggregate_renderer.py +0 -423
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/readiness_renderer.py +0 -186
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_hierarchy_renderer.py +0 -382
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/publishers/system_doc_renderer.py +0 -683
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/report_cmds.py +0 -788
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/__init__.py +0 -13
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/aggregation_report.py +0 -86
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/checklist_generator.py +0 -425
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/excel_generator.py +0 -599
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/gap_report.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/json_generator.py +0 -188
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/markdown_generator.py +0 -595
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/__init__.py +0 -154
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/collector.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/department_builder.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/errors.py +0 -9
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/md_renderer.py +0 -386
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_models.py +0 -95
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/pdf_writer.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/pdf/repo_project_builders.py +0 -274
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/readiness_report.py +0 -447
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/reporting.py +0 -94
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/reports/sarif_generator.py +0 -519
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/runtime_profiles.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/__init__.py +0 -29
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/seed/seed_loader.py +0 -561
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/__init__.py +0 -5
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/skills/skill_routing.py +0 -312
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/base.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/bitbucket.py +0 -129
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/git_url.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/github.py +0 -75
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sources/local.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/spec_sync_validator.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/__init__.py +0 -6285
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/readiness_helpers.py +0 -74
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/skill_readiness.py +0 -487
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state/store.py +0 -12927
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/state_cmds.py +0 -1868
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync/repo_sync.py +0 -409
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/sync_cmds.py +0 -1247
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/__init__.py +0 -3
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/utils/debug_bundle.py +0 -214
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/validators/checklist_validator.py +0 -342
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflow_cmds.py +0 -19147
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/__init__.py +0 -9
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/_test_audit_daily_batch.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_daily_batch.py +0 -308
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_deep_monthly.py +0 -193
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_drift_scan.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/src/vds_audit_orchestrator/workflows/audit_security_daily.py +0 -183
- package/tools/vds-scripts/audit_orchestrator/templates/sample_audit_template.xlsx +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/_helpers.py +0 -32
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_bitbucket_probe.py +0 -403
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/completeness/test_confluence_probe.py +0 -423
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_bitbucket_downloader.py +0 -289
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_image_extractor.py +0 -260
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_markdown_converter.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_cache.py +0 -197
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_material_downloader.py +0 -550
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser.py +0 -3514
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_department_entry.py +0 -214
- package/tools/vds-scripts/audit_orchestrator/tests/collectors/test_registry_parser_flow.py +0 -200
- package/tools/vds-scripts/audit_orchestrator/tests/conftest.py +0 -988
- package/tools/vds-scripts/audit_orchestrator/tests/engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_calibration.py +0 -48
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_confluence_checklist_phase22_helpers.py +0 -6065
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_multi_judge.py +0 -62
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_stability_harness.py +0 -61
- package/tools/vds-scripts/audit_orchestrator/tests/engine/test_structured_metadata.py +0 -419
- package/tools/vds-scripts/audit_orchestrator/tests/factories/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/factories/models.py +0 -534
- package/tools/vds-scripts/audit_orchestrator/tests/factories/templates.py +0 -241
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/compressed.drawio +0 -2
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/mockup.bmpr +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/diagrams/simple.drawio +0 -26
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_cli.json +0 -26
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/branch_permissions_direct.json +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_cli.json +0 -14
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/bitbucket/repo_conditions_direct.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_cli.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/page_direct.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_cli.json +0 -11
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/confluence/search_direct.json +0 -7
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_cli.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/golden/sonarqube/quality_gate_direct.json +0 -12
- package/tools/vds-scripts/audit_orchestrator/tests/fixtures/requirement_strategy_phase115.json +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/integration/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/conftest.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/expected_outcomes.md +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/auth.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/config.py +0 -16
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/db.py +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/main.py +0 -18
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/__init__.py +0 -1
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_audit_repo/src/utils.py +0 -22
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_checklist_template.json +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/code_evidence_pack.json +0 -40
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/manifest.json +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/brd.md +0 -19
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/design.md +0 -32
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/security.md +0 -23
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/srs.md +0 -25
- package/tools/vds-scripts/audit_orchestrator/tests/integration/fixtures/mock_evidence/projects/mock-audit-project/test.md +0 -30
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_checkpoint_merge.py +0 -1371
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_decoupling_route_p149.py +0 -176
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_gap_analyzer_batch_p149.py +0 -151
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_hybrid_search.py +0 -799
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_mcp_integration.py +0 -741
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_merge_ranking_p149.py +0 -98
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_modality_mismatch_p149.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase117_118_storage.py +0 -350
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase121_short_circuit.py +0 -732
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase18_workflow.py +0 -223
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase48_e2e_verification.py +0 -763
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_phase81_doc_anchor_regression.py +0 -252
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_provider_failure_finding_p149.py +0 -339
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_readiness_e2e.py +0 -430
- package/tools/vds-scripts/audit_orchestrator/tests/integration/test_refined_workflow.py +0 -1180
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/department_renderer.md +0 -24
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/project_renderer.md +0 -8
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/snapshots/repo_renderer.md +0 -10
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_department_pdf.py +0 -112
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_e2e_pdf.py +0 -135
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_idempotency.py +0 -45
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_md_renderer.py +0 -46
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_cmds.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_snapshot.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_pdf_writer.py +0 -65
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_project_builder.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_public_api.py +0 -135
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_repo_builder.py +0 -246
- package/tools/vds-scripts/audit_orchestrator/tests/pdf/test_workflow_pdf_flags.py +0 -36
- package/tools/vds-scripts/audit_orchestrator/tests/property/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/property/test_properties.py +0 -807
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agent_error_compat.py +0 -38
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_agentic_skill_policy_skip.py +0 -234
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_event_stream_logging.py +0 -785
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_timeout_policy.py +0 -277
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_base_trace_payload_sanitization.py +0 -92
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent.py +0 -2311
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_agent_re_exports.py +0 -25
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_code_analysis_helpers.py +0 -94
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_create_audit_agent_reasoning_effort.py +0 -69
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_docs_agent.py +0 -2044
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_langgraph_workflow_efficiency_metrics.py +0 -71
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_output_validators.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_phase41_toolsets.py +0 -6427
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_ai_models.py +0 -1219
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_pydantic_base_url_resolution.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_security_agent.py +0 -2069
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_skill_manager_focus.py +0 -439
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_synthesis_agent.py +0 -1195
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_tool_efficiency_guard_fr120.py +0 -683
- package/tools/vds-scripts/audit_orchestrator/tests/test_agents/test_toolsets.py +0 -716
- package/tools/vds-scripts/audit_orchestrator/tests/test_aggregator_p149.py +0 -171
- package/tools/vds-scripts/audit_orchestrator/tests/test_alembic_migrations.py +0 -287
- package/tools/vds-scripts/audit_orchestrator/tests/test_anchor_allowlist_p149.py +0 -273
- package/tools/vds-scripts/audit_orchestrator/tests/test_audit_otel.py +0 -283
- package/tools/vds-scripts/audit_orchestrator/tests/test_checklist_models.py +0 -583
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_base_check.py +0 -211
- package/tools/vds-scripts/audit_orchestrator/tests/test_checks/test_llm_checks.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_analyze_command.py +0 -400
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_archive_stale_page_cli.py +0 -217
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_bitbucket_metadata_cli.py +0 -354
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_cli_impl_profile_availability.py +0 -114
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_codex_profile.py +0 -174
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_compare_backends_cli.py +0 -449
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_confluence_parent_auto_resolve.py +0 -451
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_corpus_purge_cli.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_credentials_preflight.py +0 -106
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_debug_bundle.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_deprecation_phase157.py +0 -484
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_dispatch_concurrency_diagnostics.py +0 -758
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_check_confluence_cli.py +0 -320
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_codex.py +0 -187
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_corpus_status_cli.py +0 -236
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_correlation_cli.py +0 -128
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_crawl_status_cli.py +0 -192
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_credentials_cli.py +0 -86
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_dispatch_status_cli.py +0 -421
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_heartbeat_phase169.py +0 -173
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_hierarchy_status_cli.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_locks_cli.py +0 -134
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_logs_follow_cli.py +0 -305
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_migration.py +0 -333
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_profile_availability_cli.py +0 -151
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_doctor_skills_policy_cli.py +0 -153
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_evidence_quality_cli.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_debug_bundle_phase36.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_export_git_manifest_cli.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_file_removal_phase157e.py +0 -770
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_grounding_classifier.py +0 -226
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_logging.py +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_materials_cli.py +0 -9127
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_metadata_completeness_phase92.py +0 -364
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parent_dispatch_finalization_phase168f.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_parse_cli.py +0 -590
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase117_118_feature_flags.py +0 -219
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase164_control_plane.py +0 -718
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_phase165_runner_scripts.py +0 -230
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_preparation_classifications.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_prepare_cli.py +0 -398
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publication_quality_gate.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_publish_system_doc_cli.py +0 -158
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_query_checklist_cli.py +0 -219
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli.py +0 -673
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_readiness_cli_integration.py +0 -689
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_removed_flags_phase92.py +0 -36
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_report_cmds.py +0 -1317
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_history_index.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_run_management.py +0 -1194
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_runtime_profiles_cli.py +0 -1658
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_smart_run_selection.py +0 -1562
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_cli.py +0 -2467
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_state_migration.py +0 -339
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_sync_repos_debug_artifacts.py +0 -1109
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_upload_results_cli.py +0 -809
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_checklist_cli.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_validate_spec_sync_cli.py +0 -519
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_default_parameters_baseline.py +0 -101
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_options.py +0 -7896
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_db_modes.py +0 -6516
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_project_scope.py +0 -831
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_project_target.py +0 -611
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_lifecycle.py +0 -2488
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_projects_phase131_scaffolding.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_row_key_guard.py +0 -78
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli/test_workflow_summary_artifacts.py +0 -1872
- package/tools/vds-scripts/audit_orchestrator/tests/test_cli_paths_phase2.py +0 -45
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_bitbucket_cli_client.py +0 -124
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_cli_parity.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_confluence_cli_client.py +0 -1149
- package/tools/vds-scripts/audit_orchestrator/tests/test_clients/test_sonarqube_cli_client.py +0 -19
- package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_collectors/test_linked_page_tracker.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/test_companion_context_service.py +0 -230
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/conftest.py +0 -11
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_compile_artifact.py +0 -465
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_cross_provider_critique_e2e.py +0 -75
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_evaluation.py +0 -515
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_runtime_loader.py +0 -537
- package/tools/vds-scripts/audit_orchestrator/tests/test_dspy_modules/test_signatures_normalization.py +0 -172
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_auditor_applicability.py +0 -68
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_generator.py +0 -1252
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_checklist_projection.py +0 -54
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_confluence_checklist_projection_consistency.py +0 -1696
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_critique_merger_matrix.py +0 -120
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_check_rules.py +0 -459
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_cross_provider_critique.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_doc_loader.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_drift_detector.py +0 -34
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_evidence_collectors.py +0 -93
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_lease_timeout.py +0 -114
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader.py +0 -350
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_loader_parity.py +0 -179
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_low_confidence_reeval.py +0 -691
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase145a_completion.py +0 -209
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_phase31_row_consistency_retry_benchmark.py +0 -150
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_profile_detector.py +0 -286
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_regression_guard.py +0 -53
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_result_merger.py +0 -619
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_evaluator.py +0 -15783
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_row_failover.py +0 -215
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_scorer.py +0 -597
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_skill_breakdown_telemetry_fr137.py +0 -421
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_targeted_auto_merge.py +0 -229
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_failover.py +0 -488
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_timeout_telemetry.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_engine/test_validator.py +0 -419
- package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_incremental/test_diff_detector.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/test_infra_persistence.py +0 -291
- package/tools/vds-scripts/audit_orchestrator/tests/test_integration/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_integration/test_phase3_integration.py +0 -516
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cache.py +0 -670
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_model_builder.py +0 -281
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_oauth.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_codex_streaming.py +0 -433
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_cost_tracker.py +0 -27
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_engine.py +0 -876
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_evaluator.py +0 -212
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_instruction_templates.py +0 -639
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompt_metadata.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_prompts.py +0 -660
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider.py +0 -330
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_provider_contract_sync.py +0 -18
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_reasoning_effort_validation.py +0 -565
- package/tools/vds-scripts/audit_orchestrator/tests/test_llm/test_schemas.py +0 -827
- package/tools/vds-scripts/audit_orchestrator/tests/test_logging_config.py +0 -297
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_enums.py +0 -185
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_findings.py +0 -1159
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_project_profile.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_registry.py +0 -532
- package/tools/vds-scripts/audit_orchestrator/tests/test_models/test_template.py +0 -708
- package/tools/vds-scripts/audit_orchestrator/tests/test_observability/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_observability/test_metrics.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/test_paths_config_phase2.py +0 -21
- package/tools/vds-scripts/audit_orchestrator/tests/test_performance/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_performance/test_fr79_performance_guardrails.py +0 -199
- package/tools/vds-scripts/audit_orchestrator/tests/test_phase156_hardening.py +0 -498
- package/tools/vds-scripts/audit_orchestrator/tests/test_phase93_regression_guards.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/test_pipeline_integration.py +0 -517
- package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_profiles/test_detection.py +0 -146
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_bitbucket_link_resolver.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer.py +0 -84
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_checklist_renderer_projection.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_macros.py +0 -58
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_confluence_publisher.py +0 -2171
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_evidence_links.py +0 -129
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_field_sanitizer.py +0 -108
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_hierarchy_publisher.py +0 -134
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_incremental_plan_parser.py +0 -62
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_live_data_injector.py +0 -48
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_macro_builder.py +0 -22
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_p161_confluence_optimization.py +0 -168
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_priority_renderer.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_project_aggregate_renderer.py +0 -364
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_storage_validation.py +0 -273
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_summary_refactor.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_system_doc_hierarchy.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_table_builder.py +0 -23
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_vietnamese_templates.py +0 -37
- package/tools/vds-scripts/audit_orchestrator/tests/test_publishers/test_wiring_integration.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_aggregation_report.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_checklist_generator.py +0 -258
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_gap_report.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/test_reports/test_json_generator.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/test_result_merger_p149.py +0 -347
- package/tools/vds-scripts/audit_orchestrator/tests/test_route_mode_p149.py +0 -178
- package/tools/vds-scripts/audit_orchestrator/tests/test_rubric_parser.py +0 -179
- package/tools/vds-scripts/audit_orchestrator/tests/test_scorer.py +0 -110
- package/tools/vds-scripts/audit_orchestrator/tests/test_state/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_state/test_sparse_coverage.py +0 -117
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_langgraph_workflow.py +0 -2072
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow/test_p161_runtime_hardening.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p149.py +0 -112
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_cmds_p172.py +0 -126
- package/tools/vds-scripts/audit_orchestrator/tests/test_workflow_guidance_p150.py +0 -95
- package/tools/vds-scripts/audit_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_agentic_investigator_phase115.py +0 -42
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_requirement_analysis_agent.py +0 -412
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_agent_updates.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_security_scanner.py +0 -397
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_executor.py +0 -316
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_fallback.py +0 -299
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_policy.py +0 -520
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_skill_telemetry.py +0 -306
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_synthesis_fixes.py +0 -761
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_argument_robustness.py +0 -272
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry.py +0 -2548
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_ast_grep.py +0 -87
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase123_scoping.py +0 -353
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_phase94_ff.py +0 -445
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_tool_registry_vector_search_phase115.py +0 -35
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_utils.py +0 -1007
- package/tools/vds-scripts/audit_orchestrator/tests/unit/agents/test_vector_evidence_toolset.py +0 -622
- package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/cli/test_workflow_cli.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_cache_guard.py +0 -479
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_checklist_parser_phase120.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_diagram_extractor.py +0 -467
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_enrichment_extractor.py +0 -59
- package/tools/vds-scripts/audit_orchestrator/tests/unit/collectors/test_graphify_collector.py +0 -158
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_completeness.py +0 -563
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_freshness_evaluator.py +0 -493
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_cache_metrics.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/tests/unit/completeness/test_material_completeness_service.py +0 -2736
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_discovery.py +0 -47
- package/tools/vds-scripts/audit_orchestrator/tests/unit/config_resolution/test_redaction.py +0 -15
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_ad_hoc_analyzer.py +0 -576
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_agent_loop.py +0 -1896
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_anchor_filter_cl003.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_evidence_cache.py +0 -155
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_batch_processor.py +0 -3608
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_contract.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_checklist_scoping.py +0 -371
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_companion_phase123.py +0 -142
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_config_evidence_phase123.py +0 -249
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_confluence_checklist_contract_export_parity.py +0 -813
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_cross_repo_config_phase122.py +0 -613
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_dspy_requirement_classifier.py +0 -517
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_diversity.py +0 -144
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_evidence_truncation.py +0 -108
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_grounding_validator.py +0 -127
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_guidance_injection_phase120.py +0 -105
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_analysis_phase122.py +0 -761
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_instruction_pre_filter_phase167.py +0 -334
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_llm_row_evaluator_retries.py +0 -3684
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_loader_phase123.py +0 -345
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_manual_check_gating_phase122.py +0 -474
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_parallel_eval.py +0 -263
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase122_verifier_phase122.py +0 -169
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_phase166_route_failover.py +0 -437
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_post_eval_cl003_shared_lib.py +0 -267
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_postproc_streaming.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_pre_eval_gating_phase122.py +0 -362
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_prepare_topology_coverage.py +0 -247
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_private_dns_sanitization_phase104.py +0 -397
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_evidence_context.py +0 -450
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_knowledge_store.py +0 -487
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_project_topology.py +0 -1142
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_provider_failure_classifier.py +0 -195
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_extractor.py +0 -496
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_readiness_synthesizer.py +0 -653
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_repo_type_classifier.py +0 -303
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis.py +0 -508
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_execution_scope.py +0 -239
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase114.py +0 -919
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_phase115.py +0 -97
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_analysis_shared_lib.py +0 -340
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_drift.py +0 -729
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_classification_nlp.py +0 -670
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_requirement_scope_phase122.py +0 -615
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_matrix.py +0 -258
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_route_override.py +0 -141
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_routing_precision.py +0 -650
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_dual_evidence.py +0 -2987
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_instruction_runtime_phase122.py +0 -365
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_row_evaluator_runtime.py +0 -830
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_runtime_hardening_phase122.py +0 -225
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoped_na_skip.py +0 -107
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_scoring_enhancements.py +0 -404
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_retrieval_phase123.py +0 -441
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_library_routing_phase123.py +0 -279
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_shared_resource_indexing_phase122.py +0 -188
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_recommendation.py +0 -225
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skill_routing_cl003_shared_lib.py +0 -338
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_skills_toolset.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_stability_metric.py +0 -60
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_target_selector.py +0 -958
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_tracker.py +0 -121
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_token_wiring.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_tool_first_planner.py +0 -7103
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_knowledge_persistence.py +0 -332
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_topology_query_service.py +0 -55
- package/tools/vds-scripts/audit_orchestrator/tests/unit/engine/test_unverified_ref_retry.py +0 -909
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_evidence.py +0 -515
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_gaps.py +0 -422
- package/tools/vds-scripts/audit_orchestrator/tests/unit/models/test_readiness.py +0 -428
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_confluence_hierarchy.py +0 -227
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_project_title_generation.py +0 -335
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_helpers.py +0 -290
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_publisher_registry_integration.py +0 -557
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_readiness_renderer.py +0 -381
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_repo_title_consistency.py +0 -266
- package/tools/vds-scripts/audit_orchestrator/tests/unit/publishers/test_upload_hierarchy_integration.py +0 -470
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_dspy.py +0 -177
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_nlp_accuracy.py +0 -72
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_benchmark_retrieval_modes.py +0 -123
- package/tools/vds-scripts/audit_orchestrator/tests/unit/scripts/test_verify_phase111_requirement_analysis.py +0 -409
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_chain_cli.py +0 -277
- package/tools/vds-scripts/audit_orchestrator/tests/unit/seed/test_seed_loader.py +0 -502
- package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/skills/test_skill_routing.py +0 -209
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_bitbucket_source.py +0 -66
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_non_retryable_markers.py +0 -88
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sources/test_repo_info.py +0 -212
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_completeness.py +0 -598
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_events_contract_phase169.py +0 -100
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_hardening_phase158.py +0 -392
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_dispatch_persistence_phase157.py +0 -914
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_embedding_client.py +0 -64
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_get_latest_completed_run.py +0 -313
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_heartbeat_phase169.py +0 -109
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_hybrid_search.py +0 -398
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_normalize_url.py +0 -262
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase152_query_surface.py +0 -59
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_phase98_confluence_document_model.py +0 -202
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_published_pages.py +0 -754
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_readiness_helpers.py +0 -193
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_ledger.py +0 -522
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_run_management.py +0 -378
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_schema_contract_phase170.py +0 -755
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_cmds.py +0 -231
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_loaders.py +0 -2151
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_state_run_api.py +0 -2226
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store.py +0 -1435
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch.py +0 -646
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_dispatch_status_view.py +0 -181
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_store_scope.py +0 -213
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_utilization_persist_phase169.py +0 -77
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vds_search.py +0 -263
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_api.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_runtime.py +0 -175
- package/tools/vds-scripts/audit_orchestrator/tests/unit/state/test_vector_index_store.py +0 -1756
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/__init__.py +0 -0
- package/tools/vds-scripts/audit_orchestrator/tests/unit/sync/test_repo_sync.py +0 -257
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_artifact_exclusion.py +0 -119
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_auto_promote_phase158.py +0 -337
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_carry_forward_artifact_filtering.py +0 -317
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_checklist_precache_p160a.py +0 -416
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_cli_decomposition_fr219.py +0 -269
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_code_chunk_carry_forward.py +0 -203
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_coherence.py +0 -180
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_config_secret_policy.py +0 -522
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_project_id_migration.py +0 -318
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_corpus_status_diagnostics.py +0 -239
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_department_priority_ordering.py +0 -131
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_coordinator_phase158.py +0 -402
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_job_identity_p167a.py +0 -238
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatch_ramp_up_phase171.py +0 -434
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_dispatcher.py +0 -911
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_doc_type_en_inference.py +0 -246
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_early_exit_unchunked_repos.py +0 -111
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors.py +0 -237
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_errors_taxonomy.py +0 -83
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_chunking_config_phase98.py +0 -73
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_cmds_state_helpers.py +0 -33
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_extract_docs_code_chunking.py +0 -260
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_finalize_dispatch_run_phase168.py +0 -341
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_identity.py +0 -221
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_infrastructure_detection.py +0 -441
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_junction_table_phase95.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_late_binding_assignment_p167c.py +0 -286
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_misc_cmds_fr224_225_hardening.py +0 -194
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_p172_integration.py +0 -306
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_parent_provider_preflight.py +0 -118
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase92.py +0 -141
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_performance_gates_phase93.py +0 -50
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase115_search_strategy.py +0 -106
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase154_title_consistency.py +0 -117
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase155_param_forwarding.py +0 -304
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase158_concurrency_defaults.py +0 -207
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_doctor_schema.py +0 -319
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase170_regression.py +0 -334
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase94_corpus_lifecycle.py +0 -307
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_phase96_repo_key_migration.py +0 -305
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_pipelined_scheduling.py +0 -130
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_availability_probe.py +0 -616
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_aware_row_timeout.py +0 -102
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_profile_timeout_stagger_p160cd.py +0 -205
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_progress_summary_phase169.py +0 -96
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_registry_checklist_diagnostics.py +0 -124
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_resume_manifest_p167b.py +0 -268
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_risk_mitigations_p160e1.py +0 -348
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_single_row_shards_p160b.py +0 -357
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_state_repo_discovery.py +0 -504
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_sync_metadata_entries.py +0 -57
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_task_models.py +0 -1796
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_utilization_telemetry_p167e.py +0 -259
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_vietnamese_fts_hardening.py +0 -160
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_phase98_enrichment.py +0 -92
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_project_merge_materialization.py +0 -322
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_row_key_migration_guard.py +0 -88
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_short_circuit_phase121.py +0 -564
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_workflow_single_target_row_context.py +0 -49
- package/tools/vds-scripts/audit_orchestrator/tests/unit/test_zero_result_messaging.py +0 -76
- package/tools/vds-scripts/bandit-report.json +0 -2974
- package/tools/vds-scripts/brd_orchestrator/README.md +0 -29
- package/tools/vds-scripts/brd_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/cli.py +0 -187
- package/tools/vds-scripts/brd_orchestrator/src/vds_brd_orchestrator/validator.py +0 -121
- package/tools/vds-scripts/brd_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/brd_orchestrator/tests/test_cli.py +0 -62
- package/tools/vds-scripts/brd_orchestrator/tests/test_validator.py +0 -33
- package/tools/vds-scripts/circular_dependency_orchestrator/README.md +0 -30
- package/tools/vds-scripts/circular_dependency_orchestrator/pyproject.toml +0 -43
- package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/__init__.py +0 -16
- package/tools/vds-scripts/circular_dependency_orchestrator/src/vds_circular_dependency_orchestrator/cli.py +0 -904
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/circular_dependency_orchestrator/tests/unit/test_cli.py +0 -354
- package/tools/vds-scripts/coverage.json +0 -1
- package/tools/vds-scripts/create_pr.py +0 -57
- package/tools/vds-scripts/diagram_generator/README.md +0 -663
- package/tools/vds-scripts/diagram_generator/ci_validate.sh +0 -16
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-component.puml +0 -23
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-sequence.puml +0 -21
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.png +0 -0
- package/tools/vds-scripts/diagram_generator/docs-nttc/projects/INSURANCE/analysis/current-state/insurance-claim-business/insurance-claim-business-usecase.puml +0 -14
- package/tools/vds-scripts/diagram_generator/examples/github-actions-validate.yml +0 -39
- package/tools/vds-scripts/diagram_generator/generate_all_diagrams.py +0 -827
- package/tools/vds-scripts/diagram_generator/generate_insurance_c4_diagrams.py +0 -261
- package/tools/vds-scripts/diagram_generator/generate_insurance_c4_quick.py +0 -486
- package/tools/vds-scripts/diagram_generator/pyproject.toml +0 -28
- package/tools/vds-scripts/diagram_generator/render_png.py +0 -59
- package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/__init__.py +0 -3
- package/tools/vds-scripts/diagram_generator/src/vds_diagram_generator/cli.py +0 -50
- package/tools/vds-scripts/diagram_generator/test_c4_hierarchical.py +0 -142
- package/tools/vds-scripts/diagram_generator/test_c4_quick.py +0 -131
- package/tools/vds-scripts/diagram_generator/tests/__init__.py +0 -0
- package/tools/vds-scripts/diagram_generator/tests/test_analyzer_completeness.py +0 -260
- package/tools/vds-scripts/diagram_generator/tests/test_c4_syntax_correctness.py +0 -138
- package/tools/vds-scripts/diagram_generator/tests/test_component_coverage.py +0 -182
- package/tools/vds-scripts/diagram_generator/tests/test_mermaid_output.py +0 -80
- package/tools/vds-scripts/diagram_generator/tests/test_png_generation.py +0 -112
- package/tools/vds-scripts/diagram_generator/tests/test_scenario_templates.py +0 -15
- package/tools/vds-scripts/diagram_generator/tests/test_sequence_accuracy.py +0 -93
- package/tools/vds-scripts/diagram_generator/tests/test_structurizr_export.py +0 -177
- package/tools/vds-scripts/diagram_generator/tests/test_style_consistency.py +0 -174
- package/tools/vds-scripts/diagram_generator/tests/test_usecase_generator.py +0 -201
- package/tools/vds-scripts/diagram_generator/tests/test_usecase_integration.py +0 -124
- package/tools/vds-scripts/docker/compose.phase2-verification.yml +0 -31
- package/tools/vds-scripts/docker-compose.openapi-validator.yml +0 -14
- package/tools/vds-scripts/excel_orchestrator/README.md +0 -288
- package/tools/vds-scripts/excel_orchestrator/RESEARCH_BASED_UPDATES_REPORT.md +0 -261
- package/tools/vds-scripts/excel_orchestrator/add_essential_missing_effort.py +0 -255
- package/tools/vds-scripts/excel_orchestrator/adjust_effort_complexity.py +0 -184
- package/tools/vds-scripts/excel_orchestrator/brd_analysis_and_task_breakdown.py +0 -632
- package/tools/vds-scripts/excel_orchestrator/brd_analysis_comprehensive.py +0 -1029
- package/tools/vds-scripts/excel_orchestrator/check_overlaps_and_brd_coverage.py +0 -570
- package/tools/vds-scripts/excel_orchestrator/clean_remarks_column.py +0 -127
- package/tools/vds-scripts/excel_orchestrator/comprehensive_brd_check.py +0 -322
- package/tools/vds-scripts/excel_orchestrator/create_buffered_summary.py +0 -119
- package/tools/vds-scripts/excel_orchestrator/create_service_totals_sheet.py +0 -118
- package/tools/vds-scripts/excel_orchestrator/examples/basic_operations.py +0 -85
- package/tools/vds-scripts/excel_orchestrator/expand_all_tasks.py +0 -341
- package/tools/vds-scripts/excel_orchestrator/expand_tasks.py +0 -304
- package/tools/vds-scripts/excel_orchestrator/fill_brd_references.py +0 -347
- package/tools/vds-scripts/excel_orchestrator/fill_remarks_and_colors.py +0 -132
- package/tools/vds-scripts/excel_orchestrator/finalize_brd_and_cleanup.py +0 -295
- package/tools/vds-scripts/excel_orchestrator/finalize_brd_coverage.py +0 -327
- package/tools/vds-scripts/excel_orchestrator/fix_all_formulas.py +0 -99
- package/tools/vds-scripts/excel_orchestrator/fix_detail_presentation.py +0 -113
- package/tools/vds-scripts/excel_orchestrator/fix_presentation_and_effort.py +0 -116
- package/tools/vds-scripts/excel_orchestrator/fix_presentation_consistency.py +0 -231
- package/tools/vds-scripts/excel_orchestrator/fix_remarks_matching.py +0 -179
- package/tools/vds-scripts/excel_orchestrator/group_tasks_by_service_id.py +0 -210
- package/tools/vds-scripts/excel_orchestrator/increase_brd_coverage.py +0 -497
- package/tools/vds-scripts/excel_orchestrator/increase_effort_complexity.py +0 -155
- package/tools/vds-scripts/excel_orchestrator/organize_and_deduplicate.py +0 -273
- package/tools/vds-scripts/excel_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/excel_orchestrator/rebuild_all_formulas.py +0 -146
- package/tools/vds-scripts/excel_orchestrator/remove_base_multiplier_and_check_duplicates.py +0 -310
- package/tools/vds-scripts/excel_orchestrator/remove_duplicate_brd_tasks.py +0 -137
- package/tools/vds-scripts/excel_orchestrator/research_based_updates.py +0 -457
- package/tools/vds-scripts/excel_orchestrator/restore_e_values.py +0 -172
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/cli.py +0 -746
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/config.py +0 -74
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/converters.py +0 -226
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/errors.py +0 -88
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/excel_client.py +0 -443
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/formatters.py +0 -211
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/logging.py +0 -57
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/source_contract.py +0 -29
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/target_state_status.py +0 -837
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/ulnc_alignment.py +0 -1291
- package/tools/vds-scripts/excel_orchestrator/src/vds_excel_orchestrator/validators.py +0 -164
- package/tools/vds-scripts/excel_orchestrator/sync_detail_and_total_sheets.py +0 -211
- package/tools/vds-scripts/excel_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/excel_orchestrator/tests/conftest.py +0 -36
- package/tools/vds-scripts/excel_orchestrator/tests/test_cli.py +0 -383
- package/tools/vds-scripts/excel_orchestrator/tests/test_excel_client.py +0 -129
- package/tools/vds-scripts/excel_orchestrator/tests/test_ulnc_alignment.py +0 -373
- package/tools/vds-scripts/excel_orchestrator/tests/test_validators.py +0 -64
- package/tools/vds-scripts/excel_orchestrator/update_api_database_effort.py +0 -261
- package/tools/vds-scripts/excel_orchestrator/update_buffers_inline.py +0 -115
- package/tools/vds-scripts/excel_orchestrator/update_complex_services_and_add_new.py +0 -336
- package/tools/vds-scripts/excel_orchestrator/update_responsibility_and_fix_rows.py +0 -208
- package/tools/vds-scripts/excel_orchestrator/update_task_breakdown_vietnamese.py +0 -309
- package/tools/vds-scripts/excel_orchestrator/update_vietnamese_and_responsibility.py +0 -415
- package/tools/vds-scripts/excel_orchestrator/verify_brd_coverage_comprehensive.py +0 -401
- package/tools/vds-scripts/hexagonal_orchestrator/README.md +0 -530
- package/tools/vds-scripts/hexagonal_orchestrator/pyproject.toml +0 -48
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/__init__.py +0 -39
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/__init__.py +0 -19
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/base.py +0 -95
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/fallback.py +0 -614
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/java.py +0 -372
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/analyzers/python.py +0 -437
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cache.py +0 -331
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/classifier.py +0 -263
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/cli.py +0 -554
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/config.py +0 -577
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/models.py +0 -159
- package/tools/vds-scripts/hexagonal_orchestrator/src/vds_hexagonal_orchestrator/profiler.py +0 -451
- package/tools/vds-scripts/hexagonal_orchestrator/test-config.yaml +0 -38
- package/tools/vds-scripts/hexagonal_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driven/persistence/InMemoryUserRepository.java +0 -62
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/adapter/driving/api/UserController.java +0 -101
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/EmailService.java +0 -33
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/port/UserRepository.java +0 -45
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/application/usecase/CreateUser.java +0 -58
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/Email.java +0 -80
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-compliant/domain/entity/User.java +0 -98
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-noncompliant/domain/User.java +0 -64
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Menu.java +0 -13
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/java-with-frameworks/domain/Product.java +0 -16
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/email_service.py +0 -60
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/application/ports/user_repository.py +0 -78
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/entities/user.py +0 -56
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/__init__.py +0 -1
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-compliant/domain/value_objects/email.py +0 -63
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/application/user_service.py +0 -1837
- package/tools/vds-scripts/hexagonal_orchestrator/tests/fixtures/python-noncompliant/domain/user.py +0 -43
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cache.py +0 -458
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_integration.py +0 -942
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cli_unit.py +0 -557
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_cross_repo_pollution.py +0 -275
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_foundation.py +0 -129
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_integration.py +0 -1524
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_java_analyzer.py +0 -642
- package/tools/vds-scripts/hexagonal_orchestrator/tests/test_timing_unit.py +0 -60
- package/tools/vds-scripts/intellij_orchestrator/README.md +0 -55
- package/tools/vds-scripts/intellij_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/__init__.py +0 -17
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/cli.py +0 -210
- package/tools/vds-scripts/intellij_orchestrator/src/vds_intellij_orchestrator/core.py +0 -260
- package/tools/vds-scripts/intellij_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/intellij_orchestrator/tests/test_cli.py +0 -112
- package/tools/vds-scripts/intellij_orchestrator/tests/test_core.py +0 -83
- package/tools/vds-scripts/links_orchestrator/README.md +0 -63
- package/tools/vds-scripts/links_orchestrator/pyproject.toml +0 -64
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/__init__.py +0 -10
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/cli.py +0 -254
- package/tools/vds-scripts/links_orchestrator/src/vds_links_orchestrator/validator.py +0 -244
- package/tools/vds-scripts/links_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/links_orchestrator/tests/test_cli.py +0 -128
- package/tools/vds-scripts/links_orchestrator/tests/test_validator.py +0 -76
- package/tools/vds-scripts/lsp_orchestrator/.dockerignore +0 -69
- package/tools/vds-scripts/lsp_orchestrator/ARCHITECTURE.md +0 -383
- package/tools/vds-scripts/lsp_orchestrator/CODE_QUALITY_IMPROVEMENTS.md +0 -196
- package/tools/vds-scripts/lsp_orchestrator/COMMANDS.md +0 -870
- package/tools/vds-scripts/lsp_orchestrator/Dockerfile +0 -59
- package/tools/vds-scripts/lsp_orchestrator/IMPLEMENTATION_SUMMARY.md +0 -490
- package/tools/vds-scripts/lsp_orchestrator/LSP_ISSUES_AND_FINDINGS.md +0 -380
- package/tools/vds-scripts/lsp_orchestrator/README.md +0 -616
- package/tools/vds-scripts/lsp_orchestrator/SETUP.md +0 -143
- package/tools/vds-scripts/lsp_orchestrator/TEST_COVERAGE_SUMMARY.md +0 -255
- package/tools/vds-scripts/lsp_orchestrator/VERIFICATION_CHECKLIST.md +0 -814
- package/tools/vds-scripts/lsp_orchestrator/docker-compose.yml +0 -102
- package/tools/vds-scripts/lsp_orchestrator/docs/FOR_LLMS.md +0 -401
- package/tools/vds-scripts/lsp_orchestrator/docs/explanation/lsp-response-matching.md +0 -79
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/automate-with-json.md +0 -159
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/docker-mode.md +0 -256
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/navigate-code.md +0 -116
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/parallel-processing.md +0 -179
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/project-tool-detection.md +0 -320
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/type-check-code.md +0 -46
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/use-daemon-mode.md +0 -78
- package/tools/vds-scripts/lsp_orchestrator/docs/how-to-guides/wsl2-optimization.md +0 -227
- package/tools/vds-scripts/lsp_orchestrator/docs/index.md +0 -88
- package/tools/vds-scripts/lsp_orchestrator/docs/operator-hover-definition.md +0 -143
- package/tools/vds-scripts/lsp_orchestrator/docs/reference/commands.md +0 -581
- package/tools/vds-scripts/lsp_orchestrator/docs/reference/configuration.md +0 -422
- package/tools/vds-scripts/lsp_orchestrator/docs/tutorials/00-quick-start.md +0 -169
- package/tools/vds-scripts/lsp_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/lsp_orchestrator/src/test_file.py +0 -5
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/aggregator.py +0 -340
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/basedpyright_runner.py +0 -167
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/cli.py +0 -3370
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/code_actions.py +0 -79
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/core.py +0 -3295
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_client.py +0 -672
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_manager.py +0 -577
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/daemon_server.py +0 -1040
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/__init__.py +0 -9
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/detectors/project_detector.py +0 -537
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/formatters.py +0 -141
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ipc_protocol.py +0 -225
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_client.py +0 -957
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/lsp_router.py +0 -335
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mcp_server.py +0 -181
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/__init__.py +0 -201
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_detector.py +0 -646
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models/project_tools.py +0 -114
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/models.py +0 -399
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/mypy_runner.py +0 -209
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/protocols.py +0 -52
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_lsp_client.py +0 -109
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/ruff_runner.py +0 -44
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/utils.py +0 -959
- package/tools/vds-scripts/lsp_orchestrator/src/vds_lsp_orchestrator/workspace_indexer.py +0 -1037
- package/tools/vds-scripts/lsp_orchestrator/test_workspace_lsp.py +0 -6
- package/tools/vds-scripts/lsp_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/lsp_orchestrator/tests/conftest.py +0 -6
- package/tools/vds-scripts/lsp_orchestrator/tests/test_aggregator.py +0 -59
- package/tools/vds-scripts/lsp_orchestrator/tests/test_cli.py +0 -111
- package/tools/vds-scripts/lsp_orchestrator/tests/test_detect_tools_command.py +0 -186
- package/tools/vds-scripts/lsp_orchestrator/tests/test_formatter_linter_detection.py +0 -519
- package/tools/vds-scripts/lsp_orchestrator/tests/test_integration_phase9_10_11.py +0 -367
- package/tools/vds-scripts/lsp_orchestrator/tests/test_mypy_runner.py +0 -482
- package/tools/vds-scripts/lsp_orchestrator/tests/test_package_manager_detection.py +0 -399
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase10.py +0 -389
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase11.py +0 -327
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase12_integration.py +0 -634
- package/tools/vds-scripts/lsp_orchestrator/tests/test_phase9.py +0 -196
- package/tools/vds-scripts/lsp_orchestrator/tests/test_project_detector.py +0 -377
- package/tools/vds-scripts/lsp_orchestrator/tests/test_test_runner_detection.py +0 -549
- package/tools/vds-scripts/lsp_orchestrator/tests/test_type_checker_routing.py +0 -362
- package/tools/vds-scripts/lsp_orchestrator/tests/test_workspace_indexer.py +0 -144
- package/tools/vds-scripts/markdown_orchestrator/README.md +0 -72
- package/tools/vds-scripts/markdown_orchestrator/pyproject.toml +0 -39
- package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/markdown_orchestrator/src/vds_markdown_orchestrator/cli.py +0 -102
- package/tools/vds-scripts/multi_agent_orchestrator/Dockerfile +0 -65
- package/tools/vds-scripts/multi_agent_orchestrator/README.md +0 -306
- package/tools/vds-scripts/multi_agent_orchestrator/postman/README.md +0 -264
- package/tools/vds-scripts/multi_agent_orchestrator/postman/TEST_RESULTS_SUMMARY.md +0 -197
- package/tools/vds-scripts/multi_agent_orchestrator/postman/VDS-Multi-Agent-Orchestrator-API.postman_collection.json +0 -1010
- package/tools/vds-scripts/multi_agent_orchestrator/postman/environments/local-development.postman_environment.json +0 -55
- package/tools/vds-scripts/multi_agent_orchestrator/postman/test-results.json +0 -24146
- package/tools/vds-scripts/multi_agent_orchestrator/pyproject.toml +0 -63
- package/tools/vds-scripts/multi_agent_orchestrator/run_api.py +0 -9
- package/tools/vds-scripts/multi_agent_orchestrator/run_mock_api.py +0 -9
- package/tools/vds-scripts/multi_agent_orchestrator/simple_test.py +0 -53
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/__init__.py +0 -25
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/agent_pool.py +0 -433
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/__init__.py +0 -5
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/main.py +0 -722
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/api/mock_main.py +0 -812
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/change_log.py +0 -515
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/cli.py +0 -424
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/config.py +0 -220
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/conflict_resolver.py +0 -462
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/coordinator.py +0 -627
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/models.py +0 -389
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/progress_dashboard.py +0 -380
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/redis_client.py +0 -245
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/scheduler_subscriber.py +0 -272
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_manager.py +0 -536
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/task_tracking.py +0 -550
- package/tools/vds-scripts/multi_agent_orchestrator/src/vds_multi_agent_orchestrator/vds_ai_memory_client.py +0 -352
- package/tools/vds-scripts/multi_agent_orchestrator/test_complete_system.py +0 -149
- package/tools/vds-scripts/multi_agent_orchestrator/test_infrastructure_only.py +0 -194
- package/tools/vds-scripts/multi_agent_orchestrator/test_integration.py +0 -108
- package/tools/vds-scripts/multi_agent_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_agent_registration_credential_validator.py +0 -223
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_config.py +0 -210
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_models.py +0 -195
- package/tools/vds-scripts/multi_agent_orchestrator/tests/test_w9_agent_routes.py +0 -321
- package/tools/vds-scripts/openapi_orchestrator/README.md +0 -197
- package/tools/vds-scripts/openapi_orchestrator/pyproject.toml +0 -106
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/__init__.py +0 -29
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/cli.py +0 -345
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/full_validator.py +0 -183
- package/tools/vds-scripts/openapi_orchestrator/src/vds_openapi_orchestrator/spec_validator.py +0 -197
- package/tools/vds-scripts/openapi_orchestrator/tests/__init__.py +0 -1
- package/tools/vds-scripts/openapi_orchestrator/tests/test_cli.py +0 -234
- package/tools/vds-scripts/openapi_orchestrator/tests/test_full_validator.py +0 -203
- package/tools/vds-scripts/openapi_orchestrator/tests/test_spec_validator.py +0 -295
- package/tools/vds-scripts/pdf_orchestrator/.dockerignore +0 -93
- package/tools/vds-scripts/pdf_orchestrator/.env.example +0 -40
- package/tools/vds-scripts/pdf_orchestrator/.ruff_rules.py +0 -350
- package/tools/vds-scripts/pdf_orchestrator/.yamllint.yml +0 -43
- package/tools/vds-scripts/pdf_orchestrator/DEVELOPMENT_PLAN.md +0 -80
- package/tools/vds-scripts/pdf_orchestrator/Dockerfile +0 -87
- package/tools/vds-scripts/pdf_orchestrator/README.md +0 -608
- package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.md +0 -6
- package/tools/vds-scripts/pdf_orchestrator/cli_verification_test/test.pdf +0 -0
- package/tools/vds-scripts/pdf_orchestrator/config/alertmanager.yml +0 -83
- package/tools/vds-scripts/pdf_orchestrator/config/prometheus.prod.yml +0 -98
- package/tools/vds-scripts/pdf_orchestrator/config/prometheus.yml +0 -40
- package/tools/vds-scripts/pdf_orchestrator/config/redis.conf +0 -78
- package/tools/vds-scripts/pdf_orchestrator/docs/COMPETITIVE_ANALYSIS_REPORT.md +0 -309
- package/tools/vds-scripts/pdf_orchestrator/docs/FEATURES_GUIDE.md +0 -518
- package/tools/vds-scripts/pdf_orchestrator/docs/MULTI_USER_DEPLOYMENT_GUIDE.md +0 -615
- package/tools/vds-scripts/pdf_orchestrator/docs/USER_GUIDE.md +0 -829
- package/tools/vds-scripts/pdf_orchestrator/pyproject.toml +0 -87
- package/tools/vds-scripts/pdf_orchestrator/pytest.ini +0 -71
- package/tools/vds-scripts/pdf_orchestrator/ruff.toml +0 -6
- package/tools/vds-scripts/pdf_orchestrator/scripts/debug_security_report.py +0 -59
- package/tools/vds-scripts/pdf_orchestrator/scripts/demo_library_selector.py +0 -109
- package/tools/vds-scripts/pdf_orchestrator/scripts/generate_project_stats.py +0 -52
- package/tools/vds-scripts/pdf_orchestrator/scripts/generate_styled_pdf.py +0 -95
- package/tools/vds-scripts/pdf_orchestrator/scripts/migrate_render_pdfs.py +0 -285
- package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.bat +0 -283
- package/tools/vds-scripts/pdf_orchestrator/scripts/setup_team.sh +0 -324
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/cli.py +0 -542
- package/tools/vds-scripts/pdf_orchestrator/src/vds_pdf_orchestrator/config.py +0 -33
- package/tools/vds-scripts/pdf_orchestrator/tests/README.md +0 -650
- package/tools/vds-scripts/pdf_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/pdf_orchestrator/tests/conftest.py +0 -520
- package/tools/vds-scripts/pdf_orchestrator/tests/requirements.txt +0 -51
- package/tools/vds-scripts/pdf_orchestrator/tests/run_tests.py +0 -659
- package/tools/vds-scripts/pdf_orchestrator/tests/test_config.py +0 -36
- package/tools/vds-scripts/progress_report_orchestrator/Dockerfile +0 -77
- package/tools/vds-scripts/progress_report_orchestrator/README.md +0 -39
- package/tools/vds-scripts/progress_report_orchestrator/alembic/env.py +0 -42
- package/tools/vds-scripts/progress_report_orchestrator/alembic/script.py.mako +0 -28
- package/tools/vds-scripts/progress_report_orchestrator/alembic/versions/0001_initial_progress_schema.py +0 -180
- package/tools/vds-scripts/progress_report_orchestrator/alembic.ini +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/pyproject.toml +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/endpoint_scanner.py +0 -238
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/git_activity.py +0 -159
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/hexagonal.py +0 -100
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/analyzers/test_scanner.py +0 -136
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/cli.py +0 -743
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/config.py +0 -50
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/__init__.py +0 -12
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/db/alembic_filters.py +0 -64
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/memory.py +0 -82
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/analysis.py +0 -84
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/report.py +0 -117
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/models/topology.py +0 -101
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/kg_parser.py +0 -252
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/parsers/uc_reader.py +0 -159
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/concurrency.py +0 -39
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/llm_eval.py +0 -570
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/report.py +0 -1256
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/structural.py +0 -384
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/pipeline/sync.py +0 -143
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/__init__.py +0 -5
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/engine.py +0 -105
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/recommendations/templates.py +0 -236
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/scheduler_subscriber.py +0 -238
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/README.md +0 -56
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-architecture-reviewer/SKILL.md +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/skills/srs-endpoint-matcher/SKILL.md +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/__init__.py +0 -1
- package/tools/vds-scripts/progress_report_orchestrator/src/progress_report_orchestrator/state/schema.py +0 -625
- package/tools/vds-scripts/progress_report_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/.gitkeep +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/doc-dependencies.yaml +0 -79
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-docs.yaml +0 -478
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/fr-to-services.yaml +0 -18
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/kg/registry.yaml +0 -346
- package/tools/vds-scripts/progress_report_orchestrator/tests/fixtures/phase3_baseline_standard.md +0 -564
- package/tools/vds-scripts/progress_report_orchestrator/tests/integration/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/integration/test_checkpoint.py +0 -276
- package/tools/vds-scripts/progress_report_orchestrator/tests/test_alembic_migrations.py +0 -265
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/__init__.py +0 -0
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_analyzers.py +0 -267
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_bounded_gather.py +0 -176
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_cli_phase_report.py +0 -119
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_delta.py +0 -169
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_error_handling.py +0 -150
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_gate_exit_codes.py +0 -230
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_git_activity.py +0 -215
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_kg_parser.py +0 -267
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_autodetect.py +0 -183
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_llm_eval.py +0 -529
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_memory_integration.py +0 -151
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_migration_contract.py +0 -254
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_mode_rendering.py +0 -576
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_models.py +0 -251
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_progress_llm_config.py +0 -67
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_recommendations.py +0 -480
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_report_enhancements.py +0 -415
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_resume_reload.py +0 -343
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_trend_regression.py +0 -294
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_uc_reader.py +0 -169
- package/tools/vds-scripts/progress_report_orchestrator/tests/unit/test_valence_gap.py +0 -293
- package/tools/vds-scripts/project-cycle-report.json +0 -14
- package/tools/vds-scripts/project-dependency-graph.json +0 -11361
- package/tools/vds-scripts/project-topology.json +0 -99
- package/tools/vds-scripts/public_interface_boundary_orchestrator/pyproject.toml +0 -18
- package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/__init__.py +0 -0
- package/tools/vds-scripts/public_interface_boundary_orchestrator/src/vds_public_interface_boundary_orchestrator/cli.py +0 -232
- package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/public_interface_boundary_orchestrator/tests/test_cli.py +0 -108
- package/tools/vds-scripts/research_orchestrator/README.md +0 -68
- package/tools/vds-scripts/research_orchestrator/py.typed +0 -0
- package/tools/vds-scripts/research_orchestrator/pyproject.toml +0 -95
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/__init__.py +0 -3
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/_env.py +0 -11
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/cli.py +0 -335
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/config.py +0 -43
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/models.py +0 -89
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/evidence/scoring.py +0 -102
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/exceptions.py +0 -78
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/http_client.py +0 -160
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/logging.py +0 -49
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/output/formatters.py +0 -93
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/py.typed +0 -1
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/build.py +0 -156
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/report/format.py +0 -147
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health.py +0 -66
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/health_graph.py +0 -52
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/registry.py +0 -127
- package/tools/vds-scripts/research_orchestrator/src/vds_research_orchestrator/tools/search.py +0 -230
- package/tools/vds-scripts/research_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/research_orchestrator/tests/conftest.py +0 -53
- package/tools/vds-scripts/research_orchestrator/tests/test_cli.py +0 -222
- package/tools/vds-scripts/research_orchestrator/tests/test_config.py +0 -23
- package/tools/vds-scripts/research_orchestrator/tests/test_exceptions.py +0 -62
- package/tools/vds-scripts/research_orchestrator/tests/test_formatters.py +0 -89
- package/tools/vds-scripts/research_orchestrator/tests/test_graph_integration.py +0 -149
- package/tools/vds-scripts/research_orchestrator/tests/test_http_client.py +0 -134
- package/tools/vds-scripts/research_orchestrator/tests/test_report_build.py +0 -128
- package/tools/vds-scripts/research_orchestrator/tests/test_report_format.py +0 -91
- package/tools/vds-scripts/research_orchestrator/tests/test_scoring.py +0 -95
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/__init__.py +0 -1
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_health.py +0 -139
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_registry.py +0 -135
- package/tools/vds-scripts/research_orchestrator/tests/vds_research_orchestrator/test_tools/test_search.py +0 -238
- package/tools/vds-scripts/run-history.json +0 -26
- package/tools/vds-scripts/schema_converter/README.md +0 -109
- package/tools/vds-scripts/schema_converter/pyproject.toml +0 -37
- package/tools/vds-scripts/schema_converter/src/vds_schema_converter/__init__.py +0 -3
- package/tools/vds-scripts/schema_converter/src/vds_schema_converter/cli.py +0 -50
- package/tools/vds-scripts/schema_converter/tests/__init__.py +0 -0
- package/tools/vds-scripts/schema_converter/tests/test_json_schema_generator.py +0 -115
- package/tools/vds-scripts/schema_converter/tests/test_mermaid_generator.py +0 -112
- package/tools/vds-scripts/schema_converter/tests/test_parser.py +0 -111
- package/tools/vds-scripts/schema_converter/tests/test_plantuml_generator.py +0 -112
- package/tools/vds-scripts/schema_converter/tests/test_plantuml_validator.py +0 -69
- package/tools/vds-scripts/schema_converter/tests/test_prisma_generator.py +0 -113
- package/tools/vds-scripts/schema_converter/tests/test_sql_generator.py +0 -138
- package/tools/vds-scripts/schema_converter/tests/test_typeorm_generator.py +0 -110
- package/tools/vds-scripts/schema_converter/tests/test_validators.py +0 -96
- package/tools/vds-scripts/spec_orchestrator/README.md +0 -13
- package/tools/vds-scripts/spec_orchestrator/pyproject.toml +0 -40
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/__init__.py +0 -5
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/cli.py +0 -162
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/core.py +0 -575
- package/tools/vds-scripts/spec_orchestrator/src/vds_spec_orchestrator/sync.py +0 -306
- package/tools/vds-scripts/spec_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/spec_orchestrator/tests/test_frontmatter_drift.py +0 -243
- package/tools/vds-scripts/spec_orchestrator/tests/test_sync.py +0 -342
- package/tools/vds-scripts/structure_orchestrator/README.md +0 -60
- package/tools/vds-scripts/structure_orchestrator/pyproject.toml +0 -103
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/__init__.py +0 -13
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/cli.py +0 -308
- package/tools/vds-scripts/structure_orchestrator/src/vds_structure_orchestrator/validator.py +0 -257
- package/tools/vds-scripts/structure_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/structure_orchestrator/tests/test_cli.py +0 -161
- package/tools/vds-scripts/structure_orchestrator/tests/test_helpers.py +0 -115
- package/tools/vds-scripts/structure_orchestrator/tests/test_validator.py +0 -104
- package/tools/vds-scripts/task_orchestrator/README.md +0 -50
- package/tools/vds-scripts/task_orchestrator/__init__.py +0 -18
- package/tools/vds-scripts/task_orchestrator/pyproject.toml +0 -43
- package/tools/vds-scripts/task_orchestrator/scripts/run_excel_sync.py +0 -36
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/__init__.py +0 -13
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/audit.py +0 -134
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/cli.py +0 -127
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/debug.py +0 -133
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/normalize.py +0 -113
- package/tools/vds-scripts/task_orchestrator/src/vds_task_orchestrator/refine.py +0 -201
- package/tools/vds-scripts/task_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/task_orchestrator/tests/test_task_orchestrator.py +0 -84
- package/tools/vds-scripts/temp_query_projects.py +0 -2
- package/tools/vds-scripts/test_small.md +0 -1
- package/tools/vds-scripts/text_utils_orchestrator/pyproject.toml +0 -20
- package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/__init__.py +0 -7
- package/tools/vds-scripts/text_utils_orchestrator/src/vds_text_utils/i18n.py +0 -143
- package/tools/vds-scripts/text_utils_orchestrator/tests/__init__.py +0 -0
- package/tools/vds-scripts/text_utils_orchestrator/tests/test_i18n.py +0 -53
- package/tools/vds-scripts/upgrade_major.py +0 -61
- package/tools/vds-scripts/upgrade_major_v2.py +0 -64
- package/tools/vds-scripts/verify_violations.py +0 -57
- package/tools/vds-scripts/workflow-summary.json +0 -325
- package/tools/vds-scripts/workflow-summary.md +0 -8
|
@@ -1,2467 +0,0 @@
|
|
|
1
|
-
"""CLI tests for Phase 36 state command surface and state-dsn wiring."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import json
|
|
6
|
-
import os
|
|
7
|
-
import sys
|
|
8
|
-
import types
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
from types import SimpleNamespace
|
|
11
|
-
|
|
12
|
-
import click
|
|
13
|
-
import pytest
|
|
14
|
-
import vds_audit_orchestrator.cli_impl as _cli_impl_module
|
|
15
|
-
from typer.testing import CliRunner
|
|
16
|
-
from vds_audit_orchestrator import cli, extract_cmds, parse_cmds, workflow_cmds
|
|
17
|
-
from vds_audit_orchestrator.config import reset_config
|
|
18
|
-
from vds_audit_orchestrator.models.registry import ProjectMaterial, ProjectRegistry
|
|
19
|
-
from vds_cli_common.env import load_shared_env as _load_shared_env
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class _NullConfluenceClient:
|
|
23
|
-
"""Minimal stub — prevents real HTTP calls in isolation-level tests."""
|
|
24
|
-
|
|
25
|
-
def __init__(self, *args, **kwargs):
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
@classmethod
|
|
29
|
-
def for_registry_discovery(cls, *args, **kwargs):
|
|
30
|
-
return cls()
|
|
31
|
-
|
|
32
|
-
@classmethod
|
|
33
|
-
def for_extract_docs(cls, *args, **kwargs):
|
|
34
|
-
return cls()
|
|
35
|
-
|
|
36
|
-
@classmethod
|
|
37
|
-
def from_project_page(cls, *args, **kwargs):
|
|
38
|
-
return cls()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def _install_fake_state_module(monkeypatch, **functions):
|
|
42
|
-
module = types.ModuleType("vds_audit_orchestrator.state")
|
|
43
|
-
for name, fn in functions.items():
|
|
44
|
-
setattr(module, name, fn)
|
|
45
|
-
monkeypatch.setitem(sys.modules, "vds_audit_orchestrator.state", module)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@pytest.fixture(autouse=True)
|
|
49
|
-
def _isolate_state_dsn_env(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
50
|
-
reset_config()
|
|
51
|
-
cli._cli_state.clear()
|
|
52
|
-
monkeypatch.setattr(
|
|
53
|
-
cli,
|
|
54
|
-
"apply_runtime_profile",
|
|
55
|
-
lambda *args, **kwargs: SimpleNamespace(
|
|
56
|
-
profile_name="test",
|
|
57
|
-
source="test",
|
|
58
|
-
profile_path=Path("/tmp/test-profile.yaml"),
|
|
59
|
-
applied_env_keys=[],
|
|
60
|
-
),
|
|
61
|
-
)
|
|
62
|
-
monkeypatch.setattr(cli, "load_shared_env", lambda *args, **kwargs: {})
|
|
63
|
-
monkeypatch.setattr("vds_audit_orchestrator.config.load_shared_env", lambda *args, **kwargs: {})
|
|
64
|
-
monkeypatch.setattr("vds_audit_orchestrator.config.DEFAULT_CONFIG_FILE", Path("/tmp/nonexistent-audit-test.yaml"))
|
|
65
|
-
# cli_impl imports apply_runtime_profile directly
|
|
66
|
-
# (`from vds_audit_orchestrator.runtime_profiles import apply_runtime_profile`,
|
|
67
|
-
# line 61) and the main callback at line 9619 uses that local binding.
|
|
68
|
-
# Patching cli.apply_runtime_profile alone leaves the real function running;
|
|
69
|
-
# the real function reads ~/.vds/config/profiles.yaml, applies the "test"
|
|
70
|
-
# profile, and writes VDS_AUDIT_STATE_DSN into os.environ *after*
|
|
71
|
-
# monkeypatch.setenv but *before* Typer resolves the subcommand's state_dsn
|
|
72
|
-
# parameter, causing isolation tests to receive the live DSN.
|
|
73
|
-
monkeypatch.setattr(
|
|
74
|
-
_cli_impl_module,
|
|
75
|
-
"apply_runtime_profile",
|
|
76
|
-
lambda *args, **kwargs: SimpleNamespace(
|
|
77
|
-
profile_name="test",
|
|
78
|
-
source="test",
|
|
79
|
-
profile_path=Path("/tmp/test-profile.yaml"),
|
|
80
|
-
applied_env_keys=[],
|
|
81
|
-
),
|
|
82
|
-
)
|
|
83
|
-
# AuditConfig.load() does a local `from vds_audit_orchestrator.runtime_profiles import
|
|
84
|
-
# apply_runtime_profile` inside the function body — that local import re-reads the
|
|
85
|
-
# module attribute at call time, bypassing our _cli_impl_module patch above.
|
|
86
|
-
# Patch the source module attribute directly so every call site gets the stub.
|
|
87
|
-
monkeypatch.setattr(
|
|
88
|
-
"vds_audit_orchestrator.runtime_profiles.apply_runtime_profile",
|
|
89
|
-
lambda *args, **kwargs: SimpleNamespace(
|
|
90
|
-
profile_name="test",
|
|
91
|
-
source="test",
|
|
92
|
-
profile_path=Path("/tmp/test-profile.yaml"),
|
|
93
|
-
applied_env_keys=[],
|
|
94
|
-
),
|
|
95
|
-
)
|
|
96
|
-
monkeypatch.delenv("VDS_AUDIT_STATE_DSN", raising=False) # absent: load_shared_env can write it
|
|
97
|
-
monkeypatch.delenv("VDS_AUDIT_PROFILE", raising=False)
|
|
98
|
-
monkeypatch.delenv("VDS_AUDIT_ACTIVE_PROFILE", raising=False)
|
|
99
|
-
monkeypatch.delenv("VDS_AUDIT_DSPY_PROTOCOL", raising=False)
|
|
100
|
-
monkeypatch.delenv("VDS_AUDIT_DSPY_MODEL", raising=False)
|
|
101
|
-
monkeypatch.delenv("VDS_AUDIT_LLM_PROTOCOL", raising=False)
|
|
102
|
-
monkeypatch.delenv("VDS_AUDIT_LLM__MODEL_STANDARD", raising=False)
|
|
103
|
-
monkeypatch.setenv("VDS_AUDIT_BOOTSTRAP_HOME", "false")
|
|
104
|
-
|
|
105
|
-
# Guarantee state_dsn resolves to None when not supplied via CLI.
|
|
106
|
-
# ~/.vds/.env may leave VDS_AUDIT_STATE_DSN in os.environ from earlier
|
|
107
|
-
# pytest setup, causing Typer to pick it up at param-resolution time and
|
|
108
|
-
# bypass the "state-dsn required" guard these tests verify. Patching
|
|
109
|
-
# _resolve_state_dsn directly covers every call site regardless of whether
|
|
110
|
-
# state_dsn is already non-None when _require_*_state_dsn is entered.
|
|
111
|
-
def _null_resolve_state_dsn(state_dsn: str | None, *, required: bool) -> str | None:
|
|
112
|
-
raw = (state_dsn or "").strip()
|
|
113
|
-
if raw and raw.lower() != "env":
|
|
114
|
-
return raw # explicit CLI arg — pass through unchanged
|
|
115
|
-
# No explicit CLI arg: honour tests that restore the real load_shared_env
|
|
116
|
-
# (e.g. test_state_init_uses_vds_env_file_override, which sets VDS_ENV_FILE
|
|
117
|
-
# and restores cli.load_shared_env to the real function so it can read from
|
|
118
|
-
# a temp env file). In isolation tests cli.load_shared_env is the no-op
|
|
119
|
-
# lambda from this fixture, so the call is safe and free of side effects.
|
|
120
|
-
_cli_impl_module.load_shared_env()
|
|
121
|
-
env_val = (os.getenv("VDS_AUDIT_STATE_DSN") or "").strip()
|
|
122
|
-
if env_val:
|
|
123
|
-
return env_val
|
|
124
|
-
if required:
|
|
125
|
-
import typer as _typer
|
|
126
|
-
|
|
127
|
-
raise _typer.BadParameter(
|
|
128
|
-
"--state-dsn is required (or set VDS_AUDIT_STATE_DSN).",
|
|
129
|
-
)
|
|
130
|
-
return None
|
|
131
|
-
|
|
132
|
-
monkeypatch.setattr(_cli_impl_module, "_resolve_state_dsn", _null_resolve_state_dsn)
|
|
133
|
-
monkeypatch.setattr(_cli_impl_module, "_resolve_state_dsn_from_env", lambda: None)
|
|
134
|
-
# Prevent accidental real HTTP calls to Confluence from tests that reach
|
|
135
|
-
# the ConfluenceCliClient instantiation path before the state-dsn guard
|
|
136
|
-
# (defense-in-depth; eliminates 120 s socket timeouts).
|
|
137
|
-
monkeypatch.setattr(cli, "ConfluenceCliClient", _NullConfluenceClient)
|
|
138
|
-
yield
|
|
139
|
-
cli._cli_state.clear()
|
|
140
|
-
reset_config()
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
def test_state_group_requires_state_dsn() -> None:
|
|
144
|
-
runner = CliRunner()
|
|
145
|
-
result = runner.invoke(cli.app, ["state", "init"])
|
|
146
|
-
|
|
147
|
-
assert result.exit_code == 1
|
|
148
|
-
assert "state-dsn" in result.output.lower()
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
def test_parse_registry_requires_state_dsn() -> None:
|
|
152
|
-
runner = CliRunner()
|
|
153
|
-
result = runner.invoke(cli.app, ["parse-registry", "--registry-page", "88716667"])
|
|
154
|
-
assert result.exit_code == 2
|
|
155
|
-
assert "state-dsn" in result.output.lower()
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
def test_extract_docs_requires_state_dsn(tmp_path: Path) -> None:
|
|
159
|
-
runner = CliRunner()
|
|
160
|
-
result = runner.invoke(
|
|
161
|
-
cli.app,
|
|
162
|
-
[
|
|
163
|
-
"extract-docs",
|
|
164
|
-
"--project-page",
|
|
165
|
-
"p-1",
|
|
166
|
-
"--output-dir",
|
|
167
|
-
str(tmp_path / "evidence"),
|
|
168
|
-
],
|
|
169
|
-
)
|
|
170
|
-
assert result.exit_code == 2
|
|
171
|
-
assert "state-dsn" in result.output.lower()
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
def test_state_project_ready_repo_entries_accept_sync_status_and_readiness() -> None:
|
|
175
|
-
project_payload = {
|
|
176
|
-
"bitbucket": [
|
|
177
|
-
{
|
|
178
|
-
"repo_slug": "repo-a",
|
|
179
|
-
"local_code_path": "/tmp/repo-a",
|
|
180
|
-
"sync_status": "not_modified",
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"repo_slug": "repo-b",
|
|
184
|
-
"local_code_path": "/tmp/repo-b",
|
|
185
|
-
"readiness": "ready",
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"repo_slug": "repo-c",
|
|
189
|
-
"local_code_path": "/tmp/repo-c",
|
|
190
|
-
"sync_status": "failed",
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"repo_slug": "repo-d",
|
|
194
|
-
"local_code_path": "/tmp/repo-d",
|
|
195
|
-
"readiness": "ready",
|
|
196
|
-
"analysis_excluded": True,
|
|
197
|
-
},
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
ready_entries = workflow_cmds._state_project_ready_repo_entries(project_payload)
|
|
202
|
-
ready_slugs = {entry.get("repo_slug") for entry in ready_entries}
|
|
203
|
-
assert ready_slugs == {"repo-a", "repo-b"}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
def test_validate_project_state_readiness_accepts_repo_ready_marker() -> None:
|
|
207
|
-
project_payload = {
|
|
208
|
-
"documents": [{"title": "BRD"}],
|
|
209
|
-
"sync_metadata": {"artifacts": [{"resource_type": "confluence_page"}]},
|
|
210
|
-
"bitbucket": [
|
|
211
|
-
{
|
|
212
|
-
"repo_slug": "repo-a",
|
|
213
|
-
"local_code_path": "/tmp/repo-a",
|
|
214
|
-
"readiness": "ready",
|
|
215
|
-
}
|
|
216
|
-
],
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
ready_entries = workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
220
|
-
project_payload,
|
|
221
|
-
command="workflow",
|
|
222
|
-
project_storage_key="par",
|
|
223
|
-
)
|
|
224
|
-
assert len(ready_entries) == 1
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
def test_validate_project_state_readiness_accepts_repo_storage_key_when_path_differs(tmp_path: Path) -> None:
|
|
228
|
-
project_payload = {
|
|
229
|
-
"documents": [{"title": "BRD"}],
|
|
230
|
-
"sync_metadata": {"artifacts": [{"resource_type": "confluence_page"}]},
|
|
231
|
-
"bitbucket": [
|
|
232
|
-
{
|
|
233
|
-
"repo_slug": "campaign-policy-service.git",
|
|
234
|
-
"repo_storage_key": "cpm-campaign-policy-service",
|
|
235
|
-
"local_code_path": str(tmp_path / "cached-path-a"),
|
|
236
|
-
"readiness": "ready",
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"repo_slug": "campaign-reporting-service.git",
|
|
240
|
-
"repo_storage_key": "cpm-campaign-reporting-service",
|
|
241
|
-
"local_code_path": str(tmp_path / "cached-path-b"),
|
|
242
|
-
"readiness": "ready",
|
|
243
|
-
},
|
|
244
|
-
],
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
selected_repo_path = tmp_path / "campaign-policy-service"
|
|
248
|
-
selected_repo_path.mkdir(parents=True)
|
|
249
|
-
|
|
250
|
-
ready_entries = workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
251
|
-
project_payload,
|
|
252
|
-
command="workflow",
|
|
253
|
-
project_storage_key="88718940",
|
|
254
|
-
selected_repo_path=selected_repo_path,
|
|
255
|
-
selected_repo_storage_key="cpm-campaign-policy-service",
|
|
256
|
-
)
|
|
257
|
-
assert len(ready_entries) == 2
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
def test_validate_project_state_readiness_rejects_analysis_excluded_selected_repo(tmp_path: Path) -> None:
|
|
261
|
-
selected_repo_path = tmp_path / "repo-a"
|
|
262
|
-
selected_repo_path.mkdir(parents=True)
|
|
263
|
-
project_payload = {
|
|
264
|
-
"documents": [{"title": "BRD"}],
|
|
265
|
-
"sync_metadata": {"artifacts": [{"resource_type": "confluence_page"}]},
|
|
266
|
-
"bitbucket": [
|
|
267
|
-
{
|
|
268
|
-
"repo_slug": "repo-a",
|
|
269
|
-
"repo_storage_key": "par:repo-a",
|
|
270
|
-
"local_code_path": str(selected_repo_path),
|
|
271
|
-
"readiness": "ready",
|
|
272
|
-
"analysis_excluded": True,
|
|
273
|
-
"analysis_exclusion_reason": "deprecated repo",
|
|
274
|
-
}
|
|
275
|
-
],
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
with pytest.raises(Exception, match="analysis_excluded=true"):
|
|
279
|
-
workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
280
|
-
project_payload,
|
|
281
|
-
command="workflow",
|
|
282
|
-
project_storage_key="par",
|
|
283
|
-
selected_repo_path=selected_repo_path,
|
|
284
|
-
selected_repo_storage_key="par:repo-a",
|
|
285
|
-
)
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
def test_validate_project_state_readiness_rejects_single_repo_mismatch_and_logs_warning(
|
|
289
|
-
tmp_path: Path, monkeypatch
|
|
290
|
-
) -> None:
|
|
291
|
-
project_payload = {
|
|
292
|
-
"documents": [{"title": "BRD"}],
|
|
293
|
-
"sync_metadata": {"artifacts": [{"resource_type": "confluence_page"}]},
|
|
294
|
-
"bitbucket": [
|
|
295
|
-
{
|
|
296
|
-
"repo_slug": "repo-a",
|
|
297
|
-
"repo_storage_key": "par:repo-a",
|
|
298
|
-
"repo_key": "repo-a",
|
|
299
|
-
"local_code_path": str(tmp_path / "repo-a"),
|
|
300
|
-
"readiness": "ready",
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
}
|
|
304
|
-
selected_repo_path = tmp_path / "repo-b"
|
|
305
|
-
selected_repo_path.mkdir(parents=True)
|
|
306
|
-
|
|
307
|
-
warning_events: list[tuple[str, dict[str, object]]] = []
|
|
308
|
-
|
|
309
|
-
class _FakeLogger:
|
|
310
|
-
@staticmethod
|
|
311
|
-
def warning(event: str, **kwargs: object) -> None:
|
|
312
|
-
warning_events.append((event, kwargs))
|
|
313
|
-
|
|
314
|
-
monkeypatch.setattr(workflow_cmds, "logger", _FakeLogger())
|
|
315
|
-
|
|
316
|
-
with pytest.raises(Exception, match="no sync-ready repository matching"):
|
|
317
|
-
workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
318
|
-
project_payload,
|
|
319
|
-
command="workflow",
|
|
320
|
-
project_storage_key="par",
|
|
321
|
-
selected_repo_path=selected_repo_path,
|
|
322
|
-
selected_repo_storage_key="par:repo-b",
|
|
323
|
-
)
|
|
324
|
-
|
|
325
|
-
assert len(warning_events) == 1
|
|
326
|
-
event, payload = warning_events[0]
|
|
327
|
-
assert event == "workflow_readiness_selected_repo_not_ready"
|
|
328
|
-
assert payload.get("project_storage_key") == "par"
|
|
329
|
-
assert payload.get("selected_repo_storage_key") == "par:repo-b"
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
# ---------------------------------------------------------------------------
|
|
333
|
-
# FR-148: Confluence offline/degraded mode tests
|
|
334
|
-
# ---------------------------------------------------------------------------
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
def test_is_confluence_offline_mode_false_by_default(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
338
|
-
"""FR-148: Offline mode is disabled when no env vars are set."""
|
|
339
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
340
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", raising=False)
|
|
341
|
-
assert workflow_cmds._is_confluence_offline_mode() is False
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
def test_is_confluence_offline_mode_enabled_by_vds_audit_offline_mode(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
345
|
-
"""FR-148: VDS_AUDIT_OFFLINE_MODE=1 activates offline mode."""
|
|
346
|
-
monkeypatch.setenv("VDS_AUDIT_OFFLINE_MODE", "1")
|
|
347
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", raising=False)
|
|
348
|
-
assert workflow_cmds._is_confluence_offline_mode() is True
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
def test_is_confluence_offline_mode_enabled_by_skip_confluence_sync_check(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
352
|
-
"""FR-148: VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK=true activates offline mode."""
|
|
353
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
354
|
-
monkeypatch.setenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", "true")
|
|
355
|
-
assert workflow_cmds._is_confluence_offline_mode() is True
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
def test_is_confluence_offline_mode_truthy_values(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
359
|
-
"""FR-148: All truthy string values are accepted for offline mode env vars."""
|
|
360
|
-
for value in ("1", "true", "yes", "on"):
|
|
361
|
-
monkeypatch.setenv("VDS_AUDIT_OFFLINE_MODE", value)
|
|
362
|
-
assert workflow_cmds._is_confluence_offline_mode() is True, f"Expected truthy for value={value!r}"
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
def test_is_confluence_offline_mode_false_for_empty_and_zero(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
366
|
-
"""FR-148: Falsy values keep offline mode disabled."""
|
|
367
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", raising=False)
|
|
368
|
-
for value in ("0", "false", "no", "off", ""):
|
|
369
|
-
monkeypatch.setenv("VDS_AUDIT_OFFLINE_MODE", value)
|
|
370
|
-
assert workflow_cmds._is_confluence_offline_mode() is False, f"Expected falsy for value={value!r}"
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
def test_validate_project_state_readiness_bypasses_confluence_check_in_offline_mode(
|
|
374
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
375
|
-
) -> None:
|
|
376
|
-
"""FR-148: Confluence sync artifact check is bypassed when offline mode is active."""
|
|
377
|
-
# Project has docs but NO Confluence sync artifacts — would fail normally.
|
|
378
|
-
project_payload = {
|
|
379
|
-
"documents": [{"title": "BRD"}],
|
|
380
|
-
"sync_metadata": {"artifacts": []}, # no confluence_page/attachment
|
|
381
|
-
"bitbucket": [
|
|
382
|
-
{
|
|
383
|
-
"repo_slug": "repo-a",
|
|
384
|
-
"local_code_path": "/tmp/repo-a",
|
|
385
|
-
"readiness": "ready",
|
|
386
|
-
}
|
|
387
|
-
],
|
|
388
|
-
}
|
|
389
|
-
warning_events: list[tuple[str, dict]] = []
|
|
390
|
-
|
|
391
|
-
class _FakeLogger:
|
|
392
|
-
@staticmethod
|
|
393
|
-
def warning(event: str, **kwargs: object) -> None:
|
|
394
|
-
warning_events.append((event, dict(kwargs)))
|
|
395
|
-
|
|
396
|
-
monkeypatch.setattr(workflow_cmds, "logger", _FakeLogger())
|
|
397
|
-
monkeypatch.setenv("VDS_AUDIT_OFFLINE_MODE", "1")
|
|
398
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", raising=False)
|
|
399
|
-
|
|
400
|
-
# Should NOT raise — confluence sync artifact gate is bypassed.
|
|
401
|
-
ready_entries = workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
402
|
-
project_payload,
|
|
403
|
-
command="workflow-project",
|
|
404
|
-
project_storage_key="88730001",
|
|
405
|
-
)
|
|
406
|
-
assert len(ready_entries) == 1
|
|
407
|
-
|
|
408
|
-
# Should emit the offline bypass warning.
|
|
409
|
-
bypass_events = [e for e, _ in warning_events if e == "confluence_sync_artifacts_check_bypassed"]
|
|
410
|
-
assert len(bypass_events) == 1, f"Expected bypass warning, got: {warning_events}"
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
def test_validate_project_state_readiness_raises_confluence_check_when_not_offline(
|
|
414
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
415
|
-
) -> None:
|
|
416
|
-
"""FR-148: Confluence sync artifact check still raises when offline mode is inactive."""
|
|
417
|
-
project_payload = {
|
|
418
|
-
"documents": [{"title": "BRD"}],
|
|
419
|
-
"sync_metadata": {"artifacts": []}, # no confluence artifacts
|
|
420
|
-
"bitbucket": [
|
|
421
|
-
{
|
|
422
|
-
"repo_slug": "repo-a",
|
|
423
|
-
"local_code_path": "/tmp/repo-a",
|
|
424
|
-
"readiness": "ready",
|
|
425
|
-
}
|
|
426
|
-
],
|
|
427
|
-
}
|
|
428
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
429
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", raising=False)
|
|
430
|
-
|
|
431
|
-
with pytest.raises(Exception, match="sync_metadata.artifacts must include Confluence resource types"):
|
|
432
|
-
workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
433
|
-
project_payload,
|
|
434
|
-
command="workflow-project",
|
|
435
|
-
project_storage_key="88730001",
|
|
436
|
-
)
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
def test_validate_project_state_readiness_bypass_via_skip_confluence_sync_check_env(
|
|
440
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
441
|
-
) -> None:
|
|
442
|
-
"""FR-148: VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK also bypasses the confluence artifact gate."""
|
|
443
|
-
project_payload = {
|
|
444
|
-
"documents": [{"title": "BRD"}],
|
|
445
|
-
"sync_metadata": {"artifacts": []},
|
|
446
|
-
"bitbucket": [
|
|
447
|
-
{
|
|
448
|
-
"repo_slug": "repo-a",
|
|
449
|
-
"local_code_path": "/tmp/repo-a",
|
|
450
|
-
"readiness": "ready",
|
|
451
|
-
}
|
|
452
|
-
],
|
|
453
|
-
}
|
|
454
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
455
|
-
monkeypatch.setenv("VDS_AUDIT_SKIP_CONFLUENCE_SYNC_CHECK", "1")
|
|
456
|
-
|
|
457
|
-
ready_entries = workflow_cmds._validate_project_state_readiness_for_workflow(
|
|
458
|
-
project_payload,
|
|
459
|
-
command="workflow",
|
|
460
|
-
project_storage_key="test-project",
|
|
461
|
-
)
|
|
462
|
-
assert len(ready_entries) == 1
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
# ---------------------------------------------------------------------------
|
|
466
|
-
# FR-148 / FR-162: startup Confluence connectivity and auto-offline tests
|
|
467
|
-
# ---------------------------------------------------------------------------
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
def _reachable_connectivity_payload() -> dict[str, object]:
|
|
471
|
-
return {
|
|
472
|
-
"endpoints": [
|
|
473
|
-
{
|
|
474
|
-
"server": "internal",
|
|
475
|
-
"url": "http://confluence.digital.vn/",
|
|
476
|
-
"reachable": False,
|
|
477
|
-
"detail": "unreachable: timeout",
|
|
478
|
-
"auth": "basic",
|
|
479
|
-
"latency_ms": 30000,
|
|
480
|
-
"error": "timeout",
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
"server": "external",
|
|
484
|
-
"url": "http://10.254.136.35:8090/",
|
|
485
|
-
"reachable": True,
|
|
486
|
-
"detail": "reachable (HTTP 401)",
|
|
487
|
-
"auth": "basic",
|
|
488
|
-
"latency_ms": 220,
|
|
489
|
-
"error": None,
|
|
490
|
-
},
|
|
491
|
-
],
|
|
492
|
-
"any_reachable": True,
|
|
493
|
-
"internal_reachable": False,
|
|
494
|
-
"probe_timeout_seconds": 30,
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
def _unreachable_connectivity_payload() -> dict[str, object]:
|
|
499
|
-
return {
|
|
500
|
-
"endpoints": [
|
|
501
|
-
{
|
|
502
|
-
"server": "internal",
|
|
503
|
-
"url": "http://confluence.digital.vn/",
|
|
504
|
-
"reachable": False,
|
|
505
|
-
"detail": "unreachable: connection refused",
|
|
506
|
-
"auth": "basic",
|
|
507
|
-
"latency_ms": 30000,
|
|
508
|
-
"error": "connection refused",
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
"server": "external",
|
|
512
|
-
"url": "http://10.254.136.35:8090/",
|
|
513
|
-
"reachable": False,
|
|
514
|
-
"detail": "unreachable: timed out",
|
|
515
|
-
"auth": "basic",
|
|
516
|
-
"latency_ms": 30000,
|
|
517
|
-
"error": "timed out",
|
|
518
|
-
},
|
|
519
|
-
],
|
|
520
|
-
"any_reachable": False,
|
|
521
|
-
"internal_reachable": False,
|
|
522
|
-
"probe_timeout_seconds": 30,
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
def test_auto_activate_offline_mode_does_nothing_when_any_endpoint_is_reachable(
|
|
527
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
528
|
-
) -> None:
|
|
529
|
-
"""FR-162: One reachable endpoint must prevent false auto-offline activation."""
|
|
530
|
-
import vds_audit_orchestrator.workflow_cmds as _wc
|
|
531
|
-
|
|
532
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
533
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CHECKLIST_READINESS_PREFLIGHT", raising=False)
|
|
534
|
-
monkeypatch.setattr(
|
|
535
|
-
_wc, "collect_confluence_connectivity_payload", lambda timeout_seconds=30: _reachable_connectivity_payload()
|
|
536
|
-
)
|
|
537
|
-
|
|
538
|
-
activated, diagnostics = _wc._auto_activate_offline_mode()
|
|
539
|
-
assert activated is False
|
|
540
|
-
assert diagnostics["reachable"] is True
|
|
541
|
-
assert diagnostics["decision_basis"] == "endpoint_set"
|
|
542
|
-
assert diagnostics["any_reachable"] is True
|
|
543
|
-
assert diagnostics["reachable_endpoints"] == ["external"]
|
|
544
|
-
assert os.environ.get("VDS_AUDIT_OFFLINE_MODE") is None
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
def test_auto_activate_offline_mode_sets_env_vars_when_all_endpoints_unreachable(
|
|
548
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
549
|
-
) -> None:
|
|
550
|
-
"""FR-162: Auto-offline should activate only when all configured endpoints fail."""
|
|
551
|
-
import vds_audit_orchestrator.workflow_cmds as _wc
|
|
552
|
-
|
|
553
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
554
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CHECKLIST_READINESS_PREFLIGHT", raising=False)
|
|
555
|
-
monkeypatch.setattr(
|
|
556
|
-
_wc, "collect_confluence_connectivity_payload", lambda timeout_seconds=30: _unreachable_connectivity_payload()
|
|
557
|
-
)
|
|
558
|
-
|
|
559
|
-
warning_events: list[str] = []
|
|
560
|
-
|
|
561
|
-
class _FakeLogger:
|
|
562
|
-
@staticmethod
|
|
563
|
-
def warning(event: str, **_kwargs: object) -> None:
|
|
564
|
-
warning_events.append(event)
|
|
565
|
-
|
|
566
|
-
@staticmethod
|
|
567
|
-
def debug(event: str, **kwargs: object) -> None:
|
|
568
|
-
pass
|
|
569
|
-
|
|
570
|
-
@staticmethod
|
|
571
|
-
def error(event: str, **_kwargs: object) -> None:
|
|
572
|
-
warning_events.append(event)
|
|
573
|
-
|
|
574
|
-
monkeypatch.setattr(_wc, "logger", _FakeLogger())
|
|
575
|
-
|
|
576
|
-
activated, diagnostics = _wc._auto_activate_offline_mode()
|
|
577
|
-
assert activated is True
|
|
578
|
-
assert diagnostics["reachable"] is False
|
|
579
|
-
assert diagnostics["probe_timeout_seconds"] == 30
|
|
580
|
-
assert diagnostics["decision_basis"] == "endpoint_set"
|
|
581
|
-
assert diagnostics["endpoint_count"] == 2
|
|
582
|
-
assert os.environ.get("VDS_AUDIT_OFFLINE_MODE") == "1"
|
|
583
|
-
assert os.environ.get("VDS_AUDIT_SKIP_CHECKLIST_READINESS_PREFLIGHT") == "1"
|
|
584
|
-
assert "confluence_unreachable_auto_offline_mode_enabled" in warning_events
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
def test_auto_activate_offline_mode_aborts_when_require_confluence_and_all_endpoints_fail(
|
|
588
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
589
|
-
) -> None:
|
|
590
|
-
"""FR-162: --require-confluence aborts only on true endpoint-set connectivity failure."""
|
|
591
|
-
import vds_audit_orchestrator.workflow_cmds as _wc
|
|
592
|
-
|
|
593
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
594
|
-
monkeypatch.setattr(
|
|
595
|
-
_wc, "collect_confluence_connectivity_payload", lambda timeout_seconds=30: _unreachable_connectivity_payload()
|
|
596
|
-
)
|
|
597
|
-
|
|
598
|
-
error_events: list[str] = []
|
|
599
|
-
|
|
600
|
-
class _FakeLogger:
|
|
601
|
-
@staticmethod
|
|
602
|
-
def error(event: str, **_kwargs: object) -> None:
|
|
603
|
-
error_events.append(event)
|
|
604
|
-
|
|
605
|
-
@staticmethod
|
|
606
|
-
def debug(event: str, **kwargs: object) -> None:
|
|
607
|
-
pass
|
|
608
|
-
|
|
609
|
-
@staticmethod
|
|
610
|
-
def warning(event: str, **kwargs: object) -> None:
|
|
611
|
-
pass
|
|
612
|
-
|
|
613
|
-
monkeypatch.setattr(_wc, "logger", _FakeLogger())
|
|
614
|
-
|
|
615
|
-
with pytest.raises((SystemExit, click.exceptions.Exit)):
|
|
616
|
-
_wc._auto_activate_offline_mode(require_confluence=True)
|
|
617
|
-
|
|
618
|
-
assert "confluence_unreachable_require_confluence_abort" in error_events
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
def _auth_only_connectivity_payload() -> dict[str, object]:
|
|
622
|
-
"""All endpoints respond with 401/403 — auth failure counts as reachable."""
|
|
623
|
-
return {
|
|
624
|
-
"endpoints": [
|
|
625
|
-
{
|
|
626
|
-
"server": "internal",
|
|
627
|
-
"url": "http://confluence.digital.vn/",
|
|
628
|
-
"reachable": True,
|
|
629
|
-
"detail": "reachable (auth error: 401 Unauthorized)",
|
|
630
|
-
"auth": "basic",
|
|
631
|
-
"latency_ms": 150,
|
|
632
|
-
"error": None,
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
"server": "external",
|
|
636
|
-
"url": "http://10.254.136.35:8090/",
|
|
637
|
-
"reachable": True,
|
|
638
|
-
"detail": "reachable (auth error: 403 Forbidden)",
|
|
639
|
-
"auth": "basic",
|
|
640
|
-
"latency_ms": 200,
|
|
641
|
-
"error": None,
|
|
642
|
-
},
|
|
643
|
-
],
|
|
644
|
-
"any_reachable": True,
|
|
645
|
-
"internal_reachable": True,
|
|
646
|
-
"probe_timeout_seconds": 30,
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
def test_auto_activate_offline_mode_treats_auth_failures_as_reachable(
|
|
651
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
652
|
-
) -> None:
|
|
653
|
-
"""FR-162 / TSK-162.12: Auth responses (401/403) must count as reachable connectivity."""
|
|
654
|
-
import vds_audit_orchestrator.workflow_cmds as _wc
|
|
655
|
-
|
|
656
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
657
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CHECKLIST_READINESS_PREFLIGHT", raising=False)
|
|
658
|
-
monkeypatch.setattr(
|
|
659
|
-
_wc,
|
|
660
|
-
"collect_confluence_connectivity_payload",
|
|
661
|
-
lambda timeout_seconds=30: _auth_only_connectivity_payload(),
|
|
662
|
-
)
|
|
663
|
-
|
|
664
|
-
activated, diagnostics = _wc._auto_activate_offline_mode()
|
|
665
|
-
assert activated is False
|
|
666
|
-
assert diagnostics["reachable"] is True
|
|
667
|
-
assert diagnostics["any_reachable"] is True
|
|
668
|
-
assert diagnostics["internal_reachable"] is True
|
|
669
|
-
assert "internal" in diagnostics["reachable_endpoints"]
|
|
670
|
-
assert "external" in diagnostics["reachable_endpoints"]
|
|
671
|
-
assert os.environ.get("VDS_AUDIT_OFFLINE_MODE") is None
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
def _external_only_connectivity_payload() -> dict[str, object]:
|
|
675
|
-
"""Internal down, external reachable — checklist reads default to internal."""
|
|
676
|
-
return {
|
|
677
|
-
"endpoints": [
|
|
678
|
-
{
|
|
679
|
-
"server": "internal",
|
|
680
|
-
"url": "http://confluence.digital.vn/",
|
|
681
|
-
"reachable": False,
|
|
682
|
-
"detail": "unreachable: connection refused",
|
|
683
|
-
"auth": "basic",
|
|
684
|
-
"latency_ms": 30000,
|
|
685
|
-
"error": "connection refused",
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
"server": "external",
|
|
689
|
-
"url": "http://10.254.136.35:8090/",
|
|
690
|
-
"reachable": True,
|
|
691
|
-
"detail": "reachable (HTTP 200)",
|
|
692
|
-
"auth": "basic",
|
|
693
|
-
"latency_ms": 220,
|
|
694
|
-
"error": None,
|
|
695
|
-
},
|
|
696
|
-
],
|
|
697
|
-
"any_reachable": True,
|
|
698
|
-
"internal_reachable": False,
|
|
699
|
-
"probe_timeout_seconds": 30,
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
def test_auto_activate_offline_mode_online_but_internal_down_exposes_degradation(
|
|
704
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
705
|
-
) -> None:
|
|
706
|
-
"""FR-162 / TSK-162.17: When only external is reachable, startup stays online
|
|
707
|
-
but diagnostics expose internal_reachable=False so callers know checklist reads
|
|
708
|
-
(which default to internal via for_checklist_reads) may need VDS_AUDIT_CHECKLIST_READ_SERVER override."""
|
|
709
|
-
import vds_audit_orchestrator.workflow_cmds as _wc
|
|
710
|
-
|
|
711
|
-
monkeypatch.delenv("VDS_AUDIT_OFFLINE_MODE", raising=False)
|
|
712
|
-
monkeypatch.delenv("VDS_AUDIT_SKIP_CHECKLIST_READINESS_PREFLIGHT", raising=False)
|
|
713
|
-
monkeypatch.setattr(
|
|
714
|
-
_wc,
|
|
715
|
-
"collect_confluence_connectivity_payload",
|
|
716
|
-
lambda timeout_seconds=30: _external_only_connectivity_payload(),
|
|
717
|
-
)
|
|
718
|
-
|
|
719
|
-
activated, diagnostics = _wc._auto_activate_offline_mode()
|
|
720
|
-
# Startup must NOT go offline — external is reachable
|
|
721
|
-
assert activated is False
|
|
722
|
-
assert diagnostics["reachable"] is True
|
|
723
|
-
assert diagnostics["any_reachable"] is True
|
|
724
|
-
# But internal_reachable=False signals degradation for checklist reads
|
|
725
|
-
assert diagnostics["internal_reachable"] is False
|
|
726
|
-
assert diagnostics["reachable_endpoints"] == ["external"]
|
|
727
|
-
assert os.environ.get("VDS_AUDIT_OFFLINE_MODE") is None
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
def test_confluence_cli_client_marks_degraded_on_transport_error() -> None:
|
|
731
|
-
"""FR-148: ConfluenceCliClient._degraded is False by default."""
|
|
732
|
-
# We can't instantiate ConfluenceCliClient without a real settings file,
|
|
733
|
-
# so we test the logic by checking that _degraded starts False and
|
|
734
|
-
# mark_degraded() sets it to True.
|
|
735
|
-
|
|
736
|
-
from vds_audit_orchestrator.clients.confluence_cli_client import ConfluenceCliClient
|
|
737
|
-
|
|
738
|
-
client = object.__new__(ConfluenceCliClient)
|
|
739
|
-
client._degraded = False # type: ignore[attr-defined]
|
|
740
|
-
|
|
741
|
-
assert client.is_degraded is False # type: ignore[attr-defined]
|
|
742
|
-
|
|
743
|
-
client.mark_degraded(reason="test_reason") # type: ignore[attr-defined]
|
|
744
|
-
assert client.is_degraded is True # type: ignore[attr-defined]
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
def test_confluence_cli_client_mark_degraded_idempotent() -> None:
|
|
748
|
-
"""FR-148: Calling mark_degraded() twice does not change state beyond the first call."""
|
|
749
|
-
from vds_audit_orchestrator.clients.confluence_cli_client import ConfluenceCliClient
|
|
750
|
-
|
|
751
|
-
client = object.__new__(ConfluenceCliClient)
|
|
752
|
-
client._degraded = False # type: ignore[attr-defined]
|
|
753
|
-
|
|
754
|
-
warning_count = {"n": 0}
|
|
755
|
-
|
|
756
|
-
class _FakeLogger:
|
|
757
|
-
@staticmethod
|
|
758
|
-
def warning(_event: str, **_kwargs: object) -> None:
|
|
759
|
-
warning_count["n"] += 1
|
|
760
|
-
|
|
761
|
-
import vds_audit_orchestrator.clients.confluence_cli_client as _ccm
|
|
762
|
-
|
|
763
|
-
original_logger = _ccm.logger
|
|
764
|
-
_ccm.logger = _FakeLogger() # type: ignore[assignment]
|
|
765
|
-
try:
|
|
766
|
-
client.mark_degraded(reason="first") # type: ignore[attr-defined]
|
|
767
|
-
client.mark_degraded(reason="second") # type: ignore[attr-defined]
|
|
768
|
-
finally:
|
|
769
|
-
_ccm.logger = original_logger
|
|
770
|
-
|
|
771
|
-
assert client.is_degraded is True # type: ignore[attr-defined]
|
|
772
|
-
assert warning_count["n"] == 1, "mark_degraded should only log once (idempotent)"
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
def test_confluence_cli_client_is_transport_error_detects_timeout() -> None:
|
|
776
|
-
"""FR-148: _is_transport_error identifies timeout errors as transport-level failures."""
|
|
777
|
-
from vds_audit_orchestrator.clients.confluence_cli_client import ConfluenceCliClient
|
|
778
|
-
|
|
779
|
-
assert ConfluenceCliClient._is_transport_error(TimeoutError("read timeout after 30s"))
|
|
780
|
-
assert ConfluenceCliClient._is_transport_error(ConnectionError("connection refused"))
|
|
781
|
-
assert ConfluenceCliClient._is_transport_error(OSError("network unreachable"))
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
def test_confluence_cli_client_is_transport_error_ignores_auth_errors() -> None:
|
|
785
|
-
"""FR-148: _is_transport_error does NOT flag 401/403 as transport errors."""
|
|
786
|
-
from vds_audit_orchestrator.clients.confluence_cli_client import ConfluenceCliClient
|
|
787
|
-
|
|
788
|
-
assert not ConfluenceCliClient._is_transport_error(PermissionError("401 Unauthorized"))
|
|
789
|
-
assert not ConfluenceCliClient._is_transport_error(ValueError("404 Not Found"))
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
def test_state_init_uses_env_state_dsn(monkeypatch) -> None:
|
|
793
|
-
runner = CliRunner()
|
|
794
|
-
captured: dict[str, object] = {}
|
|
795
|
-
|
|
796
|
-
def _fake_init(**kwargs):
|
|
797
|
-
captured.update(kwargs)
|
|
798
|
-
return {"ok": True}
|
|
799
|
-
|
|
800
|
-
_install_fake_state_module(monkeypatch, init=_fake_init)
|
|
801
|
-
monkeypatch.setenv("VDS_AUDIT_STATE_DSN", "sqlite:///tmp/state.db")
|
|
802
|
-
|
|
803
|
-
result = runner.invoke(cli.app, ["--json-only", "state", "init"])
|
|
804
|
-
|
|
805
|
-
assert result.exit_code == 0, result.stdout
|
|
806
|
-
payload = json.loads(result.stdout)
|
|
807
|
-
assert payload["status"] == "ok"
|
|
808
|
-
assert payload["operation"] == "init"
|
|
809
|
-
assert captured["state_dsn"] == "sqlite:///tmp/state.db"
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
def test_state_init_uses_vds_env_file_override(monkeypatch, tmp_path: Path) -> None:
|
|
813
|
-
runner = CliRunner()
|
|
814
|
-
captured: dict[str, object] = {}
|
|
815
|
-
env_file = tmp_path / "portable.env"
|
|
816
|
-
env_file.write_text("VDS_AUDIT_STATE_DSN=postgresql://from-env-file/state\n", encoding="utf-8")
|
|
817
|
-
|
|
818
|
-
def _fake_init(**kwargs):
|
|
819
|
-
captured.update(kwargs)
|
|
820
|
-
return {"ok": True}
|
|
821
|
-
|
|
822
|
-
_install_fake_state_module(monkeypatch, init=_fake_init)
|
|
823
|
-
monkeypatch.setenv("VDS_ENV_FILE", str(env_file))
|
|
824
|
-
# DEFAULT_ENV_PATHS in vds_platform_core.env is frozen at import time (once per
|
|
825
|
-
# process). Patching the binding in vds_cli_common.env ensures _collect_shared_env_values
|
|
826
|
-
# reads the temp env file rather than the real ~/.vds/.env.
|
|
827
|
-
monkeypatch.setattr("vds_cli_common.env.DEFAULT_ENV_PATHS", (env_file,))
|
|
828
|
-
monkeypatch.setattr(cli, "load_shared_env", _load_shared_env)
|
|
829
|
-
|
|
830
|
-
result = runner.invoke(cli.app, ["--json-only", "state", "init"])
|
|
831
|
-
|
|
832
|
-
assert result.exit_code == 0, result.stdout
|
|
833
|
-
payload = json.loads(result.stdout)
|
|
834
|
-
assert payload["status"] == "ok"
|
|
835
|
-
assert captured["state_dsn"] == "postgresql://from-env-file/state"
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
def test_state_init_explicit_state_dsn_beats_env_and_vds_env_file(monkeypatch, tmp_path: Path) -> None:
|
|
839
|
-
runner = CliRunner()
|
|
840
|
-
captured: dict[str, object] = {}
|
|
841
|
-
env_file = tmp_path / "portable.env"
|
|
842
|
-
env_file.write_text("VDS_AUDIT_STATE_DSN=postgresql://from-env-file/state\n", encoding="utf-8")
|
|
843
|
-
|
|
844
|
-
def _fake_init(**kwargs):
|
|
845
|
-
captured.update(kwargs)
|
|
846
|
-
return {"ok": True}
|
|
847
|
-
|
|
848
|
-
_install_fake_state_module(monkeypatch, init=_fake_init)
|
|
849
|
-
monkeypatch.setenv("VDS_ENV_FILE", str(env_file))
|
|
850
|
-
monkeypatch.setenv("VDS_AUDIT_STATE_DSN", "postgresql://from-shell/state")
|
|
851
|
-
monkeypatch.setattr(cli, "load_shared_env", _load_shared_env)
|
|
852
|
-
|
|
853
|
-
result = runner.invoke(
|
|
854
|
-
cli.app,
|
|
855
|
-
[
|
|
856
|
-
"--json-only",
|
|
857
|
-
"state",
|
|
858
|
-
"init",
|
|
859
|
-
"--state-dsn",
|
|
860
|
-
"postgresql://from-cli/state",
|
|
861
|
-
],
|
|
862
|
-
)
|
|
863
|
-
|
|
864
|
-
assert result.exit_code == 0, result.stdout
|
|
865
|
-
payload = json.loads(result.stdout)
|
|
866
|
-
assert payload["status"] == "ok"
|
|
867
|
-
assert captured["state_dsn"] == "postgresql://from-cli/state"
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
def test_resolve_state_dsn_treats_env_sentinel_as_environment_lookup(monkeypatch) -> None:
|
|
871
|
-
monkeypatch.setenv("VDS_AUDIT_STATE_DSN", "postgresql://from-shell/state")
|
|
872
|
-
|
|
873
|
-
assert cli._resolve_state_dsn("env", required=True) == "postgresql://from-shell/state"
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
def test_state_set_repo_analysis_wires_exclusion_flags(monkeypatch) -> None:
|
|
877
|
-
runner = CliRunner()
|
|
878
|
-
captured: dict[str, object] = {}
|
|
879
|
-
|
|
880
|
-
def _fake_set_repo_analysis_exclusion(**kwargs):
|
|
881
|
-
captured.update(kwargs)
|
|
882
|
-
return {
|
|
883
|
-
"project_storage_key": "88718940",
|
|
884
|
-
"repo_storage_key": "cpm:campaign-sdk-service",
|
|
885
|
-
"analysis_excluded": kwargs["analysis_excluded"],
|
|
886
|
-
"analysis_exclusion_reason": kwargs.get("analysis_exclusion_reason"),
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
_install_fake_state_module(monkeypatch, set_repo_analysis_exclusion=_fake_set_repo_analysis_exclusion)
|
|
890
|
-
monkeypatch.setenv("VDS_AUDIT_STATE_DSN", "sqlite:///tmp/state.db")
|
|
891
|
-
|
|
892
|
-
result = runner.invoke(
|
|
893
|
-
cli.app,
|
|
894
|
-
[
|
|
895
|
-
"--json-only",
|
|
896
|
-
"state",
|
|
897
|
-
"set-repo-analysis",
|
|
898
|
-
"--project",
|
|
899
|
-
"88718940",
|
|
900
|
-
"--repo",
|
|
901
|
-
"cpm:campaign-sdk-service",
|
|
902
|
-
"--exclude",
|
|
903
|
-
"--reason",
|
|
904
|
-
"unsupported branch",
|
|
905
|
-
],
|
|
906
|
-
)
|
|
907
|
-
|
|
908
|
-
assert result.exit_code == 0, result.stdout
|
|
909
|
-
payload = json.loads(result.stdout)
|
|
910
|
-
assert payload["status"] == "ok"
|
|
911
|
-
assert payload["operation"] == "set_repo_analysis_exclusion"
|
|
912
|
-
assert captured["analysis_excluded"] is True
|
|
913
|
-
assert captured["analysis_exclusion_reason"] == "unsupported branch"
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
def test_state_init_does_not_use_langgraph_postgres_env(monkeypatch) -> None:
|
|
917
|
-
runner = CliRunner()
|
|
918
|
-
captured: dict[str, object] = {}
|
|
919
|
-
|
|
920
|
-
def _fake_init(**kwargs):
|
|
921
|
-
captured.update(kwargs)
|
|
922
|
-
return {"ok": True}
|
|
923
|
-
|
|
924
|
-
_install_fake_state_module(monkeypatch, init=_fake_init)
|
|
925
|
-
monkeypatch.setenv("VDS_AUDIT_LANGGRAPH__POSTGRES_DSN", "postgresql://fallback:5432/state")
|
|
926
|
-
|
|
927
|
-
result = runner.invoke(cli.app, ["--json-only", "state", "init"])
|
|
928
|
-
|
|
929
|
-
assert result.exit_code != 0
|
|
930
|
-
assert captured == {}
|
|
931
|
-
assert "VDS_AUDIT_STATE_DSN" in result.stdout
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
def test_state_export_wires_output_argument(monkeypatch, tmp_path) -> None:
|
|
935
|
-
runner = CliRunner()
|
|
936
|
-
captured: dict[str, object] = {}
|
|
937
|
-
export_path = tmp_path / "state-export.json"
|
|
938
|
-
|
|
939
|
-
def _fake_export(state_dsn: str, output: Path | None = None):
|
|
940
|
-
captured["state_dsn"] = state_dsn
|
|
941
|
-
captured["output"] = output
|
|
942
|
-
return {"written": str(output)}
|
|
943
|
-
|
|
944
|
-
_install_fake_state_module(monkeypatch, export=_fake_export)
|
|
945
|
-
|
|
946
|
-
result = runner.invoke(
|
|
947
|
-
cli.app,
|
|
948
|
-
[
|
|
949
|
-
"--json-only",
|
|
950
|
-
"state",
|
|
951
|
-
"export",
|
|
952
|
-
"--state-dsn",
|
|
953
|
-
"postgresql://user:pass@localhost/db",
|
|
954
|
-
"--output",
|
|
955
|
-
str(export_path),
|
|
956
|
-
],
|
|
957
|
-
)
|
|
958
|
-
|
|
959
|
-
assert result.exit_code == 0, result.stdout
|
|
960
|
-
assert captured["state_dsn"] == "postgresql://user:pass@localhost/db"
|
|
961
|
-
assert captured["output"] == export_path
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
def test_state_list_runs_wires_filters(monkeypatch) -> None:
|
|
965
|
-
runner = CliRunner()
|
|
966
|
-
captured: dict[str, object] = {}
|
|
967
|
-
|
|
968
|
-
class _FakeStore:
|
|
969
|
-
def __init__(self, dsn: str) -> None:
|
|
970
|
-
captured["dsn"] = dsn
|
|
971
|
-
|
|
972
|
-
def list_runs(self, **kwargs):
|
|
973
|
-
captured.update(kwargs)
|
|
974
|
-
return [
|
|
975
|
-
{
|
|
976
|
-
"run_id": "run-1",
|
|
977
|
-
"run_type": "workflow",
|
|
978
|
-
"payload": {
|
|
979
|
-
"workflow_status": "completed",
|
|
980
|
-
"audit_outcome": "partial",
|
|
981
|
-
"runtime_profile": "zai-anthropic",
|
|
982
|
-
"requested_profiles": ["zai-anthropic"],
|
|
983
|
-
"resolved_profiles": ["zai-anthropic", "alibaba-openai"],
|
|
984
|
-
"configured_profiles": ["zai-anthropic", "alibaba-openai", "codex-chatgpt"],
|
|
985
|
-
"profile_selection_mode": "explicit",
|
|
986
|
-
},
|
|
987
|
-
}
|
|
988
|
-
]
|
|
989
|
-
|
|
990
|
-
def close(self) -> None:
|
|
991
|
-
return None
|
|
992
|
-
|
|
993
|
-
monkeypatch.setattr("vds_audit_orchestrator.state_cmds.PostgresStateStore", _FakeStore)
|
|
994
|
-
result = runner.invoke(
|
|
995
|
-
cli.app,
|
|
996
|
-
[
|
|
997
|
-
"--json-only",
|
|
998
|
-
"state",
|
|
999
|
-
"list-runs",
|
|
1000
|
-
"--state-dsn",
|
|
1001
|
-
"postgresql://user:pass@localhost/db",
|
|
1002
|
-
"--project-storage-key",
|
|
1003
|
-
"merchant-profile-service",
|
|
1004
|
-
"--run-type",
|
|
1005
|
-
"workflow",
|
|
1006
|
-
"--limit",
|
|
1007
|
-
"5",
|
|
1008
|
-
],
|
|
1009
|
-
)
|
|
1010
|
-
|
|
1011
|
-
assert result.exit_code == 0, result.stdout
|
|
1012
|
-
payload = json.loads(result.stdout)
|
|
1013
|
-
assert payload["operation"] == "list_runs"
|
|
1014
|
-
assert captured["dsn"] == "postgresql://user:pass@localhost/db"
|
|
1015
|
-
assert captured["project_key"] == "merchant-profile-service"
|
|
1016
|
-
assert captured["run_type"] == "workflow"
|
|
1017
|
-
assert captured["limit"] == 5
|
|
1018
|
-
result_row = payload["result"][0]
|
|
1019
|
-
assert result_row["status_projection"]["lifecycle_status"] == "completed"
|
|
1020
|
-
assert result_row["status_projection"]["audit_outcome"] == "partial"
|
|
1021
|
-
assert result_row["profile_projection"]["effective_runtime_profile"] == "zai-anthropic"
|
|
1022
|
-
assert result_row["profile_projection"]["requested_profiles"] == ["zai-anthropic"]
|
|
1023
|
-
assert result_row["profile_projection"]["resolved_profiles"] == ["zai-anthropic", "alibaba-openai"]
|
|
1024
|
-
assert result_row["profile_projection"]["configured_profiles"] == [
|
|
1025
|
-
"zai-anthropic",
|
|
1026
|
-
"alibaba-openai",
|
|
1027
|
-
"codex-chatgpt",
|
|
1028
|
-
]
|
|
1029
|
-
assert result_row["profile_projection"]["profile_selection_mode"] == "explicit"
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
def test_state_show_run_with_events(monkeypatch) -> None:
|
|
1033
|
-
runner = CliRunner()
|
|
1034
|
-
captured: dict[str, object] = {}
|
|
1035
|
-
|
|
1036
|
-
class _FakeStore:
|
|
1037
|
-
def __init__(self, dsn: str) -> None:
|
|
1038
|
-
captured["dsn"] = dsn
|
|
1039
|
-
|
|
1040
|
-
def show_run(self, *, run_id: str):
|
|
1041
|
-
captured["run_id"] = run_id
|
|
1042
|
-
return {
|
|
1043
|
-
"run_id": "run-42",
|
|
1044
|
-
"payload": {
|
|
1045
|
-
"kind": "workflow_run",
|
|
1046
|
-
"retrieval_snapshot_key": "merchant-profile-service:repo-one:snap-001",
|
|
1047
|
-
"workflow_status": "completed",
|
|
1048
|
-
"audit_outcome": "findings",
|
|
1049
|
-
"runtime_profile": "zai-anthropic",
|
|
1050
|
-
"requested_profiles": ["zai-anthropic"],
|
|
1051
|
-
"resolved_profiles": ["zai-anthropic", "alibaba-openai"],
|
|
1052
|
-
"configured_profiles": ["zai-anthropic", "alibaba-openai", "codex-chatgpt"],
|
|
1053
|
-
"profile_selection_mode": "explicit",
|
|
1054
|
-
},
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
def list_run_events(self, *, run_id: str, limit=None):
|
|
1058
|
-
captured["events_run_id"] = run_id
|
|
1059
|
-
captured["events_limit"] = limit
|
|
1060
|
-
return [{"event_type": "analysis_completed"}]
|
|
1061
|
-
|
|
1062
|
-
def close(self) -> None:
|
|
1063
|
-
return None
|
|
1064
|
-
|
|
1065
|
-
monkeypatch.setattr("vds_audit_orchestrator.state_cmds.PostgresStateStore", _FakeStore)
|
|
1066
|
-
result = runner.invoke(
|
|
1067
|
-
cli.app,
|
|
1068
|
-
[
|
|
1069
|
-
"--json-only",
|
|
1070
|
-
"state",
|
|
1071
|
-
"show-run",
|
|
1072
|
-
"--state-dsn",
|
|
1073
|
-
"postgresql://user:pass@localhost/db",
|
|
1074
|
-
"--run-id",
|
|
1075
|
-
"run-42",
|
|
1076
|
-
"--include-events",
|
|
1077
|
-
],
|
|
1078
|
-
)
|
|
1079
|
-
|
|
1080
|
-
assert result.exit_code == 0, result.stdout
|
|
1081
|
-
payload = json.loads(result.stdout)
|
|
1082
|
-
assert payload["operation"] == "show_run"
|
|
1083
|
-
assert payload["result"]["run"]["payload"]["retrieval_snapshot_key"] == "merchant-profile-service:repo-one:snap-001"
|
|
1084
|
-
assert payload["result"]["run"]["status_projection"]["lifecycle_status"] == "completed"
|
|
1085
|
-
assert payload["result"]["run"]["status_projection"]["audit_outcome"] == "findings"
|
|
1086
|
-
assert payload["result"]["run"]["profile_projection"]["effective_runtime_profile"] == "zai-anthropic"
|
|
1087
|
-
assert payload["result"]["run"]["profile_projection"]["requested_profiles"] == ["zai-anthropic"]
|
|
1088
|
-
assert captured["run_id"] == "run-42"
|
|
1089
|
-
assert captured["events_run_id"] == "run-42"
|
|
1090
|
-
assert captured["events_limit"] is None
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
def test_state_list_snapshots_wires_project_storage_key(monkeypatch) -> None:
|
|
1094
|
-
runner = CliRunner()
|
|
1095
|
-
captured: dict[str, object] = {}
|
|
1096
|
-
|
|
1097
|
-
def _fake_list_snapshots(**kwargs):
|
|
1098
|
-
captured.update(kwargs)
|
|
1099
|
-
return [{"snapshot_key": "merchant-profile-service:hash"}]
|
|
1100
|
-
|
|
1101
|
-
_install_fake_state_module(monkeypatch, list_snapshots=_fake_list_snapshots)
|
|
1102
|
-
result = runner.invoke(
|
|
1103
|
-
cli.app,
|
|
1104
|
-
[
|
|
1105
|
-
"--json-only",
|
|
1106
|
-
"state",
|
|
1107
|
-
"list-snapshots",
|
|
1108
|
-
"--state-dsn",
|
|
1109
|
-
"postgresql://user:pass@localhost/db",
|
|
1110
|
-
"--project-storage-key",
|
|
1111
|
-
"merchant-profile-service",
|
|
1112
|
-
"--limit",
|
|
1113
|
-
"9",
|
|
1114
|
-
],
|
|
1115
|
-
)
|
|
1116
|
-
|
|
1117
|
-
assert result.exit_code == 0, result.stdout
|
|
1118
|
-
payload = json.loads(result.stdout)
|
|
1119
|
-
assert payload["operation"] == "list_snapshots"
|
|
1120
|
-
assert captured["project_storage_key"] == "merchant-profile-service"
|
|
1121
|
-
assert captured["limit"] == 9
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
def test_state_resolve_run_input_wires_selectors(monkeypatch) -> None:
|
|
1125
|
-
runner = CliRunner()
|
|
1126
|
-
captured: dict[str, object] = {}
|
|
1127
|
-
|
|
1128
|
-
def _fake_resolve_run_input(**kwargs):
|
|
1129
|
-
captured.update(kwargs)
|
|
1130
|
-
return {"project": {"project_storage_key": "merchant-profile-service"}}
|
|
1131
|
-
|
|
1132
|
-
_install_fake_state_module(monkeypatch, resolve_run_input=_fake_resolve_run_input)
|
|
1133
|
-
result = runner.invoke(
|
|
1134
|
-
cli.app,
|
|
1135
|
-
[
|
|
1136
|
-
"--json-only",
|
|
1137
|
-
"state",
|
|
1138
|
-
"resolve-run-input",
|
|
1139
|
-
"--state-dsn",
|
|
1140
|
-
"postgresql://user:pass@localhost/db",
|
|
1141
|
-
"--project",
|
|
1142
|
-
"merchant-profile-service",
|
|
1143
|
-
"--repo",
|
|
1144
|
-
"repo-one",
|
|
1145
|
-
],
|
|
1146
|
-
)
|
|
1147
|
-
|
|
1148
|
-
assert result.exit_code == 0, result.stdout
|
|
1149
|
-
payload = json.loads(result.stdout)
|
|
1150
|
-
assert payload["operation"] == "resolve_run_input"
|
|
1151
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1152
|
-
assert captured["repo"] == "repo-one"
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
def test_state_workflow_params_wires_selectors(monkeypatch) -> None:
|
|
1156
|
-
runner = CliRunner()
|
|
1157
|
-
captured: dict[str, object] = {}
|
|
1158
|
-
|
|
1159
|
-
def _fake_resolve_workflow_run_parameters(**kwargs):
|
|
1160
|
-
captured.update(kwargs)
|
|
1161
|
-
return {
|
|
1162
|
-
"project_storage_key": "merchant-profile-service",
|
|
1163
|
-
"available": True,
|
|
1164
|
-
"latest_run_parameters": {"retrieval_mode": "hybrid"},
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
_install_fake_state_module(monkeypatch, resolve_workflow_run_parameters=_fake_resolve_workflow_run_parameters)
|
|
1168
|
-
result = runner.invoke(
|
|
1169
|
-
cli.app,
|
|
1170
|
-
[
|
|
1171
|
-
"--json-only",
|
|
1172
|
-
"state",
|
|
1173
|
-
"workflow-params",
|
|
1174
|
-
"--state-dsn",
|
|
1175
|
-
"postgresql://user:pass@localhost/db",
|
|
1176
|
-
"--project",
|
|
1177
|
-
"merchant-profile-service",
|
|
1178
|
-
"--repo",
|
|
1179
|
-
"repo-one",
|
|
1180
|
-
],
|
|
1181
|
-
)
|
|
1182
|
-
|
|
1183
|
-
assert result.exit_code == 0, result.stdout
|
|
1184
|
-
payload = json.loads(result.stdout)
|
|
1185
|
-
assert payload["operation"] == "resolve_workflow_run_parameters"
|
|
1186
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1187
|
-
assert captured["repo"] == "repo-one"
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
def test_state_readiness_wires_selectors(monkeypatch) -> None:
|
|
1191
|
-
runner = CliRunner()
|
|
1192
|
-
captured: dict[str, object] = {}
|
|
1193
|
-
|
|
1194
|
-
def _fake_readiness(**kwargs):
|
|
1195
|
-
captured.update(kwargs)
|
|
1196
|
-
return {"summary": {"ready": True}}
|
|
1197
|
-
|
|
1198
|
-
_install_fake_state_module(monkeypatch, readiness=_fake_readiness)
|
|
1199
|
-
result = runner.invoke(
|
|
1200
|
-
cli.app,
|
|
1201
|
-
[
|
|
1202
|
-
"--json-only",
|
|
1203
|
-
"state",
|
|
1204
|
-
"readiness",
|
|
1205
|
-
"--state-dsn",
|
|
1206
|
-
"postgresql://user:pass@localhost/db",
|
|
1207
|
-
"--project",
|
|
1208
|
-
"merchant-profile-service",
|
|
1209
|
-
"--repo",
|
|
1210
|
-
"repo-one",
|
|
1211
|
-
],
|
|
1212
|
-
)
|
|
1213
|
-
|
|
1214
|
-
assert result.exit_code == 0, result.stdout
|
|
1215
|
-
payload = json.loads(result.stdout)
|
|
1216
|
-
assert payload["operation"] == "readiness"
|
|
1217
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1218
|
-
assert captured["repo"] == "repo-one"
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
def test_state_list_links_wires_selectors(monkeypatch) -> None:
|
|
1222
|
-
runner = CliRunner()
|
|
1223
|
-
captured: dict[str, object] = {}
|
|
1224
|
-
|
|
1225
|
-
def _fake_list_links(**kwargs):
|
|
1226
|
-
captured.update(kwargs)
|
|
1227
|
-
return {"project_links": [], "repo_links": []}
|
|
1228
|
-
|
|
1229
|
-
_install_fake_state_module(monkeypatch, list_links=_fake_list_links)
|
|
1230
|
-
result = runner.invoke(
|
|
1231
|
-
cli.app,
|
|
1232
|
-
[
|
|
1233
|
-
"--json-only",
|
|
1234
|
-
"state",
|
|
1235
|
-
"list-links",
|
|
1236
|
-
"--state-dsn",
|
|
1237
|
-
"postgresql://user:pass@localhost/db",
|
|
1238
|
-
"--project",
|
|
1239
|
-
"merchant-profile-service",
|
|
1240
|
-
"--repo",
|
|
1241
|
-
"repo-one",
|
|
1242
|
-
],
|
|
1243
|
-
)
|
|
1244
|
-
|
|
1245
|
-
assert result.exit_code == 0, result.stdout
|
|
1246
|
-
payload = json.loads(result.stdout)
|
|
1247
|
-
assert payload["operation"] == "list_links"
|
|
1248
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1249
|
-
assert captured["repo"] == "repo-one"
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
def test_state_compact_wires_retention_and_dry_run(monkeypatch) -> None:
|
|
1253
|
-
runner = CliRunner()
|
|
1254
|
-
captured: dict[str, object] = {}
|
|
1255
|
-
|
|
1256
|
-
def _fake_compact(**kwargs):
|
|
1257
|
-
captured.update(kwargs)
|
|
1258
|
-
return {"candidate_count": 5, "deleted_count": 0, "dry_run": True}
|
|
1259
|
-
|
|
1260
|
-
_install_fake_state_module(monkeypatch, compact=_fake_compact)
|
|
1261
|
-
result = runner.invoke(
|
|
1262
|
-
cli.app,
|
|
1263
|
-
[
|
|
1264
|
-
"--json-only",
|
|
1265
|
-
"state",
|
|
1266
|
-
"compact",
|
|
1267
|
-
"--state-dsn",
|
|
1268
|
-
"postgresql://user:pass@localhost/db",
|
|
1269
|
-
"--retention-days",
|
|
1270
|
-
"45",
|
|
1271
|
-
"--dry-run",
|
|
1272
|
-
],
|
|
1273
|
-
)
|
|
1274
|
-
|
|
1275
|
-
assert result.exit_code == 0, result.stdout
|
|
1276
|
-
payload = json.loads(result.stdout)
|
|
1277
|
-
assert payload["operation"] == "compact"
|
|
1278
|
-
assert captured["retention_days"] == 45
|
|
1279
|
-
assert captured["dry_run"] is True
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
def test_state_reconcile_runs_wires_threshold_statuses_and_dry_run(monkeypatch) -> None:
|
|
1283
|
-
runner = CliRunner()
|
|
1284
|
-
captured: dict[str, object] = {}
|
|
1285
|
-
|
|
1286
|
-
def _fake_reconcile_runs(**kwargs):
|
|
1287
|
-
captured.update(kwargs)
|
|
1288
|
-
return {"candidate_count": 2, "updated_count": 0, "dry_run": True}
|
|
1289
|
-
|
|
1290
|
-
_install_fake_state_module(monkeypatch, reconcile_runs=_fake_reconcile_runs)
|
|
1291
|
-
result = runner.invoke(
|
|
1292
|
-
cli.app,
|
|
1293
|
-
[
|
|
1294
|
-
"--json-only",
|
|
1295
|
-
"state",
|
|
1296
|
-
"reconcile-runs",
|
|
1297
|
-
"--state-dsn",
|
|
1298
|
-
"postgresql://user:pass@localhost/db",
|
|
1299
|
-
"--stale-after-minutes",
|
|
1300
|
-
"180",
|
|
1301
|
-
"--status",
|
|
1302
|
-
"running",
|
|
1303
|
-
"--status",
|
|
1304
|
-
"pending",
|
|
1305
|
-
"--dry-run",
|
|
1306
|
-
],
|
|
1307
|
-
)
|
|
1308
|
-
|
|
1309
|
-
assert result.exit_code == 0, result.stdout
|
|
1310
|
-
payload = json.loads(result.stdout)
|
|
1311
|
-
assert payload["operation"] == "reconcile_runs"
|
|
1312
|
-
assert captured["stale_after_minutes"] == 180
|
|
1313
|
-
assert captured["target_statuses"] == ["running", "pending"]
|
|
1314
|
-
assert captured["dry_run"] is True
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
def test_state_index_health_wires_bootstrap_and_index_type(monkeypatch) -> None:
|
|
1318
|
-
runner = CliRunner()
|
|
1319
|
-
captured: dict[str, object] = {}
|
|
1320
|
-
|
|
1321
|
-
def _fake_vector_index_health(**kwargs):
|
|
1322
|
-
captured.update(kwargs)
|
|
1323
|
-
return {"lexical_only": False}
|
|
1324
|
-
|
|
1325
|
-
_install_fake_state_module(monkeypatch, vector_index_health=_fake_vector_index_health)
|
|
1326
|
-
result = runner.invoke(
|
|
1327
|
-
cli.app,
|
|
1328
|
-
[
|
|
1329
|
-
"--json-only",
|
|
1330
|
-
"state",
|
|
1331
|
-
"index-health",
|
|
1332
|
-
"--state-dsn",
|
|
1333
|
-
"postgresql://user:pass@localhost/db",
|
|
1334
|
-
"--bootstrap",
|
|
1335
|
-
"--index-type",
|
|
1336
|
-
"ivfflat",
|
|
1337
|
-
"--dimensions",
|
|
1338
|
-
"768",
|
|
1339
|
-
],
|
|
1340
|
-
)
|
|
1341
|
-
|
|
1342
|
-
assert result.exit_code == 0, result.stdout
|
|
1343
|
-
payload = json.loads(result.stdout)
|
|
1344
|
-
assert payload["operation"] == "vector_index_health"
|
|
1345
|
-
assert captured["bootstrap"] is True
|
|
1346
|
-
assert captured["index_type"] == "ivfflat"
|
|
1347
|
-
assert captured["dimensions"] == 768
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
def test_state_index_health_defaults_dimensions_from_config(monkeypatch) -> None:
|
|
1351
|
-
runner = CliRunner()
|
|
1352
|
-
captured: dict[str, object] = {}
|
|
1353
|
-
|
|
1354
|
-
def _fake_vector_index_health(**kwargs):
|
|
1355
|
-
captured.update(kwargs)
|
|
1356
|
-
return {"lexical_only": False}
|
|
1357
|
-
|
|
1358
|
-
_install_fake_state_module(monkeypatch, vector_index_health=_fake_vector_index_health)
|
|
1359
|
-
monkeypatch.setattr(cli, "get_config", lambda: SimpleNamespace(embedding=SimpleNamespace(dimensions=1024)))
|
|
1360
|
-
|
|
1361
|
-
result = runner.invoke(
|
|
1362
|
-
cli.app,
|
|
1363
|
-
[
|
|
1364
|
-
"--json-only",
|
|
1365
|
-
"state",
|
|
1366
|
-
"index-health",
|
|
1367
|
-
"--state-dsn",
|
|
1368
|
-
"postgresql://user:pass@localhost/db",
|
|
1369
|
-
"--bootstrap",
|
|
1370
|
-
],
|
|
1371
|
-
)
|
|
1372
|
-
|
|
1373
|
-
assert result.exit_code == 0, result.stdout
|
|
1374
|
-
payload = json.loads(result.stdout)
|
|
1375
|
-
assert payload["operation"] == "vector_index_health"
|
|
1376
|
-
assert captured["bootstrap"] is True
|
|
1377
|
-
assert captured["index_type"] == "hnsw"
|
|
1378
|
-
assert captured["dimensions"] == 1024
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
def test_state_list_retrieval_snapshots_wires_filters(monkeypatch) -> None:
|
|
1382
|
-
runner = CliRunner()
|
|
1383
|
-
captured: dict[str, object] = {}
|
|
1384
|
-
|
|
1385
|
-
def _fake_list_retrieval_snapshots(**kwargs):
|
|
1386
|
-
captured.update(kwargs)
|
|
1387
|
-
return [{"snapshot_key": "merchant-profile-service:snap-1"}]
|
|
1388
|
-
|
|
1389
|
-
_install_fake_state_module(monkeypatch, list_retrieval_snapshots=_fake_list_retrieval_snapshots)
|
|
1390
|
-
result = runner.invoke(
|
|
1391
|
-
cli.app,
|
|
1392
|
-
[
|
|
1393
|
-
"--json-only",
|
|
1394
|
-
"state",
|
|
1395
|
-
"list-retrieval-snapshots",
|
|
1396
|
-
"--state-dsn",
|
|
1397
|
-
"postgresql://user:pass@localhost/db",
|
|
1398
|
-
"--project-storage-key",
|
|
1399
|
-
"merchant-profile-service",
|
|
1400
|
-
"--repo-storage-key",
|
|
1401
|
-
"merchant-profile-service:repo-one",
|
|
1402
|
-
"--limit",
|
|
1403
|
-
"11",
|
|
1404
|
-
],
|
|
1405
|
-
)
|
|
1406
|
-
|
|
1407
|
-
assert result.exit_code == 0, result.stdout
|
|
1408
|
-
payload = json.loads(result.stdout)
|
|
1409
|
-
assert payload["operation"] == "list_retrieval_snapshots"
|
|
1410
|
-
assert captured["project_key"] == "merchant-profile-service"
|
|
1411
|
-
assert captured["repo_key"] == "merchant-profile-service:repo-one"
|
|
1412
|
-
assert captured["limit"] == 11
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
def test_state_query_projects_wires_filters(monkeypatch) -> None:
|
|
1416
|
-
runner = CliRunner()
|
|
1417
|
-
captured: dict[str, object] = {}
|
|
1418
|
-
|
|
1419
|
-
def _fake_query_projects(**kwargs):
|
|
1420
|
-
captured.update(kwargs)
|
|
1421
|
-
return [{"project_storage_key": "merchant-profile-service", "repo_count": 2}]
|
|
1422
|
-
|
|
1423
|
-
_install_fake_state_module(monkeypatch, query_projects=_fake_query_projects)
|
|
1424
|
-
result = runner.invoke(
|
|
1425
|
-
cli.app,
|
|
1426
|
-
[
|
|
1427
|
-
"--json-only",
|
|
1428
|
-
"state",
|
|
1429
|
-
"query-projects",
|
|
1430
|
-
"--state-dsn",
|
|
1431
|
-
"postgresql://user:pass@localhost/db",
|
|
1432
|
-
"--department",
|
|
1433
|
-
"banking",
|
|
1434
|
-
"--limit",
|
|
1435
|
-
"7",
|
|
1436
|
-
],
|
|
1437
|
-
)
|
|
1438
|
-
|
|
1439
|
-
assert result.exit_code == 0, result.stdout
|
|
1440
|
-
payload = json.loads(result.stdout)
|
|
1441
|
-
assert payload["operation"] == "query_projects"
|
|
1442
|
-
assert captured["department"] == "banking"
|
|
1443
|
-
assert captured["limit"] == 7
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
def test_state_query_departments_wires_filters(monkeypatch) -> None:
|
|
1447
|
-
runner = CliRunner()
|
|
1448
|
-
captured: dict[str, object] = {}
|
|
1449
|
-
|
|
1450
|
-
def _fake_query_departments(**kwargs):
|
|
1451
|
-
captured.update(kwargs)
|
|
1452
|
-
return [{"department": "banking", "project_count": 3}]
|
|
1453
|
-
|
|
1454
|
-
_install_fake_state_module(monkeypatch, query_departments=_fake_query_departments)
|
|
1455
|
-
result = runner.invoke(
|
|
1456
|
-
cli.app,
|
|
1457
|
-
[
|
|
1458
|
-
"--json-only",
|
|
1459
|
-
"state",
|
|
1460
|
-
"query-departments",
|
|
1461
|
-
"--state-dsn",
|
|
1462
|
-
"postgresql://user:pass@localhost/db",
|
|
1463
|
-
"--department",
|
|
1464
|
-
"banking",
|
|
1465
|
-
"--limit",
|
|
1466
|
-
"5",
|
|
1467
|
-
],
|
|
1468
|
-
)
|
|
1469
|
-
|
|
1470
|
-
assert result.exit_code == 0, result.stdout
|
|
1471
|
-
payload = json.loads(result.stdout)
|
|
1472
|
-
assert payload["operation"] == "query_departments"
|
|
1473
|
-
assert captured["department"] == "banking"
|
|
1474
|
-
assert captured["limit"] == 5
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
def test_state_query_repos_wires_selectors(monkeypatch) -> None:
|
|
1478
|
-
runner = CliRunner()
|
|
1479
|
-
captured: dict[str, object] = {}
|
|
1480
|
-
|
|
1481
|
-
def _fake_query_repos(**kwargs):
|
|
1482
|
-
captured.update(kwargs)
|
|
1483
|
-
return [{"repo_storage_key": "merchant-profile-service:repo-one"}]
|
|
1484
|
-
|
|
1485
|
-
_install_fake_state_module(monkeypatch, query_repos=_fake_query_repos)
|
|
1486
|
-
result = runner.invoke(
|
|
1487
|
-
cli.app,
|
|
1488
|
-
[
|
|
1489
|
-
"--json-only",
|
|
1490
|
-
"state",
|
|
1491
|
-
"query-repos",
|
|
1492
|
-
"--state-dsn",
|
|
1493
|
-
"postgresql://user:pass@localhost/db",
|
|
1494
|
-
"--project",
|
|
1495
|
-
"merchant-profile-service",
|
|
1496
|
-
"--repo",
|
|
1497
|
-
"repo-one",
|
|
1498
|
-
],
|
|
1499
|
-
)
|
|
1500
|
-
|
|
1501
|
-
assert result.exit_code == 0, result.stdout
|
|
1502
|
-
payload = json.loads(result.stdout)
|
|
1503
|
-
assert payload["operation"] == "query_repos"
|
|
1504
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1505
|
-
assert captured["repo"] == "repo-one"
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
def test_state_query_runs_wires_selectors(monkeypatch) -> None:
|
|
1509
|
-
runner = CliRunner()
|
|
1510
|
-
captured: dict[str, object] = {}
|
|
1511
|
-
|
|
1512
|
-
def _fake_query_runs(**kwargs):
|
|
1513
|
-
captured.update(kwargs)
|
|
1514
|
-
return [{"run_id": "run-1", "run_type": "workflow", "payload": {"workflow_status": "completed"}}]
|
|
1515
|
-
|
|
1516
|
-
_install_fake_state_module(monkeypatch, query_runs=_fake_query_runs)
|
|
1517
|
-
result = runner.invoke(
|
|
1518
|
-
cli.app,
|
|
1519
|
-
[
|
|
1520
|
-
"--json-only",
|
|
1521
|
-
"state",
|
|
1522
|
-
"query-runs",
|
|
1523
|
-
"--state-dsn",
|
|
1524
|
-
"postgresql://user:pass@localhost/db",
|
|
1525
|
-
"--project",
|
|
1526
|
-
"merchant-profile-service",
|
|
1527
|
-
"--repo",
|
|
1528
|
-
"repo-one",
|
|
1529
|
-
"--run-type",
|
|
1530
|
-
"workflow",
|
|
1531
|
-
"--status",
|
|
1532
|
-
"completed",
|
|
1533
|
-
],
|
|
1534
|
-
)
|
|
1535
|
-
|
|
1536
|
-
assert result.exit_code == 0, result.stdout
|
|
1537
|
-
payload = json.loads(result.stdout)
|
|
1538
|
-
assert payload["operation"] == "query_runs"
|
|
1539
|
-
assert payload["selectors"]["project"] == "merchant-profile-service"
|
|
1540
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1541
|
-
assert captured["repo"] == "repo-one"
|
|
1542
|
-
assert captured["run_type"] == "workflow"
|
|
1543
|
-
assert captured["status"] == "completed"
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
def test_state_query_summary_wires_selectors(monkeypatch) -> None:
|
|
1547
|
-
runner = CliRunner()
|
|
1548
|
-
captured: dict[str, object] = {}
|
|
1549
|
-
|
|
1550
|
-
def _fake_query_summary(**kwargs):
|
|
1551
|
-
captured.update(kwargs)
|
|
1552
|
-
return {"project": {"project_storage_key": "merchant-profile-service"}}
|
|
1553
|
-
|
|
1554
|
-
_install_fake_state_module(monkeypatch, query_summary=_fake_query_summary)
|
|
1555
|
-
result = runner.invoke(
|
|
1556
|
-
cli.app,
|
|
1557
|
-
[
|
|
1558
|
-
"--json-only",
|
|
1559
|
-
"state",
|
|
1560
|
-
"query-summary",
|
|
1561
|
-
"--state-dsn",
|
|
1562
|
-
"postgresql://user:pass@localhost/db",
|
|
1563
|
-
"--project",
|
|
1564
|
-
"merchant-profile-service",
|
|
1565
|
-
"--repo",
|
|
1566
|
-
"repo-one",
|
|
1567
|
-
"--no-completeness",
|
|
1568
|
-
],
|
|
1569
|
-
)
|
|
1570
|
-
|
|
1571
|
-
assert result.exit_code == 0, result.stdout
|
|
1572
|
-
payload = json.loads(result.stdout)
|
|
1573
|
-
assert payload["operation"] == "query_summary"
|
|
1574
|
-
assert captured["project"] == "merchant-profile-service"
|
|
1575
|
-
assert captured["repo"] == "repo-one"
|
|
1576
|
-
assert captured["include_completeness"] is False
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
def test_state_refresh_retrieval_snapshot_wires_embedding_overrides(monkeypatch, tmp_path: Path) -> None:
|
|
1580
|
-
runner = CliRunner()
|
|
1581
|
-
captured: dict[str, object] = {}
|
|
1582
|
-
chunks_path = tmp_path / "chunks.jsonl"
|
|
1583
|
-
chunks_path.write_text(
|
|
1584
|
-
json.dumps({"chunk_id": "c-1", "content_hash": "h-1", "content_text": "hello"}) + "\n",
|
|
1585
|
-
encoding="utf-8",
|
|
1586
|
-
)
|
|
1587
|
-
|
|
1588
|
-
def _fake_refresh_retrieval_snapshot(**kwargs):
|
|
1589
|
-
captured.update(kwargs)
|
|
1590
|
-
return {"snapshot_key": kwargs.get("snapshot_key")}
|
|
1591
|
-
|
|
1592
|
-
_install_fake_state_module(monkeypatch, refresh_retrieval_snapshot=_fake_refresh_retrieval_snapshot)
|
|
1593
|
-
result = runner.invoke(
|
|
1594
|
-
cli.app,
|
|
1595
|
-
[
|
|
1596
|
-
"--json-only",
|
|
1597
|
-
"state",
|
|
1598
|
-
"refresh-retrieval-snapshot",
|
|
1599
|
-
"--state-dsn",
|
|
1600
|
-
"postgresql://user:pass@localhost/db",
|
|
1601
|
-
"--project-storage-key",
|
|
1602
|
-
"merchant-profile-service",
|
|
1603
|
-
"--snapshot-key",
|
|
1604
|
-
"merchant-profile-service:snap-1",
|
|
1605
|
-
"--chunks-path",
|
|
1606
|
-
str(chunks_path),
|
|
1607
|
-
"--repo-storage-key",
|
|
1608
|
-
"merchant-profile-service:repo-one",
|
|
1609
|
-
"--model",
|
|
1610
|
-
"nomic-embed-text",
|
|
1611
|
-
"--batch-size",
|
|
1612
|
-
"7",
|
|
1613
|
-
"--timeout-seconds",
|
|
1614
|
-
"45",
|
|
1615
|
-
"--embedding-base-url",
|
|
1616
|
-
"http://localhost:11434",
|
|
1617
|
-
"--index-type",
|
|
1618
|
-
"ivfflat",
|
|
1619
|
-
],
|
|
1620
|
-
)
|
|
1621
|
-
|
|
1622
|
-
assert result.exit_code == 0, result.stdout
|
|
1623
|
-
payload = json.loads(result.stdout)
|
|
1624
|
-
assert payload["operation"] == "refresh_retrieval_snapshot"
|
|
1625
|
-
assert captured["project_key"] == "merchant-profile-service"
|
|
1626
|
-
assert captured["repo_key"] == "merchant-profile-service:repo-one"
|
|
1627
|
-
assert captured["snapshot_key"] == "merchant-profile-service:snap-1"
|
|
1628
|
-
assert captured["chunks_path"] == chunks_path
|
|
1629
|
-
assert captured["model"] == "nomic-embed-text"
|
|
1630
|
-
assert captured["batch_size"] == 7
|
|
1631
|
-
assert captured["timeout_seconds"] == 45.0
|
|
1632
|
-
assert captured["embedding_base_url"] == "http://localhost:11434"
|
|
1633
|
-
assert captured["index_type"] == "ivfflat"
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
def test_embedding_check_succeeds_with_expected_dimensions(monkeypatch) -> None:
|
|
1637
|
-
runner = CliRunner()
|
|
1638
|
-
|
|
1639
|
-
monkeypatch.setattr(cli, "_fetch_ollama_local_models", lambda **_kwargs: ["bge-m3:latest"])
|
|
1640
|
-
monkeypatch.setattr(
|
|
1641
|
-
cli,
|
|
1642
|
-
"_probe_embedding_dimensions",
|
|
1643
|
-
lambda **_kwargs: {
|
|
1644
|
-
"backend": "ollama_api_embed",
|
|
1645
|
-
"response_model": "bge-m3:latest",
|
|
1646
|
-
"model_digest": "digest-a",
|
|
1647
|
-
"expected_dimensions": 1024,
|
|
1648
|
-
"actual_dimensions": 1024,
|
|
1649
|
-
},
|
|
1650
|
-
)
|
|
1651
|
-
monkeypatch.setattr(
|
|
1652
|
-
cli,
|
|
1653
|
-
"_collect_pgvector_readiness",
|
|
1654
|
-
lambda **_kwargs: {
|
|
1655
|
-
"ready": True,
|
|
1656
|
-
"errors": [],
|
|
1657
|
-
"diagnostics": {
|
|
1658
|
-
"extension_available": True,
|
|
1659
|
-
"extension_version": "0.8.1",
|
|
1660
|
-
"extension_version_ok": True,
|
|
1661
|
-
"vector_column_ready": True,
|
|
1662
|
-
"hnsw_index_ready": True,
|
|
1663
|
-
"ivfflat_index_ready": False,
|
|
1664
|
-
"lexical_only": False,
|
|
1665
|
-
},
|
|
1666
|
-
},
|
|
1667
|
-
)
|
|
1668
|
-
|
|
1669
|
-
result = runner.invoke(
|
|
1670
|
-
cli.app,
|
|
1671
|
-
[
|
|
1672
|
-
"--json-only",
|
|
1673
|
-
"embedding-check",
|
|
1674
|
-
"--state-dsn",
|
|
1675
|
-
"postgresql://user:pass@localhost/db",
|
|
1676
|
-
"--model",
|
|
1677
|
-
"bge-m3",
|
|
1678
|
-
],
|
|
1679
|
-
)
|
|
1680
|
-
|
|
1681
|
-
assert result.exit_code == 0, result.stdout
|
|
1682
|
-
payload = json.loads(result.stdout)
|
|
1683
|
-
assert payload["operation"] == "embedding_check"
|
|
1684
|
-
assert payload["status"] == "ok"
|
|
1685
|
-
assert payload["checks"]["ollama_reachable"] is True
|
|
1686
|
-
assert payload["checks"]["model_available"] is True
|
|
1687
|
-
assert payload["checks"]["embedding_dimensions_ok"] is True
|
|
1688
|
-
assert payload["checks"]["pgvector_ready"] is True
|
|
1689
|
-
assert payload["resolved_model"] == "bge-m3:latest"
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
def test_embedding_check_applies_bge_fallback_order_when_requested(monkeypatch) -> None:
|
|
1693
|
-
runner = CliRunner()
|
|
1694
|
-
captured: dict[str, object] = {}
|
|
1695
|
-
|
|
1696
|
-
monkeypatch.setattr(cli, "_fetch_ollama_local_models", lambda **_kwargs: ["nomic-embed-text:latest"])
|
|
1697
|
-
|
|
1698
|
-
def _fake_probe_embedding_dimensions(**kwargs):
|
|
1699
|
-
captured.update(kwargs)
|
|
1700
|
-
return {
|
|
1701
|
-
"backend": "ollama_api_embed",
|
|
1702
|
-
"response_model": "nomic-embed-text:latest",
|
|
1703
|
-
"model_digest": "digest-b",
|
|
1704
|
-
"expected_dimensions": 768,
|
|
1705
|
-
"actual_dimensions": 768,
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
monkeypatch.setattr(cli, "_probe_embedding_dimensions", _fake_probe_embedding_dimensions)
|
|
1709
|
-
monkeypatch.setattr(
|
|
1710
|
-
cli,
|
|
1711
|
-
"_collect_pgvector_readiness",
|
|
1712
|
-
lambda **_kwargs: {
|
|
1713
|
-
"ready": True,
|
|
1714
|
-
"errors": [],
|
|
1715
|
-
"diagnostics": {
|
|
1716
|
-
"extension_available": True,
|
|
1717
|
-
"extension_version": "0.8.1",
|
|
1718
|
-
"extension_version_ok": True,
|
|
1719
|
-
"vector_column_ready": True,
|
|
1720
|
-
"hnsw_index_ready": True,
|
|
1721
|
-
"ivfflat_index_ready": False,
|
|
1722
|
-
"lexical_only": False,
|
|
1723
|
-
},
|
|
1724
|
-
},
|
|
1725
|
-
)
|
|
1726
|
-
|
|
1727
|
-
result = runner.invoke(
|
|
1728
|
-
cli.app,
|
|
1729
|
-
[
|
|
1730
|
-
"--json-only",
|
|
1731
|
-
"embedding-check",
|
|
1732
|
-
"--state-dsn",
|
|
1733
|
-
"postgresql://user:pass@localhost/db",
|
|
1734
|
-
"--model",
|
|
1735
|
-
"bge-m3",
|
|
1736
|
-
"--allow-fallback",
|
|
1737
|
-
],
|
|
1738
|
-
)
|
|
1739
|
-
|
|
1740
|
-
assert result.exit_code == 0, result.stdout
|
|
1741
|
-
payload = json.loads(result.stdout)
|
|
1742
|
-
assert payload["status"] == "ok"
|
|
1743
|
-
assert payload["resolved_model"] == "nomic-embed-text:latest"
|
|
1744
|
-
assert payload["fallback_used"] is True
|
|
1745
|
-
assert captured["model"] == "nomic-embed-text:latest"
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
def test_embedding_check_fails_when_pgvector_readiness_fails(monkeypatch) -> None:
|
|
1749
|
-
runner = CliRunner()
|
|
1750
|
-
|
|
1751
|
-
monkeypatch.setattr(cli, "_fetch_ollama_local_models", lambda **_kwargs: ["bge-m3:latest"])
|
|
1752
|
-
monkeypatch.setattr(
|
|
1753
|
-
cli,
|
|
1754
|
-
"_probe_embedding_dimensions",
|
|
1755
|
-
lambda **_kwargs: {
|
|
1756
|
-
"backend": "ollama_api_embed",
|
|
1757
|
-
"response_model": "bge-m3:latest",
|
|
1758
|
-
"model_digest": "digest-a",
|
|
1759
|
-
"expected_dimensions": 1024,
|
|
1760
|
-
"actual_dimensions": 1024,
|
|
1761
|
-
},
|
|
1762
|
-
)
|
|
1763
|
-
monkeypatch.setattr(
|
|
1764
|
-
cli,
|
|
1765
|
-
"_collect_pgvector_readiness",
|
|
1766
|
-
lambda **_kwargs: {
|
|
1767
|
-
"ready": False,
|
|
1768
|
-
"errors": ["pgvector extension version must be >= 0.8.1 (found: 0.8.0)"],
|
|
1769
|
-
"diagnostics": {
|
|
1770
|
-
"extension_available": True,
|
|
1771
|
-
"extension_version": "0.8.0",
|
|
1772
|
-
"extension_version_ok": False,
|
|
1773
|
-
"vector_column_ready": True,
|
|
1774
|
-
"hnsw_index_ready": True,
|
|
1775
|
-
"ivfflat_index_ready": False,
|
|
1776
|
-
"lexical_only": False,
|
|
1777
|
-
},
|
|
1778
|
-
},
|
|
1779
|
-
)
|
|
1780
|
-
|
|
1781
|
-
result = runner.invoke(
|
|
1782
|
-
cli.app,
|
|
1783
|
-
[
|
|
1784
|
-
"--json-only",
|
|
1785
|
-
"embedding-check",
|
|
1786
|
-
"--state-dsn",
|
|
1787
|
-
"postgresql://user:pass@localhost/db",
|
|
1788
|
-
"--model",
|
|
1789
|
-
"bge-m3",
|
|
1790
|
-
],
|
|
1791
|
-
)
|
|
1792
|
-
|
|
1793
|
-
assert result.exit_code == 1, result.stdout
|
|
1794
|
-
payload = json.loads(result.stdout)
|
|
1795
|
-
assert payload["status"] == "error"
|
|
1796
|
-
assert payload["checks"]["pgvector_ready"] is False
|
|
1797
|
-
assert any("0.8.1" in err for err in payload["errors"])
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
def test_typed_run_persistence_fail_fast(monkeypatch) -> None:
|
|
1801
|
-
def _get_run(**_kwargs):
|
|
1802
|
-
return {"run_id": "run-1"}
|
|
1803
|
-
|
|
1804
|
-
def _update_run(**_kwargs):
|
|
1805
|
-
return {"run_id": "run-1"}
|
|
1806
|
-
|
|
1807
|
-
def _append_run_event(**_kwargs):
|
|
1808
|
-
raise RuntimeError("db unavailable")
|
|
1809
|
-
|
|
1810
|
-
_install_fake_state_module(
|
|
1811
|
-
monkeypatch,
|
|
1812
|
-
get_run=_get_run,
|
|
1813
|
-
create_run=lambda **kwargs: kwargs,
|
|
1814
|
-
update_run=_update_run,
|
|
1815
|
-
append_run_event=_append_run_event,
|
|
1816
|
-
)
|
|
1817
|
-
|
|
1818
|
-
with pytest.raises(RuntimeError) as exc_info:
|
|
1819
|
-
cli._persist_typed_run_terminal(
|
|
1820
|
-
state_dsn="postgresql://user:pass@localhost/db",
|
|
1821
|
-
run_id="run-1",
|
|
1822
|
-
project_key="merchant-profile-service",
|
|
1823
|
-
repo_key="merchant-profile-service:repo-one",
|
|
1824
|
-
run_type="workflow",
|
|
1825
|
-
terminal_status="completed",
|
|
1826
|
-
event_type="analysis_completed",
|
|
1827
|
-
payload={"kind": "workflow_run"},
|
|
1828
|
-
)
|
|
1829
|
-
|
|
1830
|
-
message = str(exc_info.value)
|
|
1831
|
-
assert "Typed run persistence failed" in message
|
|
1832
|
-
assert "run_id='run-1'" in message
|
|
1833
|
-
assert "analysis_completed" in message
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
def test_typed_run_start_timeout_is_non_fatal(monkeypatch) -> None:
|
|
1837
|
-
_install_fake_state_module(
|
|
1838
|
-
monkeypatch,
|
|
1839
|
-
get_run=lambda **_kwargs: {"run_id": "run-1"},
|
|
1840
|
-
create_run=lambda **kwargs: kwargs,
|
|
1841
|
-
update_run=lambda **kwargs: kwargs,
|
|
1842
|
-
append_run_event=lambda **kwargs: kwargs,
|
|
1843
|
-
)
|
|
1844
|
-
|
|
1845
|
-
monkeypatch.setattr(cli, "_noncritical_state_api_timeout_seconds", lambda: 0.01)
|
|
1846
|
-
|
|
1847
|
-
def _timeout_invoke(**_kwargs):
|
|
1848
|
-
raise TimeoutError("state timeout")
|
|
1849
|
-
|
|
1850
|
-
monkeypatch.setattr(cli, "_invoke_state_api_with_timeout", _timeout_invoke)
|
|
1851
|
-
|
|
1852
|
-
cli._persist_typed_run_start(
|
|
1853
|
-
state_dsn="postgresql://user:pass@localhost/db",
|
|
1854
|
-
run_id="run-1",
|
|
1855
|
-
project_key="merchant-profile-service",
|
|
1856
|
-
repo_key="merchant-profile-service:repo-one",
|
|
1857
|
-
run_type="workflow",
|
|
1858
|
-
event_type="run_started",
|
|
1859
|
-
payload={"kind": "workflow_invocation"},
|
|
1860
|
-
)
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
def test_load_manifest_payload_from_state_uses_timeout_guard(monkeypatch) -> None:
|
|
1864
|
-
_install_fake_state_module(
|
|
1865
|
-
monkeypatch,
|
|
1866
|
-
load_manifest_payload=lambda **_kwargs: {"projects": []},
|
|
1867
|
-
)
|
|
1868
|
-
monkeypatch.setattr(cli, "_noncritical_state_api_timeout_seconds", lambda: 0.25)
|
|
1869
|
-
|
|
1870
|
-
captured: dict[str, object] = {}
|
|
1871
|
-
|
|
1872
|
-
def _capture_timeout(*_args, **kwargs):
|
|
1873
|
-
captured["timeout_seconds"] = kwargs.get("timeout_seconds")
|
|
1874
|
-
return {"projects": []}
|
|
1875
|
-
|
|
1876
|
-
monkeypatch.setattr(cli, "_invoke_state_api_with_timeout", _capture_timeout)
|
|
1877
|
-
|
|
1878
|
-
payload = cli._load_manifest_payload_from_state("postgresql://user:pass@localhost/db")
|
|
1879
|
-
|
|
1880
|
-
assert payload == {"projects": []}
|
|
1881
|
-
assert captured["timeout_seconds"] == 0.25
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
def test_typed_run_terminal_uses_scoped_run_id_when_run_type_collides(monkeypatch) -> None:
|
|
1885
|
-
calls: dict[str, list[str]] = {
|
|
1886
|
-
"get_run": [],
|
|
1887
|
-
"create_run": [],
|
|
1888
|
-
"update_run": [],
|
|
1889
|
-
"append_run_event": [],
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
def _get_run(**kwargs):
|
|
1893
|
-
run_id = str(kwargs["run_id"])
|
|
1894
|
-
calls["get_run"].append(run_id)
|
|
1895
|
-
if run_id == "thread-123":
|
|
1896
|
-
return {"run_id": "thread-123", "run_type": "workflow"}
|
|
1897
|
-
return None
|
|
1898
|
-
|
|
1899
|
-
def _create_run(**kwargs):
|
|
1900
|
-
calls["create_run"].append(str(kwargs["run_id"]))
|
|
1901
|
-
return kwargs
|
|
1902
|
-
|
|
1903
|
-
def _update_run(**kwargs):
|
|
1904
|
-
calls["update_run"].append(str(kwargs["run_id"]))
|
|
1905
|
-
return kwargs
|
|
1906
|
-
|
|
1907
|
-
def _append_run_event(**kwargs):
|
|
1908
|
-
calls["append_run_event"].append(str(kwargs["run_id"]))
|
|
1909
|
-
return kwargs
|
|
1910
|
-
|
|
1911
|
-
_install_fake_state_module(
|
|
1912
|
-
monkeypatch,
|
|
1913
|
-
get_run=_get_run,
|
|
1914
|
-
create_run=_create_run,
|
|
1915
|
-
update_run=_update_run,
|
|
1916
|
-
append_run_event=_append_run_event,
|
|
1917
|
-
)
|
|
1918
|
-
|
|
1919
|
-
cli._persist_typed_run_terminal(
|
|
1920
|
-
state_dsn="postgresql://user:pass@localhost/db",
|
|
1921
|
-
run_id="thread-123",
|
|
1922
|
-
project_key="par",
|
|
1923
|
-
repo_key="par:repo",
|
|
1924
|
-
run_type="upload_results",
|
|
1925
|
-
terminal_status="completed",
|
|
1926
|
-
event_type="publish_completed",
|
|
1927
|
-
payload={"kind": "upload_results"},
|
|
1928
|
-
)
|
|
1929
|
-
|
|
1930
|
-
assert calls["get_run"] == ["thread-123", "thread-123:upload_results"]
|
|
1931
|
-
assert calls["create_run"] == ["thread-123:upload_results"]
|
|
1932
|
-
assert calls["update_run"] == ["thread-123:upload_results"]
|
|
1933
|
-
assert calls["append_run_event"] == ["thread-123:upload_results"]
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
def test_cache_stats_uses_state_api(monkeypatch) -> None:
|
|
1937
|
-
runner = CliRunner()
|
|
1938
|
-
|
|
1939
|
-
def _fake_cache_stats(state_dsn: str):
|
|
1940
|
-
return {"total_artifacts": 3, "status_counts": {"ready": 2, "claimed": 1}, "not_modified_count_total": 4}
|
|
1941
|
-
|
|
1942
|
-
_install_fake_state_module(monkeypatch, cache_stats=_fake_cache_stats)
|
|
1943
|
-
|
|
1944
|
-
result = runner.invoke(
|
|
1945
|
-
cli.app,
|
|
1946
|
-
[
|
|
1947
|
-
"--json-only",
|
|
1948
|
-
"cache",
|
|
1949
|
-
"stats",
|
|
1950
|
-
"--state-dsn",
|
|
1951
|
-
"postgresql://user:pass@localhost/db",
|
|
1952
|
-
],
|
|
1953
|
-
)
|
|
1954
|
-
|
|
1955
|
-
assert result.exit_code == 0, result.stdout
|
|
1956
|
-
payload = json.loads(result.stdout)
|
|
1957
|
-
assert payload["status"] == "ok"
|
|
1958
|
-
assert payload["operation"] == "cache_stats"
|
|
1959
|
-
assert payload["result"]["total_artifacts"] == 3
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
def test_state_dsn_option_appears_in_phase36_command_help() -> None:
|
|
1963
|
-
runner = CliRunner()
|
|
1964
|
-
commands = ["parse-registry", "extract-docs", "workflow", "upload-results", "list-materials", "analyze"]
|
|
1965
|
-
for command in commands:
|
|
1966
|
-
result = runner.invoke(cli.app, [command, "--help"])
|
|
1967
|
-
assert result.exit_code == 0, f"{command} help failed"
|
|
1968
|
-
assert "--state-dsn" in result.output
|
|
1969
|
-
|
|
1970
|
-
result = runner.invoke(cli.app, ["cache", "stats", "--help"])
|
|
1971
|
-
assert result.exit_code == 0
|
|
1972
|
-
assert "--state-dsn" in result.output
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
def test_parse_registry_persists_discovery_with_state_dsn(monkeypatch) -> None:
|
|
1976
|
-
runner = CliRunner()
|
|
1977
|
-
captured: dict[str, object] = {}
|
|
1978
|
-
project = ProjectMaterial(
|
|
1979
|
-
project_name="Insurance Core",
|
|
1980
|
-
project_name_en=None,
|
|
1981
|
-
page_id="101",
|
|
1982
|
-
page_url="https://example.local/pages/1",
|
|
1983
|
-
documents=[],
|
|
1984
|
-
confluence_links=["https://example.local/pages/2"],
|
|
1985
|
-
bitbucket_links=["https://bitbucket.local/projects/INS/repos/core"],
|
|
1986
|
-
department="Payment",
|
|
1987
|
-
department_page_id="200",
|
|
1988
|
-
department_storage_key="200",
|
|
1989
|
-
root_page_id="88716667",
|
|
1990
|
-
)
|
|
1991
|
-
registry = ProjectRegistry(
|
|
1992
|
-
registry_url="/pages/viewpage.action?pageId=88716667",
|
|
1993
|
-
registry_page_id="88716667",
|
|
1994
|
-
projects=[project],
|
|
1995
|
-
)
|
|
1996
|
-
|
|
1997
|
-
class _FakeConfluenceClient:
|
|
1998
|
-
@classmethod
|
|
1999
|
-
def for_registry_discovery(cls, *args, **kwargs):
|
|
2000
|
-
return cls()
|
|
2001
|
-
|
|
2002
|
-
class _FakeParser:
|
|
2003
|
-
def __init__(self, *args, **kwargs):
|
|
2004
|
-
pass
|
|
2005
|
-
|
|
2006
|
-
async def parse_registry(self, _registry_id: str) -> ProjectRegistry:
|
|
2007
|
-
return registry
|
|
2008
|
-
|
|
2009
|
-
async def _fake_resolve_page_id(_client, _identifier: str) -> str:
|
|
2010
|
-
return "88716667"
|
|
2011
|
-
|
|
2012
|
-
def _record_discovery(**kwargs):
|
|
2013
|
-
captured.update(kwargs)
|
|
2014
|
-
return {"ok": True}
|
|
2015
|
-
|
|
2016
|
-
_install_fake_state_module(monkeypatch, record_discovery=_record_discovery)
|
|
2017
|
-
monkeypatch.setattr(cli, "ConfluenceCliClient", _FakeConfluenceClient)
|
|
2018
|
-
monkeypatch.setattr(parse_cmds, "RegistryPageParser", _FakeParser)
|
|
2019
|
-
monkeypatch.setattr(cli, "_resolve_confluence_page_id", _fake_resolve_page_id)
|
|
2020
|
-
|
|
2021
|
-
result = runner.invoke(
|
|
2022
|
-
cli.app,
|
|
2023
|
-
[
|
|
2024
|
-
"--json-only",
|
|
2025
|
-
"parse-registry",
|
|
2026
|
-
"--registry-page",
|
|
2027
|
-
"88716667",
|
|
2028
|
-
"--state-dsn",
|
|
2029
|
-
"sqlite:///tmp/state.db",
|
|
2030
|
-
],
|
|
2031
|
-
)
|
|
2032
|
-
|
|
2033
|
-
assert result.exit_code == 0, result.stdout
|
|
2034
|
-
payload = captured["payload"]
|
|
2035
|
-
assert isinstance(payload, dict)
|
|
2036
|
-
assert payload["kind"] == "registry_discovery"
|
|
2037
|
-
assert payload["project_count"] == 1
|
|
2038
|
-
assert payload["departments"][0]["department"] == "Payment"
|
|
2039
|
-
assert payload["departments"][0]["department_storage_key"] == "200"
|
|
2040
|
-
assert payload["departments"][0]["department_page_id"] == "200"
|
|
2041
|
-
assert payload["departments"][0]["project_count"] == 1
|
|
2042
|
-
assert payload["departments"][0]["projects"][0]["project_storage_key"] == "101"
|
|
2043
|
-
assert payload["projects"][0]["page_id"] == "101"
|
|
2044
|
-
assert payload["projects"][0]["project_storage_key"] == "101"
|
|
2045
|
-
assert payload["projects"][0]["confluence_links"] == ["https://example.local/pages/2"]
|
|
2046
|
-
assert payload["projects"][0]["bitbucket_links"] == ["https://bitbucket.local/projects/INS/repos/core"]
|
|
2047
|
-
assert "checklist_page_id" not in payload
|
|
2048
|
-
assert "checklist_title" not in payload
|
|
2049
|
-
assert "checklist_page_url" not in payload
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
def test_parse_registry_state_persist_is_best_effort(monkeypatch) -> None:
|
|
2053
|
-
runner = CliRunner()
|
|
2054
|
-
registry = ProjectRegistry(
|
|
2055
|
-
registry_url="/pages/viewpage.action?pageId=88716667",
|
|
2056
|
-
registry_page_id="88716667",
|
|
2057
|
-
projects=[],
|
|
2058
|
-
)
|
|
2059
|
-
|
|
2060
|
-
class _FakeConfluenceClient:
|
|
2061
|
-
@classmethod
|
|
2062
|
-
def for_registry_discovery(cls, *args, **kwargs):
|
|
2063
|
-
return cls()
|
|
2064
|
-
|
|
2065
|
-
class _FakeParser:
|
|
2066
|
-
def __init__(self, *args, **kwargs):
|
|
2067
|
-
pass
|
|
2068
|
-
|
|
2069
|
-
async def parse_registry(self, _registry_id: str) -> ProjectRegistry:
|
|
2070
|
-
return registry
|
|
2071
|
-
|
|
2072
|
-
async def _fake_resolve_page_id(_client, _identifier: str) -> str:
|
|
2073
|
-
return "88716667"
|
|
2074
|
-
|
|
2075
|
-
def _broken_record_discovery(**kwargs):
|
|
2076
|
-
raise RuntimeError("state unavailable")
|
|
2077
|
-
|
|
2078
|
-
_install_fake_state_module(monkeypatch, record_discovery=_broken_record_discovery)
|
|
2079
|
-
monkeypatch.setattr(cli, "ConfluenceCliClient", _FakeConfluenceClient)
|
|
2080
|
-
monkeypatch.setattr(parse_cmds, "RegistryPageParser", _FakeParser)
|
|
2081
|
-
monkeypatch.setattr(cli, "_resolve_confluence_page_id", _fake_resolve_page_id)
|
|
2082
|
-
|
|
2083
|
-
result = runner.invoke(
|
|
2084
|
-
cli.app,
|
|
2085
|
-
[
|
|
2086
|
-
"--json-only",
|
|
2087
|
-
"parse-registry",
|
|
2088
|
-
"--registry-page",
|
|
2089
|
-
"88716667",
|
|
2090
|
-
"--state-dsn",
|
|
2091
|
-
"sqlite:///tmp/state.db",
|
|
2092
|
-
],
|
|
2093
|
-
)
|
|
2094
|
-
|
|
2095
|
-
assert result.exit_code == 1, result.stdout
|
|
2096
|
-
payload = json.loads(result.stdout)
|
|
2097
|
-
assert "error" in payload
|
|
2098
|
-
assert "state unavailable" in payload["error"].lower()
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
def test_extract_docs_persists_artifacts_with_state_dsn(monkeypatch, tmp_path) -> None:
|
|
2102
|
-
runner = CliRunner()
|
|
2103
|
-
output_dir = tmp_path / "evidence"
|
|
2104
|
-
captured: dict[str, object] = {}
|
|
2105
|
-
|
|
2106
|
-
project = ProjectMaterial(
|
|
2107
|
-
project_name="Insurance Core",
|
|
2108
|
-
project_name_en=None,
|
|
2109
|
-
page_id="101",
|
|
2110
|
-
page_url="https://example.local/pages/1",
|
|
2111
|
-
bitbucket_links=[],
|
|
2112
|
-
confluence_links=[],
|
|
2113
|
-
)
|
|
2114
|
-
|
|
2115
|
-
class _FakeConfluenceClient:
|
|
2116
|
-
def __init__(self, *args, **kwargs):
|
|
2117
|
-
pass
|
|
2118
|
-
|
|
2119
|
-
async def crawl_tree(self, root_ref: str, output_dir: Path, **kwargs) -> dict[str, object]:
|
|
2120
|
-
return {"page": {"page_id": root_ref}, "child_pages": [], "attachments": []}
|
|
2121
|
-
|
|
2122
|
-
class _FakeParser:
|
|
2123
|
-
def __init__(self, *args, **kwargs):
|
|
2124
|
-
pass
|
|
2125
|
-
|
|
2126
|
-
async def parse_project_page(self, _page_id: str, _label: str) -> ProjectMaterial | None:
|
|
2127
|
-
return project
|
|
2128
|
-
|
|
2129
|
-
class _FakeDownloader:
|
|
2130
|
-
def __init__(self, *args, **kwargs):
|
|
2131
|
-
pass
|
|
2132
|
-
|
|
2133
|
-
async def download_page(self, page_id: str, output_root: Path, **kwargs):
|
|
2134
|
-
page_path = output_root / f"{page_id}.md"
|
|
2135
|
-
page_path.parent.mkdir(parents=True, exist_ok=True)
|
|
2136
|
-
page_path.write_text("ok", encoding="utf-8")
|
|
2137
|
-
return {"page_id": page_id, "markdown_path": str(page_path), "status": "found"}
|
|
2138
|
-
|
|
2139
|
-
class _FakeBitbucketDownloader:
|
|
2140
|
-
def __init__(self, *args, **kwargs):
|
|
2141
|
-
pass
|
|
2142
|
-
|
|
2143
|
-
async def _fake_resolve_page_id(_client, _identifier: str) -> str:
|
|
2144
|
-
return "101"
|
|
2145
|
-
|
|
2146
|
-
def _record_artifacts(**kwargs):
|
|
2147
|
-
captured.update(kwargs)
|
|
2148
|
-
return {"ok": True}
|
|
2149
|
-
|
|
2150
|
-
_install_fake_state_module(
|
|
2151
|
-
monkeypatch,
|
|
2152
|
-
record_artifacts=_record_artifacts,
|
|
2153
|
-
vector_index_health=lambda **_kw: {"status": "ok", "tables": []},
|
|
2154
|
-
load_manifest_payload=lambda **_kw: {},
|
|
2155
|
-
)
|
|
2156
|
-
monkeypatch.setattr(extract_cmds, "ConfluenceCliClient", _FakeConfluenceClient)
|
|
2157
|
-
monkeypatch.setattr(extract_cmds, "RegistryPageParser", _FakeParser)
|
|
2158
|
-
monkeypatch.setattr(extract_cmds, "MaterialDownloader", _FakeDownloader)
|
|
2159
|
-
monkeypatch.setattr(extract_cmds, "BitbucketMaterialDownloader", _FakeBitbucketDownloader)
|
|
2160
|
-
monkeypatch.setattr(extract_cmds, "_resolve_confluence_page_id", _fake_resolve_page_id)
|
|
2161
|
-
|
|
2162
|
-
# Patch state functions on extract_cmds to prevent real Postgres connections
|
|
2163
|
-
_ecmds = extract_cmds
|
|
2164
|
-
|
|
2165
|
-
monkeypatch.setattr(_ecmds, "_load_manifest_payload_from_state", lambda _dsn: {})
|
|
2166
|
-
monkeypatch.setattr(
|
|
2167
|
-
_ecmds,
|
|
2168
|
-
"_preflight_extract_docs_retrieval_refresh",
|
|
2169
|
-
lambda **_kw: {
|
|
2170
|
-
"vector_readiness": {"ready": False, "diagnostics": {"lexical_only": True}},
|
|
2171
|
-
"project_readiness": {},
|
|
2172
|
-
},
|
|
2173
|
-
)
|
|
2174
|
-
monkeypatch.setattr(_ecmds, "_refresh_state_retrieval_snapshot", lambda **_kw: {"status": "ok"})
|
|
2175
|
-
|
|
2176
|
-
def _fake_record(*, state_dsn, payload, state_api=None):
|
|
2177
|
-
captured.update({"payload": payload})
|
|
2178
|
-
return {"ok": True}
|
|
2179
|
-
|
|
2180
|
-
monkeypatch.setattr(_ecmds, "_record_state_artifacts", _fake_record)
|
|
2181
|
-
|
|
2182
|
-
result = runner.invoke(
|
|
2183
|
-
cli.app,
|
|
2184
|
-
[
|
|
2185
|
-
"--json-only",
|
|
2186
|
-
"extract-docs",
|
|
2187
|
-
"--project-page",
|
|
2188
|
-
"101",
|
|
2189
|
-
"--output-dir",
|
|
2190
|
-
str(output_dir),
|
|
2191
|
-
"--recursive-depth",
|
|
2192
|
-
"0",
|
|
2193
|
-
"--no-include-attachments",
|
|
2194
|
-
"--no-include-bitbucket",
|
|
2195
|
-
"--state-dsn",
|
|
2196
|
-
"sqlite:///tmp/state.db",
|
|
2197
|
-
],
|
|
2198
|
-
)
|
|
2199
|
-
|
|
2200
|
-
assert result.exit_code == 0, result.stdout
|
|
2201
|
-
payload = captured["payload"]
|
|
2202
|
-
assert isinstance(payload, dict)
|
|
2203
|
-
assert payload["kind"] == "project_artifacts"
|
|
2204
|
-
assert len(payload["projects"]) == 1
|
|
2205
|
-
assert payload["projects"][0]["project_storage_key"] == "101"
|
|
2206
|
-
assert payload["projects"][0]["fetch_policy"] == "if-changed"
|
|
2207
|
-
sync_metadata = payload["projects"][0]["sync_metadata"]
|
|
2208
|
-
assert isinstance(sync_metadata, dict)
|
|
2209
|
-
assert sync_metadata["fetch_policy"] == "if-changed"
|
|
2210
|
-
assert sync_metadata["artifact_count"] >= 1
|
|
2211
|
-
assert sync_metadata["artifacts"][0]["resource_type"] == "confluence_page"
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
def test_analyze_wires_state_dependencies_without_signature_fallback(monkeypatch, tmp_path) -> None:
|
|
2215
|
-
runner = CliRunner()
|
|
2216
|
-
evidence_dir = tmp_path / "evidence"
|
|
2217
|
-
evidence_dir.mkdir(parents=True, exist_ok=True)
|
|
2218
|
-
captured: dict[str, object] = {}
|
|
2219
|
-
|
|
2220
|
-
engine_module = types.ModuleType("vds_audit_orchestrator.engine.ad_hoc_analyzer")
|
|
2221
|
-
|
|
2222
|
-
class _FakeConfig:
|
|
2223
|
-
def __init__(self, **kwargs):
|
|
2224
|
-
self.kwargs = kwargs
|
|
2225
|
-
|
|
2226
|
-
class _FakeResult:
|
|
2227
|
-
status = "PASS"
|
|
2228
|
-
score = 100.0
|
|
2229
|
-
evidence_anchors: list[dict[str, object]] = []
|
|
2230
|
-
|
|
2231
|
-
def model_dump(self, mode: str = "json") -> dict[str, object]:
|
|
2232
|
-
return {
|
|
2233
|
-
"requirement": "must validate signatures",
|
|
2234
|
-
"status": "PASS",
|
|
2235
|
-
"score": 100.0,
|
|
2236
|
-
"evidence_anchors": [],
|
|
2237
|
-
}
|
|
2238
|
-
|
|
2239
|
-
class _FakeAnalyzer:
|
|
2240
|
-
def __init__(
|
|
2241
|
-
self,
|
|
2242
|
-
*,
|
|
2243
|
-
evidence_dir: Path,
|
|
2244
|
-
repo_path: Path | None,
|
|
2245
|
-
config: _FakeConfig,
|
|
2246
|
-
state_dsn: str,
|
|
2247
|
-
state_manifest_loader,
|
|
2248
|
-
) -> None:
|
|
2249
|
-
captured["evidence_dir"] = evidence_dir
|
|
2250
|
-
captured["state_dsn"] = state_dsn
|
|
2251
|
-
captured["state_manifest_loader"] = state_manifest_loader
|
|
2252
|
-
|
|
2253
|
-
async def analyze(self, requirement: str) -> _FakeResult:
|
|
2254
|
-
captured["requirement"] = requirement
|
|
2255
|
-
return _FakeResult()
|
|
2256
|
-
|
|
2257
|
-
engine_module.AdHocAnalysisConfig = _FakeConfig
|
|
2258
|
-
engine_module.AdHocAnalyzer = _FakeAnalyzer
|
|
2259
|
-
monkeypatch.setitem(sys.modules, "vds_audit_orchestrator.engine.ad_hoc_analyzer", engine_module)
|
|
2260
|
-
monkeypatch.setattr(
|
|
2261
|
-
"vds_audit_orchestrator.cli._load_manifest_payload_from_state",
|
|
2262
|
-
lambda _dsn: {
|
|
2263
|
-
"projects": [
|
|
2264
|
-
{
|
|
2265
|
-
"project_name": "test-project",
|
|
2266
|
-
"project_name_en": "Test Project",
|
|
2267
|
-
"page_id": "12345",
|
|
2268
|
-
"page_url": "https://confluence.example.local/pages/viewpage.action?pageId=12345",
|
|
2269
|
-
"project_storage_key": "12345",
|
|
2270
|
-
"documents": [],
|
|
2271
|
-
"bitbucket_links": [],
|
|
2272
|
-
}
|
|
2273
|
-
]
|
|
2274
|
-
},
|
|
2275
|
-
)
|
|
2276
|
-
monkeypatch.setattr(
|
|
2277
|
-
"vds_audit_orchestrator.cli._preflight_analyze_retrieval_snapshot",
|
|
2278
|
-
lambda **_kwargs: None,
|
|
2279
|
-
)
|
|
2280
|
-
|
|
2281
|
-
from vds_audit_orchestrator.evidence.corpus import EvidenceCorpus, EvidenceDocument
|
|
2282
|
-
|
|
2283
|
-
class _FakeManifestLoader:
|
|
2284
|
-
def __init__(self, *_args, **_kwargs) -> None:
|
|
2285
|
-
pass
|
|
2286
|
-
|
|
2287
|
-
def load(self) -> EvidenceCorpus:
|
|
2288
|
-
return EvidenceCorpus(
|
|
2289
|
-
documents=[
|
|
2290
|
-
EvidenceDocument(
|
|
2291
|
-
title="Security",
|
|
2292
|
-
content="Signature validation requirements",
|
|
2293
|
-
source_path="docs/test-project/security.md",
|
|
2294
|
-
doc_type="SRS",
|
|
2295
|
-
project_name="test-project",
|
|
2296
|
-
source_url="https://confluence.example.local/pages/viewpage.action?pageId=12345",
|
|
2297
|
-
)
|
|
2298
|
-
],
|
|
2299
|
-
)
|
|
2300
|
-
|
|
2301
|
-
def load_runtime_corpus(self, **_kwargs) -> EvidenceCorpus:
|
|
2302
|
-
return self.load()
|
|
2303
|
-
|
|
2304
|
-
monkeypatch.setattr("vds_audit_orchestrator.evidence.loader.EvidenceManifestLoader", _FakeManifestLoader)
|
|
2305
|
-
|
|
2306
|
-
bootstrap_module = types.ModuleType("vds_audit_orchestrator.evidence.bootstrap")
|
|
2307
|
-
bootstrap_module.load_registry_manifest = lambda **kwargs: cli.ProjectRegistry(
|
|
2308
|
-
registry_url="/pages/viewpage.action?pageId=1",
|
|
2309
|
-
registry_page_id="1",
|
|
2310
|
-
projects=[],
|
|
2311
|
-
)
|
|
2312
|
-
monkeypatch.setitem(sys.modules, "vds_audit_orchestrator.evidence.bootstrap", bootstrap_module)
|
|
2313
|
-
|
|
2314
|
-
result = runner.invoke(
|
|
2315
|
-
cli.app,
|
|
2316
|
-
[
|
|
2317
|
-
"--json-only",
|
|
2318
|
-
"analyze",
|
|
2319
|
-
"--requirement",
|
|
2320
|
-
"must validate signatures",
|
|
2321
|
-
"--state-dsn",
|
|
2322
|
-
"sqlite:///tmp/state.db",
|
|
2323
|
-
],
|
|
2324
|
-
)
|
|
2325
|
-
|
|
2326
|
-
assert result.exit_code == 0, result.stdout
|
|
2327
|
-
payload = json.loads(result.stdout)
|
|
2328
|
-
assert payload["status"] == "PASS"
|
|
2329
|
-
assert captured["state_dsn"] == "sqlite:///tmp/state.db"
|
|
2330
|
-
assert captured["state_manifest_loader"] is cli._load_manifest_payload_from_state
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
def test_analyze_prefers_bitbucket_repo_storage_key_for_repo_identity(monkeypatch, tmp_path) -> None:
|
|
2334
|
-
runner = CliRunner()
|
|
2335
|
-
evidence_dir = tmp_path / "evidence"
|
|
2336
|
-
evidence_dir.mkdir(parents=True, exist_ok=True)
|
|
2337
|
-
repo_root = tmp_path / "merchant-profile-service"
|
|
2338
|
-
repo_root.mkdir(parents=True, exist_ok=True)
|
|
2339
|
-
captured: dict[str, object] = {}
|
|
2340
|
-
|
|
2341
|
-
engine_module = types.ModuleType("vds_audit_orchestrator.engine.ad_hoc_analyzer")
|
|
2342
|
-
|
|
2343
|
-
class _FakeConfig:
|
|
2344
|
-
def __init__(self, **kwargs):
|
|
2345
|
-
self.kwargs = kwargs
|
|
2346
|
-
|
|
2347
|
-
class _FakeResult:
|
|
2348
|
-
status = "PASS"
|
|
2349
|
-
score = 100.0
|
|
2350
|
-
evidence_anchors: list[dict[str, object]] = []
|
|
2351
|
-
|
|
2352
|
-
def model_dump(self, mode: str = "json") -> dict[str, object]:
|
|
2353
|
-
return {
|
|
2354
|
-
"requirement": "must validate signatures",
|
|
2355
|
-
"status": "PASS",
|
|
2356
|
-
"score": 100.0,
|
|
2357
|
-
"evidence_anchors": [],
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
class _FakeAnalyzer:
|
|
2361
|
-
def __init__(
|
|
2362
|
-
self,
|
|
2363
|
-
*,
|
|
2364
|
-
evidence_dir: Path,
|
|
2365
|
-
repo_path: Path | None,
|
|
2366
|
-
config: _FakeConfig,
|
|
2367
|
-
state_dsn: str,
|
|
2368
|
-
state_manifest_loader,
|
|
2369
|
-
) -> None:
|
|
2370
|
-
captured["evidence_dir"] = evidence_dir
|
|
2371
|
-
captured["repo_path"] = repo_path
|
|
2372
|
-
captured["config_kwargs"] = dict(config.kwargs)
|
|
2373
|
-
captured["state_dsn"] = state_dsn
|
|
2374
|
-
captured["state_manifest_loader"] = state_manifest_loader
|
|
2375
|
-
|
|
2376
|
-
async def analyze(self, requirement: str) -> _FakeResult:
|
|
2377
|
-
captured["requirement"] = requirement
|
|
2378
|
-
return _FakeResult()
|
|
2379
|
-
|
|
2380
|
-
engine_module.AdHocAnalysisConfig = _FakeConfig
|
|
2381
|
-
engine_module.AdHocAnalyzer = _FakeAnalyzer
|
|
2382
|
-
monkeypatch.setitem(sys.modules, "vds_audit_orchestrator.engine.ad_hoc_analyzer", engine_module)
|
|
2383
|
-
monkeypatch.setattr(
|
|
2384
|
-
"vds_audit_orchestrator.cli._load_manifest_payload_from_state",
|
|
2385
|
-
lambda _dsn: {
|
|
2386
|
-
"projects": [
|
|
2387
|
-
{
|
|
2388
|
-
"project_name": "test-project",
|
|
2389
|
-
"project_name_en": "Test Project",
|
|
2390
|
-
"page_id": "12345",
|
|
2391
|
-
"page_url": "https://confluence.example.local/pages/viewpage.action?pageId=12345",
|
|
2392
|
-
"project_storage_key": "12345",
|
|
2393
|
-
"documents": [],
|
|
2394
|
-
"bitbucket": [
|
|
2395
|
-
{
|
|
2396
|
-
"repo_slug": "merchant-profile-service",
|
|
2397
|
-
"repo_storage_key": "test-project:merchant-profile-service",
|
|
2398
|
-
"local_code_path": str(repo_root),
|
|
2399
|
-
"readiness": "ready",
|
|
2400
|
-
"status": "updated",
|
|
2401
|
-
}
|
|
2402
|
-
],
|
|
2403
|
-
}
|
|
2404
|
-
]
|
|
2405
|
-
},
|
|
2406
|
-
)
|
|
2407
|
-
monkeypatch.setattr(
|
|
2408
|
-
"vds_audit_orchestrator.cli._preflight_analyze_retrieval_snapshot",
|
|
2409
|
-
lambda **_kwargs: None,
|
|
2410
|
-
)
|
|
2411
|
-
|
|
2412
|
-
from vds_audit_orchestrator.evidence.corpus import EvidenceCorpus, EvidenceDocument
|
|
2413
|
-
|
|
2414
|
-
class _FakeManifestLoader:
|
|
2415
|
-
def __init__(self, *_args, **_kwargs) -> None:
|
|
2416
|
-
pass
|
|
2417
|
-
|
|
2418
|
-
def load(self) -> EvidenceCorpus:
|
|
2419
|
-
return EvidenceCorpus(
|
|
2420
|
-
documents=[
|
|
2421
|
-
EvidenceDocument(
|
|
2422
|
-
title="Security",
|
|
2423
|
-
content="Signature validation requirements",
|
|
2424
|
-
source_path="docs/test-project/security.md",
|
|
2425
|
-
doc_type="SRS",
|
|
2426
|
-
project_name="test-project",
|
|
2427
|
-
source_url="https://confluence.example.local/pages/viewpage.action?pageId=12345",
|
|
2428
|
-
)
|
|
2429
|
-
],
|
|
2430
|
-
)
|
|
2431
|
-
|
|
2432
|
-
def load_runtime_corpus(self, **_kwargs) -> EvidenceCorpus:
|
|
2433
|
-
return self.load()
|
|
2434
|
-
|
|
2435
|
-
monkeypatch.setattr("vds_audit_orchestrator.evidence.loader.EvidenceManifestLoader", _FakeManifestLoader)
|
|
2436
|
-
|
|
2437
|
-
bootstrap_module = types.ModuleType("vds_audit_orchestrator.evidence.bootstrap")
|
|
2438
|
-
bootstrap_module.load_registry_manifest = lambda **kwargs: cli.ProjectRegistry(
|
|
2439
|
-
registry_url="/pages/viewpage.action?pageId=1",
|
|
2440
|
-
registry_page_id="1",
|
|
2441
|
-
projects=[],
|
|
2442
|
-
)
|
|
2443
|
-
monkeypatch.setitem(sys.modules, "vds_audit_orchestrator.evidence.bootstrap", bootstrap_module)
|
|
2444
|
-
|
|
2445
|
-
result = runner.invoke(
|
|
2446
|
-
cli.app,
|
|
2447
|
-
[
|
|
2448
|
-
"--json-only",
|
|
2449
|
-
"analyze",
|
|
2450
|
-
"--requirement",
|
|
2451
|
-
"must validate signatures",
|
|
2452
|
-
"--repo-path",
|
|
2453
|
-
str(repo_root),
|
|
2454
|
-
"--state-dsn",
|
|
2455
|
-
"sqlite:///tmp/state.db",
|
|
2456
|
-
],
|
|
2457
|
-
)
|
|
2458
|
-
|
|
2459
|
-
assert result.exit_code == 0, result.stdout
|
|
2460
|
-
payload = json.loads(result.stdout)
|
|
2461
|
-
assert payload["status"] == "PASS"
|
|
2462
|
-
assert captured["repo_path"] == repo_root
|
|
2463
|
-
assert captured["state_dsn"] == "sqlite:///tmp/state.db"
|
|
2464
|
-
assert captured["state_manifest_loader"] is cli._load_manifest_payload_from_state
|
|
2465
|
-
config_kwargs = captured["config_kwargs"]
|
|
2466
|
-
assert isinstance(config_kwargs, dict)
|
|
2467
|
-
assert config_kwargs.get("repo_storage_key") == "test-project-merchant-profile-service"
|