Skip to content

test: close two residual test-coverage masks (#77)#183

Merged
edheltzel merged 2 commits into
mainfrom
worktree-test+issue-77-followups
Jun 25, 2026
Merged

test: close two residual test-coverage masks (#77)#183
edheltzel merged 2 commits into
mainfrom
worktree-test+issue-77-followups

Conversation

@edheltzel

Copy link
Copy Markdown
Owner

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.ts

The existing directory-input test pins the rootPath re-wire, but it cannot catch a dropped rootPath destructure in the slack adapter: in the nested-directory layout the dirname fallback coincidentally yields the same channel, so the mutation is masked.

A single-file input takes the isFile branch of slackChannelFromPath, deriving the channel from the file basename (general) rather than the parent directory (eng-recall). A dropped rootPath would 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.ts

The 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 findSemanticPairs dropped every pair.

The new property is exactly-determined: a two-record corpus whose single possible pair sits a fixed 0.05 margin 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 test1176 pass / 0 fail across 96 files
  • Mutation-proven (applied, observed, reverted):
    • Drop rootPath from the slack adapter destructure → single-file test fails (slack:eng-recall:general vs expected slack:general:general); directory test stays green (confirming the mask).
    • Drop-pair regression in findSemanticPairs (j = i + 1i + 2) → completeness test fails; the soundness test stays green (confirming the gap).

Closes #77

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
@edheltzel edheltzel merged commit 65de364 into main Jun 25, 2026
2 checks passed
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.

tests: optional follow-ups — single-file slack import test; semantic-completeness property

1 participant