The gate that fired anyway
说明与用途
在 PowerShell 自动化流水线中,运行器错误解析分类器输出,导致破坏性任务被执行。通过将输出合并为字符串并阻止未知结果,修复了此问题,防止了意外执行。
问题
The acceptance runner allowed destructive tasks to fire because the classifier output was mis‑parsed, letting an unparseable verdict slip through as a safe one.
结果
Destructive tasks are now correctly blocked, preventing accidental execution, while safe tasks continue to run.
工作流
- Register a task with the runner
- Capture classifier output with 2>&1
- Join output into a single string
- Apply regex to extract verdict
- If verdict is destructive, write receipt and exit 3
- If verdict is safe, write receipt and start task
- Unregister test tasks after execution
证据
The runner captured the classifier's output with 2>&1, which in PowerShell returns an array of lines, not a string.
The fix was two changes: join the captured output into a string so the regex sees what it was written for, and give unknown its own blocking exit code.
- 记录日期: 2026-09-11T13:45:22.301Z