Skip to content

feat(knowledge): video-digest watch --from --to acquires a time range with full-video timestamps - #16142

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-16127-43556765330-1
Nov 14, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-16127-43556765330-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #16127

Summary

Opened by the work-resolve-issue lane. The run's own summary:

run-watch.js <url> --from <h:mm:ss> --to <h:mm:ss> (either bound optional, YouTube only through a new timeRange adapter capability) now downloads only that range: the video-only yt-dlp pass gets --download-sections "*<from>-<to>", while captions and info.json stay whole-video. Watching samples the ranged media in media time, with cues moved into media time. The pipeline then adds the range start back to every frame time, densification window and timeline entry, and the transcript writer adds it to ASR cues, so every stamp in the slice is full-video time. watch.json timeRange records fromSec/toSec/offsetSec/cut "keyframe"/offsetErrorSec, and README.md gets a Range: line. Design choice: yt-dlp section download, the issue's first listed option, because the done-when asks to acquire only the range. Without --force-keyframes-at-cuts, yt-dlp stream-copies the section and ffmpeg keeps the segment from the seek point before --from. So offsetErrorSec is measured as the probed media length beyond the requested range, and each timed frame's timestampErrorSec grows by it. The fresh-context review raised two problems, both fixed here: --recover on a ranged slice now refuses (it would have written media-time stamps and dropped timeRange), and open-ended claim-inventory sessions no longer end at selection.durationSec, which on a ranged slice is the range length, not an end time.

Not verified

  • vitest suites (the new time-range, run-watch-time-range, build-yt-dlp-args and detect-recoverable-bootstrap tests, and the existing suites) were not executed: this lane runs no test runner. Left to the PR's CI.
  • Biome/type-check lint of the changed JS was not run here (no wrapper for it); check-affected covered the rest. Left to the PR's CI.
  • Tidy skipped: the change touches 19 files, over the 10-file tidy cutoff.
  • No live yt-dlp run against a real video: the offset error is derived from the probed clip length, and the claim that a stream-copied section keeps pre-roll rests on the ffmpeg -ss docs and yt-dlp source read above, not on a measured run.
  • Sibling parts of #15531 are not done here: captions cut to the range, caption-wait handling for ranged runs, quality gates grading only the range, ranged resume/--recover/close (this PR makes --recover refuse a ranged slice), a range-suffixed slice key with QUEUE.md dedupe, and the transcript…
  • Untracked empty dotfiles at the checkout root (.bashrc, .gitconfig, .idea, .mcp.json, .vscode and others) are sandbox mount placeholders, not part of this change; left untouched.

