teleo-infrastructure/tests
m3taversal 93917f9fc2
Some checks are pending
CI / lint-and-test (push) Waiting to run
fix(attribution): --diff-filter=A + handle sanity filter + remove legacy fallback
Ganymede review findings on epimetheus/contributor-attribution-fix branch:

1. BUG: record_contributor_attribution used `git diff --name-only` (all modified
   files), not just added. Enrich/challenge PRs re-credited the sourcer on every
   subsequent modification. Fixed: --diff-filter=A restricts to new files only.
   The synthesizer/challenger/reviewer roles for enrich PRs are still credited
   via the Pentagon-Agent trailer path, so this doesn't lose any correct credit.

2. WARNING: Legacy `source`-field heuristic fabricated garbage handles from
   descriptive strings ("sec-interpretive-release-s7-2026-09-(march-17",
   "governance---meritocratic-voting-+-futarchy"). Removed outright + added
   regex handle sanity filter (`^[a-z0-9][a-z0-9_-]{0,38}$`). Applied before
   every return path in parse_attribution (the nested-block early return was
   previously bypassing the filter).

   Dry-run impact: unique handles 83→70 (13 garbage filtered), NEW contributors
   49→48, EXISTING drift rows 34→22. The filter drops rows where the literal
   garbage string lives in frontmatter (Slotkin case: attribution.sourcer.handle
   was written as "senator-elissa-slotkin-/-the-hill" by the buggy legacy path).

3. NIT: Aligned knowledge_prefixes in the file walker to match is_knowledge_pr
   (removed entities/, convictions/). Widening those requires Cory sign-off
   since is_knowledge_pr currently gates entity-only PRs out of CI.

Tests: 17 pass (added test_bad_handles_filtered, test_valid_handle_with_hyphen_passes,
updated test_legacy_source_fallback → test_legacy_source_fallback_removed).

Ganymede review — 3-message protocol msg 3 pending.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 12:58:55 +01:00
..
__init__.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
conftest.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
test_attribution.py fix(attribution): --diff-filter=A + handle sanity filter + remove legacy fallback 2026-04-24 12:58:55 +01:00
test_contributor.py feat: external contributor pipeline — fork PR handling, attribution, prefix recognition 2026-04-16 18:14:01 +01:00
test_enrichment_dedup.py fix: enrichment idempotency — three-layer dedup prevents duplicate evidence blocks 2026-03-31 13:18:23 +01:00
test_entity_queue.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
test_eval_actions.py refactor: Phase 4 — extract eval_actions.py, drop underscore prefixes in eval_parse 2026-04-16 12:57:51 +01:00
test_eval_parse.py refactor: Phase 4 — extract eval_actions.py, drop underscore prefixes in eval_parse 2026-04-16 12:57:51 +01:00
test_eval_pipeline.py fix: add telegram/ and tests/ to deploy pipeline, remove hardcoded API key 2026-04-20 17:15:55 +01:00
test_extraction_prompt.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
test_feedback.py epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
test_merge.py Replace rebase-retry with cherry-pick merge mechanism 2026-03-31 13:18:26 +01:00
test_post_extract.py feat: atomic extract-and-connect + stale PR monitor + response audit 2026-03-28 22:34:20 +00:00
test_pr_state.py refactor: Phase 3 — fix close_pr ghost bug, wire stale_pr, extract eval_parse 2026-04-16 12:40:23 +01:00
test_reweave.py feat: consolidate eval pipeline, reweave fixes, enrichment dedup, cherry-pick merge, TG batching 2026-03-31 13:21:59 +01:00
test_reweave_merge.py Phase 6a: extract frontmatter.py from merge.py — pure YAML helpers 2026-04-16 13:16:38 +01:00
test_search.py feat: two-pass retrieval with sort order and graph expansion 2026-03-28 22:34:45 +00:00
test_tg_batching.py fix: TG message batching — group by chat_id + time proximity 2026-03-31 13:19:35 +01:00
test_x_content_pipeline.py Add X content pipeline: output gates + tweet queue + pluggable approval 2026-04-15 17:02:08 +01:00