fix: advertise structural workflow paths in schemas

This commit is contained in:
lda
2026-06-30 01:33:02 +07:00 Verified
parent 0f340bb8a5
commit 30ad99fca1
6 changed files with 101 additions and 30 deletions
+4 -3
View File
@@ -280,9 +280,10 @@ stable.
- Completed: challenge matrix operations now have compact OpenCode thread
titles, policy handling for canonical skill-document reads, and a central
`summarize_trials.py` command for audited result tables.
- Completed: canonical TOML path strings replace structural JSON path objects
in workflow drafts. Paths now emit as `"input.text"`, `"state.echoed"`,
`"message"` (local) instead of `{"root": "input", "parts": ["text"]}`.
- Completed: canonical TOML path strings are the emitted workflow path form.
Paths now serialize as `"input.text"`, `"state.echoed"`, and `"message"`
(local). Structural `{"root": "input", "parts": ["text"]}` path objects
remain accepted and are now advertised in generated schemas as an input form.
- Completed: challenge-driven CLI UX fixes now provide exact available
deployment binding suggestions, reject bare `--bind-output` state targets
before RPC with compact guidance, and accept `wf schema --full` as an alias
+3 -2
View File
@@ -84,8 +84,9 @@ New canonical graph path JSON uses TOML-key strings:
"input.message"
```
Structural root/parts objects are still accepted at model-parse boundaries for
old persisted records, but new schemas and new examples should emit strings.
Structural root/parts objects are still accepted at model-parse boundaries and
are advertised by generated schemas as an input form. Serializers and new
examples should emit strings.
Quote a segment when the field name itself contains a dot or space, for example
`state."person.name"` or `state.person."full name"`.
@@ -313,12 +313,11 @@ formatter. The shared grammar must support quoted TOML keys for literal dots,
spaces, and other non-bare segments. Parse errors identify the complete input
and recommend quoting the invalid segment.
Pydantic JSON schemas advertise path strings rather than the structural
`{root, parts}` object. Serializers emit canonical strings. Validators continue
to accept the structural object only as a read-compatibility path for existing
persisted drafts, artifacts, and runs; new public examples and writes use
strings. This is compatibility for real stored data, not a second documented
syntax.
Pydantic JSON schemas advertise both canonical path strings and structural
`{root, parts}` objects. Serializers emit canonical strings. Validators continue
to accept structural objects so machine clients and old persisted drafts,
artifacts, and runs can use the explicit root/parts form; new public examples
and writes prefer strings.
## Compatibility And Migration
@@ -346,7 +345,7 @@ shim is added without a real external caller.
- an inferred route targets `__end__` unless explicitly overridden;
- output binding still projects referenced schema definitions;
- all path models parse and serialize the canonical TOML-key string grammar;
- structural path objects remain readable but are not emitted;
- structural path objects remain accepted input but are not emitted;
- stored-workspace compile equals `compile_workflow_draft` output;
- compile does not change revision, timestamps, status, or diagnostics.