Skip to content

chore(ops): 운영 노트북 영구 설정 점검 스크립트와 절차 (#103) - #114

Merged
exijn merged 1 commit into
developfrom
chore/103-ops-laptop-check
Nov 10, 2026
Merged

exijn merged 1 commit into
developfrom
chore/103-ops-laptop-check

Conversation

@exijn

@exijn exijn commented Nov 10, 2026

Copy link
Copy Markdown
Member

Part of #103 (외부 모니터 연결·분리 실기 시험과 현장 체크리스트 기록은 사람이 수행)

변경

  • scripts/ops_laptop_check.py: 읽기 전용 점검 5항목(GDM WaylandEnable=false, logind 덮개 ignore, sleep/suspend/hibernate/hybrid-sleep mask, GNOME 자동 절전·idle off, 외부 1920x1080@60). 마지막 한 줄 OK/FAIL/CHECK. sudo·systemctl·설정 변경 없음.
  • docs/ops-laptop.md: 영구 설정 명령(운영자), 현장 체크리스트(재부팅·덮개·모니터 분리/재연결), 복구.

검증

harness, ruff, ruff format, mypy, pytest(신규 6, fixture·fake), mypy --strict 스크립트 통과.
참고: 자동화 실행 PC에서 읽기 전용으로 돌려 본 결과 5항목 모두 FAIL(Wayland 세션, 덮개·절전 미설정, 144 Hz). 이 PC가 실제 운영 노트북이라면 문서의 설정을 운영자가 적용해야 한다.

🤖 Generated with Claude Code

- scripts/ops_laptop_check.py: Xorg 기본 세션, 덮개 무시, 절전 mask, GNOME 자동 절전, 외부 1080p60 읽기 전용 점검
- docs/ops-laptop.md: 영구 설정 명령, 현장 체크리스트, 복구 절차
- fixture 파일시스템·fake 조회 테스트

Part of #103

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@exijn exijn added the ops POPPY ops label Nov 10, 2026
@exijn
exijn merged commit 19fa741 into develop Nov 10, 2026
1 check passed
@exijn
exijn deleted the chore/103-ops-laptop-check branch November 10, 2026 11:58

@inryeok-bot inryeok-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 결과

변경된 3개 파일을 검토했습니다. 인라인 관찰 3개를 게시했습니다.

심각도 개수
치명적 0
높음 0
중간 3
낮음 0

유형: 필수 수정 2, 수정 권장 1, 제안 0, 확인 질문 0, 좋았던 점 0

주요 관찰

  • 필수 수정 · MEDIUM INI 섹션을 무시해 적용되지 않는 값을 PASS로 판정합니다
  • 필수 수정 · MEDIUM logind의 다른 drop-in 경로를 누락해 재정의를 감지하지 못합니다
  • 수정 권장 · MEDIUM WaylandEnable 항목이 없으면 설정 명령이 아무 작업도 하지 않습니다

검토한 head: bb509b754920 · 최신 head는 /review로 검토하세요.

value = raw.strip()
return value


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔷 필수 수정 · MEDIUM

INI 섹션을 무시해 적용되지 않는 값을 PASS로 판정합니다

_ini_value()는 현재 섹션을 확인하지 않고 파일 전체에서 같은 이름의 마지막 키를 사용합니다. 따라서 WaylandEnable=false가 [daemon]이 아닌 섹션에 있거나 덮개 설정이 [Login] 밖에 있어도 PASS가 됩니다. 반대로 유효한 섹션 뒤의 무관한 동명 키 때문에 FAIL이 될 수도 있습니다. 두 설정 모두 섹션에 따라 의미가 달라지므로 대상 섹션 안의 값만 읽어야 합니다.

이유: 점검 결과가 실제 부팅·절전 동작을 보장하지 못해 현장 운영 중 세션 종료나 Agent 중단으로 이어질 수 있습니다.

제안: 섹션을 인식하는 조회 함수로 바꾸고 잘못된 섹션 및 섹션 간 중복 키 사례를 검증하세요.

return Check("Xorg 기본 세션", PASS, "WaylandEnable=false")
return Check("Xorg 기본 세션", FAIL, f"WaylandEnable={value}")


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔷 필수 수정 · MEDIUM

logind의 다른 drop-in 경로를 누락해 재정의를 감지하지 못합니다

logind는 /etc뿐 아니라 /run/systemd/logind.conf.d, /usr/local/lib/systemd/logind.conf.d, /usr/lib/systemd/logind.conf.d의 drop-in도 함께 적용하고 파일명 순서와 디렉터리 우선순위로 값을 결정합니다. 현재는 /etc만 읽으므로 이후 순번의 vendor/runtime drop-in이 suspend로 재정의해도 세 키를 모두 ignore로 판정할 수 있습니다.

이유: 이 점검의 핵심 안전 조건인 덮개 절전 방지가 실제 상태와 어긋날 수 있습니다.

제안: 표준 drop-in 검색·우선순위 규칙을 반영해 최종 유효 값을 검사하세요.

Comment thread docs/ops-laptop.md
## 설정 (운영자, 1회)

```bash
sudo sed -i 's/^#\?WaylandEnable=.*/WaylandEnable=false/' /etc/gdm3/custom.conf

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔷 수정 권장 · MEDIUM

WaylandEnable 항목이 없으면 설정 명령이 아무 작업도 하지 않습니다

이 sed 명령은 기존의 주석 또는 비주석 WaylandEnable= 행만 치환합니다. 패키지 버전이나 이전 편집 때문에 해당 행이 아예 없으면 성공 종료하면서 파일을 변경하지 않으며, 이후 점검도 계속 FAIL입니다.

이유: 점검에서 발견한 결함을 문서의 안내만으로 복구할 수 없는 환경이 생깁니다.

제안: 키가 없을 때 [daemon] 섹션에 추가하는 멱등적 절차를 제공하세요.

@exijn exijn mentioned this pull request Nov 10, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ops POPPY ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant