Skip to content

shell: retry a transient shell-handle failure and name its cause - #1690

Merged
justrach merged 1 commit into
mainfrom
fix/shell-id-cause
Oct 20, 2026
Merged

justrach merged 1 commit into
mainfrom
fix/shell-id-cause

Conversation

@justrach

Copy link
Copy Markdown
Owner

Fixes #1619.

Root cause

shell_identity.forJob mapped every unexpected reservation error to ShellIdentityUnavailable, which dropped the underlying error. exec_bash.spawnFailText then gave HOME-permissions repair advice for any of them. A transient fd or lock failure looked like broken storage, and the next call worked without any repair.

Fix

  • Errors that don't mean the storage itself is unusable are retried up to three times, 25 ms apart.
  • The underlying error is kept (shell_identity.last_cause) and shown: ShellIdentityUnavailable: <cause>.
  • Only a storage fault (access denied, read-only, out of space or quota, missing or bad path) gets the permissions advice. Anything else says it is usually transient and to run the command again.

Tests

  • New: a transient cause is named without permissions advice, and a storage fault keeps it.
  • Shell identity and exec unit tests: 110 pass.
  • Tier-1 pre-push gate is green.

Reserving a durable shell handle mapped every unexpected error to
ShellIdentityUnavailable, and the message always blamed HOME's
.codegraff permissions. A transient fd or lock failure looked like
broken storage, and the real cause was lost; the next call worked
without any repair.

Errors that don't say the storage itself is unusable are retried three
times. The underlying error is kept and shown, and only a storage
fault (access, read-only, full disk, missing or bad path) gets the
permissions advice; anything else says it is usually transient.

Fixes #1619
@justrach
justrach merged commit d771324 into main Oct 20, 2026
6 checks passed
@justrach
justrach deleted the fix/shell-id-cause branch October 20, 2026 05:34
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.

Intermittent ShellIdentityUnavailable blocks terminal tools and hides reservation cause

1 participant