Upstream sync checklist
This fork merges xai-org/grok-build into its own main branch so the upstream history remains visible while the fork-specific ZDR and provider changes stay reviewable. Treat every upstream sync as a policy review, including clean merges: a new or relocated network call may bypass an existing guard without creating a Git conflict.
Merge and review
Fetch both remotes and branch from the fork's current
main.Merge
upstream/mainwith a merge commit. Resolve conflicts by retaining upstream structure and reapplying the fork's policy at the new call site.Compare the result with
upstream/mainto inventory the complete fork-only delta:bashgit diff --stat upstream/main..HEAD git diff --name-status upstream/main..HEADReview upstream changes to every outbound HTTP, telemetry, persistence, update, feedback, sharing, media, and auxiliary-inference path even when Git merged the file automatically.
Confirm
SOURCE_REVmatches the revision supplied by the merged upstream tree, and record the upstream Git commit in the pull request.
ZDR invariants
The synchronized tree must continue to satisfy these rules when enforcement is active:
GROK_ENFORCE_ZDR=1or[features] enforce_zdr = trueactivates the process-wide guard; the resolved default remains enabled.- Remote session sync, repository uploads, sharing, feedback, announcements, update checks, product catalog and bundle refreshes, product telemetry, trace upload, and external OpenTelemetry do not send data.
- Voice and incompatible media paths remain disabled unless they have an explicitly approved ZDR-safe output path.
- User-configured inference endpoints receive the functional authorization and provider headers they require, but never xAI client-identity headers.
- The Responses API continues to send
store: false. - Auxiliary model roles remain explicit and reviewable so a session cannot silently route content through an unapproved provider.
Application enforcement only controls grok-build's behavior. The configured provider's retention, training, abuse-monitoring, and legal terms remain a separate production requirement; do not describe the merged build itself as a provider-level ZDR guarantee.
Required checks
Run formatting, the affected Rust tests, the composition-root check, and the documentation build:
cargo fmt --all -- --check
cargo test -p xai-grok-env
cargo test -p xai-grok-sampler
cargo test -p xai-grok-shell
cargo test -p xai-grok-tools
cargo check -p xai-grok-pager-bin
npm --prefix docs ci
npm --prefix docs run docs:buildIf a full package test is impractical, document the narrower command and the reason in the pull request. Do not treat a successful compile as a substitute for the policy-focused tests.