Skip to content

build(knowledge): bump typescript to 7.0.2 in the extraction packages - #8495

Merged
kyle-sexton merged 5 commits into
mainfrom
build/knowledge-typescript-7
Oct 20, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
build/knowledge-typescript-7

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #8357
Refs: #8361

Summary

Takes TypeScript 7.0.2 in both knowledge extraction packages, as the owner decided on #8357: one attended upgrade PR covering the course-digest bump (#8357) and the video-digest bump (#8361). The Dependabot PRs stay open until this one merges and supersedes them.

Fix

  • course-digest/extraction and video-digest/extraction: typescript ^6.0.3 to ^7.0.2, lockfiles regenerated with npm install on current main (the Dependabot lockfiles predate later bumps to @types/node and vitest).
  • TypeScript 7 rejects property reads on a JSDoc object and no longer widens a null-initialized local, so tsc --noEmit reported 36 errors in course-digest and 11 in video-digest. Each site now carries a real type, no any casts:
    • course-digest: new lib/types.js with PlatformConfig, Course, CourseModule, CourseLesson, used by adapters/auth-session.js, lib/browser.js, lib/player-presence.js, classify-frames.js and lib/validators.js; the regression summary shape in lib/validators.js; hotmartFrame as a Playwright Frame and hlsBase as string | null in lib/players/hotmart.js.
    • video-digest: the outcome slice's watch is the existing WatchState; the quality-audit doc and the promotion-decisions doc carry their row shapes; nullable locals typed in adapters/x.js, watch/queue-claim.js, watch/run-watch.js and watch/merge-triage-json.js.
  • Two knowledge changelog fragments (patch), one per package, from scripts/new-changelog-fragment.sh.

Verification

  • npm run build (tsc --noEmit) in both packages: 0 errors (was 36 and 11).
  • npm test (vitest): course-digest 156 passed, video-digest 748 passed.
  • scripts/check-affected.sh: 6 passed, 2 skipped.

Related

#8357, #8361

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits October 19, 2026 14:00
Applies the Dependabot bumps from #8357 (course-digest) and #8361
(video-digest), regenerated on current main. TypeScript 7 no longer
treats a JSDoc `object` as open or widens a `null`-initialized local, so
the checkJs build failed with 47 errors. Give those sites real types:

- course-digest: new lib/types.js with PlatformConfig, Course,
  CourseModule and CourseLesson, used by the auth-session input, the
  browser and player-presence helpers, classify-frames and the
  validators; the regression summary and hotmart's frame and HLS base
  get their real shapes.
- video-digest: the watch slice's watch is a WatchState, the quality
  audit doc and promotion-decisions doc carry their row shapes, and the
  nullable locals in x.js, queue-claim.js and run-watch.js are typed.

tsc --noEmit is clean and vitest passes in both packages.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 20, 2026 04:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T04:59:18.880344Z e84acf3 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.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed e84acf3382719a8ddfecbbe131dfe0732fd98ed7: 0 finding(s), 0 as inline comments.

No security issues found in PR #8495 at e84acf3.

The PR bumps typescript from ^6.0.3 to ^7.0.2 in the course-digest and video-digest extraction packages. It also adds JSDoc types and @type annotations, a new lib/types.js that only holds typedefs and export {}, two changelog fragments, and a test-selection allowlist entry.

  • Runtime code: The .js changes are JSDoc type annotations only. repair-synthesis-promotions.js also drops one inline @type cast on the filter callback, and its typedefs replace it. No control flow, input handling, path building, command execution or credential handling changed.
  • Lockfiles: Every added resolved URL in both package-lock.json files points at registry.npmjs.org, with no git, tarball or other non-registry sources. The new @typescript/typescript-<platform> optional dependencies are all pinned to 7.0.2, and typescript is declared as a devDependency only. I did not check the integrity hashes against the registry, and I did not look at whether TypeScript 7 or its platform packages run install scripts.
  • scripts/affected-tests-no-suite.txt: The two added globs only exclude the extraction directories from the affected-tests selector. The added comment says CI's test-node job still runs install, typecheck and test for them. I did not read that workflow to confirm it. This is not a security control.
  • Instruction surfaces: The diff touches no CLAUDE.md, AGENTS.md, rules file, skill or agent body, or hook block list or allowlist. Nothing in it deletes or softens a standing guardrail.
  • Actions hardening: The diff changes no workflow files.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed e84acf3382719a8ddfecbbe131dfe0732fd98ed7: 0 finding(s), 0 as inline comments.

No findings on head e84acf3.

I read the whole diff (21 files) and the PR context. Both Dependabot bumps (#8357, #8361) are referenced with Refs:, and neither issue states acceptance criteria. I reported nothing against closing issues.

  • Type changes: these are JSDoc-only, with no runtime edits. The new lib/types.js ends in export {}; and holds only typedefs.
    • The PlatformConfig, Course, CourseModule and CourseLesson typedefs match how the call sites use them.
    • In repair-synthesis-promotions.js, PromotionDecisionRow adds verdict, which the filter callback reads. That is why the inline cast on the callback could be dropped.
    • The nullable locals (hlsBase, hotmartFrame, and the typed locals in x.js, queue-claim.js and run-watch.js) are annotated without changing assignments.
  • Test lane: the new scripts/affected-tests-no-suite.txt entries match the two knowledge SUBPROJECTS rows in scripts/plan-test-lanes.sh (lines 86-87). Their comment accurately names the test-node lane as the covering one.
  • Lockfiles: the diff shows them as binary and I did not inspect them.

I could not run tsc or vitest here, because the extraction packages have no node_modules installed. The PR body's claims (0 type errors, 156 and 748 tests passing, check-affected.sh result) are author-claimed and unverified by me.

@kyle-sexton
kyle-sexton marked this pull request as draft October 20, 2026 04:45
kyle-sexton and others added 2 commits October 20, 2026 00:55
A change to an extraction file no shell suite names, such as
course-digest/extraction/classify-frames.js, failed the selector as
UNMAPPED. The test-node job's knowledge blocks install, typecheck and test
both packages, so record that lane as their coverage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WyWcv2NwzrPQ4dChfwFjM7
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 20, 2026 04:57
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 0dfc861 Oct 20, 2026
56 checks passed
@kyle-sexton
kyle-sexton deleted the build/knowledge-typescript-7 branch October 20, 2026 05:11
kyle-sexton added a commit that referenced this pull request Oct 20, 2026
TypeScript 7 no longer widens a null-initialized local, so `let cleanup =
null` failed tsc (TS2322) once this branch met main's TS7 bump (#8495) in
the merge queue. The local now carries its JSDoc type.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WyWcv2NwzrPQ4dChfwFjM7
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.

1 participant