diff --git a/configs/quality/scripts_inventory_manifest.json b/configs/quality/scripts_inventory_manifest.json index 5ae62361c3..06eb492580 100644 --- a/configs/quality/scripts_inventory_manifest.json +++ b/configs/quality/scripts_inventory_manifest.json @@ -1,20 +1,21 @@ { "schema_version": "1.0", - "generated_at": "2026-05-25T18:56:06.584983+00:00", + "generated_at": "2026-05-28T21:50:15.279353+00:00", "summary": { - "total_scripts": 397, + "total_scripts": 403, "status_counts": { - "active": 357, + "active": 360, + "orphan": 3, "supporting": 40 }, "reference_group_coverage": { "agents": 4, "build": 3, "ci": 58, - "docs": 149, - "scripts": 314, + "docs": 145, + "scripts": 317, "skills": 8, - "tests": 161 + "tests": 164 } }, "scripts": [ @@ -293,7 +294,7 @@ }, { "path": "scripts/ops/__main__.py", - "line": 50, + "line": 60, "source_group": "scripts", "text": "\"diagnose-codex-wsl\": \"../ai/codex/diagnose_wsl.sh\"," }, @@ -1029,7 +1030,7 @@ "references": [ { "path": "scripts/ops/__main__.py", - "line": 51, + "line": 61, "source_group": "scripts", "text": "\"setup-agents\": \"../ai/codex/setup_agents.sh\"," }, @@ -1095,7 +1096,7 @@ "references": [ { "path": "scripts/ops/__main__.py", - "line": 53, + "line": 63, "source_group": "scripts", "text": "\"setup-skills\": \"../ai/codex/setup_skills.sh\"," }, @@ -1128,7 +1129,7 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 128, + "line": 132, "source_group": "scripts", "text": "├── gemini-interactive.ps1 # Thin compatibility launcher" }, @@ -1179,7 +1180,7 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 129, + "line": 133, "source_group": "scripts", "text": "├── gemini-interactive.sh # Thin compatibility launcher" }, @@ -1215,7 +1216,7 @@ }, { "path": "scripts/ai/gemini/gemini-interactive.ps1", - "line": 25, + "line": 19, "source_group": "scripts", "text": "$LauncherWSL = \"$RepoWSL/scripts/ai/gemini/gemini-interactive.sh\"" }, @@ -1236,7 +1237,7 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 126, + "line": 130, "source_group": "scripts", "text": "├── headless.ps1 # PowerShell transport without MCP sync" }, @@ -1248,7 +1249,7 @@ }, { "path": "scripts/ai/gemini/README.md", - "line": 112, + "line": 114, "source_group": "scripts", "text": "- `headless.sh` / `headless.ps1` set `GEMINI_SKIP_MCP_SETUP=1` for one launch and then delegate back to the canonical launcher." } @@ -1263,19 +1264,19 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 106, + "line": 110, "source_group": "scripts", "text": "bash scripts/ai/gemini/headless.sh" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 127, + "line": 131, "source_group": "scripts", "text": "├── headless.sh # WSL launcher without MCP sync" }, { "path": "scripts/ai/gemini/QUICK_REFERENCE.md", - "line": 57, + "line": 61, "source_group": "scripts", "text": "bash scripts/ai/gemini/headless.sh" }, @@ -1299,15 +1300,15 @@ }, { "path": "scripts/ai/gemini/README.md", - "line": 112, + "line": 114, "source_group": "scripts", "text": "- `headless.sh` / `headless.ps1` set `GEMINI_SKIP_MCP_SETUP=1` for one launch and then delegate back to the canonical launcher." }, { "path": "scripts/ai/gemini/headless.ps1", - "line": 20, + "line": 15, "source_group": "scripts", - "text": "$LauncherWSL = ConvertTo-WslPath (Join-Path $ScriptDir \"headless.sh\")" + "text": "$LauncherWSL = ConvertTo-GeminiWslPath (Join-Path $ScriptDir \"headless.sh\")" } ] }, @@ -1335,7 +1336,7 @@ "references": [ { "path": "scripts/ai/gemini/helper/check-env.ps1", - "line": 19, + "line": 12, "source_group": "scripts", "text": "$CheckWSL = \"$RepoWSL/scripts/ai/gemini/helper/check-env.sh\"" } @@ -1350,7 +1351,7 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 135, + "line": 139, "source_group": "scripts", "text": "│ ├── ensure-gemini-cli.sh # Managed CLI bootstrap" }, @@ -1430,11 +1431,11 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 7, + "reference_count": 8, "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 132, + "line": 136, "source_group": "scripts", "text": "│ ├── run-gemini-impl.sh # Runtime launcher" }, @@ -1446,31 +1447,37 @@ }, { "path": "scripts/ai/gemini/run-gemini.sh", - "line": 186, + "line": 187, "source_group": "scripts", "text": "bash \"${HELPER_DIR}/run-gemini-impl.sh\" \"$@\"" }, { "path": "scripts/ai/gemini/run-gemini.sh", - "line": 196, + "line": 192, + "source_group": "scripts", + "text": "bash \"${HELPER_DIR}/run-gemini-impl.sh\" --allowed-mcp-server-names \"${GEMINI_INTERACTIVE_MCP_SERVERS}\" \"$@\"" + }, + { + "path": "scripts/ai/gemini/run-gemini.sh", + "line": 203, "source_group": "scripts", "text": "bash \"${HELPER_DIR}/run-gemini-impl.sh\" --prompt \"$*\"" }, { "path": "scripts/ai/gemini/run-gemini.sh", - "line": 206, + "line": 213, "source_group": "scripts", "text": "bash \"${HELPER_DIR}/run-gemini-impl.sh\" --prompt \"$*\" --approval-mode yolo" }, { "path": "scripts/ai/gemini/run-gemini.sh", - "line": 214, + "line": 221, "source_group": "scripts", "text": "bash \"${HELPER_DIR}/run-gemini-impl.sh\" --prompt \"${COMMAND} $*\"" }, { "path": "scripts/ai/gemini/run-gemini.sh", - "line": 216, + "line": 223, "source_group": "scripts", "text": "bash \"${HELPER_DIR}/run-gemini-impl.sh\" --prompt \"${COMMAND}\"" } @@ -1491,6 +1498,39 @@ } ] }, + { + "path": "scripts/ai/gemini/helper/wsl-support.ps1", + "type": "ps1", + "status": "active", + "agent_usage": [], + "reference_count": 4, + "references": [ + { + "path": "scripts/ai/gemini/gemini-interactive.ps1", + "line": 14, + "source_group": "scripts", + "text": "$WslSupport = Join-Path $ScriptDir \"helper\\wsl-support.ps1\"" + }, + { + "path": "scripts/ai/gemini/headless.ps1", + "line": 12, + "source_group": "scripts", + "text": "$WslSupport = Join-Path $ScriptDir \"helper\\wsl-support.ps1\"" + }, + { + "path": "scripts/ai/gemini/helper/check-env.ps1", + "line": 7, + "source_group": "scripts", + "text": "$WslSupport = Join-Path $ScriptDir \"wsl-support.ps1\"" + }, + { + "path": "scripts/ai/gemini/run-gemini.ps1", + "line": 14, + "source_group": "scripts", + "text": "$WslSupport = Join-Path $ScriptDir \"helper\\wsl-support.ps1\"" + } + ] + }, { "path": "scripts/ai/gemini/run-gemini.ps1", "type": "ps1", @@ -1500,49 +1540,49 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 8, + "line": 11, "source_group": "scripts", "text": ".\\scripts\\ai\\gemini\\run-gemini.ps1 check" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 9, + "line": 12, "source_group": "scripts", "text": ".\\scripts\\ai\\gemini\\run-gemini.ps1 setup" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 12, + "line": 15, "source_group": "scripts", "text": ".\\scripts\\ai\\gemini\\run-gemini.ps1" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 15, + "line": 18, "source_group": "scripts", "text": ".\\scripts\\ai\\gemini\\run-gemini.ps1 \"analyze this code\"" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 111, + "line": 115, "source_group": "scripts", "text": "GEMINI_MODEL=gemini-2.0-flash .\\scripts\\ai\\gemini\\run-gemini.ps1" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 124, + "line": 128, "source_group": "scripts", "text": "├── run-gemini.ps1 # PowerShell delegator" }, { "path": "scripts/ai/gemini/QUICK_REFERENCE.md", - "line": 7, + "line": 9, "source_group": "scripts", "text": ".\\scripts\\ai\\gemini\\run-gemini.ps1" }, { "path": "scripts/ai/gemini/QUICK_REFERENCE.md", - "line": 19, + "line": 23, "source_group": "scripts", "text": ".\\scripts\\ai\\gemini\\run-gemini.ps1 \"analyze the repository structure\"" } @@ -1557,49 +1597,49 @@ "references": [ { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 21, + "line": 24, "source_group": "scripts", "text": "bash scripts/ai/gemini/run-gemini.sh check" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 22, + "line": 25, "source_group": "scripts", "text": "bash scripts/ai/gemini/run-gemini.sh setup" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 25, + "line": 28, "source_group": "scripts", "text": "bash scripts/ai/gemini/run-gemini.sh" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 28, + "line": 31, "source_group": "scripts", "text": "bash scripts/ai/gemini/run-gemini.sh \"explain this repository\"" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 46, + "line": 49, "source_group": "scripts", "text": "| `start` | `run-gemini.sh start` | Interactive CLI (default) |" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 47, + "line": 50, "source_group": "scripts", "text": "| `prompt` | `run-gemini.sh prompt \"task\"` | Headless prompt execution |" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 48, + "line": 51, "source_group": "scripts", "text": "| `exec` | `run-gemini.sh exec \"task\"` | Auto-approve all actions (YOLO mode) |" }, { "path": "scripts/ai/gemini/GEMINI_INTERACTIVE_GUIDE.md", - "line": 49, + "line": 52, "source_group": "scripts", "text": "| `check` | `run-gemini.sh check` | Verify environment setup |" } @@ -1685,7 +1725,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 39, + "reference_count": 34, "references": [ { "path": "docs/05-operations/deployment/NEO4J-COMPLETION-GUIDE.md", @@ -1746,7 +1786,7 @@ "references": [ { "path": "tests/architecture/test_dev_setup_copilot_codex_mcp_consolidation.py", - "line": 164, + "line": 170, "source_group": "tests", "text": "ps_content = (root / \"scripts/ai/mcp/github-mcp-wrapper.ps1\").read_text(" } @@ -1757,7 +1797,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 4, + "reference_count": 3, "references": [ { "path": "scripts/ai/.mcp.json", @@ -1765,12 +1805,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/github-mcp-wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 61, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/github-mcp-wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 8, @@ -1779,7 +1813,7 @@ }, { "path": "tests/architecture/test_dev_setup_copilot_codex_mcp_consolidation.py", - "line": 161, + "line": 167, "source_group": "tests", "text": "sh_content = (root / \"scripts/ai/mcp/github-mcp-wrapper.sh\").read_text(" } @@ -1821,7 +1855,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 3, + "reference_count": 2, "references": [ { "path": "scripts/ai/.mcp.json", @@ -1829,12 +1863,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_brave_search_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 112, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_brave_search_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 15, @@ -1856,19 +1884,13 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 2, + "reference_count": 1, "references": [ { "path": "scripts/ai/.mcp.json", "line": 142, "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_chembl_wrapper.sh\"" - }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 142, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_chembl_wrapper.sh\"" } ] }, @@ -1908,7 +1930,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 3, + "reference_count": 2, "references": [ { "path": "scripts/ai/.mcp.json", @@ -1916,12 +1938,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_context7_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 82, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_context7_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 10, @@ -1943,7 +1959,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 4, + "reference_count": 3, "references": [ { "path": "docs/CODEX_WSL_SETUP.md", @@ -1957,12 +1973,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_docker_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 70, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_docker_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 9, @@ -1984,7 +1994,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 3, + "reference_count": 2, "references": [ { "path": "scripts/ai/.mcp.json", @@ -1992,12 +2002,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_grafana_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 106, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_grafana_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 14, @@ -2019,19 +2023,13 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 2, + "reference_count": 1, "references": [ { "path": "scripts/ai/.mcp.json", "line": 160, "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_mermaid_wrapper.sh\"" - }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 160, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_mermaid_wrapper.sh\"" } ] }, @@ -2048,7 +2046,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 3, + "reference_count": 2, "references": [ { "path": "scripts/ai/.mcp.json", @@ -2056,12 +2054,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_neo4j_cypher_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 124, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_neo4j_cypher_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 17, @@ -2083,7 +2075,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 23, + "reference_count": 22, "references": [ { "path": "docs/00-project/ai/memory/neo4j-project-memory-seed.json", @@ -2148,7 +2140,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 3, + "reference_count": 2, "references": [ { "path": "scripts/ai/.mcp.json", @@ -2156,12 +2148,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_prometheus_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 100, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_prometheus_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 13, @@ -2183,19 +2169,13 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 2, + "reference_count": 1, "references": [ { "path": "scripts/ai/.mcp.json", "line": 148, "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_pubchem_wrapper.sh\"" - }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 148, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_pubchem_wrapper.sh\"" } ] }, @@ -2212,19 +2192,13 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 2, + "reference_count": 1, "references": [ { "path": "scripts/ai/.mcp.json", "line": 154, "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_pubmed_wrapper.sh\"" - }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 154, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_pubmed_wrapper.sh\"" } ] }, @@ -2241,7 +2215,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 4, + "reference_count": 3, "references": [ { "path": "scripts/ai/.mcp.json", @@ -2249,12 +2223,6 @@ "source_group": "scripts", "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_sonarqube_wrapper.sh\"" }, - { - "path": "scripts/ai/.vscode/mcp.json", - "line": 118, - "source_group": "scripts", - "text": "\"/mnt/wsl/docker-desktop-bind-mounts/Ubuntu/ccd98afae0adb4ee090bbfed89f354b31936eafe0874d43825bf3cb903f3bd1d/scripts/ai/mcp/mcp_sonarqube_wrapper.sh\"" - }, { "path": "scripts/ai/mcp/check.sh", "line": 16, @@ -4486,7 +4454,7 @@ }, { "path": "scripts/engineering/repo/generate_scripts_wrapper_caller_matrix.py", - "line": 96, + "line": 98, "source_group": "scripts", "text": "Candidate(\"scripts/docs/build_docs_site.sh\", \"shell transport adapter\")," }, @@ -4498,13 +4466,13 @@ }, { "path": "tests/unit/scripts/repo/test_generate_scripts_wrapper_caller_matrix.py", - "line": 14, + "line": 16, "source_group": "tests", "text": "test_file.write_text(\"scripts/docs/build_docs_site.sh\\n\", encoding=\"utf-8\")" }, { "path": "tests/unit/scripts/repo/test_generate_scripts_wrapper_caller_matrix.py", - "line": 25, + "line": 27, "source_group": "tests", "text": "assert \"`scripts/docs/build_docs_site.sh`\" in report" } @@ -4707,7 +4675,7 @@ }, { "path": "docs/00-project/RULES.md", - "line": 1942, + "line": 1944, "source_group": "docs", "text": "- **5.26** (2026-05-15): ADR Governance Sync. Приложение F синхронизировано с ADR-046/047 и теперь явно делегирует canonical live registry в `decisions/README.md` и `adr-registry.md`. Исправлен genera" }, @@ -5764,7 +5732,7 @@ }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 258, + "line": 259, "source_group": "tests", "text": "ROOT / \"scripts\" / \"engineering\" / \"ci\" / \"apply_ci_fixes.py\"" } @@ -5911,7 +5879,7 @@ }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 159, + "line": 160, "source_group": "tests", "text": "ROOT / \"scripts\" / \"engineering\" / \"ci\" / \"quality_integral_gate.py\"" } @@ -5995,7 +5963,7 @@ }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 153, + "line": 154, "source_group": "tests", "text": "ROOT / \"scripts\" / \"engineering\" / \"ci\" / \"run_pytest_resilient.py\"" } @@ -6161,63 +6129,6 @@ "reference_count": 0, "references": [] }, - { - "path": "scripts/engineering/dev/.setup_wsl_codex.sh", - "type": "sh", - "status": "active", - "agent_usage": [], - "reference_count": 12, - "references": [ - { - "path": "docs/03-guides/development/codex-wsl2-setup.md", - "line": 68, - "source_group": "docs", - "text": "| `.setup_wsl_codex.sh` | `scripts/engineering/dev/` | DNS resolver (dig + PowerShell fallback) |" - }, - { - "path": "docs/03-guides/development/codex-wsl2-setup.md", - "line": 253, - "source_group": "docs", - "text": "**Layer 1: DNS** (`scripts/engineering/dev/.setup_wsl_codex.sh`)" - }, - { - "path": "docs/03-guides/development/codex-wsl2-setup.md", - "line": 266, - "source_group": "docs", - "text": "bash \"$BIOETL_DIR/scripts/engineering/dev/.setup_wsl_codex.sh\"" - }, - { - "path": "docs/03-guides/development/codex-wsl2-setup.md", - "line": 292, - "source_group": "docs", - "text": "bash \"$BIOETL_DIR/scripts/engineering/dev/.setup_wsl_codex.sh\" 2>/dev/null" - }, - { - "path": "docs/03-guides/development/codex-wsl2-setup.md", - "line": 348, - "source_group": "docs", - "text": "bash \"$BIOETL_DIR/scripts/engineering/dev/.setup_wsl_codex.sh\"" - }, - { - "path": "docs/05-operations/tooling/scripts-ops/CODEX_QUICK_REF.md", - "line": 7, - "source_group": "docs", - "text": ".\\scripts\\engineering\\dev\\.setup_wsl_codex.sh" - }, - { - "path": "docs/05-operations/tooling/scripts-ops/CODEX_QUICK_REF.md", - "line": 71, - "source_group": "docs", - "text": "| `OpenAI timeout` | Run setup: `.\\scripts\\engineering\\dev\\.setup_wsl_codex.sh` |" - }, - { - "path": "docs/05-operations/tooling/scripts-ops/CODEX_SETUP.md", - "line": 23, - "source_group": "docs", - "text": ".\\scripts\\engineering\\dev\\.setup_wsl_codex.sh" - } - ] - }, { "path": "scripts/engineering/dev/.wsl-vpn-fix.ps1", "type": "ps1", @@ -6266,19 +6177,19 @@ }, { "path": "docs/03-guides/getting-started.md", - "line": 65, + "line": 71, "source_group": "docs", "text": "uv run python -m scripts.engineering.dev setup-mcp" }, { "path": "docs/03-guides/getting-started.md", - "line": 68, + "line": 74, "source_group": "docs", "text": "If you activated `.venv` instead of using `uv`, `python -m scripts.engineering.dev setup-mcp`" }, { "path": "docs/03-guides/testing.md", - "line": 95, + "line": 99, "source_group": "docs", "text": "`python -m scripts.engineering.dev run-tests`, and" }, @@ -6537,7 +6448,7 @@ "agent_usage": [ "py-test-swarm" ], - "reference_count": 32, + "reference_count": 33, "references": [ { "path": ".codex/agents/py-test-swarm.md", @@ -6596,7 +6507,7 @@ "agent_usage": [ "py-test-swarm" ], - "reference_count": 32, + "reference_count": 33, "references": [ { "path": ".codex/agents/py-test-swarm.md", @@ -6828,7 +6739,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 18, + "reference_count": 17, "references": [ { "path": "Makefile", @@ -6850,22 +6761,16 @@ }, { "path": "docs/03-guides/testing.md", - "line": 561, + "line": 596, "source_group": "docs", "text": "bash scripts/engineering/dev/run_pytest_sharded.sh \\" }, { "path": "docs/03-guides/testing.md", - "line": 652, + "line": 687, "source_group": "docs", "text": "| 6 | `BIOETL_PYTEST_SHARDED_FORCE_COVERAGE=1 bash scripts/engineering/dev/run_pytest_sharded.sh --stream --keep-coverage-files --coverage-dir .coverage-sharded -- -vv --cov-report=term-missing` | В" }, - { - "path": "makefile", - "line": 95, - "source_group": "build", - "text": "BIOETL_PYTEST_SHARDED_FORCE_COVERAGE=1 bash scripts/engineering/dev/run_pytest_sharded.sh --stream --keep-coverage-files --coverage-dir .coverage-sharded -- -m \"not e2e and not benchmark and not memor" - }, { "path": "scripts/engineering/dev/README.md", "line": 50, @@ -6877,6 +6782,12 @@ "line": 51, "source_group": "scripts", "text": "bash scripts/engineering/dev/run_pytest_sharded.sh --stream" + }, + { + "path": "scripts/engineering/dev/README.md", + "line": 52, + "source_group": "scripts", + "text": "bash scripts/engineering/dev/run_pytest_sharded.sh --tail" } ] }, @@ -6885,7 +6796,7 @@ "type": "ps1", "status": "active", "agent_usage": [], - "reference_count": 3, + "reference_count": 4, "references": [ { "path": "scripts/engineering/dev/README.md", @@ -6901,7 +6812,13 @@ }, { "path": "tests/architecture/test_dev_run_tests_consolidation.py", - "line": 29, + "line": 11, + "source_group": "tests", + "text": "\"scripts/engineering/dev/run_tests.ps1\": 'Join-Path $PSScriptRoot \"../../..\"'," + }, + { + "path": "tests/architecture/test_dev_run_tests_consolidation.py", + "line": 36, "source_group": "tests", "text": "content = (root / \"scripts/engineering/dev/run_tests.ps1\").read_text(" } @@ -6912,11 +6829,11 @@ "type": "py", "status": "active", "agent_usage": [], - "reference_count": 17, + "reference_count": 18, "references": [ { "path": "docs/03-guides/testing.md", - "line": 94, + "line": 98, "source_group": "docs", "text": "Developer wrappers such as `scripts/engineering/dev/run_tests.py`," }, @@ -6969,11 +6886,11 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 4, + "reference_count": 5, "references": [ { "path": "docs/03-guides/testing.md", - "line": 96, + "line": 100, "source_group": "docs", "text": "`scripts/engineering/dev/run_tests.sh` are convenience entry points for local" }, @@ -6991,7 +6908,13 @@ }, { "path": "tests/architecture/test_dev_run_tests_consolidation.py", - "line": 19, + "line": 9, + "source_group": "tests", + "text": "\"scripts/engineering/dev/run_tests.sh\": 'dirname \"$0\")/../../..'," + }, + { + "path": "tests/architecture/test_dev_run_tests_consolidation.py", + "line": 26, "source_group": "tests", "text": "content = (root / \"scripts/engineering/dev/run_tests.sh\").read_text(" } @@ -7048,7 +6971,7 @@ }, { "path": "docs/03-guides/getting-started.md", - "line": 79, + "line": 85, "source_group": "docs", "text": ".\\scripts\\engineering\\dev\\setup_env_windows.ps1" } @@ -7105,7 +7028,7 @@ }, { "path": "docs/03-guides/getting-started.md", - "line": 85, + "line": 91, "source_group": "docs", "text": "bash scripts/engineering/dev/setup_env_wsl.sh" } @@ -7116,11 +7039,17 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 1, + "reference_count": 2, "references": [ { "path": "tests/architecture/test_dev_run_tests_consolidation.py", - "line": 39, + "line": 10, + "source_group": "tests", + "text": "\"scripts/engineering/dev/test_changed.sh\": 'dirname \"$0\")/../../..'," + }, + { + "path": "tests/architecture/test_dev_run_tests_consolidation.py", + "line": 46, "source_group": "tests", "text": "content = (root / \"scripts/engineering/dev/test_changed.sh\").read_text(" } @@ -8127,7 +8056,7 @@ }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 342, + "line": 343, "source_group": "tests", "text": "ROOT / \"scripts\" / \"engineering\" / \"qa\" / \"generate_architecture_debt_tasks.py\"" } @@ -8138,7 +8067,7 @@ "type": "py", "status": "active", "agent_usage": [], - "reference_count": 26, + "reference_count": 27, "references": [ { "path": ".github/workflows/architecture-docs-nightly.yml", @@ -8377,13 +8306,13 @@ }, { "path": "docs/00-project/glossary.md", - "line": 546, + "line": 548, "source_group": "docs", "text": "A terminology linter is available at `scripts/engineering/qa/lint_terminology.py`:" }, { "path": "docs/00-project/glossary.md", - "line": 550, + "line": 552, "source_group": "docs", "text": "python scripts/engineering/qa/lint_terminology.py src/bioetl/" }, @@ -8446,7 +8375,7 @@ }, { "path": "scripts/engineering/qa/check_naming_package_consistency.py", - "line": 244, + "line": 246, "source_group": "scripts", "text": "location=\"scripts/engineering/qa/naming_audit.py --check\"," } @@ -8493,7 +8422,7 @@ }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 345, + "line": 346, "source_group": "tests", "text": "ROOT / \"scripts\" / \"engineering\" / \"qa\" / \"reduce_architecture_debt.py\"" } @@ -8682,7 +8611,7 @@ }, { "path": "tests/architecture/test_module_coverage_inventory.py", - "line": 215, + "line": 213, "source_group": "tests", "text": "\"scripts/engineering/qa/report_module_coverage_inventory.py\"" } @@ -8812,7 +8741,7 @@ }, { "path": "docs/03-guides/testing.md", - "line": 220, + "line": 224, "source_group": "docs", "text": "- canonical tooling paths активированы для enforced rollout: `scripts/engineering/qa/report_vcr_metadata_catalog.py` генерирует/проверяет catalog, а `scripts/ops/migrations/active/backfill_vcr_metadat" }, @@ -9109,7 +9038,7 @@ }, { "path": "docs/03-guides/testing.md", - "line": 594, + "line": 629, "source_group": "docs", "text": "- `python -m scripts.engineering.qa.vcr check-placement`" }, @@ -9172,7 +9101,7 @@ }, { "path": "docs/03-guides/testing.md", - "line": 595, + "line": 630, "source_group": "docs", "text": "- `python -m scripts.engineering.qa.vcr check-naming`" }, @@ -9199,7 +9128,7 @@ }, { "path": "docs/03-guides/testing.md", - "line": 218, + "line": 222, "source_group": "docs", "text": "- `vcr_cassette_max_age_days: 90` является blocking stale-age threshold: CI теперь валидирует managed metadata inventory через `scripts/engineering/qa/vcr/check_vcr_metadata_age.py --max-age-days 90`" }, @@ -9261,7 +9190,7 @@ "type": "py", "status": "active", "agent_usage": [], - "reference_count": 54, + "reference_count": 53, "references": [ { "path": ".github/workflows/compiled-artifacts-block.yml", @@ -9627,7 +9556,7 @@ }, { "path": "scripts/engineering/repo/generate_scripts_wrapper_caller_matrix.py", - "line": 98, + "line": 100, "source_group": "scripts", "text": "\"scripts/engineering/repo/cleanup_branch_candidates.sh\"," }, @@ -9860,7 +9789,7 @@ "type": "py", "status": "active", "agent_usage": [], - "reference_count": 125, + "reference_count": 122, "references": [ { "path": "docs/00-project/ai/memory/README.md", @@ -9925,14 +9854,8 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 2, + "reference_count": 1, "references": [ - { - "path": "docs/05-operations/runbooks/neo4j-complete-recovery-guide.md", - "line": 154, - "source_group": "docs", - "text": "| `scripts/memory/prompts/print_seed.sh` | Maintained prompt seed helper for manual enrichment |" - }, { "path": "scripts/memory/README.md", "line": 19, @@ -9946,14 +9869,8 @@ "type": "py", "status": "active", "agent_usage": [], - "reference_count": 6, + "reference_count": 5, "references": [ - { - "path": "docs/05-operations/runbooks/neo4j-complete-recovery-guide.md", - "line": 153, - "source_group": "docs", - "text": "| `scripts/memory/query.py` | Operator-facing memory query entrypoint |" - }, { "path": "scripts/memory/README.md", "line": 24, @@ -9991,7 +9908,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 14, + "reference_count": 9, "references": [ { "path": "docs/00-project/ai/memory/neo4j-project-memory-seed.json", @@ -10050,17 +9967,17 @@ "agent_usage": [], "reference_count": 2, "references": [ - { - "path": "docs/05-operations/runbooks/neo4j-complete-recovery-guide.md", - "line": 152, - "source_group": "docs", - "text": "| `scripts/memory/sync.py` | Deterministic repo graph sync entrypoint |" - }, { "path": "scripts/memory/README.md", "line": 23, "source_group": "scripts", "text": "- `sync.py` is now a compatibility module alias to `memory.graph.sync`." + }, + { + "path": "tests/unit/memory/test_graph_entrypoints.py", + "line": 42, + "source_group": "tests", + "text": "assert sync_path.name == \"sync.py\"" } ] }, @@ -10069,7 +9986,7 @@ "type": "py", "status": "active", "agent_usage": [], - "reference_count": 9, + "reference_count": 11, "references": [ { "path": "docs/00-project/ai/memory/agent-memory.md", @@ -10079,13 +9996,13 @@ }, { "path": "docs/05-operations/01-monitoring-guide.md", - "line": 511, + "line": 528, "source_group": "docs", "text": "python -m scripts.ops check-observability-ports --json" }, { "path": "docs/05-operations/01-monitoring-guide.md", - "line": 569, + "line": 586, "source_group": "docs", "text": "1. Запустите `python -m scripts.ops check-observability-ports --json`." }, @@ -10552,7 +10469,7 @@ }, { "path": "scripts/engineering/repo/generate_scripts_wrapper_caller_matrix.py", - "line": 106, + "line": 108, "source_group": "scripts", "text": "Candidate(\"scripts/ops/launchers/codex/codex-exec.bat\", WINDOWS_TRANSPORT_ROLE)," }, @@ -10803,7 +10720,7 @@ "type": "sh", "status": "active", "agent_usage": [], - "reference_count": 17, + "reference_count": 15, "references": [ { "path": "Makefile", @@ -10819,22 +10736,10 @@ }, { "path": "docs/03-guides/testing.md", - "line": 175, + "line": 179, "source_group": "docs", "text": "`scripts/ops/launchers/codex/setup_plugins.sh --pytest-only` перед запуском pytest." }, - { - "path": "makefile", - "line": 33, - "source_group": "build", - "text": "bash scripts/ops/launchers/codex/setup_plugins.sh --pytest-only" - }, - { - "path": "makefile", - "line": 36, - "source_group": "build", - "text": "bash scripts/ops/launchers/codex/setup_plugins.sh" - }, { "path": "scripts/engineering/dev/README.md", "line": 91, @@ -10852,6 +10757,18 @@ "line": 523, "source_group": "scripts", "text": "bash scripts/ops/launchers/codex/setup_plugins.sh --pytest-only" + }, + { + "path": "scripts/engineering/dev/run_pytest.sh", + "line": 527, + "source_group": "scripts", + "text": "# setup_plugins.sh may provision a temporary pytest runtime under /tmp when" + }, + { + "path": "scripts/engineering/repo/generate_scripts_wrapper_caller_matrix.py", + "line": 109, + "source_group": "scripts", + "text": "Candidate(\"scripts/ops/launchers/codex/setup_plugins.sh\", BOOTSTRAP_HELPER_ROLE)," } ] }, @@ -10993,7 +10910,7 @@ }, { "path": "scripts/ops/__main__.py", - "line": 38, + "line": 42, "source_group": "scripts", "text": "\"salt-rotate\": \"maintenance/security/salt_rotate.py\"," } @@ -11020,7 +10937,7 @@ }, { "path": "docs/03-guides/testing.md", - "line": 220, + "line": 224, "source_group": "docs", "text": "- canonical tooling paths активированы для enforced rollout: `scripts/engineering/qa/report_vcr_metadata_catalog.py` генерирует/проверяет catalog, а `scripts/ops/migrations/active/backfill_vcr_metadat" }, @@ -11101,7 +11018,7 @@ }, { "path": "tests/architecture/test_test_structural_debt.py", - "line": 20, + "line": 18, "source_group": "tests", "text": "\"tests/testing_support/neo4j_memory_sync.py::test_snapshot_contains_core_repo_surfaces\": 295," } @@ -11116,13 +11033,13 @@ "references": [ { "path": "scripts/ops/__main__.py", - "line": 39, + "line": 43, "source_group": "scripts", "text": "\"check-observability-ports\": \"observability/check_published_observability_endpoints.py\"," }, { "path": "tests/unit/scripts/ops/observability/test_check_published_observability_endpoints.py", - "line": 117, + "line": 120, "source_group": "tests", "text": "expected_target=\"observability/check_published_observability_endpoints.py\"," } @@ -11137,24 +11054,53 @@ "references": [ { "path": "scripts/ops/__main__.py", - "line": 41, + "line": 45, "source_group": "scripts", "text": "\"audit-live-grafana\": \"observability/grafana/audit_live_grafana_panels.py\"," }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 226, + "line": 227, "source_group": "tests", "text": "/ \"audit_live_grafana_panels.py\"" }, { "path": "tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py", - "line": 65, + "line": 227, "source_group": "tests", "text": "expected_target=\"observability/grafana/audit_live_grafana_panels.py\"," } ] }, + { + "path": "scripts/ops/observability/grafana/check_grafana_dashboard_audit_preflight.py", + "type": "py", + "status": "active", + "agent_usage": [], + "reference_count": 2, + "references": [ + { + "path": "scripts/ops/__main__.py", + "line": 47, + "source_group": "scripts", + "text": "\"observability/grafana/check_grafana_dashboard_audit_preflight.py\"" + }, + { + "path": "tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py", + "line": 407, + "source_group": "tests", + "text": "expected_target=\"observability/grafana/check_grafana_dashboard_audit_preflight.py\"," + } + ] + }, + { + "path": "scripts/ops/observability/grafana/render_all_grafana_screenshots.ps1", + "type": "ps1", + "status": "orphan", + "agent_usage": [], + "reference_count": 0, + "references": [] + }, { "path": "scripts/ops/observability/grafana/rerender_grafana_screenshots.py", "type": "py", @@ -11164,18 +11110,62 @@ "references": [ { "path": "scripts/ops/__main__.py", - "line": 40, + "line": 44, "source_group": "scripts", "text": "\"rerender-grafana\": \"observability/grafana/rerender_grafana_screenshots.py\"," }, { "path": "tests/architecture/test_generated_artifact_routing.py", - "line": 211, + "line": 212, "source_group": "tests", "text": "/ \"rerender_grafana_screenshots.py\"" } ] }, + { + "path": "scripts/ops/observability/grafana/run_grafana_dashboard_audit_cycle.py", + "type": "py", + "status": "active", + "agent_usage": [], + "reference_count": 2, + "references": [ + { + "path": "scripts/ops/__main__.py", + "line": 50, + "source_group": "scripts", + "text": "\"observability/grafana/run_grafana_dashboard_audit_cycle.py\"" + }, + { + "path": "tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py", + "line": 574, + "source_group": "tests", + "text": "expected_target=\"observability/grafana/run_grafana_dashboard_audit_cycle.py\"," + } + ] + }, + { + "path": "scripts/ops/observability/grafana/setup_grafana_screenshot_runtime.ps1", + "type": "ps1", + "status": "active", + "agent_usage": [], + "reference_count": 1, + "references": [ + { + "path": "scripts/ops/observability/grafana/render_all_grafana_screenshots.ps1", + "line": 30, + "source_group": "scripts", + "text": "scripts/ops/observability/grafana/setup_grafana_screenshot_runtime.ps1" + } + ] + }, + { + "path": "scripts/ops/observability/grafana/setup_grafana_screenshot_runtime.sh", + "type": "sh", + "status": "orphan", + "agent_usage": [], + "reference_count": 0, + "references": [] + }, { "path": "scripts/ops/runtime/deploy/deploy-bioetl.sh", "type": "sh", @@ -11203,7 +11193,7 @@ }, { "path": "scripts/ops/__main__.py", - "line": 56, + "line": 66, "source_group": "scripts", "text": "\"deploy\": \"runtime/deploy/deploy-bioetl.sh\"," } @@ -11214,7 +11204,7 @@ "type": "ps1", "status": "active", "agent_usage": [], - "reference_count": 4, + "reference_count": 2, "references": [ { "path": "docs/05-operations/runbooks/neo4j-backend-recovery-quick-start.md", @@ -11222,18 +11212,6 @@ "source_group": "docs", "text": "| Manual Docker restart | `scripts/ops/runtime/docker/restart-docker.ps1` |" }, - { - "path": "docs/05-operations/runbooks/neo4j-complete-recovery-guide.md", - "line": 55, - "source_group": "docs", - "text": ".\\scripts\\ops\\runtime\\docker\\restart-docker.ps1" - }, - { - "path": "docs/05-operations/runbooks/neo4j-complete-recovery-guide.md", - "line": 155, - "source_group": "docs", - "text": "| `scripts/ops/runtime/docker/restart-docker.ps1` | Docker Desktop restart helper |" - }, { "path": "scripts/engineering/repo/check_scripts_inventory.py", "line": 220, @@ -11641,7 +11619,7 @@ }, { "path": "scripts/ops/__main__.py", - "line": 54, + "line": 64, "source_group": "scripts", "text": "\"check-skills\": \"support/skills/check_ai_skills_layout.sh\"," } @@ -12223,6 +12201,14 @@ } ] }, + { + "path": "scripts/setup.sh", + "type": "sh", + "status": "orphan", + "agent_usage": [], + "reference_count": 0, + "references": [] + }, { "path": "scripts/shutdown.ps1", "type": "ps1", diff --git a/configs/quality/scripts_lifecycle_registry.json b/configs/quality/scripts_lifecycle_registry.json index 4daafc11a9..16af419cf6 100644 --- a/configs/quality/scripts_lifecycle_registry.json +++ b/configs/quality/scripts_lifecycle_registry.json @@ -247,6 +247,33 @@ "decision": "shared_helper_module", "review_by": "2026-07-15", "next_step": "Retain as the context-aware Neo4j audit connection helper while deployment and live-audit runbooks still reference src/tools/neo4j_audit.py; fold it into a broader canonical ops helper surface only if the audit workflow is consolidated." + }, + "scripts/ops/observability/grafana/render_all_grafana_screenshots.ps1": { + "status": "orphan", + "rationale": "To be removed", + "review_date": "2026-05-28", + "owner": "team-observability", + "decision": "pending_removal", + "next_step": "remove file", + "review_by": "2026-06-28" + }, + "scripts/ops/observability/grafana/setup_grafana_screenshot_runtime.sh": { + "status": "orphan", + "rationale": "To be removed", + "review_date": "2026-05-28", + "owner": "team-observability", + "decision": "pending_removal", + "next_step": "remove file", + "review_by": "2026-06-28" + }, + "scripts/ops/setup.sh": { + "status": "supporting", + "rationale": "Local environment setup", + "review_date": "2026-05-28", + "owner": "team-dev-tools", + "decision": "maintain", + "next_step": "none", + "review_by": "2026-06-28" } } -} +} \ No newline at end of file diff --git a/scripts/docs/build/__pycache__/__init__.cpython-313.pyc b/scripts/docs/build/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 56574c1e45..0000000000 Binary files a/scripts/docs/build/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/scripts/docs/build/__pycache__/mkdocs_build.cpython-313.pyc b/scripts/docs/build/__pycache__/mkdocs_build.cpython-313.pyc deleted file mode 100644 index 4b9d96cc7d..0000000000 Binary files a/scripts/docs/build/__pycache__/mkdocs_build.cpython-313.pyc and /dev/null differ diff --git a/scripts/engineering/qa/check_quality_exemptions.py b/scripts/engineering/qa/check_quality_exemptions.py index 20119edc23..47af280254 100644 --- a/scripts/engineering/qa/check_quality_exemptions.py +++ b/scripts/engineering/qa/check_quality_exemptions.py @@ -31,3 +31,27 @@ def _canonical_script() -> Path: sys.stderr.write(f"ERROR: canonical script not found: {script}\n") raise SystemExit(2) runpy.run_path(str(script), run_name="__main__") + +def main(args: list[str] | None = None) -> int: + script = _canonical_script() + if not script.exists(): + sys.stderr.write(f"ERROR: canonical script not found: {script}\n") + return 2 + + # Save original argv + original_argv = sys.argv.copy() + try: + # Patch sys.argv to pass arguments to runpy correctly + if args is not None: + sys.argv = [str(script)] + args + else: + sys.argv = [str(script)] + sys.argv[1:] + + globals_dict = runpy.run_path(str(script), run_name="__main__") + + return 0 + except SystemExit as e: + return e.code if isinstance(e.code, int) else 0 + finally: + # Restore argv + sys.argv = original_argv diff --git a/scripts/engineering/repo/catalog.yaml b/scripts/engineering/repo/catalog.yaml index ffc1c16f38..4feff79762 100644 --- a/scripts/engineering/repo/catalog.yaml +++ b/scripts/engineering/repo/catalog.yaml @@ -1,4 +1,3 @@ -schema_version: '1.0' canonical_roots: - scripts/ai - scripts/ai/codex @@ -17,18 +16,6 @@ canonical_roots: - scripts/ops/migrations/active - scripts/ops/migrations/oneoff - scripts/diagrams -policies: - canonical_invocation_required_for_new_integrations: true - no_scripts_in_root: true - root_allowlist: - - docs_parity_check.py - - documentation_governance_check.py - - docker-setup.ps1 - - docker-setup.sh - - generate_adr_registry.py - - generate_test_github_issues.py - - optimized_test_runner.py - - test_selection_strategy.py entrypoints: package_console_scripts: bioetl: src/bioetl/interfaces/cli/main.py @@ -37,73 +24,86 @@ entrypoints: scripts.engineering.repo: scripts/engineering/repo/__main__.py scripts.schema: scripts/schema/__main__.py workflow_surfaces: - - .github/workflows/tests.yml - - .github/workflows/contract-tests.yml -lifecycle: - manifest_path: configs/quality/scripts_inventory_manifest.json - registry_path: configs/quality/scripts_lifecycle_registry.json - non_active_statuses: - - unknown - - orphan - - legacy - required_registry_fields: - - owner - - decision - - next_step - - review_by - deprecated_decisions: - - deprecate - deprecated_required_fields: - - replacement - - sunset_date - enforce_known_registry_paths: true - active_script_count_max: 357 - active_script_count_policy: fail-fast-no-growth - active_script_count_owner: '@bioetl-platform' - active_script_count_review_by: '2026-09-30' + - .github/workflows/tests.yml + - .github/workflows/contract-tests.yml groups: ai: path: scripts/ai purpose: Canonical AI-facing setup, launcher, and runtime-adjacent tooling + baselines: + path: scripts/engineering/baselines + purpose: Baseline artifacts consumed by engineering quality gates ci: path: scripts/engineering/ci purpose: CI orchestration, resiliency runners, periodic quality reports + common: + path: scripts/engineering/common + purpose: Shared helpers used by engineering and adjacent script domains + data: + path: scripts/ops/data + purpose: Data integrity and storage-level operational checks dev: path: scripts/engineering/dev purpose: Local developer setup and test utilities - qa: - path: scripts/engineering/qa - purpose: Architecture and quality-gate checks, debt telemetry - repo: - path: scripts/engineering/repo - purpose: Repository hygiene and inventory governance tooling diagnostics: path: scripts/engineering/diagnostics purpose: Manual diagnostics and investigation helpers - baselines: - path: scripts/engineering/baselines - purpose: Baseline artifacts consumed by engineering quality gates - common: - path: scripts/engineering/common - purpose: Shared helpers used by engineering and adjacent script domains + diagrams: + path: scripts/diagrams + purpose: Diagram lint/render/quality pipeline docs: path: scripts/docs purpose: Documentation lint/build/drift/maintenance - schema: - path: scripts/schema - purpose: Schema generation and validation contracts - data: - path: scripts/ops/data - purpose: Data integrity and storage-level operational checks - ops: - path: scripts/ops - purpose: Active platform/ops automation, launchers, runtime, and maintenance tooling migrations_active: path: scripts/ops/migrations/active purpose: Active repeatable migration scripts migrations_oneoff: path: scripts/ops/migrations/oneoff purpose: One-time migration scripts with explicit sunset - diagrams: - path: scripts/diagrams - purpose: Diagram lint/render/quality pipeline + ops: + path: scripts/ops + purpose: Active platform/ops automation, launchers, runtime, and maintenance tooling + qa: + path: scripts/engineering/qa + purpose: Architecture and quality-gate checks, debt telemetry + repo: + path: scripts/engineering/repo + purpose: Repository hygiene and inventory governance tooling + schema: + path: scripts/schema + purpose: Schema generation and validation contracts +lifecycle: + active_script_count_max: 360 + active_script_count_owner: '@bioetl-platform' + active_script_count_policy: fail-fast-no-growth + active_script_count_review_by: '2026-09-30' + deprecated_decisions: + - deprecate + deprecated_required_fields: + - replacement + - sunset_date + enforce_known_registry_paths: true + manifest_path: configs/quality/scripts_inventory_manifest.json + non_active_statuses: + - unknown + - orphan + - legacy + registry_path: configs/quality/scripts_lifecycle_registry.json + required_registry_fields: + - owner + - decision + - next_step + - review_by +policies: + canonical_invocation_required_for_new_integrations: true + no_scripts_in_root: true + root_allowlist: + - docs_parity_check.py + - documentation_governance_check.py + - docker-setup.ps1 + - docker-setup.sh + - generate_adr_registry.py + - generate_test_github_issues.py + - optimized_test_runner.py + - test_selection_strategy.py +schema_version: '1.0' diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000000..2b36c7f3ca --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# ============================================================================== +# scripts/setup.sh — скрипт настройки окружения BioETL +# +# Использование: +# ./scripts/setup.sh # Полная настройка +# ./scripts/setup.sh --quick # Быстрая установка (без линтеров/тестов) +# ./scripts/setup.sh --skip-tests # Запуск линтеров без тестов +# ./scripts/setup.sh --force # Пересоздание .venv +# ============================================================================== + +set -e + +QUICK=0 +SKIP_TESTS=0 +FORCE=0 + +for arg in "$@"; do + case $arg in + --quick) + QUICK=1 + ;; + --skip-tests) + SKIP_TESTS=1 + ;; + --force) + FORCE=1 + ;; + *) + echo "Неизвестный аргумент: $arg" + exit 1 + ;; + esac +done + +if [ "$FORCE" -eq 1 ]; then + echo "Удаление .venv..." + rm -rf .venv +fi + +echo "Установка зависимостей..." +make install + +if [ -f ".venv/bin/activate" ]; then + source .venv/bin/activate +fi + +if [ "$QUICK" -eq 1 ]; then + echo "Установка завершена (quick mode)." + exit 0 +fi + +echo "Запуск линтеров..." +make lint + +if [ "$SKIP_TESTS" -eq 1 ]; then + echo "Установка завершена (тесты пропущены)." + exit 0 +fi + +echo "Запуск тестов..." +make test-fast + +echo "Установка успешно завершена." diff --git a/src/bioetl/application/services/control_plane/effective_config_support.py b/src/bioetl/application/services/control_plane/effective_config_support.py index 3c104adc22..671c180c2b 100644 --- a/src/bioetl/application/services/control_plane/effective_config_support.py +++ b/src/bioetl/application/services/control_plane/effective_config_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._effective_config_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/historical_replay_certification.py b/src/bioetl/application/services/control_plane/historical_replay_certification.py index 0aae3d0ea8..7ba0346ec7 100644 --- a/src/bioetl/application/services/control_plane/historical_replay_certification.py +++ b/src/bioetl/application/services/control_plane/historical_replay_certification.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._historical_replay_certification import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/historical_replay_certification_support.py b/src/bioetl/application/services/control_plane/historical_replay_certification_support.py index 05d0f8e9ea..12d49411d1 100644 --- a/src/bioetl/application/services/control_plane/historical_replay_certification_support.py +++ b/src/bioetl/application/services/control_plane/historical_replay_certification_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._historical_replay_certification_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/ledger_identity_support.py b/src/bioetl/application/services/control_plane/ledger_identity_support.py index 28285fe285..30980d57ae 100644 --- a/src/bioetl/application/services/control_plane/ledger_identity_support.py +++ b/src/bioetl/application/services/control_plane/ledger_identity_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._ledger_identity_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/manifest_time_support.py b/src/bioetl/application/services/control_plane/manifest_time_support.py index 0b98cbc2a3..d80d467067 100644 --- a/src/bioetl/application/services/control_plane/manifest_time_support.py +++ b/src/bioetl/application/services/control_plane/manifest_time_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._manifest_time_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_ledger_core_events.py b/src/bioetl/application/services/control_plane/run_ledger_core_events.py index ee792df7bc..9a9668fd2c 100644 --- a/src/bioetl/application/services/control_plane/run_ledger_core_events.py +++ b/src/bioetl/application/services/control_plane/run_ledger_core_events.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_ledger_core_events import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_ledger_entry_support.py b/src/bioetl/application/services/control_plane/run_ledger_entry_support.py index 83151ce278..612819e340 100644 --- a/src/bioetl/application/services/control_plane/run_ledger_entry_support.py +++ b/src/bioetl/application/services/control_plane/run_ledger_entry_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_ledger_entry_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_ledger_rich_events.py b/src/bioetl/application/services/control_plane/run_ledger_rich_events.py index e28ff4e1f9..8953e626ff 100644 --- a/src/bioetl/application/services/control_plane/run_ledger_rich_events.py +++ b/src/bioetl/application/services/control_plane/run_ledger_rich_events.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_ledger_rich_events import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_artifact_support.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_artifact_support.py index 9b25185a3f..b7a9d46f2d 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_artifact_support.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_artifact_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_artifact_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base.py index 4a2f2edb85..a6233ff535 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_base import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base_helpers.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base_helpers.py index 1e9071e822..8fc3e37114 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base_helpers.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_base_helpers.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_base_helpers import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_finalization.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_finalization.py index 87f5229c74..0346a48a8c 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_finalization.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_finalization.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_finalization import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay.py index d9c94b0392..b1ae753b0f 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_replay import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay_projection.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay_projection.py index 593dcb43f6..bb62b9bc38 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay_projection.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_replay_projection.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_replay_projection import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_snapshot_support.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_snapshot_support.py index 1650bcac8c..fb831b9b36 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_snapshot_support.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_snapshot_support.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_snapshot_support import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_source_refs.py b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_source_refs.py index e33080d7f6..694629069a 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_diagnostics_source_refs.py +++ b/src/bioetl/application/services/control_plane/run_manifest_diagnostics_source_refs.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_diagnostics_source_refs import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_inspection_mixins.py b/src/bioetl/application/services/control_plane/run_manifest_inspection_mixins.py index 8c0609d076..1e707473d4 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_inspection_mixins.py +++ b/src/bioetl/application/services/control_plane/run_manifest_inspection_mixins.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_inspection_mixins import * # noqa: F403 - diff --git a/src/bioetl/application/services/control_plane/run_manifest_service_mixins.py b/src/bioetl/application/services/control_plane/run_manifest_service_mixins.py index 825790ba6e..9d2154a096 100644 --- a/src/bioetl/application/services/control_plane/run_manifest_service_mixins.py +++ b/src/bioetl/application/services/control_plane/run_manifest_service_mixins.py @@ -3,4 +3,3 @@ from __future__ import annotations from bioetl.application.services.control_plane._run_manifest_service_mixins import * # noqa: F403 - diff --git a/src/bioetl/application/workflow/transforms/reconcile_foreign_keys.py b/src/bioetl/application/workflow/transforms/reconcile_foreign_keys.py index b23f1b7c8a..0001f83717 100644 --- a/src/bioetl/application/workflow/transforms/reconcile_foreign_keys.py +++ b/src/bioetl/application/workflow/transforms/reconcile_foreign_keys.py @@ -35,9 +35,7 @@ async def _executor( "source_key": result.source_key, "reference_key": result.reference_key, "source_keys": list(request.source_keys or (request.source_key,)), - "reference_keys": list( - request.reference_keys or (request.reference_key,) - ), + "reference_keys": list(request.reference_keys or (request.reference_key,)), "action": result.action, "nulls_equal": request.nulls_equal, "scanned_rows": result.scanned_rows, diff --git a/src/bioetl/composition/bootstrap/cli/health.py b/src/bioetl/composition/bootstrap/cli/health.py index a96029bae7..61881ff561 100644 --- a/src/bioetl/composition/bootstrap/cli/health.py +++ b/src/bioetl/composition/bootstrap/cli/health.py @@ -13,7 +13,9 @@ create_health_server_dependencies, create_health_service, ) -from bioetl.composition.bootstrap.assembly.checkpoint import bootstrap_checkpoint_adapter +from bioetl.composition.bootstrap.assembly.checkpoint import ( + bootstrap_checkpoint_adapter, +) from bioetl.composition.bootstrap.cli.noop import create_noop_logger from bioetl.composition.bootstrap.cli.run_manifest import ( bootstrap_run_manifest_service, diff --git a/src/bioetl/domain/deterministic_identity.py b/src/bioetl/domain/deterministic_identity.py index 98675148a1..fce7ed6591 100644 --- a/src/bioetl/domain/deterministic_identity.py +++ b/src/bioetl/domain/deterministic_identity.py @@ -50,13 +50,14 @@ def _canonical_mapping(value: object) -> dict[str, object]: def _is_non_string_sequence(value: object) -> bool: - return isinstance(value, Sequence) and not isinstance(value, (str, bytes, bytearray)) + return isinstance(value, Sequence) and not isinstance( + value, (str, bytes, bytearray) + ) def _canonical_sequence(value: object) -> list[object]: return [ - _canonical_identity_value(nested) - for nested in cast(Sequence[object], value) + _canonical_identity_value(nested) for nested in cast(Sequence[object], value) ] diff --git a/src/bioetl/domain/ports/workflow_foreign_key_reconciliation.py b/src/bioetl/domain/ports/workflow_foreign_key_reconciliation.py index 27d1e43a2c..e3b302124b 100644 --- a/src/bioetl/domain/ports/workflow_foreign_key_reconciliation.py +++ b/src/bioetl/domain/ports/workflow_foreign_key_reconciliation.py @@ -40,21 +40,15 @@ def __post_init__(self) -> None: if self.source_keys is None and self.reference_keys is None: return if self.source_keys is None or self.reference_keys is None: - raise ValueError( - "source_keys and reference_keys must be provided together" - ) + raise ValueError("source_keys and reference_keys must be provided together") if not self.source_keys or not self.reference_keys: raise ValueError("source_keys and reference_keys cannot be empty") if len(self.source_keys) != len(self.reference_keys): - raise ValueError( - "source_keys and reference_keys must have the same length" - ) + raise ValueError("source_keys and reference_keys must have the same length") if self.source_keys[0].strip() != self.source_key.strip(): raise ValueError("source_key must match the first source_keys entry") if self.reference_keys[0].strip() != self.reference_key.strip(): - raise ValueError( - "reference_key must match the first reference_keys entry" - ) + raise ValueError("reference_key must match the first reference_keys entry") @property def effective_source_keys(self) -> tuple[str, ...]: diff --git a/src/bioetl/infrastructure/config/chembl_policy_registry_loader.py b/src/bioetl/infrastructure/config/chembl_policy_registry_loader.py index d8a0cae7fa..ca746adcd4 100644 --- a/src/bioetl/infrastructure/config/chembl_policy_registry_loader.py +++ b/src/bioetl/infrastructure/config/chembl_policy_registry_loader.py @@ -71,7 +71,9 @@ def load(self) -> ChemblPolicyRegistryData: @staticmethod def _load_ontology_families( - payload: dict[str, object], # Any: YAML scalar/sequence leaf types remain heterogeneous + payload: dict[ + str, object + ], # Any: YAML scalar/sequence leaf types remain heterogeneous ) -> tuple[ChemblOntologyPolicyFamily, ...]: families = payload.get("families", {}) if not isinstance(families, dict): @@ -124,7 +126,9 @@ def _load_ontology_families( @staticmethod def _merge_unit_companion_policies( - families: dict[str, dict[str, object]], # Any: YAML scalar/sequence leaf types remain heterogeneous + families: dict[ + str, dict[str, object] + ], # Any: YAML scalar/sequence leaf types remain heterogeneous unit_companion_policies: object, ) -> None: if not isinstance(unit_companion_policies, dict): @@ -156,7 +160,9 @@ def _merge_unit_companion_policies( @staticmethod def _merge_unit_companion_family( *, - family_payload: dict[str, object], # Any: YAML scalar/sequence leaf types remain heterogeneous + family_payload: dict[ + str, object + ], # Any: YAML scalar/sequence leaf types remain heterogeneous family_name: str, policy_fields: tuple[str, ...], ) -> None: diff --git a/src/bioetl/infrastructure/observability/prometheus_metrics.py b/src/bioetl/infrastructure/observability/prometheus_metrics.py index e9e9ce8b27..a0ef2e70ae 100644 --- a/src/bioetl/infrastructure/observability/prometheus_metrics.py +++ b/src/bioetl/infrastructure/observability/prometheus_metrics.py @@ -67,6 +67,7 @@ def _reject_unexpected_labels(name: str, labels: MetricLabels) -> None: f"Prometheus metric {name} does not accept labels: {formatted}" ) + def _require_registered_metric[_MetricT]( *, name: str, diff --git a/src/bioetl/infrastructure/storage/workflow_foreign_key_reconciliation.py b/src/bioetl/infrastructure/storage/workflow_foreign_key_reconciliation.py index c28a737ce5..b082ee5a9c 100644 --- a/src/bioetl/infrastructure/storage/workflow_foreign_key_reconciliation.py +++ b/src/bioetl/infrastructure/storage/workflow_foreign_key_reconciliation.py @@ -19,15 +19,11 @@ __all__ = ["SilverForeignKeyReconciliationAdapter"] _NULL_TOKEN = object() -_RECONCILIATION_ROWS_SCANNED_TOTAL = ( - "bioetl_workflow_reconciliation_rows_scanned_total" -) +_RECONCILIATION_ROWS_SCANNED_TOTAL = "bioetl_workflow_reconciliation_rows_scanned_total" _RECONCILIATION_ROWS_RETAINED_TOTAL = ( "bioetl_workflow_reconciliation_rows_retained_total" ) -_RECONCILIATION_ROWS_DELETED_TOTAL = ( - "bioetl_workflow_reconciliation_rows_deleted_total" -) +_RECONCILIATION_ROWS_DELETED_TOTAL = "bioetl_workflow_reconciliation_rows_deleted_total" @dataclass(slots=True) @@ -152,11 +148,13 @@ async def _reconcile_loaded_rows( reference_values = { key for row in reference_rows - if (key := _normalize_row_key( - row, - request.effective_reference_keys, - nulls_equal=request.nulls_equal, - )) + if ( + key := _normalize_row_key( + row, + request.effective_reference_keys, + nulls_equal=request.nulls_equal, + ) + ) is not None } retained_rows: list[dict[str, object]] = [] diff --git a/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_process.py b/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_process.py index 94c5397e85..29a4b9f91d 100644 --- a/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_process.py +++ b/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_process.py @@ -121,7 +121,9 @@ def _build_detached_backend_popen_kwargs( sw_hide = int(getattr(subprocess_module, "SW_HIDE", 0)) if startf_use_show_window: startupinfo.dwFlags = ( - int(startupinfo.dwFlags) if hasattr(startupinfo, "dwFlags") else 0 | startf_use_show_window + int(startupinfo.dwFlags) + if hasattr(startupinfo, "dwFlags") + else 0 | startf_use_show_window ) if has_sw_hide: startupinfo.wShowWindow = sw_hide diff --git a/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_runtime.py b/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_runtime.py index 96ffc71a62..a543ee5801 100644 --- a/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_runtime.py +++ b/src/bioetl/interfaces/cli/commands/domains/health/observability_backend_runtime.py @@ -325,7 +325,9 @@ def _start_observability_backend_detached( poll_seconds=poll_seconds, probe_fn=probe_fn, ) - command = python_executable_to_tuple(process.args) if hasattr(process, "args") else () + command = ( + python_executable_to_tuple(process.args) if hasattr(process, "args") else () + ) if ready and wait_required_paths_fn( health_url, required_probe_paths=required_probe_paths, @@ -439,6 +441,7 @@ def ensure_observability_backend_started( warning_printer=warning_printer, ) + def should_disable_transient_health_server( *, health_server_enabled: bool, diff --git a/src/bioetl/interfaces/http/_health_server_checkpoint_lookup.py b/src/bioetl/interfaces/http/_health_server_checkpoint_lookup.py index 22c82b474e..af4335a582 100644 --- a/src/bioetl/interfaces/http/_health_server_checkpoint_lookup.py +++ b/src/bioetl/interfaces/http/_health_server_checkpoint_lookup.py @@ -37,9 +37,8 @@ async def load_checkpoint_freshness_evidence( scope.resolved_manifest.run_id, ) evidence_source = "immutable_run_history" - elif ( - scope.selected_pipelines - or not host._is_all_scope_token(scope.requested_pipeline) + elif scope.selected_pipelines or not host._is_all_scope_token( + scope.requested_pipeline ): checkpoint_tuple = await host._checkpoint_port.load(target_pipeline) if checkpoint_tuple is None and hasattr( diff --git a/src/bioetl/interfaces/http/_health_server_routing_support.py b/src/bioetl/interfaces/http/_health_server_routing_support.py index afa4dde032..af1ebdb343 100644 --- a/src/bioetl/interfaces/http/_health_server_routing_support.py +++ b/src/bioetl/interfaces/http/_health_server_routing_support.py @@ -335,12 +335,15 @@ async def handle_control_plane_checkpoint_freshness( else scope.requested_pipeline ) - checkpoint_tuple, evidence_source, manifest_id, aggregate_scope_unknown = ( - await load_checkpoint_freshness_evidence( - host, - scope=scope, - target_pipeline=target_pipeline, - ) + ( + checkpoint_tuple, + evidence_source, + manifest_id, + aggregate_scope_unknown, + ) = await load_checkpoint_freshness_evidence( + host, + scope=scope, + target_pipeline=target_pipeline, ) if aggregate_scope_unknown: await host._send_payload_response( diff --git a/src/memory/notes.py b/src/memory/notes.py index aec3653ad7..72b8b16b73 100644 --- a/src/memory/notes.py +++ b/src/memory/notes.py @@ -124,9 +124,7 @@ def _target() -> None: delimiter = first_line parsed = _read_frontmatter_metadata_only(handle, delimiter, path) if not isinstance(parsed, dict): - raise ValueError( - f"note frontmatter must be a mapping: {path}" - ) + raise ValueError(f"note frontmatter must be a mapping: {path}") metadata = parsed except Exception as e: exception = e @@ -238,7 +236,11 @@ def normalize_text_key(value: str) -> str: def _resolve_read_timeout(read_timeout_seconds: float | None) -> float: - return NOTE_READ_TIMEOUT_SECONDS if read_timeout_seconds is None else read_timeout_seconds + return ( + NOTE_READ_TIMEOUT_SECONDS + if read_timeout_seconds is None + else read_timeout_seconds + ) def parse_markdown_note( diff --git a/src/memory/tooling/workflow.py b/src/memory/tooling/workflow.py index cf14d0abe3..7b2432539c 100644 --- a/src/memory/tooling/workflow.py +++ b/src/memory/tooling/workflow.py @@ -222,7 +222,9 @@ def _refresh_pre_task_surfaces( tempfile.mkdtemp(prefix="memory-pre-task-") ) repo_root = ( - refresh_repo_root or _discover_repo_root() or Path(__file__).resolve().parents[3] + refresh_repo_root + or _discover_repo_root() + or Path(__file__).resolve().parents[3] ) refresh_report = refresh_all( repo_root.resolve(), @@ -556,7 +558,9 @@ def _build_parser() -> argparse.ArgumentParser: pre_parser.add_argument("--skip-refresh-if-missing", action="store_true") pre_parser.add_argument("--limit", type=int, default=10) pre_parser.add_argument( - "--profile", default=DEFAULT_PROFILE, help="Task retrieval profile (validated at runtime)." + "--profile", + default=DEFAULT_PROFILE, + help="Task retrieval profile (validated at runtime).", ) pre_parser.add_argument("--skip-session-note", action="store_true") pre_parser.add_argument("--json", action="store_true") diff --git a/src/memory/validation.py b/src/memory/validation.py index e2f4644ced..af8895b14a 100644 --- a/src/memory/validation.py +++ b/src/memory/validation.py @@ -409,7 +409,11 @@ def _iter_note_paths( if not directory.exists(): continue if artifact_class == "episodic_note": - limit = None if include_all_episodic_notes else DEFAULT_EPISODIC_NOTE_SCAN_LIMIT + limit = ( + None + if include_all_episodic_notes + else DEFAULT_EPISODIC_NOTE_SCAN_LIMIT + ) note_paths = _bounded_episodic_note_paths(directory, limit=limit) else: note_paths = [ diff --git a/tests/architecture/test_architecture_dependency_docs_drift.py b/tests/architecture/test_architecture_dependency_docs_drift.py index 16954044dc..9d6b1c5a88 100644 --- a/tests/architecture/test_architecture_dependency_docs_drift.py +++ b/tests/architecture/test_architecture_dependency_docs_drift.py @@ -101,6 +101,7 @@ def test_dependency_map_drift_check_passes_current_repo( f"stderr:\n{stderr.getvalue()}\n" ) + def test_dependency_map_generated_markdown_uses_canonical_generator_path() -> None: markdown = Path( "docs/02-architecture/generated/module-dependency-map.md" diff --git a/tests/architecture/test_determinism_identity_policy.py b/tests/architecture/test_determinism_identity_policy.py index 6885b4ad22..c3d4215f63 100644 --- a/tests/architecture/test_determinism_identity_policy.py +++ b/tests/architecture/test_determinism_identity_policy.py @@ -125,9 +125,7 @@ def _iter_uuid4_candidate_paths(root: Path) -> tuple[Path, ...]: if result.returncode != 0: return tuple(root.rglob("*.py")) return tuple( - ROOT / line - for line in result.stdout.splitlines() - if line.endswith(".py") + ROOT / line for line in result.stdout.splitlines() if line.endswith(".py") ) diff --git a/tests/architecture/test_runtime_uuid_seam_inventory.py b/tests/architecture/test_runtime_uuid_seam_inventory.py index bca53975c4..b20b4b34be 100644 --- a/tests/architecture/test_runtime_uuid_seam_inventory.py +++ b/tests/architecture/test_runtime_uuid_seam_inventory.py @@ -19,6 +19,7 @@ def _tracked_python_files() -> list[Path]: import shutil + git_cmd = shutil.which("git") or "git" try: result = subprocess.run( @@ -28,7 +29,9 @@ def _tracked_python_files() -> list[Path]: capture_output=True, text=True, ) - return [ROOT / line for line in result.stdout.splitlines() if line.endswith(".py")] + return [ + ROOT / line for line in result.stdout.splitlines() if line.endswith(".py") + ] except (OSError, subprocess.CalledProcessError): files: list[Path] = [] for scan_root in SCAN_ROOTS: diff --git a/tests/architecture/test_strict_architecture_contracts.py b/tests/architecture/test_strict_architecture_contracts.py index dcbf8cacc2..3a0479608a 100644 --- a/tests/architecture/test_strict_architecture_contracts.py +++ b/tests/architecture/test_strict_architecture_contracts.py @@ -409,7 +409,14 @@ def _allowed_env_var_files(src_dir: Path) -> set[Path]: src_dir / "bioetl" / "infrastructure" / "config" / "dq_config_loader.py", src_dir / "bioetl" / "infrastructure" / "observability" / "logging_config.py", src_dir / "bioetl" / "infrastructure" / "observability" / "tracing.py", - src_dir / "bioetl" / "interfaces" / "cli" / "commands" / "domains" / "health" / "observability_backend_runtime.py", + src_dir + / "bioetl" + / "interfaces" + / "cli" + / "commands" + / "domains" + / "health" + / "observability_backend_runtime.py", } diff --git a/tests/integration/test_grafana_dashboard_metric_semantics.py b/tests/integration/test_grafana_dashboard_metric_semantics.py index 973fa3815d..3f7c2b2dca 100644 --- a/tests/integration/test_grafana_dashboard_metric_semantics.py +++ b/tests/integration/test_grafana_dashboard_metric_semantics.py @@ -1193,7 +1193,9 @@ def test_provider_telemetry_freshness_marks_missing_current_status_as_warn() -> expressions = [target.get("expr", "") for target in panel.get("targets", [])] assert len(expressions) == 1 expression = expressions[0] - assert "count_over_time(bioetl_provider_current_status[${__range_s}s])" in expression + assert ( + "count_over_time(bioetl_provider_current_status[${__range_s}s])" in expression + ) assert ( "absent(count_over_time(bioetl_provider_current_status[${__range_s}s]))" in expression @@ -1245,7 +1247,9 @@ def test_provider_critical_table_keeps_severity_only_scope() -> None: assert panel is not None, "Panel 'Inspect Critical Providers' not found" expressions = [target.get("expr", "") for target in panel.get("targets", [])] - assert expressions == ["max_over_time(bioetl_provider_current_status[${__range_s}s]) >= 1"] + assert expressions == [ + "max_over_time(bioetl_provider_current_status[${__range_s}s]) >= 1" + ] defaults = panel.get("fieldConfig", {}).get("defaults", {}) assert defaults.get("thresholds", {}).get("steps") == [ diff --git a/tests/integration/test_grafana_silver_reject_config.py b/tests/integration/test_grafana_silver_reject_config.py index ca79e7d1ae..b837c03e55 100644 --- a/tests/integration/test_grafana_silver_reject_config.py +++ b/tests/integration/test_grafana_silver_reject_config.py @@ -167,18 +167,35 @@ def test_dq_validation_diagnostics_groups_failures_then_runtime_then_trends() -> assert row is not None nested = {panel.get("title"): panel for panel in row.get("panels", [])} assert nested["Inspect: Quarantine by Error Type"].get("gridPos", {}).get("y") == 48 - assert nested["Monitor: Silver Validation Failures"].get("gridPos", {}).get("y") == 48 - assert nested["Monitor: Gold Strict Validation Failures"].get("gridPos", {}).get("y") == 48 + assert ( + nested["Monitor: Silver Validation Failures"].get("gridPos", {}).get("y") == 48 + ) + assert ( + nested["Monitor: Gold Strict Validation Failures"].get("gridPos", {}).get("y") + == 48 + ) assert nested["Track: Anomalies Detected"].get("gridPos", {}).get("y") == 56 assert nested["Track: DQ Check Duration (p95)"].get("gridPos", {}).get("y") == 56 - assert nested["Track: DQ Impact on Deliverability Trend (Blocked Share %)"].get( - "gridPos", {} - ).get("y") == 65 - assert nested["Track: Data Quality Score Trend (Volume-weighted)"].get( - "gridPos", {} - ).get("y") == 65 - assert nested["Review: Lineage Handoff to Control Plane"].get("gridPos", {}).get("y") == 65 - assert nested["Review: Aggregate Control-plane Handoff"].get("gridPos", {}).get("y") == 73 + assert ( + nested["Track: DQ Impact on Deliverability Trend (Blocked Share %)"] + .get("gridPos", {}) + .get("y") + == 65 + ) + assert ( + nested["Track: Data Quality Score Trend (Volume-weighted)"] + .get("gridPos", {}) + .get("y") + == 65 + ) + assert ( + nested["Review: Lineage Handoff to Control Plane"].get("gridPos", {}).get("y") + == 65 + ) + assert ( + nested["Review: Aggregate Control-plane Handoff"].get("gridPos", {}).get("y") + == 73 + ) def test_dq_quarantine_breakdown_prefers_bar_comparison_over_pie_share() -> None: @@ -221,10 +238,15 @@ def test_dq_failure_monitors_use_background_severity_and_nonzero_red( ) assert panel is not None assert panel.get("options", {}).get("colorMode") == "backgroundSolid" - steps = panel.get("fieldConfig", {}).get("defaults", {}).get("thresholds", {}).get( - "steps", [] + steps = ( + panel.get("fieldConfig", {}) + .get("defaults", {}) + .get("thresholds", {}) + .get("steps", []) + ) + assert any( + step.get("value") == 0 and step.get("color") == "green" for step in steps ) - assert any(step.get("value") == 0 and step.get("color") == "green" for step in steps) assert any(step.get("value") == 1 and step.get("color") == "red" for step in steps) @@ -402,9 +424,7 @@ def test_silver_reject_explorer_payload_link_preserves_time_scope() -> None: ) -def test_silver_reject_explorer_backend_health_marker_uses_live_health_probe() -> ( - None -): +def test_silver_reject_explorer_backend_health_marker_uses_live_health_probe() -> None: """Explorer must expose a first-screen backend trust marker via /health/live.""" dashboard = load_dashboard( Path("grafana/dashboards/bioetl-silver-reject-explorer.json") @@ -431,9 +451,7 @@ def test_silver_reject_explorer_backend_health_marker_uses_live_health_probe() - assert target.get("url") == "/health/live" assert target.get("root_selector") == "$.checks.server" - no_value = str( - panel.get("fieldConfig", {}).get("defaults", {}).get("noValue", "") - ) + no_value = str(panel.get("fieldConfig", {}).get("defaults", {}).get("noValue", "")) assert "UNKNOWN" in no_value description = str(panel.get("description", "")) assert "reachable" in description @@ -762,11 +780,26 @@ def test_dq_breakdown_panels_describe_direct_explorer_drilldowns( @pytest.mark.parametrize( ("panel_title", "forbidden_snippet"), [ - ("Inspect: Silver Filter Rejects by Pipeline", 'label_replace(vector(0), "pipeline", "no_events"'), - ("Inspect: Top Silver Reject Reasons (Pareto)", 'label_replace(vector(0), "reason_code", "none"'), - ("Inspect: Top Silver Reject Fields", 'label_replace(vector(0), "field", "none"'), - ("Inspect: Quarantine by Error Type", 'label_replace(vector(0), "error_type", "none"'), - ("Track: Anomalies Detected", 'label_replace(label_replace(vector(0), "severity", "none"'), + ( + "Inspect: Silver Filter Rejects by Pipeline", + 'label_replace(vector(0), "pipeline", "no_events"', + ), + ( + "Inspect: Top Silver Reject Reasons (Pareto)", + 'label_replace(vector(0), "reason_code", "none"', + ), + ( + "Inspect: Top Silver Reject Fields", + 'label_replace(vector(0), "field", "none"', + ), + ( + "Inspect: Quarantine by Error Type", + 'label_replace(vector(0), "error_type", "none"', + ), + ( + "Track: Anomalies Detected", + 'label_replace(label_replace(vector(0), "severity", "none"', + ), ], ) def test_dq_breakdown_panels_do_not_invent_synthetic_placeholder_categories( @@ -798,8 +831,14 @@ def test_dq_breakdown_panels_do_not_invent_synthetic_placeholder_categories( @pytest.mark.parametrize( ("panel_title", "expected_no_value"), [ - ("Inspect: Silver Filter Rejects by Pipeline", "No filtered-out samples in range"), - ("Inspect: Top Silver Reject Reasons (Pareto)", "No reject reason samples in range"), + ( + "Inspect: Silver Filter Rejects by Pipeline", + "No filtered-out samples in range", + ), + ( + "Inspect: Top Silver Reject Reasons (Pareto)", + "No reject reason samples in range", + ), ("Inspect: Top Silver Reject Fields", "No reject field samples in range"), ("Inspect: Quarantine by Error Type", "No quarantined records in range"), ("Track: Anomalies Detected", "No anomaly events in range"), diff --git a/tests/integration/test_grafana_surface_contracts.py b/tests/integration/test_grafana_surface_contracts.py index e25cffaadf..d58cc4e791 100644 --- a/tests/integration/test_grafana_surface_contracts.py +++ b/tests/integration/test_grafana_surface_contracts.py @@ -213,11 +213,7 @@ def test_control_plane_dashboard_contains_checkpoint_and_replay_metrics() -> Non assert not missing, f"Control-plane dashboard missing metrics: {missing}" checkpoint_panel = next( - ( - panel - for panel in get_dashboard_panels(dashboard) - if panel.get("id") == 892 - ), + (panel for panel in get_dashboard_panels(dashboard) if panel.get("id") == 892), None, ) assert checkpoint_panel is not None diff --git a/tests/integration/test_runner_lifecycle.py b/tests/integration/test_runner_lifecycle.py index 894d6c250e..9410cfae69 100644 --- a/tests/integration/test_runner_lifecycle.py +++ b/tests/integration/test_runner_lifecycle.py @@ -83,7 +83,6 @@ def _build_runner( ) - @dataclass class CallRecorder: """Records the order of method calls for verification.""" diff --git a/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py b/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py index 39c8f3fa80..801fe6531d 100644 --- a/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py +++ b/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py @@ -1540,9 +1540,7 @@ def test_filtered_snapshot_docs_drift_preserves_describes_edges() -> None: "doc_source_surface", RUN_MANIFEST_LEDGER_DOC_PATH, ) in relation_keys - assert any( - key.label == "doc_claim_surface" for key in filtered.nodes - ) + assert any(key.label == "doc_claim_surface" for key in filtered.nodes) assert any( relation_key[2] == "ASSERTS" and relation_key[3] == "doc_claim_surface" for relation_key in relation_keys diff --git a/tests/unit/application/services/test_run_manifest_inspection_verify.py b/tests/unit/application/services/test_run_manifest_inspection_verify.py index 05c14f1214..887356d94d 100644 --- a/tests/unit/application/services/test_run_manifest_inspection_verify.py +++ b/tests/unit/application/services/test_run_manifest_inspection_verify.py @@ -7,11 +7,21 @@ import pytest -from bioetl.application.services.control_plane.effective_config_service import EffectiveConfigService -from bioetl.application.services.control_plane.manifest.inspection_service import RunManifestInspectionService -from bioetl.application.services.control_plane.manifest.models import RunManifestCreateSpec as RunManifestCreateRequest -from bioetl.application.services.control_plane.run_ledger_service import RunLedgerService -from bioetl.application.services.control_plane.run_manifest_service import RunManifestService +from bioetl.application.services.control_plane.effective_config_service import ( + EffectiveConfigService, +) +from bioetl.application.services.control_plane.manifest.inspection_service import ( + RunManifestInspectionService, +) +from bioetl.application.services.control_plane.manifest.models import ( + RunManifestCreateSpec as RunManifestCreateRequest, +) +from bioetl.application.services.control_plane.run_ledger_service import ( + RunLedgerService, +) +from bioetl.application.services.control_plane.run_manifest_service import ( + RunManifestService, +) from bioetl.domain.config.dq import DQConfig from bioetl.domain.control_plane import ConfigSourceRef, RunArtifactRef, RunSourceRef from bioetl.domain.types import RunID, RunType diff --git a/tests/unit/application/services/test_workflow_runner_service.py b/tests/unit/application/services/test_workflow_runner_service.py index c2ddfda3da..8fa3a22ed9 100644 --- a/tests/unit/application/services/test_workflow_runner_service.py +++ b/tests/unit/application/services/test_workflow_runner_service.py @@ -346,9 +346,7 @@ async def test_workflow_runner_marks_downstream_steps_skipped_after_failure() -> @pytest.mark.asyncio -async def test_workflow_runner_executes_chembl_baseline_in_dependency_order() -> ( - None -): +async def test_workflow_runner_executes_chembl_baseline_in_dependency_order() -> None: metrics = _RecordingMetrics() pipeline_runner = _PipelineRunner() transform_service = _RecordingTransformService() @@ -376,9 +374,7 @@ async def test_workflow_runner_executes_chembl_baseline_in_dependency_order() -> ) assert result.status == "success" - assert [step.step_id for step in result.steps] == list( - config.topological_step_ids - ) + assert [step.step_id for step in result.steps] == list(config.topological_step_ids) assert [pipeline_name for pipeline_name, _options in pipeline_runner.calls] == [ "chembl_assay", "chembl_target", diff --git a/tests/unit/composition/factories/pipeline/test_creation_wiring.py b/tests/unit/composition/factories/pipeline/test_creation_wiring.py index dfbc464b6d..83cf4232c1 100644 --- a/tests/unit/composition/factories/pipeline/test_creation_wiring.py +++ b/tests/unit/composition/factories/pipeline/test_creation_wiring.py @@ -15,6 +15,7 @@ _create_pipeline_with_services_impl, _create_silver_validator, ) + _STARTED_AT = datetime(2026, 4, 24, 12, 0, tzinfo=UTC) diff --git a/tests/unit/composition/factories/pipeline/test_factory_method_helpers.py b/tests/unit/composition/factories/pipeline/test_factory_method_helpers.py index 4f99c650b7..8f09a2d889 100644 --- a/tests/unit/composition/factories/pipeline/test_factory_method_helpers.py +++ b/tests/unit/composition/factories/pipeline/test_factory_method_helpers.py @@ -20,6 +20,7 @@ create_transformer_instance, ) from bioetl.domain.ports.noop import NoOpAudit + _STARTED_AT = datetime(2026, 4, 24, 12, 0, tzinfo=UTC) diff --git a/tests/unit/composition/factories/pipeline/test_pipeline_factory.py b/tests/unit/composition/factories/pipeline/test_pipeline_factory.py index 4ea60edf3b..3e0297e936 100644 --- a/tests/unit/composition/factories/pipeline/test_pipeline_factory.py +++ b/tests/unit/composition/factories/pipeline/test_pipeline_factory.py @@ -300,8 +300,7 @@ def test_extract_dq_configs_trims_value_distribution_for_relaxed_dq() -> None: assert dq_configs.silver is not None assert ( - SilverDQCheckType.VALUE_DISTRIBUTION - not in dq_configs.silver.get_checks_enums() + SilverDQCheckType.VALUE_DISTRIBUTION not in dq_configs.silver.get_checks_enums() ) assert SilverDQCheckType.VALUE_DISTRIBUTION.value in silver_sink.dq_report.checks diff --git a/tests/unit/composition/factories/pipeline/test_runner_assembly_unit.py b/tests/unit/composition/factories/pipeline/test_runner_assembly_unit.py index f363be94af..52ee78b504 100644 --- a/tests/unit/composition/factories/pipeline/test_runner_assembly_unit.py +++ b/tests/unit/composition/factories/pipeline/test_runner_assembly_unit.py @@ -159,7 +159,10 @@ def test_build_checkpoint_manager_uses_control_plane_policy() -> None: assert mock_create_manager.call_args.kwargs["compatibility_policy"] == "observe" assert mock_create_manager.call_args.kwargs["metrics"] is pipeline.services.metrics - assert mock_create_manager.call_args.kwargs["clock"].__class__.__name__ == "SystemClock" + assert ( + mock_create_manager.call_args.kwargs["clock"].__class__.__name__ + == "SystemClock" + ) @pytest.mark.unit diff --git a/tests/unit/interfaces/cli/commands/test_observability_backend_runtime.py b/tests/unit/interfaces/cli/commands/test_observability_backend_runtime.py index ea27a909af..1883424999 100644 --- a/tests/unit/interfaces/cli/commands/test_observability_backend_runtime.py +++ b/tests/unit/interfaces/cli/commands/test_observability_backend_runtime.py @@ -91,7 +91,9 @@ def fake_urlopen(url: str, timeout: float) -> _Response: assert ( probe_observability_backend_required_paths( "http://127.0.0.1:8081/health", - required_probe_paths=("/ops/control-plane/checkpoint-freshness?pipeline=x",), + required_probe_paths=( + "/ops/control-plane/checkpoint-freshness?pipeline=x", + ), timeout_seconds=1.0, urlopen_fn=fake_urlopen, ) @@ -279,7 +281,9 @@ def test_ensure_backend_failure_message_includes_exit_code_and_log_tail() -> Non log_path.unlink(missing_ok=True) -def test_wait_for_observability_backend_required_paths_ready_retries_until_success() -> None: +def test_wait_for_observability_backend_required_paths_ready_retries_until_success() -> ( + None +): checks = {"count": 0} def fake_required_probe( diff --git a/tests/unit/interfaces/http/test_health_server_control_plane_identity.py b/tests/unit/interfaces/http/test_health_server_control_plane_identity.py index c824b6e56c..6f2b24b322 100644 --- a/tests/unit/interfaces/http/test_health_server_control_plane_identity.py +++ b/tests/unit/interfaces/http/test_health_server_control_plane_identity.py @@ -1513,7 +1513,9 @@ async def test_control_plane_checkpoint_freshness_prefers_exact_run_scope( server, manifest_store = running_server_with_run_catalog port = self._get_server_port(server) manifest = next( - item for item in manifest_store.list_all() if item.manifest_id == "manifest-1" + item + for item in manifest_store.list_all() + if item.manifest_id == "manifest-1" ) status_code, _, body = await self._send_request( diff --git a/tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py b/tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py index 36c3034e00..3339634b66 100644 --- a/tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py +++ b/tests/unit/scripts/ops/observability/test_grafana_dashboard_tooling.py @@ -147,7 +147,9 @@ def test_rerender_playwright_fallback_streams_output_from_repo_root( class _Result: returncode = 0 - monkeypatch.setattr(rerender_subject, "_playwright_script_path", lambda: script_path) + monkeypatch.setattr( + rerender_subject, "_playwright_script_path", lambda: script_path + ) monkeypatch.setattr( rerender_subject, "_resolve_node_executable", lambda: "/usr/bin/node" ) @@ -288,9 +290,7 @@ def test_live_audit_treats_checkpoint_freshness_unknown_as_valid_unknown_state( ) panel = { "targets": [ - { - "url": "/ops/control-plane/checkpoint-freshness?pipeline=${pipeline}" - } + {"url": "/ops/control-plane/checkpoint-freshness?pipeline=${pipeline}"} ] } config = audit_subject.AuditConfig( @@ -338,8 +338,7 @@ def test_live_audit_classifies_http_freshness_zero_and_empty() -> None: empty_payload = {"status": "UNKNOWN", "age_seconds": None} assert ( - audit_subject._classify_http_freshness_payload(zero_payload)[0] - == "zero_result" + audit_subject._classify_http_freshness_payload(zero_payload)[0] == "zero_result" ) assert ( audit_subject._classify_http_freshness_payload(empty_payload)[0] @@ -458,9 +457,7 @@ def test_grafana_audit_preflight_detects_stale_screenshot(tmp_path: Path) -> Non os.utime(screenshot_path, (1, 1)) os.utime(dashboard_path, (2, 2)) - result = preflight_subject._check_screenshot_artifacts( - screenshot_dir - ) + result = preflight_subject._check_screenshot_artifacts(screenshot_dir) assert result.status == "error" assert "stale dashboard screenshots" in result.detail @@ -684,11 +681,13 @@ def test_grafana_audit_cycle_stops_when_backend_cannot_be_ensured( monkeypatch.setattr( cycle_subject, "ensure_observability_backend_started", - lambda **_kwargs: calls.append("ensure") - or _backend_result( - backend_available=False, - message="bind failed", - status="failed", + lambda **_kwargs: ( + calls.append("ensure") + or _backend_result( + backend_available=False, + message="bind failed", + status="failed", + ) ), ) monkeypatch.setattr( @@ -869,8 +868,12 @@ def fake_ensure(**kwargs: Any) -> SimpleNamespace: status="started", ) - monkeypatch.setattr(cycle_subject, "ensure_observability_backend_started", fake_ensure) - monkeypatch.setattr(cycle_subject, "drop_listening_backend_on_port", lambda _port: False) + monkeypatch.setattr( + cycle_subject, "ensure_observability_backend_started", fake_ensure + ) + monkeypatch.setattr( + cycle_subject, "drop_listening_backend_on_port", lambda _port: False + ) monkeypatch.setattr( cycle_subject, "probe_observability_backend_required_paths", @@ -919,7 +922,9 @@ def test_grafana_audit_cycle_reuses_existing_backend_when_fallback_start_fails( ) -> None: calls: list[tuple[str, list[str]]] = [] - monkeypatch.setattr(cycle_subject, "drop_listening_backend_on_port", lambda _port: False) + monkeypatch.setattr( + cycle_subject, "drop_listening_backend_on_port", lambda _port: False + ) monkeypatch.setattr( cycle_subject, "probe_observability_backend_required_paths", @@ -981,7 +986,9 @@ def test_grafana_audit_cycle_uses_managed_backend_when_detached_backend_fails( ) -> None: calls: list[tuple[str, list[str]]] = [] - monkeypatch.setattr(cycle_subject, "drop_listening_backend_on_port", lambda _port: True) + monkeypatch.setattr( + cycle_subject, "drop_listening_backend_on_port", lambda _port: True + ) monkeypatch.setattr( cycle_subject, "ensure_observability_backend_started", diff --git a/tests/unit/scripts/qa/test_import_graph_inventory_reports.py b/tests/unit/scripts/qa/test_import_graph_inventory_reports.py index 2e554613c8..acfbba3ecc 100644 --- a/tests/unit/scripts/qa/test_import_graph_inventory_reports.py +++ b/tests/unit/scripts/qa/test_import_graph_inventory_reports.py @@ -148,7 +148,9 @@ def test_build_compatibility_importer_census_supports_relative_repo_root( payload = build_compatibility_importer_census(Path(".")) assert payload["summary"]["twin_pair_count"] == 1 - assert payload["twin_pairs"][0]["private_module"] == "bioetl.application.core._helper" + assert ( + payload["twin_pairs"][0]["private_module"] == "bioetl.application.core._helper" + ) assert payload["twin_pairs"][0]["public_module"] == "bioetl.application.core.helper"