[codex] Fix OpenCode integration tests#1285
Merged
Merged
Conversation
63d4a19 to
68040f2
Compare
Owner
|
lgtm |
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.
What problem are you trying to solve?
The baseline OpenCode integration suite failed on
devwhile validating the #1232 bootstrap-caching PR. The failures were not caused by #1232:tests/opencode/test-tools.shstill prompted for old custom OpenCode tools (find_skills/use_skill) that the current plugin no longer exposes. Current OpenCode uses the nativeskilltool.tests/opencode/test-priority.shhard-failed on a confirmed OpenCode duplicate-name behavior: bundled Superpowers skills can currently shadow project/personal skills with the same native skill name.The priority behavior is real, but the first attempted plugin fix was too magical for this PR. That fix has been split out to PRI-1370. This PR keeps the integration suite aligned with current OpenCode behavior and keeps the unresolved priority issue visible without landing the odd plugin workaround.
What does this PR change?
This PR rewrites the OpenCode integration tests to exercise OpenCode's native
skilltool with JSON-event assertions instead of oldfind_skills/use_skillprompts. It also changes the priority test into documentation mode for the current duplicate-name behavior, verifies non-colliding bundled Superpowers skills still load, and raises the real-OpenCode command timeout from 60s to 120s to avoid normal model/tool latency flakes.Is this change appropriate for the core library?
Yes. This is test coverage for the OpenCode plugin support shipped by Superpowers core. It does not add a new third-party integration surface; it keeps the existing OpenCode harness tests accurate for the current plugin and OpenCode CLI behavior.
What alternatives did you consider?
I first tried fixing the local-skill-shadowing behavior in
.opencode/plugins/superpowers.jsby building a filtered symlink directory of bundled skills during plugin config registration. That passed tests, but it was too surprising and filesystem-heavy for a maintenance PR. Drew asked to split it out, so the behavior fix now lives in PRI-1370 for separate design.I also considered restoring custom
find_skills/use_skilltools, but the current plugin intentionally maps skill usage to OpenCode's nativeskilltool, so reintroducing custom tools would add unnecessary surface area and diverge from current OpenCode behavior.Does this PR contain multiple unrelated changes?
No. Both test files are part of the same OpenCode integration-test maintenance pass: update stale native-tool assumptions, document the split-out priority behavior, and make the real CLI sessions less timing-sensitive.
Existing PRs
This came from the OpenCode PR triage pass. #1232 fixed bootstrap caching and is already merged into
dev; #1210 and #1216 were duplicate caching fixes; #1247 is a broader OpenCode refactor that should remain separate; #981 is related to OpenCode skill naming/docs but does not fix this integration-test cleanup. The split-out behavior follow-up is PRI-1370.Environment tested
Evaluation
test-tools.shandtest-priority.sh. During debugging, focused reruns were also used for the two failing tests.bash tests/opencode/run-tests.sh --integrationfailed intest-tools.shandtest-priority.shon plaindev.bash tests/opencode/run-tests.sh --integrationpassed with 4 passed, 0 failed, 0 skipped.test-tools.shasked for obsolete custom tools.test-tools.shverifies OpenCode's nativeskilltool loads personal, project, and bundled Superpowers skills.test-priority.shfailed on the unresolved duplicate-name shadowing behavior.test-priority.shdocuments that current behavior and points at the split-out follow-up, while still verifying non-colliding bundled skills load.Rigor
superpowers:writing-skillsand adversarial skill-content pressure testing are not applicableAdditional verification run:
All commands passed.
Human review
This is still a draft PR and is pending Drew's review of the complete diff.