conductor(plan): Mark Task 1.1 complete
This commit is contained in:
@@ -49,19 +49,19 @@
|
||||
**Files:**
|
||||
- Modify: `src/ai_client.py:1-...` (10 refs throughout the file)
|
||||
|
||||
### Task 1.1: Rename `send_result` → `send` in `src/ai_client.py`
|
||||
### Task 1.1: Rename `send_result` → `send` in `src/ai_client.py` [5351389]
|
||||
|
||||
- [ ] **Step 1: Snapshot the pre-rename state**
|
||||
- [x] **Step 1: Snapshot the pre-rename state**
|
||||
|
||||
Run: `uv run pytest 2>&1 | tail -3`
|
||||
Expected: a line like `=== X passed in Y.YYs ===` where X is the current passing count. Record this number mentally as the "before" baseline.
|
||||
|
||||
- [ ] **Step 2: Identify all 10 references in `src/ai_client.py`**
|
||||
- [x] **Step 2: Identify all 10 references in `src/ai_client.py`**
|
||||
|
||||
Run: `git grep -n "send_result" -- src/ai_client.py`
|
||||
Expected: 10 lines, all in `src/ai_client.py`. Each line shows the line number and the context.
|
||||
|
||||
- [ ] **Step 3: Rename each reference**
|
||||
- [x] **Step 3: Rename each reference**
|
||||
|
||||
For each of the 10 references:
|
||||
- `def send_result(` → `def send(`
|
||||
@@ -75,12 +75,12 @@ Use the MCP edit tool. Verify the rename is complete:
|
||||
Run: `git grep "send_result" -- src/ai_client.py`
|
||||
Expected: 0 matches (the grep returns nothing).
|
||||
|
||||
- [ ] **Step 4: Run the test suite — confirm the "red"**
|
||||
- [x] **Step 4: Run the test suite — confirm the "red"**
|
||||
|
||||
Run: `uv run pytest 2>&1 | tail -10`
|
||||
Expected: many test failures with `AttributeError: module 'src.ai_client' has no attribute 'send_result'` (or `AttributeError: <module> has no attribute 'send_result'` from monkeypatch.setattr). This is the TDD red moment. **Do not panic; this is expected.**
|
||||
|
||||
- [ ] **Step 5: Commit the red moment**
|
||||
- [x] **Step 5: Commit the red moment**
|
||||
|
||||
```bash
|
||||
git add src/ai_client.py
|
||||
@@ -94,7 +94,7 @@ back to green.
|
||||
Refs: conductor/tracks/send_result_to_send_20260616/"
|
||||
```
|
||||
|
||||
- [ ] **Step 6: Attach the git note**
|
||||
- [x] **Step 6: Attach the git note**
|
||||
|
||||
```bash
|
||||
git notes add -m "Task 1.1: rename send_result to send in src/ai_client.py
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
"""Update plan.md to mark Task 1.1 as complete with commit SHA 5351389."""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
PLAN = Path("conductor/tracks/send_result_to_send_20260616/plan.md")
|
||||
SHA = "5351389"
|
||||
|
||||
EDITS: list[tuple[str, str]] = [
|
||||
(
|
||||
"### Task 1.1: Rename `send_result` → `send` in `src/ai_client.py`\n\n- [ ] **Step 1: Snapshot the pre-rename state**",
|
||||
f"### Task 1.1: Rename `send_result` → `send` in `src/ai_client.py` [{SHA}]\n\n- [x] **Step 1: Snapshot the pre-rename state**",
|
||||
),
|
||||
(
|
||||
"- [ ] **Step 2: Identify all 10 references in `src/ai_client.py`**",
|
||||
"- [x] **Step 2: Identify all 10 references in `src/ai_client.py`**",
|
||||
),
|
||||
(
|
||||
"- [ ] **Step 3: Rename each reference**",
|
||||
"- [x] **Step 3: Rename each reference**",
|
||||
),
|
||||
(
|
||||
"- [ ] **Step 4: Run the test suite — confirm the \"red\"**",
|
||||
"- [x] **Step 4: Run the test suite — confirm the \"red\"**",
|
||||
),
|
||||
(
|
||||
"- [ ] **Step 5: Commit the red moment**",
|
||||
"- [x] **Step 5: Commit the red moment**",
|
||||
),
|
||||
(
|
||||
"- [ ] **Step 6: Attach the git note**",
|
||||
"- [x] **Step 6: 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