Skip to content

B45: port upstream #24846, #24864 and #24854 - #223

Merged
jtn0123 merged 4 commits into
nextfrom
section/upstream-b45
Nov 3, 2026
Merged

jtn0123 merged 4 commits into
nextfrom
section/upstream-b45

Conversation

@jtn0123

@jtn0123 jtn0123 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Ports three upstream 0.19 fixes onto next as reviewed cherry-pick -x commits, under ledger ID B45 (fork/ledger/B45.md).

Upstream PRs

What changes

  • Preview gif and mp4 clips that start inside a later preview now end at the requested time (-t is measured from the clipped start).
  • An export that fails before or during ffmpeg drops its row instead of staying in progress until a restart. Discarding skips an empty thumbnail path.
  • Timers that measure elapsed time use the monotonic clock: webpush cooldowns, VLM watch deadlines, state classification, Birdseye, detector and camera watchdogs, stats, file and rknn helpers. A wall clock step such as an NTP sync at boot no longer holds notifications, ends jobs early or restarts a healthy camera.
  • Review summaries state their length limits, use named subjects' names in every field, and note objects already in view at the start. The review tester picks up frame captions and current field guidance.
  • UI: no password strength meter; the confirm field revalidates when the password changes; the t shortcut and the mic button unmute audio for two-way talk; tiles with no saved volume play at full volume.
  • dependabot holds pandas below 3.1.

Conflicts and how they were resolved

  • Miscellaneous fixes blakeblackshear/frigate#24846 backend (auth.py, event.py, api/export.py, review.py, the recordings query params, frigate-api.yaml): already on the fork through B36 with the fork's own shape. Kept the fork's version. test_http_event takes upstream's timestamps; one fork comment was updated.
  • Miscellaneous fixes blakeblackshear/frigate#24846 UI (ExportDialog, DetailStream, recordingReviewUrl, MediaSync, TriggerView, KnownPlatesField): already covered by UI155. Kept the fork's version.
  • media.py preview handlers: took upstream's clip math and kept the fork's asyncio.to_thread query.
  • SetPasswordDialog and CreateUserDialog: dropped the meter, kept the fork's SessionsEndNotice and its removal of autoFocus; the revalidation call is void form.trigger(...) for the floating-promise lint.
  • NotificationsSettingsExtras and LiveCameraView: took upstream's behavior and kept the fork comments, talkState === "available", mic title and disabled logic.
  • frigate/video/ffmpeg.py: upstream's watchdog loop does not exist on the fork, which splits it into helpers with a B32 status cache. Ported _no_frames_received into _check_detect_process, and made every last_restart_time monotonic, including the fork's own D30 hwaccel retry and record stall restarts, so the comparisons stay on one clock. _send_roles_offline gets time.monotonic().
  • stats/util.py: kept the fork's _runner_device next to upstream's _monotonic_to_wall.
  • genai/prompts.py: took upstream's text (the fork had only removed em dashes there, and the new text has none).

Left out

  • Miscellaneous fixes blakeblackshear/frigate#24846 drops the severity sort in /review. Not ported: B37 keeps alerts ahead of the limit.
  • Miscellaneous fixes blakeblackshear/frigate#24846's new unknown-user login warning log is 0.19-only. B36 already verifies unknown users against a fixed hash.
  • The fork's SV12 watchdog heartbeat and SV6 outage tracker stay on the wall clock: the heartbeat is published as an age in stats, and the outage tracker compares against frame times.
  • No endpoint or auth dependency changed, so the API spec is unchanged (--check passes).

Tests

  • New or updated: test_fork_cov_record_export (missing rows and unexpected errors discard the export), test_http_fork_cov_media (gif and mp4 durations), test_record_watchdog (monotonic fake clock, plus a hwaccel retry that does not block later restarts), test_fork_cov_comms_webpush and test_fork_cov_jobs_vlm_watch (monotonic fakes), test_genai_review_tester (new signatures and captions), vitest overlay/fork/SetPasswordDialog.test.tsx (no meter, and a fixed mismatch clears; it fails without the fix).
  • Docker, targeted: 881 tests OK across the auth, event, export, recordings query params, media, review, webpush, stats, ffmpeg and watchdog, genai prompts, birdseye, classification and VLM watch modules.
  • make check-fast: passes (lint, typecheck, ratchet, vitest, i18n, ruff, mypy, gitleaks, scripts, and the full Python suite in Docker). One run hit a load-related timing flake in test_fork_api_responsiveness, which passed 3 of 3 on rerun; the final run was green.

🤖 Generated with Claude Code

hawkeye217 and others added 4 commits November 2, 2026 20:44
Most of upstream's grab bag was already fixed on the fork by B36 (backend)
and UI155 (web), each in its own way. The conflicts were resolved toward
the fork, and only what the fork lacked was taken.

Ported:
- preview.gif and preview.mp4 measure the clip duration (-t) from the
  clamped start, so a preview that starts after start_ts no longer reads
  past the requested end
- the exporter discards the row and partial files when an export fails
  before or during ffmpeg (an exception, or DoesNotExist while building
  the command), instead of leaving it in progress until a restart, and
  skips an empty thumbnail path when discarding
- the password strength meter is removed (it scored the old 8 character
  rules); editing the password revalidates the confirm field, and the set
  password dialog shows a live match or mismatch indicator
