Skip to content

feat(knowledge): resume, recover and close ranged video-digest slices - #16460

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-16130-43766405519-1
Nov 16, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #16130

Summary

Opened by the work-resolve-issue lane. The run's own summary, updated for the review round:

A ranged watch's slice key now gets the suffix -r<fromSec>-<toSec> (end for an open --to, 0 for an open --from), so each range of one video is its own slice. The key charset stays inside [A-Za-z0-9_-]. run-watch.js --recover used to refuse a ranged slice. It now recovers one: it moves the full-video caption cues into the ranged media's time, plans coverage there, adds the recorded fromSec back to frames, windows and the timeline, recomputes offsetErrorSec, keeps timeRange in watch.json and skips the duration-mismatch check, as run-watch.js does. resume names the range in the continuation prompt. Given a video id, or a ranged <id>-r<from>-<to> key, instead of a slug, it resumes the one matching slice, and it fails listing the slugs when a bare id matches several. close needed no code change: the part-3 outcome checks already grade a ranged slice by its watch.json timeRange. QUEUE.md dedupe on video id plus range is now produced by a script: preflight-metadata.js takes --from/--to and emits queueKey, the video-id cell with the range suffix, built by rangedSliceKey. The agent pastes that value instead of composing the suffix, and watch <n> passes the suffix back as --from/--to. A ranged add for a source without range support (X) is rejected at preflight. The suffix format, the fail-and-list rule for an ambiguous id and --recover re-applying the recorded range follow the defaults in the 2026-11-15 decision comment. The owner's correction says these defaults may change.

Not verified

  • The vitest suites for the changed files (time-range, run-watch-time-range, detect-recoverable-bootstrap, recover-watch-bootstrap, run-resume, watch-state) were not executed: this lane runs no node or test runner. Left to the PR's CI.
  • Biome lint and format were not run on the changed JS (no node in this lane); left to the PR's CI.
  • Tidy skipped: the change is 17 files, over the 10-file tidy cutoff.
  • close needed no code change and has no new ranged-specific test. Its outcome checks already filter by watch.json timeRange (part 3, check-watch-outcomes.test.js), and runClose itself has no range-dependent logic.
  • The queue's video-id-plus-range dedupe is documented agent procedure, not code: QUEUE.md rows are written by the agent, and no script parses the video-id cell.
  • The suffix format, the fail-and-list rule and --recover re-applying the range are the agent defaults from the 2026-11-15 comment. The owner's correction says they may change.
  • Recovery of a ranged slice still needs a .vtt in the temp work dir, the same as a whole-video slice. A ranged run transcribed by ASR with no captions cannot be recovered and must be re-run. This limit predates this change.
  • Untracked files in the checkout root that this run did not create (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) appear in git status. They look like runner environment files and are not part of this change.

Fix

  • plugins/knowledge/skills/video-digest/extraction/lib/time-range.js: new rangedSliceKey(sliceKey, range) that appends -r<fromSec>-<toSec> (end for an open end), or returns the key unchanged with no range
  • plugins/knowledge/skills/video-digest/extraction/lib/time-range.test.js: rangedSliceKey tests (no range, open start and end, two ranges kept apart, charset)
  • plugins/knowledge/skills/video-digest/extraction/watch/run-watch.js: the slice slug is derived from rangedSliceKey(sliceKey, timeRange); the README video id stays the plain id
  • plugins/knowledge/skills/video-digest/extraction/watch/run-watch-time-range.test.js: the ranged slug ends in -<id>-r3600-4800, matches the slice dir, and watch.json videoId stays the plain id
  • plugins/knowledge/skills/video-digest/extraction/watch/detect-recoverable-bootstrap.js and its test: ranged slices are no longer refused for recovery
  • plugins/knowledge/skills/video-digest/extraction/watch/recover-watch-bootstrap.js: reads the recorded timeRange, plans on media-time cues, shifts the watching result into full-video time, recomputes offsetErrorSec, keeps timeRange
  • plugins/knowledge/skills/video-digest/extraction/watch/recover-watch-bootstrap.test.js: ranged recovery test (frame times, offsetErrorSec 5, no durationMismatch)
  • plugins/knowledge/skills/video-digest/extraction/watch/run-resume.js and its test: a non-slug argument matches slices by videoId or videoId plus range suffix; one match resumes, several fail listing slugs
  • plugins/knowledge/skills/video-digest/extraction/watch/watch-state.js and its test: the continuation prompt names a ranged slice's range
  • plugins/knowledge/skills/video-digest/extraction/acquisition/preflight-metadata.js: takes --from/--to (one URL), emits queueKey (rangedSliceKey of videoId and the range) on every entry, rejects a ranged add for a source without the timeRange capability
  • plugins/knowledge/skills/video-digest/extraction/acquisition/preflight-metadata.test.js: queueKey tests (plain id unranged, two ranges of one video give two cells, transient row keeps the suffix, ranged X add rejected) and argument-split tests
  • plugins/knowledge/skills/video-digest/SKILL.md: slug section names the range suffix; resume accepts a video id or ranged key; queue rows name ranged adds
  • plugins/knowledge/skills/video-digest/context/watch-pipeline.md: the suffix rule, ranged resume/recover/close, and a note on pre-suffix ranged slices
  • plugins/knowledge/skills/video-digest/context/watch-queue.md: the video-id cell is preflight's queueKey (dedupe on id plus range, never composed by hand), ranged preflight form, watch <n> passes --from/--to from the suffix, companion slug uses the suffixed cell
  • plugins/knowledge/skills/video-digest/reference/sources/youtube.md: slice-key paragraph names the ranged suffix and per-range queue row
  • .changes/knowledge/work-resolve-issue-issue-16130-43766405519-1-1039735c.md: minor changelog fragment for the knowledge plugin

Verification

The runner ran each check from the base copy against 08798e9:

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

The run reports:

  • check-changelog-fragments: all 4 fragments valid (run before and after the review fixes)
  • check-changed-skills: video-digest PASS, 0 errors, 6 warnings, all pre-existing in kind (SKILL.md size and router-cap warnings; the body grew 364 -> 369 lines)
  • check-affected: 14 passed, 7 skipped over 17 changed files
  • fresh-context review subagent over the whole diff: no code bugs; it worked each new test through by hand and found the asserted values match what the code produces. It raised one risk (resume did not accept a ranged queue key) and three doc points (youtube.md slice-key paragraph, companion slug in…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43766405519

Left out: the items under Not verified.

Related

#16130

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

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16460, incremental (5ca2b75 → cd79192)

I found no security issues in this push. This was a full review, not blocking only: the prior-findings file says blocking only: no.

Scope. I read every hunk of the three files this push changed. None of them matches a trusted-path glob.

  • plugins/knowledge/skills/video-digest/context/watch-queue.md
  • plugins/knowledge/skills/video-digest/extraction/acquisition/preflight-metadata.js
  • plugins/knowledge/skills/video-digest/extraction/acquisition/preflight-metadata.test.js

What I checked:

  • New argument parsing in parsePreflightArgs. The --from/--to values go through the existing parseTimeRangeArgs. The function drops those flags and their values from the URL list, and a ranged add must name exactly one URL. The URLs left over follow the same adapter-validation path as before (resolveSourceAdapter → decision.ok). The diff opens no new route from an argument to a shell, path or URL.
  • queueKey. It is rangedSliceKey(videoId, timeRange). videoId comes from the adapter's slice key, as before. The range suffix is built from numeric bounds, which I checked in the previous round. So the key the agent pastes into the QUEUE.md video-id cell can only add -r<int>-<int|end> to a key that already existed.
  • Capability check. A source without range support (X) is rejected as invalid-url before the probe runs, so no spawn happens for a range it can't handle. This adds a check and removes none.
  • Doc edits in watch-queue.md. They only tell the agent to copy queueKey instead of building the suffix by hand. No standing instruction is deleted or weakened.

This push touches no trust control, workflow, token request, merge hold or plugin manifest. The PR context and prior-findings files contain no text directed at this lane.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

pr-merge's gate refuses its verifier verdict (verify:missing)

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

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, blocking only): preflight emits queueKey for ranged queue adds

No blocking findings. This lane already reviewed an earlier head (5ca2b75), so this pass reported blocking findings only. Scope: the 3 files in .claude-lane/incremental.diff, all read in full:

  • context/watch-queue.md
  • acquisition/preflight-metadata.js
  • acquisition/preflight-metadata.test.js

What I checked

  • Earlier finding is fixed. The resolved thread asked for preflight to build the ranged video-id cell instead of the agent writing it by hand. The fix does that:
    • Every preflightResult sets queueKey: videoId === null ? null : rangedSliceKey(videoId, timeRange) (preflight-metadata.js#L277).
    • Every return path that has a videoId passes timeRange through: unavailable, both ok branches, and the fallback status.
    • Invalid-URL rejects keep videoId: null, so their queueKey is null.
    • The new test gives two ranges of one video two different cells could fail if this broke.
  • Range gate matches the watch path. adapter.capabilities.timeRange !== true → reject (L343) is the same check as run-watch.js:178 and registry.js:132. Only youtube.js declares timeRange: true.
  • CLI argument split works. parsePreflightArgs uses the shared parseTimeRangeArgs:
    • --from or --to with a missing or bad value returns an error before any URL filtering.
    • The filter drops each flag and the argument right after it, so a range value is never read as a URL.
    • A ranged add with more than one URL is refused.
  • Docs match the code. watch-queue.md now says to write and dedupe the video-id cell from preflight's queueKey. It documents the ranged command form, which matches the new usage line and main.

Closing issue #16130: the "QUEUE.md dedupes on video id plus range" criterion now has a script-produced cell and a test that could fail. The criteria the earlier review checked are unchanged in this push.

Not verified: the author says the tests were not run in their lane and CI runs them. That is author-claimed, and I could not run anything either, because this lane has no shell.

The settled-threads and prior-findings files contain no embedded instructions to this lane. No plugin manifest changes in this push. No paved-path or .claude/rules criteria applied.

Spend: none beyond normal CI.

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 43781708963

Failed GitHub API calls

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

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM63vnsY
@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 cd79192
Run 43781708963

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 cd79192.

@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 43781708963

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for cd79192

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-16460-cd79192d561c5a823ca1b5ce2a703db9fd821307, expires on 2026-12-16.

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=cd79192d561c5a823ca1b5ce2a703db9fd821307 rubric=9.4.1 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 16, 2026
Merged via the queue into main with commit 6fc1bca Nov 16, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-16130-43766405519-1 branch November 16, 2026 01:10
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 6fc1bcadc37b0b4e0e075e76a971bbbdda607170; 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 4 of 4

1 participant