feat(web): authorize corrective smooth reader
This commit is contained in:
36
my-tools/rotate_web_task_context.py
Executable file
36
my-tools/rotate_web_task_context.py
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Record a Blender/WBV2 context rotation without deleting evidence."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from wbv2_runtime import CONTROL_ROOT, ROOT, queue_pointer
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--reason", choices=("completed", "timeout", "interrupted"), required=True)
|
||||
parser.add_argument("--next-task", required=True)
|
||||
args = parser.parse_args()
|
||||
pointer = queue_pointer()
|
||||
path = CONTROL_ROOT / "my-tools-context-rotation.json"
|
||||
payload = {
|
||||
"schemaVersion": 1,
|
||||
"rotatedAt": datetime.now(timezone.utc).isoformat(),
|
||||
"reason": args.reason,
|
||||
"previousTask": pointer.get("task"),
|
||||
"nextTask": args.next_task,
|
||||
"preserved": ["docs/EXECUTION_QUEUE.md", "docs/tasks/**", "tests/golden/**"],
|
||||
"nextStep": "Run node tools/web/print-task-context.mjs and node tools/web/check-task-context.mjs.",
|
||||
}
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(json.dumps(payload, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
print(json.dumps({"previousTask": pointer.get("task"), "nextTask": args.next_task, "reason": args.reason}, ensure_ascii=False))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user