- push registration clears the unsaved registration message when it fails
- the `t` shortcut unmutes camera audio when it starts two-way talk, like
  the button
- live tiles default to volume 1 when the group has no saved setting
- dependabot holds pandas below 3.1 until numpy 2
- upstream's tests: in-progress export delete, recordings/unavailable
  scale=0, and the first minute of the time-of-day filter (its event times
  are now on the hour in UTC; a fork comment in that test is updated)

Kept the fork's version (already fixed): the unknown-user login hash
(B36's verify_password against a fixed hash; upstream's new unknown-user
warning log is 0.19-only and left out), the recordings/unavailable scale,
vod/event padding (B36 also caps it at 3600), preview offsets and earliest
preview, the in-progress bulk delete, the events time-of-day filter (B36's
DST-aware time_of_day_clause), the recording share link base path, Last N
hours export math, the detail stream camera switch, per-group live audio
(groupAudioStates), per-trigger highlight timers (use-timed-highlights),
the media sync 409 toast, the known plates unnamed entry, and the refused
subscription toast. The set password dialog keeps the fork's dropped
autoFocus (an accessibility fix).

Left out: removing the severity order_by in /review. The fork's B37 sorts
by severity then start_time in one order_by call so alerts stay ahead of
the limit; upstream's change keeps only the start_time sort.

(cherry picked from commit 96ce75c)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r#24864)

Timers that measure elapsed time move to time.monotonic(), so a wall clock
step (an NTP sync at boot, a manual change) can no longer hold every push
notification in cooldown, end a VLM watch job early, pause state
classification, freeze Birdseye, make the detector watchdog restart a
healthy detector, or make the camera watchdog restart ffmpeg or never
restart it. The camera watchdog's no frames check now tracks when the
capture thread's frame time last changed, since that value is a wall clock
frame time. Stats convert the detector's monotonic detection_start back to
wall clock time for the API.

Conflicts, resolved toward the fork:
- frigate/video/ffmpeg.py: the fork split upstream's inline watchdog loop
  into helpers (_check_detect_process, _check_record_processes,
  _check_shared_sub_stream) and sends status through the B32 status cache.
  The loop kept the fork's structure; the no frames check moved into
  _check_detect_process, and the disable path uses monotonic time with the
  fork's _send_*_status helpers.
- frigate/stats/util.py: kept the fork's _runner_device next to the new
  _monotonic_to_wall.
- frigate/comms/webpush.py: imports only; the fork does not use Iterator.

Fork follow-ups in the same file, so the watchdog never mixes clocks: the
D30 hwaccel retry restart now records last_restart_time on the monotonic
clock (a wall clock value there would have blocked every later restart),
and a stalled recorder restart sends its offline status with a monotonic
resend time like the rest of the loop. test_fork_cov_comms_webpush.py
drives the cooldown clock through webpush's time module and expects -inf
as the unset cooldown time.

Unchanged: the fork's SV12 watchdog heartbeat and SV6 outage tracker keep
the wall clock. The heartbeat is published as an age in stats, and the
outage tracker compares against frame times.

(cherry picked from commit 2b4397b)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review summary prompts state the length of the scene (no more than five
sentences) and shortSummary (one sentence) fields, since grammar
constrained providers cut text off at the schema cap, and every user facing
field repeats the rule to use a named subject's name. The observations
guidance asks for chronological order from the first frame, and the frame
annotation guidance says a lost track can mean the object went out of view,
not only that it left the frame. Tracker notes title-case sub labels the
way the Objects in Scene list does, and an object already tracked before
the first sampled frame gets one "already in view" note instead of its
earlier history.

Conflict: frigate/genai/prompts.py, where the fork had already replaced the
em dashes in the base observations and scene guidance and the detailed
scene preset. Upstream's new text has none, so it was taken as is.

(cherry picked from commit 47ea942)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test_fork_cov_record_export.py: an export whose source rows are missing
  now drops its row (the fork test asserted the old in-progress row), and
  so does one whose run raises; discarding skips an empty thumbnail path
  (blakeblackshear#24846)
- test_genai_review_tester.py: follows the tester's new load_frames and
  followup_loop signatures, expects "default" to restore the current field
  guidance, and covers frame captions being loaded and sent (blakeblackshear#24854)
- test_fork_cov_jobs_vlm_watch.py: the fake clock answers monotonic(),
  which the job's deadlines now use (blakeblackshear#24864)
- test_http_fork_cov_media.py: preview gif and mp4 from a preview that
  starts after start_ts read only up to end_ts (blakeblackshear#24846)
- SetPasswordDialog.test.tsx (new): no strength meter, a live match line,
  and editing the password clears the confirm field's stale mismatch error
  (blakeblackshear#24846)
- test_record_watchdog.py: the watchdog harness drives ffmpeg's time module
  from the same hand-moved clock as datetime and binds
  _no_frames_received, since the loop now paces restarts on the monotonic
  clock (blakeblackshear#24864); a new test fails if the D30 hwaccel retry records its
  restart on the wall clock again
- fork/ledger/B45.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e45b1b70-7124-4364-a6fb-156f36338b85
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@jtn0123
jtn0123 merged commit c395f82 into next Nov 3, 2026
20 checks passed
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.

3 participants