fix: fence symbolic task state after protocol corruption #351

Open
nsaspy wants to merge 3 commits from rage/coding-task-state-protocol-fence into main
Owner

Implements #260 and advances #1.

RED

2f7d9ba5962a23ac8270768283afe984709aa09d tightens the unknown-status regression: a protocol-integrity failure must terminate the owned process, and the next operation must hit the existing crash fence rather than reuse or replace that stream.

Implementation

af141e408ac26cc20e1283d17412a24585f1b396 centralizes protocol failure handling. Broken/closed pipes, response timeout, oversized response, malformed JSON/shape and unknown statuses now terminate the owned process before raising. Because ownership remains non-null and dead, subsequent operations fail closed until explicit stop() resets the session.

This also prevents an oversized partial line from leaving tail bytes that a later command could mis-associate as its response. No Core changes or cross-plugin composition.

Implements #260 and advances #1. ## RED `2f7d9ba5962a23ac8270768283afe984709aa09d` tightens the unknown-status regression: a protocol-integrity failure must terminate the owned process, and the next operation must hit the existing crash fence rather than reuse or replace that stream. ## Implementation `af141e408ac26cc20e1283d17412a24585f1b396` centralizes protocol failure handling. Broken/closed pipes, response timeout, oversized response, malformed JSON/shape and unknown statuses now terminate the owned process before raising. Because ownership remains non-null and dead, subsequent operations fail closed until explicit `stop()` resets the session. This also prevents an oversized partial line from leaving tail bytes that a later command could mis-associate as its response. No Core changes or cross-plugin composition.
Some checks failed
CI / test (pull_request) Failing after 18s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin rage/coding-task-state-protocol-fence:rage/coding-task-state-protocol-fence
git switch rage/coding-task-state-protocol-fence

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff rage/coding-task-state-protocol-fence
git switch rage/coding-task-state-protocol-fence
git rebase main
git switch main
git merge --ff-only rage/coding-task-state-protocol-fence
git switch rage/coding-task-state-protocol-fence
git rebase main
git switch main
git merge --no-ff rage/coding-task-state-protocol-fence
git switch main
git merge --squash rage/coding-task-state-protocol-fence
git switch main
git merge --ff-only rage/coding-task-state-protocol-fence
git switch main
git merge rage/coding-task-state-protocol-fence
git push origin main
Sign in to join this conversation.
No description provided.