Private
Public Access
0
0
Files
manual_slop/scripts/tier2/update_state_toml_phase6.py
T
ed c0e2051ec9 conductor(plan): Mark Phase 6 complete - all track tasks done
Phase 6 tasks (t6_1, t6_2, t6_3) and the phase itself marked completed.
All 16 task entries now have status=completed.
All 6 phase entries now have status=completed.

This is the final state.toml commit for the track.
2026-06-17 01:18:40 -04:00

41 lines
1.7 KiB
Python

"""Mark Phase 6 tasks as complete in state.toml."""
from __future__ import annotations
from pathlib import Path
STATE = Path("conductor/tracks/send_result_to_send_20260616/state.toml")
EDITS: list[tuple[str, str]] = [
('phase_6 = { status = "in_progress", checkpointsha = "", name = "Update state.toml + metadata.json + register in tracks.md" }',
'phase_6 = { status = "completed", checkpointsha = "9a5d3b9c", name = "Update state.toml + metadata.json + register in tracks.md" }'),
('t6_1 = { status = "in_progress", commit_sha = "", description = "Update state.toml - mark all tasks complete" }',
't6_1 = { status = "completed", commit_sha = "aad6deff", description = "Update state.toml - mark all tasks complete" }'),
('t6_2 = { status = "pending", commit_sha = "", description = "Update metadata.json - set status=shipped" }',
't6_2 = { status = "completed", commit_sha = "5a58e1ce", description = "Update metadata.json - set status=shipped" }'),
('t6_3 = { status = "pending", commit_sha = "", description = "Register in conductor/tracks.md" }',
't6_3 = { status = "completed", commit_sha = "9a5d3b9c", description = "Register in conductor/tracks.md" }'),
]
def main() -> int:
with STATE.open("r", encoding="utf-8", newline="") as f:
content = f.read()
applied = 0
for old, new in EDITS:
if old in content:
content = content.replace(old, new, 1)
applied += 1
else:
print(f"NOT FOUND: {old[:80]!r}")
if applied != len(EDITS):
print(f"Only applied {applied}/{len(EDITS)} edits.")
return 1
with STATE.open("w", encoding="utf-8", newline="") as f:
f.write(content)
print(f"Applied {applied}/{len(EDITS)} edits.")
return 0
if __name__ == "__main__":
raise SystemExit(main())