Skip to content

Commit 03a11ca

Browse files
committed
fix(ci): require all codex synthesis schema fields
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 0adbc12 commit 03a11ca

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/basic_memory/ci/project_updates.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -430,22 +430,23 @@ def _extend_list_section(sections: list[str], title: str, values: list[str]) ->
430430

431431
def render_agent_synthesis_schema() -> str:
432432
"""Render the optional Codex structured-output schema guardrail."""
433+
properties = {
434+
"summary": {"type": "string", "minLength": 1},
435+
"why_it_matters": {"type": "string", "minLength": 1},
436+
"user_facing_changes": {"type": "array", "items": {"type": "string"}},
437+
"internal_changes": {"type": "array", "items": {"type": "string"}},
438+
"verification": {"type": "array", "items": {"type": "string"}},
439+
"follow_ups": {"type": "array", "items": {"type": "string"}},
440+
"decision_candidates": {"type": "array", "items": {"type": "string"}},
441+
"task_candidates": {"type": "array", "items": {"type": "string"}},
442+
}
433443
schema = {
434444
"$schema": "https://json-schema.org/draft/2020-12/schema",
435445
"title": "AgentSynthesis",
436446
"type": "object",
437447
"additionalProperties": False,
438-
"required": ["summary", "why_it_matters"],
439-
"properties": {
440-
"summary": {"type": "string", "minLength": 1},
441-
"why_it_matters": {"type": "string", "minLength": 1},
442-
"user_facing_changes": {"type": "array", "items": {"type": "string"}},
443-
"internal_changes": {"type": "array", "items": {"type": "string"}},
444-
"verification": {"type": "array", "items": {"type": "string"}},
445-
"follow_ups": {"type": "array", "items": {"type": "string"}},
446-
"decision_candidates": {"type": "array", "items": {"type": "string"}},
447-
"task_candidates": {"type": "array", "items": {"type": "string"}},
448-
},
448+
"required": list(properties),
449+
"properties": properties,
449450
}
450451
return json.dumps(schema, indent=2, sort_keys=True) + "\n"
451452

tests/ci/test_project_updates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def test_render_agent_synthesis_schema_is_ci_guardrail_not_domain_schema() -> No
423423
assert schema["title"] == "AgentSynthesis"
424424
assert "summary" in schema["required"]
425425
assert "why_it_matters" in schema["required"]
426+
assert set(schema["required"]) == set(schema["properties"])
426427
assert "project_update" not in json.dumps(schema)
427428

428429

0 commit comments

Comments
 (0)