teleo-infrastructure/lib
m3taversal f43f8f923f fix: enrichment idempotency — three-layer dedup prevents duplicate evidence blocks
Layer 1: Insertion-time dedup in openrouter-extract-v2.py — skip if source_slug
already appears in claim content.
Layer 2: Insertion-time dedup in entity_batch.py — skip if PR number already
enriched this claim.
Layer 3: Post-rebase dedup in merge.py — scan rebased files for duplicate
evidence blocks (same source reference) and remove them before force-push.

Root cause: multiple enrichment branches modify the same claim at the same
insertion point. When rebased sequentially, evidence blocks are duplicated.
(Leo: PRs #1751, #1752)

lib/dedup.py: standalone module — parses evidence headers, deduplicates by
source key, preserves trailing content (Relevant Notes, Topics sections).
9 tests covering all patterns including the real PR #1751 duplication case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 13:18:23 +01:00
..
__init__.py Initial commit: Pipeline v2 daemon + infrastructure docs 2026-03-12 14:11:18 +00:00
analytics.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
attribution.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
breaker.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
claim_index.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
config.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
connect.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
costs.py Initial commit: Pipeline v2 daemon + infrastructure docs 2026-03-12 14:11:18 +00:00
db.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
dedup.py fix: enrichment idempotency — three-layer dedup prevents duplicate evidence blocks 2026-03-31 13:18:23 +01:00
domains.py ganymede: extract lib/domains.py — single domain→agent mapping 2026-03-13 15:33:18 +00:00
entity_batch.py fix: enrichment idempotency — three-layer dedup prevents duplicate evidence blocks 2026-03-31 13:18:23 +01:00
entity_queue.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
evaluate.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
extraction_prompt.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
feedback.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
fixer.py fix: fixer GC now closes PRs on Forgejo + deletes branches, not just DB 2026-03-24 14:37:50 +00:00
forgejo.py leo: handle non-JSON 200 from Forgejo merge API 2026-03-13 17:38:00 +00:00
health.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
llm.py fix: zombie retry loop + cost tracking 2026-03-28 11:29:58 +00:00
log.py Initial commit: Pipeline v2 daemon + infrastructure docs 2026-03-12 14:11:18 +00:00
merge.py fix: enrichment idempotency — three-layer dedup prevents duplicate evidence blocks 2026-03-31 13:18:23 +01:00
post_extract.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
search.py feat: two-pass retrieval with sort order and graph expansion 2026-03-28 22:34:45 +00:00
stale_pr.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
substantive_fixer.py fix: zombie retry loop + cost tracking 2026-03-28 11:29:58 +00:00
validate.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
watchdog.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
worktree_lock.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00