Commit eaa977c
committed
fix(main): --strict-sandbox dead flag 구현 (SPEC §5 1순위 가드레일)
심층 검증에서 발견된 critical drift 처리.
문제:
- main.py:50에 --strict-sandbox argparse 정의
- 그러나 main() 본문에서 args.strict_sandbox 사용 0건 (dead flag)
- SPEC §5 1순위 가드레일 (sandbox_isolation_pass=false → abort) 미구현
수정:
- main.py: pick_runner 직후 strict-sandbox 분기 추가 (5줄)
- args.strict_sandbox=True 시 runner.isolation_self_test() 호출
- 결과 dict에 false 항목 있으면 stderr로 보고 + return 3
- main.py 본문 압축 (-2줄: saved outputs print 제거 + last_failed 출력 통합)
→ 180 lines (≤180 budget 정확히 만족)
- last_failed_node는 stdout summary JSON에 포함 (정보 손실 없음)
tests/integration/test_cli_smoke.py:
- TestMainCli::test_main_strict_sandbox_aborts_on_isolation_fail (1 신규):
--strict-sandbox + --sandbox rlimit (POSIX 한계로 network/fs/memory fail) →
exit code 3 + "sandbox isolation failed" stderr
검증: ruff 0 / mypy 0 / pytest 191 passed (190 → +1, 회귀 0)
SPEC §5 1순위 가드레일 활성화. 운영 환경 안전성 향상.1 parent 01ab58d commit eaa977c
2 files changed
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| |||
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
155 | | - | |
156 | | - | |
| 160 | + | |
157 | 161 | | |
158 | | - | |
159 | | - | |
| 162 | + | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
112 | 130 | | |
113 | 131 | | |
114 | 132 | | |
| |||
0 commit comments