refactor(orb): de-duplicate orb module (#47)#67
Merged
Conversation
Sixth de-duplication step of #47, following the established pattern. - src/orb/orb.ts: replace the type-only stub with the REAL implementation moved verbatim from the monolith (describe). Imports bit_pattern_31 and rectify_patch from their existing real modules; the constructor now instantiates imgproc via direct module import instead of the jsfeatNext.imgproc static slot. - src/jsfeatNext.ts: shrinks by ~107 lines. Verified behavior-preserving: tsc --noEmit clean; npm test 57/57 (the orb parity test pins describe() output byte-for-byte vs original jsfeat); UMD bundle smoke-checked (instanceof, descriptor computation). 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.
Sixth slice of #47, fresh off the integration branch.
What changed
src/orb/orb.ts— type-only stub replaced by the real implementation, verbatim from the monolith (describe). Importsbit_pattern_31/rectify_patchfrom their existing real modules; one deliberate change: the constructor instantiatesimgprocvia direct module import instead of thejsfeatNext.imgprocstatic slot (established pattern).src/jsfeatNext.ts— ~107 lines removed. Now ~460 lines of the original ~3,900.Verification
tsc --noEmit→ clean (caught a missing constants import during extraction; fixed before commit)npm test→ 57/57 — the orb parity test pinsdescribe()output byte-for-byte against original jsfeatdist//types/untouched (rebuilt when the integration branch merges todev)Advances #47. Remaining:
yape06→motion_estimator(+ inline kernels → tightens thecore.tsanyslots) →optical_flow_lk.🤖 Generated with Claude Code