fix: rebuild tool catalog after wide-native rlm showcase - #655
Closed
justrach wants to merge 2 commits into
Closed
Conversation
ADR 0030 showcased rlm after a 4-wide read/bash batch and only invalidated the cached catalog. The next xAI Responses body was `"tools":,` (empty toolsJson printed after the field), so scatter-sum and multi-read 400'd mid-turn. Rebuild on showcase, ensure before every request, and write [] for an empty catalog so that shape cannot reach the wire.
justrach
marked this pull request as ready for review
August 28, 2026 02:05
Invalidate-only after a 4-wide native batch shipped `"tools":,` and xAI 400'd the rlm rematch. Comments at the call sites plus ADR 0030 name the failure so this does not get "simplified" back.
Owner
Author
|
Already on main via 281 (catalog rebuild after wide-native rlm showcase). Closing as superseded. |
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.
ADR 0030 showcased
rlmafter a 4-wide nativeread_file/codedb/bash/webfetchbatch and only invalidated the cached catalog. The next xAI Responses request readtoolsJson() == ""andwriteOpenAIToolsprinted the empty slice after the field name, so the body was"tools":,. xAI 400'd:Failed to parse the request body as JSON: tools: expected value.That is why the grok-build rematch on latest 280 went 3/5 on the rlm suite (
scatter-sum,multi-read). Both tasks did four parallel reads, showcased rlm, then died on the follow-up call. SWE stayed 5/6 because those tasks never hit a 4-wide native batch.Fix
noticeWideNativeAndRefreshinvalidates and rebuilds (same as#492load-native).runTurncallsensureRootToolsbefore everytoolsJson()read, so any mid-turn invalidate cannot ship an empty catalog.writeOpenAITools("")writes[]instead of a missing JSON value.Comments for later agents (follow-up commit): call sites + ADR 0030 now name the 2026-08-28 rematch 400 and say not to revert this to invalidate-only. SWE hid the bug; the rlm suite is what catches it.
Tests
[].Live rematch SuperGrok OAuth, grok-4.6, grok-build 1.0.5,
graff-dev:SWE (cookie-store retry after one SIGABRT): 5/6 vs 5/6, graff 259s / 9.4M / 158k vs grok 330s / 156M / 120k. Both miss
label-sort.RLM: 5/5 vs 5/5, graff 46s / 8.6M / 70k vs grok 120s / 160M / 54k.
Core (new): shared 11 tasks 11/11 vs 11/11, graff 89s / 9.1M / 144k vs grok 141s / 156M / 111k.
schema-outputis graff-only (grok has no--output-schema); graff missed it this rep (stdout was pulse chrome, not JSON).Cherry-pick onto 280: #656.
Tier 1: fmt/lines/reach/build/tests/sdk green.
test-tui-hover.pyflaked in the parallel pool, then passed solo.