Skip to content

Fix timestamp schema inconsistency between global validation and tool schemas#42

Draft
andmoredev with Copilot wants to merge 1 commit into
try-to-fix-some-stufffrom
copilot/sub-pr-37-one-more-time
Draft

Fix timestamp schema inconsistency between global validation and tool schemas#42
andmoredev with Copilot wants to merge 1 commit into
try-to-fix-some-stufffrom
copilot/sub-pr-37-one-more-time

Conversation

Copilot AI commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

The global TimestampSchema only accepted HH:MM:SS format, but the create-clips tool accepted HH:MM:SS,MMM with milliseconds, and the clip-detector prompt examples showed milliseconds. This created a validation mismatch where segments could be created with millisecond timestamps but fail validation elsewhere.

Changes

  • Updated global TimestampSchema in schemas/common.mjs to accept optional milliseconds: /^\d{2}:\d{2}:\d{2}(,\d{3})?$/
  • Enhanced test coverage to validate both formats, reject invalid millisecond formats (dot notation, incomplete/excessive digits)

Impact

Both formats now validate consistently across:

  • Global schema (schemas/common.mjs)
  • Tool schema (functions/tools/create-clips.mjs)
  • Prompt examples (functions/agents/clip-detector.mjs)
  • Processing utilities (functions/utils/video-processing.mjs - already handled both)
// Both formats now valid everywhere
TimestampSchema.parse("00:14:32")      // ✓
TimestampSchema.parse("00:14:32,500")  // ✓ (now consistent)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI mentioned this pull request Feb 18, 2026
Copilot AI changed the title [WIP] Apply changes based on review feedback for Claude code fixes Fix timestamp schema inconsistency between global validation and tool schemas Feb 18, 2026
Copilot AI requested a review from andmoredev February 18, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants