refactor(optical_flow_lk): de-duplicate the last module — thin aggregator reached (#47)#70
Merged
kalwalt merged 1 commit intoJul 8, 2026
Conversation
…s is now a thin aggregator (#47) Ninth and FINAL de-duplication step of #47. - src/optical_flow_lk/optical_flow_lk.ts: replace the type-only stub with the REAL implementation moved verbatim from the monolith (track). The constructor instantiates imgproc via direct module import instead of the jsfeatNext.imgproc static slot. - src/jsfeatNext.ts: now a 59-line THIN AGGREGATOR - it only imports the modules and attaches them to the public namespace. Unused helper imports (resample/convol kernels, linalg_base, fast_private, orb/yape06 utils, point_t, JSFEAT_CONSTANTS) pruned; they are consumed by the modules themselves now. This completes the stub/monolith de-duplication: every algorithm lives in its own real module under src/<module>/, extending the shared base from src/core/core.ts. No type-only stubs remain; the audit's section-4 target architecture (thin aggregator) is reached for the module layer. Verified behavior-preserving: tsc --noEmit clean; npm test 57/57 (the optical_flow_lk parity test pins track() vs original jsfeat across pyramid levels); UMD bundle checked - all 18 public modules attach and instanceof chains hold. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kalwalt
added a commit
that referenced
this pull request
Jul 8, 2026
One-shot artifact rebuild for the integration of the stub/monolith de-duplication (#62-#70) into dev, per the agreed convention (refactor PRs ship source only; artifacts are rebuilt at integration/release points). - dist/jsfeatNext.js (UMD) + dist/jsfeatNext.mjs (ESM) rebuilt from the refactored source - types/ regenerated: now mirrors the new module layout, including types/src/core/core.d.ts and types/src/motion_model/motion_model.d.ts Verified: npm test 57/57; all 18 public modules attach on the fresh UMD bundle; VERSION 0.7.6 intact; no .d.ts files leak into dist/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kalwalt
added a commit
that referenced
this pull request
Jul 9, 2026
One-shot artifact rebuild for the integration of the stub/monolith de-duplication (#62-#70) into dev, per the agreed convention (refactor PRs ship source only; artifacts are rebuilt at integration/release points). - dist/jsfeatNext.js (UMD) + dist/jsfeatNext.mjs (ESM) rebuilt from the refactored source - types/ regenerated: now mirrors the new module layout, including types/src/core/core.d.ts and types/src/motion_model/motion_model.d.ts Verified: npm test 57/57; all 18 public modules attach on the fresh UMD bundle; VERSION 0.7.6 intact; no .d.ts files leak into dist/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ninth and final slice of #47. 🎉
What changed
src/optical_flow_lk/optical_flow_lk.ts— the last type-only stub replaced by the real implementation, verbatim from the monolith (track). Constructor instantiatesimgprocvia direct module import (established pattern).src/jsfeatNext.ts— now a 59-line thin aggregator: imports the modules, attaches them to the public namespace, nothing else. Unused helper imports pruned (they're consumed by the modules themselves now).What this completes
The full stub/monolith de-duplication (#47):
src/<module>/, extending the shared base fromsrc/core/core.tssrc/jsfeatNext.ts: ~3,900 lines → 59 lines across nine PRs (refactor(math): extract core base class and de-duplicate math module (#47) #62–refactor(motion_estimator): de-duplicate motion_estimator and extract kernels (#47) #69 + this one)Verification
tsc --noEmit→ cleannpm test→ 57/57 (the optical_flow_lk parity test pinstrack()vs original jsfeat across pyramid levels)cache→optical_flow_lk),instanceofchains hold,VERSIONintactdist//types/untouched — to be rebuilt once in the integration→devPRAfter this merges
The integration branch
feat/refactor-jsfeat-nextis complete and ready for its final PR intodev(with a one-shotdist/+types/rebuild and a final round of example testing). Closes out the implementation of #47.🤖 Generated with Claude Code