Fix opencode control-session reuse for monitor layout restarts#421
Open
Fix opencode control-session reuse for monitor layout restarts#421
Conversation
6cdf8cd to
99d865e
Compare
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
findBestOpenCodeControlSession(clean + symlink resolution fallback) to handle trailing slash/symlink differencesorch-control)Acceptance Criteria Evidence
1)
orch-monitor --newpreserves control session history when server still runningVerified via daemon reuse and recovery tests:
All pass and show stored session is reused/recovered (no new session creation in those paths).
2) Session reuse works with trailing slash/symlink path differences
Verified via normalized path tests:
Both pass.
3)
--new-control-agentstill creates a fresh session--new-control-agentclears.orch/control-session.json; daemon behavior when no stored session now verified by:Passes and confirms immediate fresh session creation.
4) Daemon logs include reuse-failure reasons
Verified via:
Passes and asserts log output includes explicit failure reasons for reuse and recovery listing failures.
5) Add test for path normalization in
findBestOpenCodeControlSessionAdded and verified:
Passes.
Validation Run
go test ./internal/daemon -run "Test(GetOrCreateOpenCodeControlSession|FindBestOpenCodeControlSession)"✅go build ./...✅make lint✅go test ./...❌ (pre-existing unrelated failure ininternal/cli):TestApplyConfigDefaultsFallbacksfails withinvalid config schema ... config.yaml: EOFRefs: orch-440