test: close two residual test-coverage masks (#77)#183
Merged
Conversation
Two tests-only follow-ups promoted from PR #56 / PR #61 reviews. 1. Single-file Slack import (conversation-import.test.ts): the existing directory-input test cannot catch a dropped `rootPath` destructure in the slack adapter — its dirname fallback coincidentally yields the same channel. A single-file input takes the isFile branch (channel from the file basename), so a dropped rootPath would derive the channel from the parent directory instead. Verified: the mutation flips the directory test's result from blind to caught. 2. Dedup semantic completeness (dedup.property.test.ts): the existing semantic-threshold properties are soundness-only — they stay green even if findSemanticPairs dropped every pair. An exactly-determined two-record corpus (one pair a fixed margin above threshold) pins completeness: that pair MUST be found. Verified: a drop-pair mutation fails this test while the soundness test passes. bun run lint clean; bun test 1176 pass / 0 fail. Closes #77
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 tests-only follow-ups from issue #77 (promoted from PR #56 re-review and PR #61 review). No
src/changes.1. Single-file Slack import test —
tests/lib/conversation-import.test.tsThe existing directory-input test pins the
rootPathre-wire, but it cannot catch a droppedrootPathdestructure in the slack adapter: in the nested-directory layout thedirnamefallback coincidentally yields the same channel, so the mutation is masked.A single-file input takes the
isFilebranch ofslackChannelFromPath, deriving the channel from the file basename (general) rather than the parent directory (eng-recall). A droppedrootPathwould fall back to the parent-dir name, changing the session ID — so this case unmasks the regression.2. Dedup semantic-completeness property —
tests/lib/dedup.property.test.tsThe existing semantic-threshold properties are soundness-only: they only constrain what is planned (nothing below threshold, correct survivor/similarity), so they stay green even if
findSemanticPairsdropped every pair.The new property is exactly-determined: a two-record corpus whose single possible pair sits a fixed
0.05margin above the threshold (well beyond the float32 tolerance), so the pair must be found. This closes the completeness gap.Verification
bun run lint— clean (tsc --noEmit)bun test— 1176 pass / 0 fail across 96 filesrootPathfrom the slack adapter destructure → single-file test fails (slack:eng-recall:generalvs expectedslack:general:general); directory test stays green (confirming the mask).findSemanticPairs(j = i + 1→i + 2) → completeness test fails; the soundness test stays green (confirming the gap).Closes #77