fix(mqtt): resolve B-9 by implementing lazy get_logs_dir() evaluation
- Replace import-time LOGS_DIR cwd binding with dynamic get_logs_dir() function - Implement PEP 562 __getattr__ and __dir__ for transparent LOGS_DIR backward compatibility - Update audit-log callers in mqtt_common.py and registry.py to use dynamic resolution - Add 5 regression guards in tests/test_tier1_unit.py (276/276 PASS) - Update IMPROVEMENTS.md, VERSIONS.md, registry.md, and include plan and peer review reports
This commit is contained in:
@@ -87,6 +87,14 @@
|
||||
- 회귀 가드 5종 신설 — argv 보존, 파손 래퍼 면역, 스킬 트리 무오염(B-6 경계), 락 해제 및 스냅샷 정리(B-12 경계), 비활성화 스위치.
|
||||
- 회귀 및 계약 테스트: **271/271 PASS (100%)** 달성.
|
||||
|
||||
#### 9. 감사 로그 루트 지연 평가 (B-9 / P4-1)
|
||||
- `mqtt_common.LOGS_DIR` 의 import 시점 cwd 고정을 제거하고 호출 시점에 해석하는 `get_logs_dir()` 를 도입. `chdir` 이후에도 감사 로그가 현재 워크스페이스에 정확히 기록됨.
|
||||
- PEP 562 모듈 `__getattr__` 로 `LOGS_DIR` 속성 접근 하위 호환 유지(동적 평가).
|
||||
- PEP 562 `__dir__` 병행 정의로 `dir()`·탭 완성 가시성 유지.
|
||||
- `DELEGATE_JOB_LOGS_DIR` 환경변수가 실행 중 변경까지 반영.
|
||||
- 회귀 가드 5종 신설 — cwd 추종, 실제 파일 생성, 환경변수 동적 반영, 전역 재도입 차단, dir() 탐색성.
|
||||
- 회귀 및 계약 테스트: **276/276 PASS (100%)** 달성.
|
||||
|
||||
---
|
||||
|
||||
### 🛠️ `v1.4.0` — Stability, Cleanup & Safe Job Delegation (2026-08-16)
|
||||
|
||||
Reference in New Issue
Block a user