Repository navigation
Description
Description
Shared-service detection searches the entire process command line for app-server, remote-control, or daemon. Those strings can also occur in a normal session's prompt, executable path, or option value. Such sessions receive lock_owner_is_shared_service and cannot be safely recovered even when other evidence is sufficient.
Evidence and reproduction
Baseline: bed34a7aeca90275a1b3e3d838e9c1b77b9fe325 (package version 0.4.2).
The actual reconcileArguments() source function was executed in memory with generated arguments, without accessing or signaling a real Codex process. These ordinary argument arrays incorrectly set isSharedService: true:
["codex", "exec", "fix the daemon"]
["codex", "fix app-server logs"]
["codex", "-C", "/work/app-server", "resume"]
["/work/daemon/codex", "resume"]Controls: ["codex", "app-server"] correctly returns true and ["codex", "resume"] returns false. Separately collected cwd is not itself matched; a path triggers this defect when it appears in the command line.
Expected behavior and acceptance criteria
- Distinguish actual execution modes from executable paths, prompt arguments, and known option values.
- Preserve Linux kernel argv boundaries and reconcile independent process evidence. Truncated, conflicting, unsupported, or ambiguous evidence must continue to block unlock.
- Do not treat a naive whitespace split of macOS
ps argsas verified argv. Document and test any platform limitation where boundaries cannot be established safely. - Preserve refusal for actual app-server, Remote Control, and daemon owners, including mode tokens after supported global options.
- Add negative tests for prompts/paths and positive tests for real service modes, unknown options, truncation, mismatched evidence, and ambiguous flattened arguments.
- Retain actual advisory-lock integration coverage; all refused cases must send zero signals.
This is a recovery-availability defect. No additional unsafe process termination was demonstrated. Existing #52 truncation protection must not regress.
Activity