conductor(plan): Mark Task 4.1 complete (Phase 4 done)
This commit is contained in:
@@ -421,14 +421,14 @@ Verify: all 5 high-impact test files are green. AUTO-CONFIRMED by Tier 2 (each f
|
||||
|
||||
**Files:** 24 test files (the ones not yet renamed in Phase 3).
|
||||
|
||||
### Task 4.1: Identify and rename the remaining 24 test files (single batch commit)
|
||||
### Task 4.1: Identify and rename the remaining 24 test files (single batch commit) [ada9617]
|
||||
|
||||
- [ ] **Step 1: Get the full list of test files that still reference `send_result`**
|
||||
- [x] **Step 1: Get the full list of test files that still reference `send_result`**
|
||||
|
||||
Run: `git grep -l "send_result" -- tests/`
|
||||
Expected: 24 files (29 total - 5 already renamed in Phase 3).
|
||||
|
||||
- [ ] **Step 2: For each file, rename `send_result` → `send`**
|
||||
- [x] **Step 2: For each file, rename `send_result` → `send`**
|
||||
|
||||
For each of the 24 files:
|
||||
- `@patch('src.ai_client.send_result')` → `@patch('src.ai_client.send')`
|
||||
@@ -447,12 +447,12 @@ Use the MCP edit tool for each file. The 24 files include: test_ai_cache_trackin
|
||||
Verify after the batch: `git grep "send_result" -- tests/`
|
||||
Expected: 0 matches.
|
||||
|
||||
- [ ] **Step 3: Run the full test suite — confirm 100% green**
|
||||
- [x] **Step 3: Run the full test suite — confirm 100% green**
|
||||
|
||||
Run: `uv run pytest 2>&1 | tail -3`
|
||||
Expected: a line like `=== X passed in Y.YYs ===` where X matches the pre-rename baseline from Task 1.1 Step 1. **No failures.**
|
||||
|
||||
- [ ] **Step 4: Commit**
|
||||
- [x] **Step 4: Commit**
|
||||
|
||||
```bash
|
||||
git add tests/
|
||||
@@ -472,7 +472,7 @@ test_tiered_aggregation, test_token_usage, and 4 others.
|
||||
Refs: conductor/tracks/send_result_to_send_20260616/"
|
||||
```
|
||||
|
||||
- [ ] **Step 5: Attach the git note**
|
||||
- [x] **Step 5: Attach the git note**
|
||||
|
||||
```bash
|
||||
git notes add -m "Task 4.1: rename in remaining 24 test files (batch)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
"""Update plan.md for Task 4.1."""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
PLAN = Path("conductor/tracks/send_result_to_send_20260616/plan.md")
|
||||
SHA = "ada9617"
|
||||
|
||||
EDITS: list[tuple[str, str]] = [
|
||||
(
|
||||
"### Task 4.1: Identify and rename the remaining 24 test files (single batch commit)\n\n- [ ] **Step 1: Get the full list of test files that still reference `send_result`**",
|
||||
f"### Task 4.1: Identify and rename the remaining 24 test files (single batch commit) [{SHA}]\n\n- [x] **Step 1: Get the full list of test files that still reference `send_result`**",
|
||||
),
|
||||
("- [ ] **Step 2: For each file, rename `send_result` → `send`**", "- [x] **Step 2: For each file, rename `send_result` → `send`**"),
|
||||
("- [ ] **Step 3: Run the full test suite — confirm 100% green**", "- [x] **Step 3: Run the full test suite — confirm 100% green**"),
|
||||
("- [ ] **Step 4: Commit**", "- [x] **Step 4: Commit**"),
|
||||
("- [ ] **Step 5: Attach the git note**", "- [x] **Step 5: Attach the git note**"),
|
||||
]
|
||||
|
||||
|
||||
def main() -> int:
|
||||
with PLAN.open("r", encoding="utf-8", newline="") as f:
|
||||
content = f.read()
|
||||
has_crlf = "\r\n" in content
|
||||
nl = "\r\n" if has_crlf else "\n"
|
||||
normalized = [(o.replace("\n", nl), n.replace("\n", nl)) for o, n in EDITS]
|
||||
new_content = content
|
||||
applied = 0
|
||||
for old, new in normalized:
|
||||
if old in new_content:
|
||||
new_content = new_content.replace(old, new, 1)
|
||||
applied += 1
|
||||
else:
|
||||
print(f"NOT FOUND: {old[:80]!r}", file=sys.stderr)
|
||||
if applied != len(EDITS):
|
||||
print(f"Only applied {applied}/{len(EDITS)} edits.", file=sys.stderr)
|
||||
return 1
|
||||
with PLAN.open("w", encoding="utf-8", newline="") as f:
|
||||
f.write(new_content)
|
||||
print(f"Applied {applied}/{len(EDITS)} edits. Line endings: {'CRLF' if has_crlf else 'LF'}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user