Skip to content

fix: address remote command feedback and persistence failures - #78

Merged
anikitenko merged 2 commits into
mainfrom
fix/ssh-connection-improvements
Oct 18, 2026
Merged

anikitenko merged 2 commits into
mainfrom
fix/ssh-connection-improvements

Conversation

@anikitenko

Copy link
Copy Markdown
Owner
  • Add host adapters for SSH status, live output, and cancellation
  • Validate combined output limits and sanitize service errors
  • Reject JSON flush failures and support recovery
  • Document FDO wiring, timeout semantics, and save acknowledgements

- Add host adapters for SSH status, live output, and cancellation
- Validate combined output limits and sanitize service errors
- Reject JSON flush failures and support recovery
- Document FDO wiring, timeout semantics, and save acknowledgements
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Metric Percent
Lines 93.63%
Statements 92.05%
Functions 96.09%
Branches 85.27%

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8203de1f86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/hostServices.ts Outdated
return execResult(value, payload.maxOutputBytes);
}, error => { throw safeError(error); });
void result.catch(() => {});
const iterator = iteratorFor(host.events);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Cancel the started command when event validation fails

If startSSHExecution() successfully starts a remote command but returns a malformed events value, iteratorFor(host.events) throws before the cleanup callback is registered. The caller receives no execution handle, while host.cancel() is never invoked, so the remote command can continue running without any way for the plugin to stop it. Establish best-effort cancellation before validating the event source, or catch validation failures and cancel the newly started execution.

Useful? React with 👍 / 👎.

Comment thread src/utils/hostServices.ts Outdated
const result = Promise.resolve(host.result).then(value => {
assertCurrent(transport, "ssh.exec");
return execResult(value, payload.maxOutputBytes);
}, error => { throw safeError(error); });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Invalidate rejected results after transport replacement

When host services are cleared or replaced while an execution is pending, cleanup can cause the old host's result promise to reject, commonly with CANCELLED. Unlike the fulfillment branch, this rejection branch never calls assertCurrent, so the stale old-transport error is exposed as a valid terminal result instead of UNAVAILABLE. Check that the transport is still current before mapping the provider rejection.

Useful? React with 👍 / 👎.

Comment thread src/utils/hostServices.ts Outdated
} finally { closeIterator(iterator); }
},
};
void result.finally(() => { activeResources.delete(cleanup); }).catch(() => {});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain teardown cleanup until the output stream closes

A result is explicitly allowed to settle before its bounded output events are drained, but settling it immediately removes this execution from activeResources. If host services are then cleared or replaced before the consumer finishes—or when there is no consumer—the teardown no longer calls iterator.return(), leaving the old output subscription and its buffered host resources alive. Keep the resource registered until the event iterator has also completed or been closed.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T10:45:35.518003Z 8203de1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@anikitenko
anikitenko merged commit 3a6b641 into main Oct 18, 2026
3 checks passed
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.

1 participant