Skip to content

fix(knowledge): grade a ranged video-digest slice's session floors on the range alone - #16445

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-16129-43762929377-1
Nov 15, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-16129-43762929377-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #16129

Summary

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

A ranged watch (--from/--to) now has its session floors count only the claim-inventory sessions that overlap watch.json timeRange, as the recorded decision asks. That applies in check-watch-outcomes.js (session count in the floors, Min / session, session coverage) and in the floors line init-watch-checklist.js writes. A new shared helper, sessionsInTimeRange in lib/watch-slice-sessions.js, does the filtering, so both callers agree. A session that only touches a range bound is outside the range. When parsing found sessions but none overlaps the range, the gate message names timeRange as the cause instead of the inventory format. The frame-gap part needed no code change, as the decision says: a new orchestrate-watching test runs a 1200s ranged pass at a dense 10s cap through cuesInMediaTime and watchingInVideoTime, and checks that every gap-fill frame falls inside 3600-4800 in full-video time.

The run went past its turn budget (turns=78 max-turns=75): the work may be too big for one run.

Not verified

  • The vitest suites (watch-slice-sessions, check-watch-outcomes, orchestrate-watching tests) were not run: this lane runs no interpreter or test runner. They are left to the PR's CI.
  • Tidy did not run every pass. Passes 1-3 (simplify, comments, generated-code residue) found nothing to change, and pass 4 tightened the quality-gates.md paragraph through write-for-agents. write-for-humans was not invoked on the changelog fragment, to save turns. Pass 5's ai-slop fix flow needs…
  • Review finding left open (design): a session that overlaps the range by only a few seconds is graded in full (Min / session frames inside that sliver), and the overlap test ignores offsetErrorSec. This follows the recorded decision ('sessions that overlap the range'); a minimum-overlap tolerance…
  • Review finding left open (coverage): no init-watch-checklist test with a timeRange case, and the gap-fill test builds the media-to-video-time step from time-range.js itself instead of driving run-watch.js.
  • build/lint of the touched JS files ran only as far as check-affected covers them; no separate eslint or tsc run was possible in this lane

Fix

  • plugins/knowledge/skills/video-digest/extraction/lib/watch-slice-sessions.js: new export sessionsInTimeRange(sessions, timeRange), which keeps the sessions overlapping the range (an open end on either side runs to the end of the video) and keeps every session when there is no range
  • plugins/knowledge/skills/video-digest/extraction/evals/check-watch-outcomes.js: loadWatchOutcomeSlice filters the parsed sessions by watch.timeRange before outcomeFloors and the session gates, and records parsedSessionCount; when sessions parsed but none overlaps the range, the no-session message…
  • plugins/knowledge/skills/video-digest/extraction/watch/init-watch-checklist.js: the checklist's session count, which feeds the floors line and the sheet-triage percent, counts only sessions in watch.timeRange
  • plugins/knowledge/skills/video-digest/extraction/lib/watch-slice-sessions.test.js: sessionsInTimeRange tests (no range, a closed range with straddling and touching sessions, an open-ended range and session)
  • plugins/knowledge/skills/video-digest/extraction/evals/check-watch-outcomes.test.js: two session-gate tests on a ranged slice: an out-of-range session is not graded, and no overlapping session fails both gates with the timeRange message
  • plugins/knowledge/skills/video-digest/extraction/watching/orchestrate-watching.test.js: a test that a ranged run's gap-fill frames all fall inside the range in full-video time
  • plugins/knowledge/skills/video-digest/context/quality-gates.md: new 'Ranged slice' paragraph saying how the floors grade a ranged slice
  • .changes/knowledge/work-resolve-issue-issue-16129-43762929377-1-929a02a8.md: patch changelog fragment for knowledge

Verification

The runner ran each check from the base copy against 7e551cf:

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

