Repository navigation
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely. 🚧 Right now this is a draft, so automated Claude review is paused — nothing is being spent yet. Mark it Ready for review to trigger it. Warning 💸 The Claude reviewer bills in credits, not vibesAutomated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared. Draft when unsure, Ready when you mean it:
However you get there, arrive prepared:
Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.
|
…-clock-fallback # Conflicts: # workflows/roboflow_workflows/core_steps/flow_control/rate_limiter/v1.py
…-clock-fallback # Conflicts: # workflows/CHANGELOG.md
What changed and why
roboflow_core/rate_limiter@v1is meant to fall back todatetime.now()whenvideo_reference_imageis not a video frame. It never did:WorkflowImageData.video_metadatadoesn't raise for an image without metadata. Instead it returns a placeholder withframe_number=0, fps=30, so thetry/exceptnever fell back. The limiter computed time 0 on every run and, after the first run, suppressednext_stepsforever. This affects still images (HTTP requests) and images from steps that build a newWorkflowImageDatawithout copying video metadata (stitch_images@v1,grid_visualization@v1,stability_ai_*). It is the follow-up split out of #3296, where Camera Calibration dropping metadata exposed it.WorkflowImageData.has_video_metadata(), a public check for real (producer-supplied) video metadata, so blocks don't read_video_metadata.frame_number / fps) only forcomes_from_video_file=Truewith a non-zero FPS;frame_timestampotherwise (streams, unknown source, FPS missing or 0). This is the same rule Time in Zone and Velocity use.Behavior change for streams: frames with
comes_from_video_fileset toFalse/Nonethat report an FPS used to be timed byframe_number / fps. They now useframe_timestamp. Video files are unchanged.Execution engine changelog: not needed.
has_video_metadata()is an additive accessor and changes no compile or run behavior (see.cursor/rules/execution-engine-version-changelog.mdc). The fix is recorded under## Unreleased→### Fixedinworkflows/CHANGELOG.md.Tests
workflows/tests/unit_tests/core_steps/control_flow/test_rate_limiter.py, with wall-clock time simulated by patching the module'sdatetime:frame_timestamppath).has_video_metadata()test inworkflows/tests/unit_tests/execution_engine/entities/test_base.py.datetime.fromtimestampcall hits the patcheddatetime, so they error out rather than show the old output. To show the bug itself, a script with real time ran still images 0.15 s apart with a 0.1 s cooldown: the old block let only the first through ([True, False, False, False]), the fixed one let all four through.Commands run:
Not run: the server integration test
tests/workflows/integration_tests/execution/test_workflow_with_rate_limiter.py, which needs a model. It uses novideo_reference_image, so its path is the unchanged wall-clock one.Notes