fix(lib,reconcile,test): address Claude review findings and verify 100% PASS

- lib.sh: distinguish unobservable/headless (rc=2) from unsettled panes in _pane_quiescent; restore 10s quiescence window with early giveup (SKS_EMPTY_GIVEUP)
- reconcile.sh: fix SKILLS_DIR command substitution logic (&& pwd instead of || pwd)
- tests/test_b19_headless_reconcile_fixes.py: implement mutation-proven regression tests for headless prompt bypass, slow-settling panes with persistent counters, and real reconcile.sh SKILLS_DIR evaluation
- deploy/ & IMPROVEMENTS.md: document nats submodule access notes and B-19/B-20 evolution
- Promoted Reviewer Claude's final 100% PASS report (report-119b9f57.md)
This commit is contained in:
2026-08-23 20:57:38 +09:00
parent 6e2e9b1161
commit 31b2d70ffe
9 changed files with 428 additions and 95 deletions
+6 -6
View File
@@ -38,13 +38,13 @@
### **B-19 (✅ 완료 — 헤드리스 분할 레이아웃 0×0 예외 처리, reconcile SKILLS_DIR 누락 및 Fast-path 게이팅 보완)**
- **현상**:
1. `lib.sh:449` 헤드리스 환경에서 `herdr pane layout``0×0`을 반환할 때 `overflow`로 오판정되어 새 워크스페이스(`w1, w2, w3`)가 계속 증식하던 결함.
2. `reconcile.sh:814, 816`에서 `SKILLS_DIR`을 전달하지 않아 Python 내에서 상대 경로 조립 실패(`resume dry-run failed: No such file or directory`)가 기록되던 결함.
3. `lib.sh:1667` `send_keys_safe`에서 `herdr agent prompt` Fast-path가 렌더러 안정화 및 다이얼로그 체크 이전에 실행되거나 실패 시 중복 입력이 발생할 수 있던 결함.
1. `lib.sh` 헤드리스 환경에서 `herdr pane layout``0×0`을 반환할 때 `overflow`로 오판정되어 새 워크스페이스(`w1, w2, w3`)가 계속 증식하던 결함 (후속 B-20 2×K 그리드 엔진으로 완전 승계 및 공용화).
2. `reconcile.sh:19`에서 `SKILLS_DIR` 명령 치환 오류(`2>/dev/null || pwd`)로 빈 문자열이 되어 Python 내 상대 경로 조립 실패(`resume dry-run failed: No such file or directory`)가 유발되던 결함.
3. `lib.sh:1620` `send_keys_safe`에서 `herdr agent prompt` Fast-path가 다이얼로그 체크 이 실행되거나 헤드리스/비표시 상태에서 정숙성 루프가 불필요하게 10초 대기/실패하던 결함.
- **조치 결과 (완료)**:
- `lib.sh`: `w <= 0 or h <= 0`인 헤드리스 상태일 때 기본 `'right'` 분할 적용. `send_keys_safe`의 Fast-path를 안정화/다이얼로그 확인 후로 배치하고 단일 성공 즉시 `return 0` 처리.
- `reconcile.sh`: `env_python``atomic_dump_yaml` 실행 시 `SKILLS_DIR="$SKILLS_DIR"` 명시 주입 및 3중 fallback 경로 추가.
- 회귀 가드: `tests/test_b19_headless_reconcile_fixes.py` (4개 테스트 신규 작성 및 100% 통과).
- `lib.sh`: B-20 공용 엔진을 통해 헤드리스 0×0 결정론적 분할 적용. `_pane_quiescent``SKS_EMPTY_GIVEUP`(기본 3회) 연속 공백 감지 시 조기 `rc=2`(관측 불가, ~1.5초 소요) 탈출을 도입하고, 관측 가능한 페인은 20×0.5s(10초) 정숙성 윈도를 보존. `send_keys_safe``rc=2`일 때 시각 다이얼로그 루프를 건너뛰고 RPC Fast-path로 직행하도록 최적화. RPC 성공 즉시 `return 0` 반환하여 중복 입력 방지 및 온디맨드 마커 계산 적용.
- `reconcile.sh`: `SKILLS_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"`로 절대 경로 즉시 계산 및 `env_python`/`atomic_dump_yaml`로 명시 주입, Python 측 `__file__` 의존성 제거.
- 회귀 가드: `tests/test_b19_headless_reconcile_fixes.py` (6개 기능/통합 테스트 100% 통과).
### **B-14 (✅ 완료 — F-1 / P1): `publish_event.py` 브로커 장애 시 `return 2` 조기 탈출로 인한 65분 루프 정지**
- **현상**: `publish_event.py`에서 브로커 네트워크 장애 발생 시 `return 2`로 조기 종료되어, 뒤따르는 로컬 레지스트리 상태(`update_job_status(status=completed)`) 및 감사 로그(`append_event`, `registry.append_event`) 갱신이 누락되던 결함.