Skip to content

refactor(knowledge): simplify video-digest watching and docpage-digest-batch code - #15344

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14617-43008694100-1
Nov 11, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14617

Summary

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

Simplified six of the seven listed files, with no behavior change: the frame read-policy no longer re-runs the text-dense window check, the watching manifest writer uses one local JSON-write helper and computes highVolume once, the watching CLI destructures its argv and passes contactSheetsDir by shorthand, build-menu-view.mjs shares one error-text helper, and docpage-digest-batch.js shares one gatesPass accessor and finds the first dead digest directly. run-tests.sh was already minimal, so it is unchanged. Two candidate edits in timestamp-interleave.js (array spread in place of pushes, and dropping the == null guard) were reverted: under checkJs they could widen kind to string or lose the null narrowing, and tsc cannot run in this lane.

Not verified

  • extraction package npm run build (tsc --noEmit) and npm test (vitest): this lane runs no interpreter or npm, so both are left to the PR's CI
  • plugins/knowledge/tests/docpage-digest-batch.test.sh and build-menu-view.test.sh were not executed here; left to the PR's CI
  • tidy pass 5 (ai-slop:audit fix) on the changelog fragment: detect.sh and the fix-flow scripts are not lane wrappers, so the detector did not run; the fragment was read by hand against the catalog and holds the issue's prescribed text, with no tell found
  • check-affected skipped typos (not installed) and the validate-plugins steps that run code from the checked tree

Fix

  • plugins/knowledge/skills/video-digest/extraction/watching/read-policy.js: toSelectedFrame picks the resolution from the textDense value it already computed, instead of calling resolveReadResolution, which re-ran isInTextDenseWindow
  • plugins/knowledge/skills/video-digest/extraction/watching/run-watching-pipeline.js: argv destructured; the sheets temp dir is named contactSheetsDir so both object literals use shorthand; the VTT read is inlined into normalizeVttCues
  • plugins/knowledge/skills/video-digest/extraction/watching/timestamp-interleave.js: interleaveTranscriptAndFrames push objects written on one line each, blank lines removed
  • plugins/knowledge/skills/video-digest/extraction/watching/write-watching-manifest.js: local writeJson helper for the two identical JSON writes; highVolume computed once and reused
  • plugins/knowledge/skills/video-digest/scripts/build-menu-view.mjs: errorText helper replaces two copies of the error-message expression
  • plugins/knowledge/workflows/docpage-digest-batch.js: gatesPassOf accessor replaces two copies of the gatesPass expression; the first failed digest is found with digests.find instead of indexOf over the units
  • .changes/knowledge/work-resolve-issue-issue-14617-43008694100-1-a738d477.md: patch fragment, ### Changed, "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 7419c99:

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

The run reports:

  • check-changelog-fragments: all 11 fragments valid (ran before and after tidy)
  • check-changed-skills: video-digest PASS, 0 errors, 5 warnings that predate this change (ran before and after tidy)
  • check-affected: 12 passed, 7 skipped, the rest CI-only (ran before and after tidy)
  • fresh-context review subagent over the whole diff and the covering tests (read-policy.test.js, timestamp-interleave.test.js, write-watching-manifest.test.js, build-menu-view.test.sh, docpage-digest-batch.test.mjs): no behavior change, no checkJs type error, no test expected to break
  • git-read diff --unified=0 HEAD: the timestamp-interleave.js push objects keep the same keys and values
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43008694100

Left out: the items under Not verified.

Related

#14617

Merge-Risk: max=MEDIUM demote=false head=7419c99ba7e2f5431e4638da3438d206aa0b638f rubric=8.4.2 rater=claude-opus-5-5 checker=claude-opus-5-5

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

Copy link
Copy Markdown
Contributor

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

Security review: PR #15344, head 7419c99

No security issues found. I read every hunk of all 7 changed files. This is a refactor that keeps existing behaviour inside the knowledge plugin. It reaches no trust boundary, credential, token, workflow, manifest or instruction surface.

