fix(mcp,testreport): stop steering transport unlock failures at --force - #618
Open
plusky wants to merge 1 commit into
Open
fix(mcp,testreport): stop steering transport unlock failures at --force#618plusky wants to merge 1 commit into
plusky wants to merge 1 commit into
Conversation
…ce (openSUSE#544) The Failed bucket is a transport/SFTP error, not contention: --force only bypasses the ownership check, so both Failed arms now point at list_locks and a plain unlock retry. The abort-path contended arm names the LockOutcome::Contended owner already in hand, branches own-vs-other on the cancel-time session_user, and states --force's whole-group-of-every-template scope; docs/src/mcp.md mirrors both.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #618 +/- ##
==========================================
- Coverage 96.89% 96.89% -0.01%
==========================================
Files 209 209
Lines 60697 60772 +75
==========================================
+ Hits 58810 58882 +72
- Misses 1887 1890 +3 ☔ View full report in Codecov by Harness. |
mimi1vx
requested changes
Sep 11, 2026
mimi1vx
left a comment
Member
There was a problem hiding this comment.
Critical (must fix)
crates/mtui-mcp/src/session.rs:421(contended_reason) duplicatesmtui_core::commands::support::contended_lock_reason(crates/mtui-core/src/commands/support.rs:54) — same own/foreign/unknown branching, same hedge wording, same--forceframing, kept in sync by hand across two crates.LockOwneralready lives inmtui-hosts, so there's a natural shared home: hoist onecontended_lock_reason-equivalent there (or a small trait/free fn both crates call) and have bothmtui-coreandmtui-mcpcall it instead of maintaining parallel copies. Must be deduplicated before merge — two independent copies of ownership-messaging logic will drift the next time either one gets a wording tweak.
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.
Fixes #544. Transport/SFTP unlock failures (LockOutcome::Failed) were advised to retry with unlock --force, which only bypasses the ownership check and does nothing here — remedy is now list_locks + retry once reachable. Remaining --force offers state the whole-group scope of every loaded template. Contended arm names the lock owner, branching own (you) vs foreign vs unknown (owner data already rode on Contended since #531, no new I/O). Adversarial review: GO, no blockers. Full workspace gate green.