Repository navigation
test(missions): qualify presence loss through the RPC it actually controls - #1224
Merged
Merged
Conversation
…trols The opt-in native presence test waited for the mission_* tools to leave the native tool list after the backend's presence lease ended. That never happens: tools register once at plugin load, independently of presence, so scheduled passages keep them. The test has failed on every OpenCode version (2.2.0 to 2.2.3) since registration moved to plugin load; only the experiment it was written against registered tools inside presence. MISSIONS.md still said tools register through presence. The test now observes what presence controls: - the typed codenomad.missions RPC unregisters (only rpc.unavailable or rpc.method_not_found count as absent) and registers again exactly once when the lease returns; - the tools stay registered; - the ordinary route refuses with the tools' own message; - the real provider request carries no mission_* tool without presence, and carries mission_inspect with it. MISSIONS.md describes the actual registration and how to run the test. No product behavior changes. Validation: presence-native passes on isolated OpenCode 2.2.3, 2.2.2 and 2.2.0. It fails when presence retention always holds, when the context hook keeps the tools, and when tools register inside presence. Server typecheck, 155 opencode/missions tests including missions-plugin and missions-reload, build:missions and test-missions-native.mjs on 2.2.3 pass.
Contributor
Author
Gatekeeper reviewRound 1 (
Checks:
|
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.
Problem
The opt-in
presence-native.test.tswaits for themission_*tools to leave the native tool list after the backend's presence lease ends. That never happens: tools register once at plugin load, independently of presence (desktop-plugin.ts), so scheduled passages keep them (MISSIONS_RECURRING.md).The test fails identically on OpenCode 2.2.0, 2.2.1, 2.2.2 and 2.2.3, and on every dev commit since registration moved to plugin load; it is unrelated to #1209.
MISSIONS.mdstill said tools register through presence.Change (test and docs only)
codenomad.missionsRPC unregisters (onlyrpc.unavailable/rpc.method_not_foundcount as absent) and re-registers exactly once when the lease returns;mission_*tool without presence, and carriesmission_inspectwith it.MISSIONS.md: the actual registration, and how to run the opt-in test.User impact
None. Without presence, the context hook strips every
mission_*tool from model requests and the executors refuse; the new test proves this natively.Validation
presence-nativepasses on isolated OpenCode 2.2.3, 2.2.2 and 2.2.0.opencode/missionstests incl. missions-plugin/missions-reload;build:missions;test-missions-native.mjson 2.2.3.