The run reports:

  • check-changelog-fragments: all 3 fragments valid (after adding the missing ### Fixed heading the first run flagged)
  • check-changed-skills: video-digest PASS, 0 errors, 5 warnings, all on lines this change did not touch (SKILL.md size, an injected command, watch-pipeline.md)
  • check-affected: 14 passed, 7 skipped (tools not installed or code from the checked tree), over 8 changed files
  • review: one fresh-context subagent traced every new test by hand and expects each to pass. It confirmed both session-counting call sites that feed floors are covered and reported 4 low findings: the misleading message for an unparsed inventory and the two doc/changelog wording mismatches are fixed;…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43762929377

Left out: the items under Not verified.

Related

#16129

Follow-ups

  • Pre-existing (advisory): **Advisory: the checklist half of the #16129 criterion has no test.** (thread)

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

Copy link
Copy Markdown
Contributor

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

Security review: PR #16445

I found no security issues. I read all 8 changed files in full.

The change only alters how the video-digest skill grades its local quality checks on a ranged watch (--from/--to):

  • New helper. sessionsInTimeRange in lib/watch-slice-sessions.js keeps only the claim-inventory sessions that overlap watch.json timeRange. It is pure arithmetic on numbers already parsed.
  • Callers. check-watch-outcomes.js and init-watch-checklist.js now use that filtered list to count sessions.
  • Message. When no session overlaps the range, the failure message now names watch.json timeRange as the cause.
  • Docs and tests. The rest is a doc paragraph in quality-gates.md, a changelog fragment, and tests.

What I checked:

  • Shell, paths, network, credentials: nothing in the diff runs a shell command, builds a path from new input, makes a network call, or touches a token, secret or credential.
  • Gate bypass: the filter cannot make a gate pass with nothing to check. With no overlapping session, both session checks still fail (check-watch-outcomes.js pushSessionCoverageChecks). These checks grade the quality of a digest; they are not a trust control or a merge hold.
  • Trusted paths: no changed file matches a trusted-path glob.
  • Plugin manifests and Actions: no plugin.json or marketplace.json changed, and no workflow, action or permission changed.
  • Standing instructions: no instruction surface is deleted or softened. The only doc change adds a paragraph.
  • PR context: the PR description and the closing issue contain no embedded instructions aimed at this lane.

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

claude-lane: claude-review

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #16445 (head 7e551cf)

I found one advisory problem and nothing blocking. I read all 8 changed files in .claude-lane/pr.diff, along with the code they call: time-range.js, orchestrate-watching.js, watch-state.js, and the unchanged parts of check-watch-outcomes.js and init-watch-checklist.js.

Closing issue #16129 (checked against the full items in the maintainer's recorded decision):

  • "Quality gates grade the range, not the whole video: the conference-multi-session floors apply only to sessions inside the range."
    • The grading script meets it. loadWatchOutcomeSlice now filters sessions by watch.timeRange before it computes outcomeFloors and the session gates. The two new tests in check-watch-outcomes.test.js would fail if that filter broke. With range 0–300, Closing (starting at 300) is dropped, so the gate passes; without the filter it would fail on Closing.
    • The checklist half has no test. The floors line that init-watch-checklist.js writes also counts only in-range sessions, but no test covers it (see the inline comment).
  • "--max-frame-gap-sec applies within the range…"
    • No code change was needed, as the decision says. orchestrate-watching.js bounds gap fill by the probed ranged-media length (durationSec).
    • The new test is the one the decision asked for. Because the probe is mocked to 1200s, it mainly guards against regressions; it doesn't prove the end-to-end run-watch.js path. The PR says so under "Not verified".

Other checks:

  • sessionsInTimeRange uses fromSec/toSec, which matches the WatchTimeRange shape watch-state.js persists (offsetSec = fromSec, keyframe cut).
  • Its rule for an open end, or a session that only touches a bound, matches cuesInMediaTime.
  • The noSessions message correctly tells "nothing parsed" apart from "nothing overlaps the range".
  • The PR also notes an open design point: a session that overlaps the range only a little is still graded in full. That follows the recorded decision ("sessions that overlap the range"), so I didn't raise it as a finding.

Not verified: I ran no tests. The author says the vitest suites weren't run either; they are left to CI.

No embedded instructions appeared in the PR context. No manifest, paved-path or cost items apply.

No subagent hunter or verifier ran in this review; the single candidate was checked by hand against the source. Verifier dropped 0 of 1 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 43764618862

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 7e551cfc17999c7f968e84bd363855e7fc0b18a1, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=7e551cfc17999c7f968e84bd363855e7fc0b18a1 rubric=9.4.0 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

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

Failed GitHub API calls

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 9b5d4df Nov 15, 2026
69 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-16129-43762929377-1 branch November 15, 2026 21:49
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 4, survived 2, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 67%; mutation score 67%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/knowledge/skills/video-digest/extraction/lib/watch-slice-sessions.js 4 0 0 0 0 0
plugins/knowledge/skills/video-digest/extraction/watch/init-watch-checklist.js 0 2 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/knowledge/skills/video-digest/extraction/watch/init-watch-checklist.js:373 other unclassified none
plugins/knowledge/skills/video-digest/extraction/watch/init-watch-checklist.js:374 other unclassified none

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 9b5d4dfe99924b740fb0195966491210c4e42b65; 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 3 of 4

0 participants