Repository navigation
Conversation
…code The JSDoc advertised a 0.35 different-threshold default while the implementation uses 0.25, and described a no-shared Kendall-tau result as 1 while the code returns 0. Document the actual behaviour so callers calibrate expect=different correctly.
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.
Summary
Two comments in
src/engine/polymorph-report.tsdisagreed with the code. The options doc advertised a0.35default fordifferentThresholdwhilecomparePolymorphArtifactsused0.25, and the Kendall-tau doc said a no-shared result is1while the implementation returns0when fewer than two names are shared.Callers use
expect: "different"to decide whether two hardened builds actually differ. A threshold that is 0.1 lower than documented changes that decision for drift scores between 0.25 and 0.35, and a disjoint export set reads as no reordering rather than as incomparable.What changed
0.25, matching the code.0when fewer than two names are shared and no longer claims1for the disjoint case.Scope
Comments only. No runtime code, thresholds or returned metrics changed. The existing tests for identical, reversed, partially inverted and empty inputs remain the contract.
Verification
npx vitest run tests/polymorph-report.test.tspasses, 8 tests.