fix: address coderabbit followups

This commit is contained in:
lda
2026-06-05 18:49:25 +07:00 Verified
parent d61b183793
commit 80e8f3299f
5 changed files with 17 additions and 8 deletions
@@ -17,7 +17,7 @@ tasks from this file's old history.
Use the replacement plan instead: Use the replacement plan instead:
```text ```text
docs/superpowers/plans/2026-05-27-openapi-core-capability-source.md docs/historical/superpowers/plans/2026-05-27-openapi-core-capability-source.md
``` ```
The replacement plan uses the OpenAPI document as source of truth, The replacement plan uses the OpenAPI document as source of truth,
@@ -127,7 +127,7 @@ Output shape:
- Modify: `pyproject.toml` - Modify: `pyproject.toml`
- Modify: `uv.lock` - Modify: `uv.lock`
- Modify: `docs/superpowers/plans/2026-05-27-openapi-capability-source.md` - Modify: `docs/historical/superpowers/plans/2026-05-27-openapi-capability-source.md`
- Test: `tests/openapi/test_codegen_executor.py` may be removed or replaced later. - Test: `tests/openapi/test_codegen_executor.py` may be removed or replaced later.
- [ ] **Step 1: Replace runtime dependency** - [ ] **Step 1: Replace runtime dependency**
@@ -155,7 +155,7 @@ Expected: lockfile updates successfully.
Keep the superseded note at the top of: Keep the superseded note at the top of:
```text ```text
docs/superpowers/plans/2026-05-27-openapi-capability-source.md docs/historical/superpowers/plans/2026-05-27-openapi-capability-source.md
``` ```
Expected: future agents do not continue Task 5/6 AST parsing work. Expected: future agents do not continue Task 5/6 AST parsing work.
+1 -1
View File
@@ -210,7 +210,7 @@ def workflow_mcp_source_to_connection_config(source: object) -> ConnectionConfig
if getattr(source, "kind", None) != "mcp": if getattr(source, "kind", None) != "mcp":
raise ValueError("expected wf_config MCP source") raise ValueError("expected wf_config MCP source")
for field in ("id", "provider", "account", "enabled", "ownership"): for field in ("id", "provider", "account", "enabled", "ownership", "transport"):
if getattr(source, field, None) is None: if getattr(source, field, None) is None:
raise ValueError(f"wf_config MCP source missing required field: {field}") raise ValueError(f"wf_config MCP source missing required field: {field}")
transport = getattr(source, "transport") transport = getattr(source, "transport")
+2 -1
View File
@@ -35,7 +35,8 @@ def _registry_entry(source_id: str) -> McpSourceRegistryEntry:
def test_wf_server_package_stays_mcp_free() -> None: def test_wf_server_package_stays_mcp_free() -> None:
path = "src/wf_server/context.py" path = "src/wf_server/context.py"
tree = ast.parse(open(path, encoding="utf-8").read(), filename=path) with open(path, encoding="utf-8") as file:
tree = ast.parse(file.read(), filename=path)
violations: list[str] = [] violations: list[str] = []
for node in ast.walk(tree): for node in ast.walk(tree):
+11 -3
View File
@@ -1,10 +1,14 @@
from __future__ import annotations from __future__ import annotations
from pathlib import Path
from wf_config import WorkflowConfigFile from wf_config import WorkflowConfigFile
from wf_mcp.broker.config import broker_config_from_workflow_config from wf_mcp.broker.config import broker_config_from_workflow_config
def test_broker_config_from_workflow_config_converts_mcp_sources(tmp_path) -> None: def test_broker_config_from_workflow_config_converts_mcp_sources(
tmp_path: Path,
) -> None:
workflow_config = WorkflowConfigFile.model_validate( workflow_config = WorkflowConfigFile.model_validate(
{ {
"version": 1, "version": 1,
@@ -52,7 +56,9 @@ def test_broker_config_from_workflow_config_converts_mcp_sources(tmp_path) -> No
assert connection.metadata["description"] == "Everything test server" assert connection.metadata["description"] == "Everything test server"
def test_broker_config_from_workflow_config_converts_mcp_http_source(tmp_path) -> None: def test_broker_config_from_workflow_config_converts_mcp_http_source(
tmp_path: Path,
) -> None:
workflow_config = WorkflowConfigFile.model_validate( workflow_config = WorkflowConfigFile.model_validate(
{ {
"version": 1, "version": 1,
@@ -83,7 +89,9 @@ def test_broker_config_from_workflow_config_converts_mcp_http_source(tmp_path) -
assert connection.metadata["headers"] == {"X-Test": "yes"} assert connection.metadata["headers"] == {"X-Test": "yes"}
def test_broker_config_from_workflow_config_ignores_non_mcp_sources(tmp_path) -> None: def test_broker_config_from_workflow_config_ignores_non_mcp_sources(
tmp_path: Path,
) -> None:
workflow_config = WorkflowConfigFile.model_validate( workflow_config = WorkflowConfigFile.model_validate(
{ {
"version": 1, "version": 1,