Fix

  • plugins/knowledge/skills/video-digest/extraction/lib/time-range.js: new module that parses --from/--to, builds the yt-dlp section spec, moves cues between media and full-video time, shifts a watching result to full-video time, and computes the keyframe offset error (a --to past the video's end is capped at the video duration)
  • plugins/knowledge/skills/video-digest/extraction/lib/time-range.test.js: unit tests for the module, including a --to past the video's end
  • plugins/knowledge/skills/video-digest/extraction/watch/run-watch.js: parses and validates the range, refuses it for adapters without the capability, passes it to acquisition, transcript and watch state, runs watching on media-time cues, shifts the result, records offsetErrorSec
  • plugins/knowledge/skills/video-digest/extraction/watch/run-watch-time-range.test.js: CLI-level test of a ranged run plus refusal cases
  • plugins/knowledge/skills/video-digest/extraction/acquisition/build-yt-dlp-args.js: new downloadSection option that pushes --download-sections only when media is downloaded
  • plugins/knowledge/skills/video-digest/extraction/acquisition/build-yt-dlp-args.test.js: test for the section flag
  • plugins/knowledge/skills/video-digest/extraction/acquisition/acquire.js: threads downloadSection to the video-downloading pass only; caption passes stay whole
  • plugins/knowledge/skills/video-digest/extraction/acquisition/acquire.test.js: full-mode case asserting only the video-only spawn carries --download-sections
  • plugins/knowledge/skills/video-digest/extraction/adapters/adapter-contract.js: timeRange capability and AcquireContext.timeRange
  • plugins/knowledge/skills/video-digest/extraction/adapters/youtube.js: declares timeRange and maps it to the section spec
  • plugins/knowledge/skills/video-digest/extraction/adapters/youtube.test.js: adapter.acquire cases for the timeRange to download-section mapping, with and without a range
  • plugins/knowledge/skills/video-digest/extraction/adapters/registry.js: acquireMedia passes timeRange through and throws for an adapter without the capability
  • plugins/knowledge/skills/video-digest/extraction/transcript/write-transcript.js: README Range line; ASR cues shifted to full-video time on a ranged run
  • plugins/knowledge/skills/video-digest/extraction/watch/watch-state.js: WatchTimeRange typedef; createWatchState persists timeRange
  • plugins/knowledge/skills/video-digest/extraction/watch/detect-recoverable-bootstrap.js: a ranged slice is not recoverable (names the re-run)
  • plugins/knowledge/skills/video-digest/extraction/watch/detect-recoverable-bootstrap.test.js: test for the refusal
  • plugins/knowledge/skills/video-digest/extraction/watch/list-promotion-candidates.js: open-ended session runs past every frame instead of ending at selection.durationSec
  • plugins/knowledge/skills/video-digest/extraction/evals/check-watch-outcomes.js: same open-ended session bound in session-visual-coverage
  • plugins/knowledge/skills/video-digest/context/watch-pipeline.md: documents --from/--to, the full-video-time contract, watch.json timeRange fields, the keyframe error as our decision with live pointers to the yt-dlp and ffmpeg option docs, and the --recover refusal
  • plugins/knowledge/skills/video-digest/SKILL.md: --from/--to added to the watch full form and the CLI bootstrap command
  • .changes/knowledge/work-resolve-issue-issue-16127-43556765330-1-409d44c8.md: minor changelog fragment

Verification

The runner ran each check from the base copy against ca10b11:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //raw.githubusercontent.com/yt-dlp/yt-dlp/master/README.md: --download-sections takes a "*" prefix for a time range, e.g. "*10:15-inf", needs ffmpeg; --force-keyframes-at-cuts forces keyframes at cuts and is slow because it re-encodes
  • read https: //raw.githubusercontent.com/yt-dlp/yt-dlp/master/yt_dlp/downloader/external.py: FFmpegFD passes -ss <section_start> and -t <end-start> per input and adds -c copy unless force_keyframes_at_cuts is set
  • read https: //ffmpeg.org/ffmpeg.html: -ss as an input option seeks to the closest seek point before position; with stream copy the segment between the seek point and position is preserved
  • check-changelog-fragments: all 41 fragments valid
  • check-changed-skills: video-digest PASS, 0 errors; remaining warnings predate this change (the SKILL.md growth warning was cleared)
  • check-affected: 14 passed, 7 skipped, 0 failed over 19 changed files
  • fresh-context review subagent over the whole diff: two findings (ranged --recover, open-ended session end), both fixed; it hand-traced the new tests' expected values and found no existing test broken
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43556765330

Left out: the items under Not verified.

Related

#16127

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16142, incremental since 7feaa4b6

No security issues found. I read the whole change to the one file in scope, plugins/knowledge/skills/video-digest/extraction/watch/run-watch-time-range.test.js, in .claude-lane/incremental.diff. This lane already reviewed an earlier head, so this review was blocking only (CRITICAL and IMPORTANT findings).

What changed

  • The test now imports watchStatePath from ./watch-state.js. It uses that function to find the slice's state file instead of joining watch.json onto the path by hand.
  • A fixture's metadata title changed from "Ranged Fixture" to "Sample Talk".

Why there is no finding

  • Both edits are test-only. No production code, command, path built from input, yt-dlp argument or network call changed.
  • The file matches no trusted-path glob, and the change touches no workflow, token scope, merge hold, kill switch, plugin manifest or instruction surface.
  • The PR context contains no text aimed at this review.

Prior findings: the earlier summary reported 0 findings, so nothing carries over.

Spend: none.

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: 3 inline finding(s) on ca10b110dc120bafb186103f37270e508ced4c09; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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

Incremental code review: 7feaa4b6 → 7b055bc8 (#16142)

This lane already reviewed an earlier head of this pull request, so this review was blocking only. I read every hunk of the one file in .claude-lane/incremental.diff: plugins/knowledge/skills/video-digest/extraction/watch/run-watch-time-range.test.js.

What changed

  • Where the test reads the state file. The test now reads the ranged watch's state file from watchStatePath(sliceDir). It used to read path.join(sliceDir, "watch.json").
    • watchStatePath returns lanePath(sliceDir, LANES.runState, WATCH_STATE_FILENAME), which is the run-state/watch.json location that the other watch tests use.
    • The test now uses the module's own path helper instead of a hard-coded path that points at the wrong place.
  • Fixture title. The title changed from "Ranged Fixture" to "Sample Talk". Nothing in the test asserts on the title or on a slug built from it.

Other notes

  • No findings. Every earlier finding was fixed and resolved at 7feaa4b6, and this push leaves those lines alone.
  • manifest: this push changes no plugin.json or marketplace.json.
  • Spend: none.
  • Verification: I ran nothing, because this lane has no shell. CI is the check that the test passes.
  • I found no embedded instructions in the diff, the prior-findings file or the settled-threads file.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 43560080857

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM63ZIS2
Lane-Thread: PRRT_kwDOTCGFQM63ZIS9
Lane-Thread: PRRT_kwDOTCGFQM63ZIS-
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-feedback-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 7feaa4b
Run 43560080857

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 0
Leg handoff
Run job success
Activity step skipped
Commits pushed none (read lane)
Run 43560530872

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 7feaa4b.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 7feaa4b641758f3b60d59ebe4eee48feac22634d. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/fix-ci is failure), which clears when the lane runs
  again

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 43560080857

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 43561754720

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 43561754720

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could fix a failing check only by weakening a required check, and the head has no fresh fixer round left (it ran one, or an earlier lane stop already spent its same-head retry), so a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=16142 -f activity=fix-ci

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 43561754720

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 1
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 43562714392

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch
Model rung 1
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 43562714392

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 43562714392

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 1
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 43565542875

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch
Model rung 1
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 43565542875

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 43565542875

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

…e path

The ranged-watch test opened <slice>/watch.json, but the state file lives
at <slice>/run-state/watch.json (watchStatePath), so the test failed with
ENOENT on CI. It now reads the path the code writes.

The fixture title "Ranged Fixture" also put "Ranged" in the proper-noun
repair lexicon, which recased the stubbed cue text and would have failed
the transcript assertion next. The title no longer shares a word with
the cues.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 7b055bc8e60aa242dd27b5e1f376ea56f111a2b2, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 7b055bc

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-16142-7b055bc8e60aa242dd27b5e1f376ea56f111a2b2, expires on 2026-12-14.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=HIGH demote=true head=7b055bc8e60aa242dd27b5e1f376ea56f111a2b2 rubric=9.0.2 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 14, 2026
@melodic-automation-lanes melodic-automation-lanes Bot removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 14, 2026
Merged via the queue into main with commit 803d0ff Nov 14, 2026
65 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-16127-43556765330-1 branch November 14, 2026 07:27
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 803d0ffee96303d6bd9b5e84dab0751ac9724606; later checks count it verified from this comment.

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.

knowledge:video-digest: digest a time range of a video (--from/--to) - part 1 of 4

1 participant