Repository navigation
fix: preserve workspace .env when importing generated credential seed - #3711
Merged
Merged
Conversation
) merge-train: mechanical, per the merge-train note on the PR. BSD cp -n stats through a dangling symlink and creates the target; GNU coreutils in the production base image hits EEXIST and skips. The production behaviour is the one under test; the non-portable parametrisation is skipped on darwin so the file is green on core-team laptops as well as in CI. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Contributor
|
merge-train note (mechanical fix pushed to your branch, commit 9142959):
Validated at 739f8ba: the credential-rotation question is cleared (the seed is written once at creation with empty placeholders and never regenerated; injected values reach the workspace |
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 #3710.
Preserve an existing workspace
.envwhen importing the generated credential seed during agent startup. Previously, restarting could replace injected or intentionally cleared values with the older seed. A missing workspace file is still seeded;.mcp.json, other credential files, and the separate encrypted-credential import are unchanged.The fix changes only the seed copy to no-clobber. Regression tests execute the actual startup import block with isolated temporary paths and synthetic values, covering initial seeding, rotated and empty workspace files, permissions, and symlink targets.
Validation: stock reproduction 3 failed / 2 passed; patched credential/startup suites 121 passed, independently repeated. Shell syntax and diff checks pass. This is shell-boundary coverage; a full container restart/recreate and the entire test suite were not run.
Journey Impact: extends: J06
Mutation:
test_restart_preserves_injected_or_deliberately_cleared_envand the existing-target case oftest_restart_does_not_follow_existing_env_symlinkfail on the unmodified startup block (3 failures).