Skip to content

Improve SCHEMA_MISMATCH repair guidance and add loop-alias/exports repair tools#373

Open
zhongkaifu wants to merge 1 commit into
mainfrom
codex/update-workflow-for-schema_mismatch-fix
Open

Improve SCHEMA_MISMATCH repair guidance and add loop-alias/exports repair tools#373
zhongkaifu wants to merge 1 commit into
mainfrom
codex/update-workflow-for-schema_mismatch-fix

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • Improve LLM guidance and deterministic tooling to more accurately and efficiently fix SCHEMA_MISMATCH validation errors when repairing workflows.
  • Reduce unnecessary LLM rounds by applying deterministic repairs for common loop-related reference issues and missing exports.
  • Make repair tools callable from the LLM agent so automated fixes can be applied via the existing toolchain.

Description

  • Enhanced the LLM system prompt and SCHEMA_MISMATCH guidance in velvetflow/planner/repair.py to prioritize schema-aware fixes and Jinja-based conversions (e.g., join/first, tojson).
  • Added two deterministic repair tool wrappers to the agent in repair.py: align_loop_body_alias_references and fix_missing_loop_exports_items, and included them in the agent tools list.
  • Extended velvetflow/planner/repair_tools.py apply_repair_tool to handle align_loop_body_alias_references and fix_missing_loop_exports_items by routing to the existing implementations.
  • Kept changes minimal and scoped to repair prompt/text and tool exposure; primary modified files are velvetflow/planner/repair.py and velvetflow/planner/repair_tools.py.

Testing

  • No automated tests were executed as part of this change.
  • Existing unit tests referencing SCHEMA_MISMATCH remain unchanged and should be run in CI to validate behavior.
  • Manual linting/format checks were not performed in this rollout.
  • Recommend running the test suite (pytest tests/) in CI to verify regressions and behavior on loop-related repair cases.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant