test(grok): Grok Build compatibility golden fixtures#9345
Open
bbingz wants to merge 1 commit into
Open
Conversation
Centralize billing, Stop-hook envelope, chat_history sample lines, and encode_cwd_dirname oracle vectors under src/shared/fixtures/grok/ so Orca’s Grok integration can lock contracts without inventing payloads per test. Fixture-driven coverage for weekly credits (incl. proto3 zero omission), monthly unified fallback, and native-chat transcript decoding.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds Grok golden fixtures for billing, chat history, stop hooks, and CWD encoding, along with ESM-compatible fixture loading helpers. Adds Vitest coverage using mocked network, filesystem, and home-directory inputs to validate rate-limit mapping, transcript decoding, hook envelope preservation, and encoding outputs. Documents the fixture files and their associated contract behaviors. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
AmethystLiang
self-requested a review
July 18, 2026 16:46
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.
Summary
Add a shared fixture pack under
src/shared/fixtures/grok/so Orca’s Grok integration can lock open-source / wire contracts without reinventing payloads:chat_history.jsonlsample rows (user_query, bootstrap skip, tool_calls)encode_cwd_dirnameoracle vectors fromxai-org/grok-build(ready for fix(grok): O(1) session path via encode_cwd_dirname parity #9267’s encoder)Fixture-driven Vitest covers rate-limit mapping and native-chat decoding.
Testing
vitestsrc/shared/fixtures/grok/grok-fixtures.test.ts(6 passed)Notes
Independent of #9265/#9267/#8391. Encode goldens are documented until the encoder lands on main.