Skip to content

fix(tests): test_dedup_detected_from_prior_hash fails -- adapter reads pre_existing flag not find_doc_id_by_hash result #292

Closed

Description

@piyushmakhija28

Summary

test_dedup_detected_from_prior_hash in tests/test_adapters.py at line ~496 asserts outcome.deduplicated is True. But PipelineIngestor reads result.get("pre_existing", False) from the pipeline result, not from find_doc_id_by_hash. fake_ingest result dict has no 'pre_existing' key, so deduplicated = False. The _StubSectionStore.find_doc_id_by_hash stub is never called by the adapter.

Fix

tests/test_adapters.py: add "pre_existing": True to the fake_ingest result dict in this test case, and remove the stale stub method that is never called.

Impact

test_dedup_detected_from_prior_hash fails on every run. Deduplication behavior is completely untested.

Activity

  1. added
    bugSomething isn't working
    priority: highData loss, security, or major correctness bug
    code-reviewFound via automated code review
    on Jun 21, 2026
  2. piyushmakhija28 commented on Jun 21, 2026

    @piyushmakhija28
    ContributorAuthor

    Fixed in PR #280 (Sprint R3/R4: fix(sprint-r3): root-cause fixes for all 39 bugs from code review round 3 + Sprint R4 round 4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode-reviewFound via automated code reviewpriority: highData loss, security, or major correctness bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions