Skip to content

feat(render): --source codex 추가 (lterm-free tmux statusline 경로)#29

Merged
ictechgy merged 2 commits into
mainfrom
feature/source-codex
Jun 14, 2026
Merged

feat(render): --source codex 추가 (lterm-free tmux statusline 경로)#29
ictechgy merged 2 commits into
mainfrom
feature/source-codex

Conversation

@ictechgy

Copy link
Copy Markdown
Owner

배경

codex CLI는 Claude Code식 command-backed statusline(임의 스크립트 stdin JSON → stdout 렌더)을 네이티브 미지원(FR openai/codex#17827·#16921 OPEN; built-in enum statusline은 있으나 스크립트 훅 없음). understatus는 화면을 소유한 레이어가 statusline을 채우는 방식으로 우회한다.

기존엔 lterm 데몬 경유(--source lterm)만 있었으나, tmux status-line 등에서 understatus를 직접 호출하는 lterm-free 경로를 위해 --source codex를 추가한다. (ralplan 합의: iTerm NativeChrome은 plain-text 한계·F1 미검증 블로커로 No-Go, tmux 경로가 사용자 의도 "lterm 없이"에 부합)

변경

  • Source::Codex 추가Source::Lterm과 동일한 parse_lterm_input 파서 + codex enrich를 공유. enrich 게이팅을 matches!(source, Source::Lterm | Source::Codex)로 확장(Claude 경로는 여전히 제외).
  • codex 데이터는 understatus가 ~/.codex 세션을 직접 판독하므로 lterm 데몬 불필요. stdin에 {"agent":"codex","cwd":"..."}만 주면 enrich가 model/ctx%/rate-limit를 채운다.
  • ctx/chain 게이팅은 Claude 한정 유지(codex는 자연 no-op).
  • parser/help/에러 메시지 claude|lterm|codex 동기화 + parse 테스트 2개.

사용 예 (tmux)

set -g status-interval 5
set -g status-right-length 120
set -g status-right '#[fg=cyan]#(echo "{\"agent\":\"codex\",\"cwd\":\"#{pane_current_path}\"}" | understatus render --source codex --oneline)'

검증

  • rustup 툴체인: cargo fmt --check 클린, cargo clippy --all-targets -- -D warnings 클린, cargo test 343(lib) + 15(oneline) = 358 그린
  • E2E: --source codex plain 출력, ESC 바이트 0(plain-text 계약 — tmux/SetUserVar 안전), 후행 개행 없음, 미지 source 거부 메시지에 codex 포함
  • 독립 code-reviewer: CRITICAL/HIGH/MEDIUM 0(회귀-0·enrich 이중게이팅·match 망라·plain-text 위임 4대 계약 검증) → SHIP

회귀

Source::Claude/Source::Lterm 경로 비트 단위 불변. 순수 additive(variant + 공유 arm). 버전 범프 없음(기능 추가지만 다음 릴리스에 묶음).

🤖 Generated with Claude Code

ictechgy and others added 2 commits June 14, 2026 10:49
codex CLI는 command-backed statusline을 네이티브 미지원(FR openai/codex#17827).
기존 우회는 lterm 데몬 경유였으나, tmux status-line 등에서 understatus를 직접
호출하는 lterm-free 경로를 위해 `--source codex`를 추가한다.

- Source::Codex는 Source::Lterm과 동일한 parse_lterm_input 파서 + codex enrich를
  공유한다. enrich 게이팅을 `Lterm | Codex`로 확장(Claude 경로는 여전히 제외).
- codex 데이터는 understatus가 ~/.codex 세션을 직접 판독하므로 lterm 데몬 불필요.
  stdin에 {"agent":"codex","cwd":"..."}만 주면 enrich가 model/ctx%/rate-limit를 채운다.
- ctx/chain 게이팅은 Claude 한정 유지(codex는 자연 no-op).
- parser/help/에러 메시지 claude|lterm|codex 동기화 + parse 테스트 2개.

검증: fmt/clippy -D warnings 클린, test 343+15=358 그린, --source codex 출력의
ESC 바이트 0(plain-text 계약, tmux/SetUserVar 안전)·후행개행 없음 E2E 확인.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
quad-review-loop Claude 트랙 MEDIUM 반영. 인라인 matches!(source, Lterm|Codex)를
순수 함수 should_enrich_codex로 추출하고, Claude=no-op·Lterm/Codex=발화 불변식을
단위 테스트(should_enrich_codex_gate)로 고정한다. run_render_pipeline이 stdin/~/.codex
I/O를 타 직접 테스트가 어려운 게이트를, 순수 함수 추출로 회귀-0을 코드로 보장한다.

quad-review-loop round 1, finding: MEDIUM|testability|src/main.rs|enrich-gate-test-gap

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ictechgy ictechgy merged commit c39e932 into main Jun 14, 2026
1 check passed
@ictechgy ictechgy deleted the feature/source-codex branch June 14, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant