You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(shim): preserve configuration created while waiting for the lock - #63
The shim could overwrite workspace configuration created by another command while it waited for the context lock. Inspect the configuration after acquiring that lock.
What changed
Preserve configuration created during the lock wait, including configuration without an API target.
Release the context lock if configuration inspection fails.
Update the login inheritance documentation and changelog.
Scope
This change covers automatic login copying into the default workspace context. Explicit imports keep their existing behavior.
Blast Radius
The ordinary managed shim checks configuration later in its existing lock lifecycle. The Linux concurrency regression uses an inotify event to synchronize the two commands.
Verification
The concurrency regression failed before the fix and passed afterward. Application tests and focused race-detector tests passed.
A controlled official CF CLI probe reproduced the overwrite on main and preserved the workspace API, organization, and space after the fix.
make check, make release-check, make security, and make smoke passed.
PASS+NOTES for exact head 7b91b7cc1f40a57faf0e778976ce1c27092b1163. No blocking finding.
Independent official CLI evidence reproduced the race on the baseline in 10 of
10 runs and passed on the head in 10 of 10 runs. The head preserved the normalized
workspace configuration, emitted no seed notice, left the synthetic global source
unchanged, and returned 0. The original sparse-JSON probe still reports false on
the head because cf version adds default fields. A direct official CLI control
confirmed that the API target, organization name, and space name remain unchanged.
The focused behavior set passed 20 repetitions. Both new tests passed 10
repetitions under the race detector. The full internal/app package and the
isolated race-enabled end-to-end suite passed. The new error path returned exitError and released the context lock for immediate reacquisition. Named,
external, existing no-target, and fresh-seed behavior remained intact.
Notes only. The deterministic race test is Linux-only, and Windows received
compile-only coverage. The Linux test releases its held lock on failure but does
not join its goroutine on every abnormal exit. Neither note blocks this fix. Root
artifacts show make check, make release-check, make security, and make smoke passed.
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
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.
Why
The shim could overwrite workspace configuration created by another command while it waited for the context lock. Inspect the configuration after acquiring that lock.
What changed
Scope
This change covers automatic login copying into the default workspace context. Explicit imports keep their existing behavior.
Blast Radius
The ordinary managed shim checks configuration later in its existing lock lifecycle. The Linux concurrency regression uses an inotify event to synchronize the two commands.
Verification
make check,make release-check,make security, andmake smokepassed.Closes #62.