Repository navigation
fix(remote): isolate restored agent configuration - #353
Merged
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Summary
When a remote daemon restarts with different provider configuration variables, resuming or forking a saved conversation can combine its recorded profile with the daemon's new configuration paths. Clear that provider's configuration variables before applying the saved environment. New terminals keep their existing inheritance behavior, and the removal list remains internal to the daemon.
Add real PTY regressions for all four providers, sparse and complete OpenCode configuration, legacy and empty history, unrelated provider variables, and external attempts to select removals. Run them through the existing Agent CI entry point.
@coderabbitai summary
GitHub Project
PR Type
Validation
Status: passed
Command:
cargo test --locked --manifest-path remote/Cargo.tomlResult: 47 tests passed on macOS using the installed Rustup stable toolchain and an isolated Cargo target directory, including serialization isolation for the internal removal list.
Status: passed
Command:
cargo build --locked --manifest-path remote/Cargo.tomlandpython3 -B remote/tests/test_agents.py --binary <isolated-built-zshell-server>Result: 150 production checks passed: 52 Agent lifecycle and exact-resume checks, 39 native-fork checks, and 59 configuration-environment checks. Tests use disposable providers, real PTYs, production history, and daemon restarts.
Status: passed
Command:
python3 -B remote/tests/test_agent_environment.py --operation agentResume --binary <c152d0a-built-zshell-server>and the same command with--operation agentForkResult: Both negative controls reproduced the original OpenCode configuration-inheritance assertion against c152d0a. The same scenarios pass with this change.
Status: passed
Command:
make formatandgit diff --checkResult: Formatting produced no additional changes; the diff has no whitespace errors.
Status: passed
Command:
make run DERIVED_DATA=<temporary-build>;codesign --verify --deep --strict --verbose=2 <built-debug-app>;python3 -B remote/tests/test_agent_environment.py --binary <built-debug-app>/Contents/Resources/zshell-serverResult: Full macOS Debug build, app launch and signature verification passed. The actual bundled remote server also passed all 59 real-PTY environment checks. A separate coordinating-agent run against the isolated server build passed the same 59 checks. Providers are disposable fixtures.
Status: not run
Reason: CI completion is not awaited for this maintainer-authorized change.
Risk and Rollback
Related Issue
None
AI Attribution