REGRESSION: codex doesnt know defs and refs

This commit is contained in:
lda
2026-05-18 18:47:36 +07:00 Verified
parent 7605a5292d
commit b3586453a5
5 changed files with 58 additions and 2 deletions
+16
View File
@@ -324,6 +324,22 @@ The `wf.std` self-binding is present when the saved graph depends on standard
library capabilities. This tiny echo graph does not need much from `wf.std`, but
keeping local system-source bindings explicit is the current general pattern.
System-source bindings can look redundant:
```json
{
"wf.std": "wf.std",
"wf.mcp": "wf.mcp"
}
```
They mean "bind the artifact's logical local source to the concrete local source
with the same id." They are not external account bindings. Keep them explicit
for now when validation reports `binding_missing` for `wf.std` or `wf.mcp`.
Later the platform may make system-source self-bindings implicit, but current
artifacts and deployments use one uniform binding mechanism for both local and
external sources.
## 8. Validate Before Running
```yaml
+6
View File
@@ -150,8 +150,14 @@ deployment bindings: {}
Fix:
- add a binding such as `"demo": "demo.personal"`
- if the missing logical source is local, add a self-binding such as
`"wf.std": "wf.std"` or `"wf.mcp": "wf.mcp"`
- then validate again
System-source self-bindings look redundant, but they mean "use the local
standard source with the same id." Current deployments bind local and external
sources through the same field.
Use:
```text
+15
View File
@@ -396,6 +396,21 @@ artifact reference: context7.query-docs
runtime binding: context7 -> context7.default
```
Local system sources use the same binding mechanism. For example:
```text
artifact reference: wf.std.replace
runtime binding: wf.std -> wf.std
artifact reference: wf.mcp.call_tool
runtime binding: wf.mcp -> wf.mcp
```
These self-bindings are not external account choices. They keep dependency
resolution uniform across local system sources and upstream connection sources.
They may become implicit later, but today deployments should include them when
validation reports `binding_missing` for `wf.std` or `wf.mcp`.
or:
```text
+1 -2
View File
@@ -8,7 +8,6 @@ from wf_artifacts import ArtifactKind
from wf_artifacts.models import RequiredCapability
from wf_mcp.broker.service import WfMcpService
from ..models import RawWorkflowPlan
from .handlers import WorkflowSurfaceHandlers
@@ -87,7 +86,7 @@ def register_workflow_tools(server: FastMCP[Any], service: WfMcpService) -> None
artifact_id: str,
version: int,
title: str,
plan: RawWorkflowPlan,
plan: dict[str, Any],
outcomes: list[str],
kind: ArtifactKind = "workflow",
description: str | None = None,
+20
View File
@@ -186,6 +186,26 @@ def test_workflow_tools_have_human_metadata() -> None:
asyncio.run(run_proxy())
def test_create_artifact_from_plan_exposes_plan_as_plain_object() -> None:
config = BrokerConfig(
store_root=local_temp_root() / "unified_create_artifact_schema_store",
connections=[],
)
async def run_proxy() -> None:
client = create_server_client(config, admin_tools=False)
async with client:
tools = await client.list_tools()
by_name = {tool.name: tool for tool in tools}
schema = by_name["wf.workflow.create_artifact_from_plan"].inputSchema
plan_schema = schema["properties"]["plan"]
assert plan_schema["type"] == "object"
assert plan_schema.get("additionalProperties") is True
asyncio.run(run_proxy())
def test_server_exposes_platform_documentation_resources() -> None:
config = BrokerConfig(
store_root=local_temp_root() / "unified_docs_resource_store",