#!/usr/bin/env python3 """Fail-closed migration shim for ACK's removed free-form command validator. ACK v0.10 no longer accepts a shell command as worker configuration. Keep this file only so older documentation or automation fails with a precise migration message instead of silently retaining the unsafe path. """ from __future__ import annotations import sys MIGRATION_MESSAGE = ( "ACK v0.10 已停用自由 worker command 校验器;请在 " "docs/ack/tasks.yaml 的 project.orchestration 中声明 profile,并仅调用 " "scripts/launch_worker.py profile-hash|plan|launch。" ) def main(argv: list[str] | None = None) -> int: arguments = list(sys.argv[1:] if argv is None else argv) if arguments == ["--self-test"]: print("legacy worker command 路径已 fail-closed") return 0 sys.stderr.write(MIGRATION_MESSAGE + "\n") return 2 if __name__ == "__main__": raise SystemExit(main())