Repository navigation
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: |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #34853
V2 issue linking: This PR targets
v2per its contribution guide. GitHub closing links only apply to the default branch (dev), so the standards workflow flags this existing reference. A maintainer needs to link #34853 manually in Development.Type of change
What does this PR do?
When a live listener delays a form or permission settlement event, another reply can still see the request as pending. Both replies then publish conflicting events and return success.
Claim each request before publishing and release the claim after settlement or publication failure. Form replies and cancellation share the same guard; permissions use it for direct replies, reject/always cascades, and shutdown. Pending state remains available if publication fails, so the caller can retry. Cascade snapshots also recheck ownership after asynchronous permission evaluation.
This covers the current V2 Form and Permission services. The older #44340 targeted the previous QuestionV2/PermissionV2 implementation and was closed unmerged by automated cleanup.
How did you verify your code works?
Refreshed against
v2(a67cf4c3fd) while retaining the upstream permission tests. On macOS, Form/Permission regressions passed all 131 tests, Core typecheck passed, and canonical rootbun run checkpassed (36/36 tasks). Blocked-listener cases cover settlement races, failed publication recovery, cascades, and shutdown.The same affected tests also passed on Linux arm64 (131 pass); owner package typechecks passed, with build-mode checks forced to avoid stale artifacts.
Screenshots / recordings
N/A — core concurrency behavior.
Checklist