fix: harden authoring schema and contract projections

This commit is contained in:
lda
2026-08-29 21:08:05 +07:00 Verified
parent 8b16c6403d
commit 0570ef8a78
14 changed files with 243 additions and 359 deletions
+18
View File
@@ -255,6 +255,24 @@ def test_schema_path_options_returns_empty_schema_for_unconstrained_property() -
]
def test_schema_path_options_copies_schema_fragments() -> None:
schema = {
"type": "object",
"properties": {
"request": {
"type": "object",
"properties": {"id": {"type": "string"}},
}
},
}
options = schema_path_options(schema, root="input", uses=["step_input"])
# Options are safe for UI consumers to annotate without mutating the source schema.
options[0]["schema"]["title"] = "Edited through option"
assert schema["properties"]["request"].get("title") is None
def test_project_authoring_contract_inventory_composes_pure_inputs() -> None:
context_entry: AuthoringPathOptionPayload = {
"path": "context.loop_item",