fix(opencode): cancel parent before foreground task jobs - #12
Open
benjaminshafii wants to merge 1 commit into
Open
benjaminshafii wants to merge 1 commit into
benjaminshafii wants to merge 1 commit into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: |
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.
Issue for this PR
Related: different-ai/openwork#4679 (native Stop correctness).
Type of change
What does this PR do?
Adds a release patch for upstream v1.18.18. SessionRunState.cancel currently settles child jobs before interrupting the parent runner. That wakes a foreground task and lets the parent issue another provider request inside the abort call. Interrupt the parent first, then sweep jobs; retain recursive and no-runner cleanup.
The included regression uses real runner/background services and a readiness barrier. It checks interruption order, no continuation, descendant cleanup, and preservation of an unrelated job. Existing no-runner tests remain enabled.
How did you verify your code works?
OPENCODE_VERSION=1.18.18-openwork.parent-first.84d1dc1 bun run script/build.ts --single --skip-install --skip-embed-web-ui.84d1dc17ade9373f748068673b0491adf278b8fc; binary SHA256:edb4b729a45ba135b1247a62bd3ce56e19ad01bedeab6564f999eb89ad84d8e6.df56e8b2d1e91f03d1b9919422841453d95ab315.a0b265a33832ce645a4cb9a9ad624a6054d45da4: headless native PERM-03 and PERM-04 passed on candidate v1 binary, with its version asserted through native health; both v2 regressions passed. PERM-04 reports zero extra provider requests; native cancellation, unrelated requests, and exactly-once follow-up assertions retained. PERM-03 includes failed-rejection visibility and retry.Release is gated on required reviews/checks. This PR does not dispatch a release or change the OpenWork pin. After approval, orchestrator can build upstream_ref=v1.18.18 with an unused version such as 1.18.18-openwork.0 and verify published assets before integration.
Screenshots / recordings
Not a UI change; verification uses native API and provider-request witnesses.
Checklist