Repository navigation
test(cli): cover JSON-clean task metadata without a selected variant - #13688
Merged
johnnyeric merged 3 commits intoSep 3, 2026
Merged
Conversation
The subagent task metadata previously always included the model variant key even when undefined, which failed JSON-valued schema validation and produced a repeated "Expected JSON value, got undefined" rejection after spawning explore subagents (issue Kilo-Org#13620). The construction-side fix already landed on main in dd390c1; this adds the regression test locking in that the metadata omits the variant key and stays JSON-serializable.
Check the decoded output as well as the source object so the assertion remains meaningful even if Record decoding changes semantics.
maphew
marked this pull request as ready for review
September 2, 2026 04:59
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by grok-4.6 · Input: 139.9K · Output: 8.8K · Cached: 417.4K Review guidance: REVIEW.md from base branch |
…i-subagent-metadata-variant Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Contributor
Author
|
Merge-readiness sweep complete: branch synced with current main (ffc0655, 0 behind), no merge conflicts, CI green on the latest head, Codex + Kilo reviews report no issues. Ready for human review. |
johnnyeric
approved these changes
Sep 3, 2026
Contributor
|
Thanks for adding the test! merged. |
This was referenced Sep 6, 2026
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
Add a regression test for #13620 to
packages/opencode/test/kilocode/tool-task-model.test.ts.The subagent task metadata previously always contained a
variantkey even when no variant was selected, leaving anundefinedvalue in the in-memory metadata object. JSON-valued schema validation rejectsundefined, so spawningexploresubagents without a variant produced a repeatedExpected JSON value, got undefined at [0]["metadata"]["variant"]rejection.Why
The construction-side fix already landed on main in commit dd390c1 (PR #13641), but it has no test coverage, and issue #13620 remains open and unlinked. This test locks in the behavior:
variantkey when undefinedSchema.Record(Schema.String, Schema.Json)Reverting the guard in
task.tsmakes this test fail, confirming it covers the regression.Scope
Test-only change; no production code modified.