What I checked:

  • read-policy.js: toSelectedFrame now chooses the resolution from the textDense value it already has, instead of calling resolveReadResolution. This only picks between two in-module constants. No input handling changed.
  • run-watching-pipeline.js: the CLI arguments are now destructured, and one variable is renamed. The temp dirs are still made with fs.mkdtemp under os.tmpdir(). The VTT path still comes from the caller's argv, same as before. No new path, command or injection surface.
  • timestamp-interleave.js: only formatting changed. The objects pushed have the same keys and values.
  • write-watching-manifest.js: adds a local writeJson helper. It writes to the same paths under sliceDir that the base code wrote to. No new write target.
  • build-menu-view.mjs: adds an errorText helper. The error messages are the same, and the exit codes are unchanged.
  • docpage-digest-batch.js: adds a gatesPassOf accessor and replaces indexOf(dead[0]) with digests.find(...). Both feed the same values into the run-record fence and the result. The untrusted-source discipline (RULE and the fences) is untouched.
  • .changes/... fragment: a changelog file only.

Scope notes:

  • No changed file matches a listed trusted path.
  • No plugin manifest, userConfig key or standing instruction changed, so the manifest and instruction-surface lenses don't apply.
  • The PR context file has no embedded text telling the lane to pass the PR, skip a check, drop a finding or post somewhere else.
  • The prior-findings file shows no earlier review of this PR, so this was a full review, not blocking-only.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings. I read every hunk of all 7 changed files.

Each edit keeps behavior the same, as #14617 requires:

  • read-policy.js: resolveReadResolution(ts, windows, textDense) returns NATIVE whenever textDense is true. It also returns NATIVE when isInTextDenseWindow is true, and that check is the very value textDense already holds. So the new ternary on textDense gives the same result and skips one repeat check. Both constants are export const string literals, so under checkJs the ternary still has the '1280x720'|'1920x1080' literal type.
  • docpage-digest-batch.js: digests.find(d => !d || d.code) uses the same test as the dead filter, in the same order. It therefore finds the same element as digests[s.units.indexOf(dead[0])]. If that element is null or undefined (or past the end of the array), find returns undefined, which hits the same digest-no-result fallback. gatesPassOf is the same expression as the two copies it replaces.
  • write-watching-manifest.js: writeJson writes the same bytes, with a trailing newline and utf8 encoding. highVolume is computed once from the same expression for both payloads, and the order of keys in each payload is unchanged.
  • run-watching-pipeline.js: destructuring argv gives the same indices. Renaming sheetsDir to contactSheetsDir keeps the same JSON output key and the same orchestrateWatching argument, and the order of the mkdtemp, readFile and parse steps is unchanged.
  • timestamp-interleave.js and build-menu-view.mjs: formatting changes and one helper pulled out. The objects, messages and exit codes are the same.

Closing issue #14617 acceptance criteria:

  • Behavior unchanged, and no listed file renamed, moved or deleted: met, by reading the code. I ran nothing; the author says the tests and tsc are left to CI, which is unverified.
  • Only listed files and a changelog fragment are edited: met. run-tests.sh is unchanged, and the PR body explains why.
  • Within 400 lines and 15 files: met (7 files, about 60 changed lines).
  • ci-status green: CI decides this; the lane cannot see it.
  • Fragment for knowledge with bump: patch, ### Changed and "Internal simplification, no behavior change.": met.
  • Test coverage: the author names tests that cover these paths (read-policy.test.js, write-watching-manifest.test.js, docpage-digest-batch.test.mjs, and others). I did not open them.

Other checks:

  • No plugin manifest is changed.
  • The standards index under docs/standards has no paved-path row, so no paved-path criteria apply.
  • No embedded instructions were found in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 7419c99

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-15344-7419c99ba7e2f5431e4638da3438d206aa0b638f, expires on 2026-12-11.

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit e7eac48 Nov 11, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14617-43008694100-1 branch November 11, 2026 12:05
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit e7eac48ddf0661a17b6849232151c73381a4ac4a; 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.

Simplify the video-digest and workflows knowledge plugin code

0 participants