Add bounded tmux user-option persistence and fix nested inventory#167
Merged
Conversation
This reverts commit 1535c76.
…tmux-user-options-omx-ownership
lterm new --detach로 tmux 플래그 없이 중첩 실행된 자식이 검증된 self-lterm 부모 provenance를 잃는 문제(G012)를 수정한다. - client: current_verified_lterm_tmux_parent에서 tmux 불리언 파라미터와 조기 false 반환을 제거 (소켓 pane 우선순위·real-tmux 검증은 유지) - server: parent_request의 동일한 !tmux 게이트를 제거 (capability 조합 금지, pane id 형식, 부모 생존 검증은 유지) - test: 중첩 provenance 테스트에 tmux 플래그 없는 자식 케이스와 ls --children --json 노출 계약 검증을 추가 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
암묵(env) 복구된 tmux 부모는 tmux-parent 프로토콜 검사 실패 시 하드 실패 대신 root 세션으로 안전 강등한다(프라이버시-안전 경고만 출력). 명시 부모 엄격성, capability 부모 우선순위, 중첩 provenance, 서버측 검증은 불변. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the shell-and-sleep PTY fixture with a direct cat leader and validate retained process-group identity through the production gate before exercising the forced waitid fallback close race.
…ions-omx-ownership
ictechgy
marked this pull request as ready for review
July 20, 2026 19:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tmux user-option persistence, lifecycle/generation safety, and nested-session inventory repair
Problem & root cause
set-optionwas previously an unconditional no-op, so tmux-compatible tooling that persists@user-optionssilently lost state; documentation overstated tmux compatibility relative to actual behavior.fork()could be held past its owner's lifetime.--tmux(after a wrapper stripped the capability environment) was stored without parent provenance and therefore appeared as a root in defaultls. Root cause: an over-broad child-tmux-mode gate on both the client fallback provenance path and server parent acceptance suppressed legitimately verified provenance. The gate was never a trust boundary — every verification predicate (self-provided-socket match, strict%digitspane format, capability/explicit precedence, parent liveness) is retained; only the erroneous gate is removed.Implementation
Immutable-ID tmux user-option persistence
set-option/setfor a bounded@namesubset, read viashow-options/show-option/show, with a strict grammar ([-pqu] [-t target] [--] @option [value];-qabsent-option success semantics;--ends parsing;-tseparate or attached, never clustered).-p), so they survive session renames. Strict name charset/length and value size limits; C0/C1/DEL controls and a published UnicodeCf/bidi/zero-width/variation-selector denylist rejected; bounded per-identity, total-identity, total-entry, and store-size limits.set-optioncalls andset-window-option/setwretain legacy accepted no-op behavior.Lifecycle & generation safety
flockRAII guard now explicitly unlocks onDrop(SAFETY-commented), defeating fork-inherited lock extension.Exact OMX interoperability & truthful docs
README.md,README.ko.md, anddocs/public-contract.mdnow documentset-optionas partial (not full tmux option support) with the exact accepted grammar, identity model, limits, and denylist;list-sessionsformat tokens like#{@omx_instance_id}read root-session values only and never leak pane/window values. Explicitly stated non-goals: no built-in, global, server, window, or inheritance option semantics.Nested-session inventory regression repair
Impact
@user-optionsthat survive renames; defaultlsagain shows only true root sessions, with descendants reachable via--children/--all; no behavior change for already-persisted records or raw attach.Test matrix
cargo test --locked)cargo fmt -- --checkcargo check --all-targetscargo clippy --locked --all-targets -- -D warningscargo build --release --lockedcargo audit--all,--childrenexposure, external-tmux negative control, clean shutdownThe isolated smoke additionally verified the pre-existing production inventory was byte-for-byte unchanged before and after (no values reproduced here by design).
Security & privacy constraints
Cargo.toml/Cargo.lockunchanged across the range, verified empirically).Known non-blocking audit note
cargo auditreports one informational "unsound" advisory (RUSTSEC-2026-0190) in a transitive dependency. It is explicitly allowlisted, reports zero vulnerabilities, and is not claimed to be risk-free — it is tracked as informational and does not block this PR.Review evidence
Draft PR: ready for review; merge intentionally withheld pending explicit authorization.