Skip to content

fix(knowledge): scale video-digest frame-gap cap with video length and refresh generated checklist evidence - #15538

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/video-digest-coverage
Nov 12, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/video-digest-coverage

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

No related issue: found while running the video-digest skill on a 3:28 demo video; the owner approved the fixes in session.

Summary

The video-digest watch missed most of the demo screens on a short video. It also left a stale count in the checklist after a re-run. Three fixes in the knowledge plugin's video-digest skill.

Fix

  • The frame-gap cap now scales with video length. maxFrameGapForDuration in compute-coverage-plan.js replaces the fixed 60 s MAX_FRAME_GAP_SEC and reuses the existing duration tiers:
    • up to 90 s: 5 s;
    • up to 300 s: 6 s;
    • over 300 s: duration / 80, rounded up, held between 6 s and 60 s. Gap fill stays near 80 frames, under the 8-sheet high-volume threshold. A 20-minute talk gets 15 s; 80 minutes and longer get 60 s, as before.
    • An explicit --max-frame-gap-sec still wins. The basis for each value is in vendor/video-digestion/TUNING.md.
    • Why: on the 208 s video, the 60 s cap gave 27 frames and missed 14-29 s demo stretches. A 6 s cap gave 49 frames, and 10 of the 12 promoted frames came only from that run.
  • --force refreshes only generated checklist evidence.
    • init-watch-checklist.js now rewrites lines starting - evidence (generated): and keeps evidence an agent wrote.
    • A tick backed only by generated evidence stays only while the generator still proves it. This replaces dropCompanionNaTicks.
    • post-bootstrap-slice.js passes force, so a run-watch.js re-run refreshes the checklist instead of printing SKIP.
    • The "Dropped ticks" notice moved to stderr, so it cannot corrupt run-watch's stdout JSON.
  • Checklist row 1.5 states the full high-volume rule.
    • templates/watch-checklist.md and context/quality-gates.md now include the candidate-count rule from isHighVolume (frame-budget.js).
    • The generated tick now passes candidateCount and targetMinFrames.

Verification

  • npm --prefix plugins/knowledge/skills/video-digest/extraction test (vitest): 91 files, 864 tests passed.
  • The typecheck (run-tests.sh build) passed.
  • The new post-bootstrap-slice.test.js fails without the force change.
  • The tier tests derive their expected values from the tier rule, not from the implementation.
  • Markdownlint is clean on the changed markdown files. Pre-commit and pre-push hooks passed.

Related

  • #15531: video-digest time range. Different files.
  • #15532: queue table cells. Different files.

Follow-ups

  • The over-300 s rule is a judgment bound with no measurement yet. Retune LONG_GAP_FILL_FRAME_BUDGET from the first long demo-heavy digest (TUNING.md "Tune signal").

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupokVV5anSMZds6E23DQ

kyle-sexton and others added 2 commits November 11, 2026 23:10
…rated checklist evidence

- The default maximum gap between timed frames follows the duration tiers:
  5 s up to 90 s, 6 s up to 300 s, 60 s beyond (maxFrameGapForDuration).
  On a 3:28 demo video the fixed 60 s cap sampled 27 frames and missed
  most demo screens; 6 s gave 49 frames and 10 of the 12 promoted ones.
  --max-frame-gap-sec still wins; recovery derives the same default when
  the run recorded no override.
- Checklist row 1.5 and the Phase 1 quality gate point at isHighVolume,
  and the generated 1.5 tick now checks the candidate-count condition.
- init-watch-checklist --force rewrites only generated evidence lines and
  keeps agent-written ticks and evidence; a tick held only by generated
  evidence stays only while the generator still proves it. A run-watch
  re-bootstrap refreshes the checklist the same way, and the dropped-tick
  notice moves to stderr so it cannot corrupt run-watch's stdout JSON.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupokVV5anSMZds6E23DQ
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 12, 2026 04:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T04:19:17.486604Z eaef399 Draft marked ready
ℹ️ 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.

kyle-sexton and others added 2 commits November 12, 2026 00:19
…5 minutes

The cap jumped from 6 s to 60 s at 300 s, so a 6-minute demo video sampled
like the old default. Past the medium tier the cap is now duration / 80,
rounded up, held between 6 s and 60 s, which keeps gap fill near 80 frames
(under the 8-sheet high-volume threshold) and reaches 60 s at 80 minutes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupokVV5anSMZds6E23DQ
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d9013d63b715fd6ef64f9c6826becd62abe618ca: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, blocking only): no security issues found

This review covered only what changed since d4eb7df5. I read every hunk of both files on the incremental list:

  • plugins/knowledge/skills/video-digest/extraction/watch/recover-watch-bootstrap.js: isHighVolume now gets its candidateCount from selection.candidateCount, the recorded candidate count, where it used to get selectedCount. This is a numeric input to a local high-volume heuristic. It doesn't reach a shell, a path, a URL or a credential.
  • plugins/knowledge/vendor/video-digestion/TUNING.md: the doc now says that maxFrameGapSec is written to watch.json only when --max-frame-gap-sec set it. This corrects documentation. It doesn't delete, narrow or soften any standing instruction.

Scope checks:

  • Neither file matches a TRUSTED PATHS: glob.
  • The diff touches no trust control.
  • No plugin manifest changed.
  • The instruction-surface check doesn't apply.

The PR description has no embedded instructions aimed at the review lane.

The prior-findings file says blocking only: yes, so this review reported only CRITICAL and IMPORTANT findings. It found none at any severity.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 2 inline finding(s) on d4eb7df52a6d4472fb883af18c6aba78156b0cee; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed d9013d63b715fd6ef64f9c6826becd62abe618ca: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #15538, incremental (d4eb7df → d9013d6)

This was an incremental review, and I read every hunk of both files in scope. This lane had already reviewed an earlier head (blocking only: yes), so I reported blocking findings only. I found none.

Both earlier findings are fixed

  1. recover-watch-bootstrap.js:315: recovery now decides highVolume from selection.candidateCount, the same count it writes to selection.json.
    • On the downsampled path that count is merged.length (L301-L305).
    • Otherwise it is the candidateCount that selectFramesForCoverage returns. That value is selected.length from summarizeFrameSelection (frame-budget.js:76), which is the count the old code used, so non-downsampled slices behave as before.
    • Recovery now matches the normal path (orchestrate-watching.js:160) and the row 1.5 rule in init-watch-checklist.js:277, which reads the same count.
  2. TUNING.md:59-60: it now says maxFrameGapSec is always in coverage-plan.json, and in watch.json only when --max-frame-gap-sec set it. That agrees with watch-pipeline.md and watch-state.js.

No plugin manifest changed in this push, and the PR closes no issue.

The spend note from the earlier review still applies and is not a finding: lower default frame-gap caps mean more frames and contact sheets per digest, which spends more vision tokens from subscription or prepaid usage.

I ran no tests; I had no shell.

…te count

Recovery computed highVolume from the downsampled selected count while
selection.json records the full candidate count, so checklist row 1.5 could
disagree with a correct highVolume. Use selection.candidateCount, as the main
pipeline does. Also state in TUNING.md that watch.json records maxFrameGapSec
only when --max-frame-gap-sec set it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupokVV5anSMZds6E23DQ
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 92bf37d Nov 12, 2026
66 of 68 checks passed
@kyle-sexton
kyle-sexton deleted the fix/video-digest-coverage branch November 12, 2026 06:04
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant