Skip to content

fix(kdenlive): carry rounded milliseconds into seconds in seconds_to_timecode - #597

Open
kevin9327 wants to merge 1 commit into
HKUDS:mainfrom
kevin9327:fix/kdenlive-timecode-ms-carry
Open

kevin9327 wants to merge 1 commit into
HKUDS:mainfrom
kevin9327:fix/kdenlive-timecode-ms-carry

Conversation

@kevin9327

Copy link
Copy Markdown

seconds_to_timecode in the kdenlive harness rounded the fractional part separately from the whole seconds. A value just under a whole second rounded up to 1000 ms without carrying into the seconds field, giving an invalid timecode:

  • seconds_to_timecode(1.9996) returned "00:00:01.1000" instead of "00:00:02.000"
  • seconds_to_timecode(59.9999) returned "00:00:59.1000" instead of "00:01:00.000"

Fix: round once to whole milliseconds, then split into hours, minutes, seconds and ms with divmod. Output is unchanged for every value that was already correct.

Test: test_seconds_to_timecode_rounds_up_into_next_second in kdenlive/agent-harness/cli_anything/kdenlive/tests/test_core.py fails before the fix and passes after. The rest of test_core.py passes.

AI-assistance note: I found and wrote this change with help from an AI coding assistant. I reviewed it and ran the tests myself.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-20T03:15:19.529711Z 8108f51 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the existing-cli-fix Fixes or improves an existing CLI harness label Oct 20, 2026

This branch has not been deployed

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

Labels

existing-cli-fix Fixes or improves an existing CLI harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant