Update upstream to 5163763
CI / test (push) Canceled after 0s
CI / grok-linux-amd64 (push) Canceled after 0s
CI / grok-windows-amd64 (push) Canceled after 0s
CI / grok-macos-arm64 (push) Canceled after 0s
CI / release (push) Canceled after 0s

Forward-port the six local patches onto the two new monorepo syncs
(SOURCE_REV e6a67a54 -> 84ae1223). Resolved 0001 against the runtime
full_version() injection and 0005 against the Option-wrapped
UserPromptSubmit hook payload.
This commit is contained in:
iceBear67
2026-08-16 03:22:31 +00:00
parent c48b60d383
commit a968ad297c
6 changed files with 53 additions and 53 deletions
@@ -18,24 +18,24 @@ test asserts the line still ends with the channel label (or ")").
delete the patch file and run 'make apply'.
diff --git a/crates/codegen/xai-grok-pager-bin/src/main.rs b/crates/codegen/xai-grok-pager-bin/src/main.rs
index ac1adc4fc7800e507742d4ae4bb7067edf2959f5..19238e835bb37d8d9670c70b0402d43caf248827 100644
index 29beeff904c352b1c4f029c972312a83521f44db..0a618cf1b6331e5d9699ea4c44a99ae081fcc1bf 100644
--- a/crates/codegen/xai-grok-pager-bin/src/main.rs
+++ b/crates/codegen/xai-grok-pager-bin/src/main.rs
@@ -1788,7 +1788,8 @@ fn install_heap_profile_hooks() {
@@ -1787,7 +1787,8 @@ fn install_heap_profile_hooks() {
}
fn version_text(channel_label: &str) -> String {
format!(
- "grok {}\n",
+ "grok {} {}\n",
+ xai_grok_version::fork_tag(),
xai_grok_version::display_version_with_commit(env!("VERSION_WITH_COMMIT"), channel_label,)
)
}
xai_grok_version::display_version_with_commit(
xai_grok_version::full_version(),
channel_label,
diff --git a/crates/codegen/xai-grok-version/src/lib.rs b/crates/codegen/xai-grok-version/src/lib.rs
index 29fdfc1e64ea1df96f0ca3e1afe78c9ac37843bd..f56d96d34b828a0c10267fca407bc0b14e0c2a55 100644
index b7d224fc92d5e25ba5dae888fb60335c3c0933ad..200d31e3d27e71bae5537ad93e210cbfd86adc3e 100644
--- a/crates/codegen/xai-grok-version/src/lib.rs
+++ b/crates/codegen/xai-grok-version/src/lib.rs
@@ -9,6 +9,15 @@ pub const VERSION: &str = match option_env!("GROK_VERSION") {
@@ -11,6 +11,15 @@ pub const VERSION: &str = match option_env!("GROK_VERSION") {
None => env!("CARGO_PKG_VERSION"),
};
@@ -48,12 +48,12 @@ index 29fdfc1e64ea1df96f0ca3e1afe78c9ac37843bd..f56d96d34b828a0c10267fca407bc0b1
+ format!("[{FORK_NAME}]")
+}
+
/// [`TEST_VERSION_ENV`] override first, then [`VERSION`]. Trimmed so
/// non-semver-aware callers can pass the result straight into parsing.
pub fn installed() -> String {
@@ -72,4 +81,12 @@ mod tests {
assert_eq!(display_version(""), VERSION);
assert!(display_version(" [stable]").ends_with("[stable]"));
/// Runtime-injected `"<version> (<shortcommit>)"` string. Only the release
/// binary stamps the commit hash in its own build.rs and injects it here at
/// startup, so the big lib crates don't recompile on every commit.
@@ -100,4 +109,12 @@ mod tests {
set_full_version("second (bbbbbbb)");
assert_eq!(full_version(), "first (aaaaaaa)");
}
+
+ /// The fork marker must stay non-empty and bracketed -- the pager splices it