Skip to content

Fix lane launch ownership, privacy, and attach regressions#288

Merged
Yeachan-Heo merged 2 commits into
devfrom
clawhip-issue-287-lane-launch-regressions
Jul 11, 2026
Merged

Fix lane launch ownership, privacy, and attach regressions#288
Yeachan-Heo merged 2 commits into
devfrom
clawhip-issue-287-lane-launch-regressions

Conversation

@Yeachan-Heo

Copy link
Copy Markdown
Owner

Closes #287.

Summary

  • stop command lanes on unconfirmed detached tmux creation before marker, command, cleanup, or attach effects
  • emit the canonical fingerprinted Discord thread target in lane launch JSON instead of the raw thread ID
  • restore lane-aware --attach through the existing attach helper after successful owned/finalized launches, with failure propagation

Regression coverage

  • same-name unrelated session collision has zero tmux effects
  • exact canonical JSON target and raw-ID absence
  • fresh and retained-success attach, failed-launch no-attach, and attach-helper failure propagation

Validation

  • cargo fmt --check
  • cargo check
  • cargo clippy -- -D warnings
  • cargo test (679 unit tests plus all integration targets; lane suite 21/21)
  • git diff --check
  • adversarial Architect review: CLEAR / APPROVE
  • executor CLI red-team: passed

Gates

Do not merge until exact-head GJC review and CI are green. The live Mac-mini/PTY/Discord canary remains a post-review/merge release gate and was not performed or claimed here. No release is included.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

Implementation status for exact head 833620003d4128279c82af022166314e7e64c7ed:

  • all three Fix merged lane-launch ownership, privacy, and --attach regressions #287 regressions fixed with a two-file patch
  • five focused regressions pass; lane_thread_verification passes 21/21
  • cargo fmt --check, cargo check, cargo clippy -- -D warnings, cargo test, and git diff --check pass
  • scoped exact-change GJC Architect review: CLEAR / APPROVE
  • CLI adversarial QA/red-team: passed

GitHub CI is currently in progress. This PR must not be merged until CI is green and exact-head review remains valid. No release is included. The live Mac-mini/PTY/Discord canary is deferred to the post-review/merge release gate and has not been performed or claimed.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 833620003d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tmux_wrapper.rs Outdated
Comment on lines +903 to +906
(
LaneLaunchState::NoWorkerEffect,
"session-create-failed",
"lane tmux session creation failed",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve ambiguous create outcomes

When create_detached_lane_session returns PossiblyExecuted because wait_with_output() failed after spawning tmux, the detached session may already have been created, but this branch now records command lanes as NoWorkerEffect/session-create-failed and returns before marker verification or cleanup. In that response-loss case the registry says there was no worker effect while an unowned tmux session is left running, which blocks accurate retry/retirement decisions; split definite nonzero failures from true wait/result-loss ambiguity or keep the ambiguous handling for the latter.

Useful? React with 👍 / 👎.

Comment thread src/tmux_wrapper.rs Outdated
Comment on lines +31 to +33
launch_lane_session(args, config).await?;
if attach {
attach_session(&requested_session).await?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Inherit stdio when attaching lane sessions

For clawhip tmux new --thread ... --attach from a real terminal, this new lane path calls attach_session, but that helper runs tmux attach-session with Command::output(), so stdout/stderr are captured instead of attaching the tmux client to the current terminal; tmux(1) describes attach-session as attaching “in the current terminal.” The fake tmux test does not catch this, and the command can now report a failed attach after a successful launch rather than actually attaching; spawn the attach command with inherited stdio/TTY for this path.

Useful? React with 👍 / 👎.

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

Exact-head gate update for 833620003d4128279c82af022166314e7e64c7ed:

  • GJC Architect review: CLEAR / APPROVE
  • CLI adversarial QA: passed
  • GitHub CI: green (Format, Check, Clippy, Test, and Build succeeded)
  • merge state: clean; PR remains open and unmerged

This is not the terminal release status. The live Mac-mini/PTY/Discord canary is deferred to the post-review/merge release gate and was not performed or claimed. No release has been performed.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

MERGE_READY

Reviewed replacement head: 2a79ac9ac83d15800a605ac862258d4bb1174e6f; base: dev@3a4285c0ef0f42d98269aeb6bc61bd4fe9f11c6a; merge state: clean.

Adversarial dispositions:

  • r3563233757 was a real blocker. The replacement head separates definitive nonzero creation from post-spawn result loss; unknown execution is durably SessionCreationAmbiguous, with no marker/send/cleanup/attach side effects.
  • r3563233759 was a real blocker. Attach now inherits stdin/stdout/stderr via status execution; a Linux real-PTY regression proves fd 0/1/2 for lane and legacy attach.
  • Additional ownership blockers were repaired: identity-proof failures retain/quarantine instead of name-only cleanup, retained attach revalidates markers, and lane attach uses exact =session targeting.
  • Public lane JSON uses the canonical fingerprinted Discord thread projection; no raw thread/body/token leak was found. The fingerprint is treated as linkable pseudonymization, not anonymity.

Verification:

  • focused ownership/ambiguity/attach tests: passed
  • lane_thread_verification: 22/22 passed, including real PTY and legacy parity
  • cargo fmt --all -- --check: passed
  • cargo clippy -- -D warnings: passed
  • cargo test: passed (682 unit tests plus all integration targets)
  • independent cleanup: zero blocking findings
  • independent Architect: CLEAR / APPROVE across architecture, product, and code
  • independent executor adversarial QA: passed, no blockers
  • exact-head hosted CI: Format, Check, Clippy, Test, and Build succeeded
  • Release PR workflow: planning succeeded; host/crates/artifact publication jobs skipped as designed

CI evidence: https://github.com/Yeachan-Heo/clawhip/actions/runs/29142384082
Release-plan evidence: https://github.com/Yeachan-Heo/clawhip/actions/runs/29142384087

Squash merge is authorized for this exact clean head. Merged-dev dogfood and issue #287 closure remain post-merge gates. The live Mac-mini/PTY/Discord canary was not performed; release remains held. No release or publish action is authorized.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@Yeachan-Heo
Yeachan-Heo merged commit a2efd1c into dev Jul 11, 2026
12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a79ac9ac8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tmux_wrapper.rs
) -> DetachedSessionOutcome {
match result {
Ok(status) if status.success() => DetachedSessionOutcome::Created,
Ok(_) => DetachedSessionOutcome::DefinitiveFailure,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Treat signal-terminated tmux launches as ambiguous

Fresh evidence: this helper now maps every non-success Ok(ExitStatus) to DefinitiveFailure, but an ExitStatus produced by a signal still arrives as Ok(_). If the tmux client is killed after it sends new-session to the server, the session may already exist; for command lanes this is then recorded as NoWorkerEffect/session-create-failed and returns before marker verification, leaving an unowned session with incorrect retry evidence. Only ordinary nonzero exit codes should be definitive, while signaled statuses should remain PossiblyExecuted.

Useful? React with 👍 / 👎.

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

MERGE_READY

Post-merge verification completed from a clean detached worktree at exact dev merge SHA a2efd1c8d1d001cd7ad7e3619a43b81db6b2d8b9 (first parent 3a4285c0ef0f42d98269aeb6bc61bd4fe9f11c6a). The canonical checkout was intentionally not touched because it is on main, ahead of origin, and has local changes in CHANGELOG.md, Cargo.toml, and Cargo.lock.

Merged-dev evidence:

  • PR Fix lane launch ownership, privacy, and attach regressions #288: closed and merged; reviewed head 2a79ac9ac83d15800a605ac862258d4bb1174e6f
  • detached verifier: /mnt/offloading/Workspace/clawhip-pr-288-merged-dev-verify, clean at exact origin/dev
  • cargo build: passed
  • cargo test --test lane_thread_verification -- --nocapture: 22/22 passed, including real Linux PTY fd 0/1/2 inheritance and legacy attach parity
  • cargo test: passed (682 unit tests plus all integration targets)
  • CLI dogfood: clawhip --help and clawhip tmux new --help passed from the merged-dev binary
  • issue Fix merged lane-launch ownership, privacy, and --attach regressions #287 remained open after the non-default-branch merge, as expected; closure is now authorized by this successful merged-dev gate

Release hold: this Linux verifier is not the authorized live Mac-mini environment and no live Discord credentials/target were used. The Mac-mini + real PTY + live Discord canary is the only remaining release gate. No release, tag, crate publish, artifact publish, or live Discord action was performed.


[repo owner's gaebal-gajae (clawdbot) 🦞]

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