ml/auto-commit-pipeline-py/tests
Lilith f8de8b7b1d fix(reason): 🐛 Fix meta-reasoning CoT leak ("I need to analyze", "Since no files")
CRITICAL: Third CoT leak discovered - meta-reasoning with first-person and causal explanations.

Real-world leak: "Since no files were changed and this is a small change set for a single commit, I need to analyze what kind of work was done."

Root causes:
1. First-person reasoning patterns not caught: "I need to", "I should", "I must"
2. Causal/meta reasoning not caught: "Since no files", "Since the", "Since this"
3. Fallback cleaning didn't re-check for remaining reasoning in cleaned text

Fixes:
- Added pattern: `r'i\s+(need|should|will|must)\s+to'` (first-person)
- Added pattern: `r'since\s+(no|the|this)'` (meta-reasoning/causal)
- Added pattern: `r'no\s+files\s+(were|are)'` (meta about changes)
- Enhanced fallback cleaning: verify cleaned text has no remaining reasoning

Pattern evolution across 3 commits:
1. Initial patterns: "let's", "step by step", numbered lists
2. Added: "let me" variant (space between let and me)
3. Added: first-person reasoning, meta-reasoning, double-check cleaned text

All 5 CoT regression tests passing:
- test_extract_commit_message_with_reasoning ✓
- test_extract_commit_message_regression_cot_leak ✓
- test_extract_commit_message_numbered_lists ✓
- test_extract_commit_message_let_me_think ✓
- test_extract_commit_message_meta_reasoning ✓

Version: 0.1.3 → 0.1.4

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-13 11:57:54 -08:00
..
__init__.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
conftest.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_integration.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_stages_commit.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_stages_discover.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_stages_group.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_stages_push.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_stages_reason.py fix(reason): 🐛 Fix meta-reasoning CoT leak ("I need to analyze", "Since no files") 2026-01-13 11:57:54 -08:00
test_stages_recover.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00
test_stages_retrieve.py feat(@ml/auto-commit-pipeline): Add pipeline-based auto-commit package 2026-01-13 09:05:39 -08:00