Skip to content

tools: improve routine schema guidance#1089

Merged
henrypark133 merged 1 commit intostagingfrom
codex-routine-event-e2e
Mar 13, 2026
Merged

tools: improve routine schema guidance#1089
henrypark133 merged 1 commit intostagingfrom
codex-routine-event-e2e

Conversation

@henrypark133
Copy link
Copy Markdown
Collaborator

Summary

  • make and expose clearer LLM-facing parameter descriptions
  • reuse the runtime routine schemas in the schema validator to prevent drift
  • expand builtin routine trace coverage for cron, manual, and system-event routine creation paths

Test Plan

  • cargo test schema_ --lib --features libsql
  • cargo test --test e2e_builtin_tool_coverage routine_ --features libsql

Notes

  • reviewed once more before opening; no blocking findings in the schema/test changes
  • branch is based on local , which is currently behind , so a rebase may still be needed later if upstream moves in overlapping files

Copilot AI review requested due to automatic review settings March 12, 2026 23:42
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added size: XL 500+ changed lines scope: tool/builtin Built-in tools risk: medium Business logic, config, or moderate-risk modules contributor: core 20+ merged PRs and removed size: XL 500+ changed lines labels Mar 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves LLM-facing routine tool schema guidance, removes schema duplication by reusing the runtime routine schemas in strict-schema validation tests, and expands E2E trace coverage for cron/manual/system-event routine creation flows.

Changes:

  • Centralize routine_create / routine_update parameter schemas into reusable helpers with clearer descriptions.
  • Reuse the runtime routine schemas in schema_validator tests to prevent schema drift.
  • Extend builtin tool E2E trace coverage for cron timezone/context/action fields, manual routines, and system-event filters/tool permissions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/fixtures/llm_traces/tools/routine_system_event_emit.json Adds system-event filters and tool permissions, and aligns emitted payload with filters.
tests/fixtures/llm_traces/tools/routine_manual_create.json New trace fixture covering manual routine creation defaults.
tests/fixtures/llm_traces/tools/routine_create_list.json Expands routine_create trace to cover timezone, context paths, lightweight action config, cooldown, and notify fields.
tests/e2e_builtin_tool_coverage.rs Adds DB-level assertions to verify persisted routine trigger/action/notify/guardrails fields for the new traces.
src/tools/schema_validator.rs Stops duplicating routine schemas inline; instead calls the canonical routine schema helpers.
src/tools/builtin/routine.rs Introduces reusable schema helper functions, updates tool schemas to call them, and adds unit tests around schema shape/descriptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@zmanian zmanian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good refactor -- extracting canonical schema functions eliminates duplication between the tool implementations and schema validator tests. The improved descriptions will meaningfully help LLM tool use accuracy, especially the clarifications about what routine_update can and cannot change.

Note: will conflict with #1108 in routine.rs and e2e_builtin_tool_coverage.rs. Recommend merging this first since it's the larger structural change.

@henrypark133 henrypark133 merged commit 7d745d5 into staging Mar 13, 2026
14 checks passed
@henrypark133 henrypark133 deleted the codex-routine-event-e2e branch March 13, 2026 18:24
@ironclaw-ci ironclaw-ci Bot mentioned this pull request Mar 17, 2026
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
drchirag1991 pushed a commit to drchirag1991/ironclaw that referenced this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: tool/builtin Built-in tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants