From 502dd0230fe224730b534be0861d20792cfb8642 Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Fri, 21 Aug 2026 06:21:21 +0000 Subject: [PATCH] feat(dirty-content-fingerprint): apiserver/xcecli meson pass fingerprint to go_build Both apiserver/meson.build and xcecli/meson.build add XCE_DIRTY_FINGERPRINT=get_option('dirty_fingerprint'), unquoted, identically positioned to the existing XCE_GIT_COMMIT/XCE_BUILD_TIME entries. Verified independently by review with a distinct test value: fresh configure + real ninja builds of both binaries confirm the value reaches go build's actual invocation (visible in go version -m's recorded -ldflags build setting), matches the C-side -DVERSION_DIRTY_FINGERPRINT= from the same configure, and degrades to empty identically to the two pre-existing vars when omitted. Co-Authored-By: Claude Sonnet 5 --- .kiro/specs/dirty-content-fingerprint/tasks.md | 6 +++--- src/frontend/apiserver/meson.build | 1 + src/frontend/xcecli/meson.build | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.kiro/specs/dirty-content-fingerprint/tasks.md b/.kiro/specs/dirty-content-fingerprint/tasks.md index 93dc1f8a..d3141d2f 100644 --- a/.kiro/specs/dirty-content-fingerprint/tasks.md +++ b/.kiro/specs/dirty-content-fingerprint/tasks.md @@ -47,9 +47,9 @@ - _Requirements: 1.1, 5.1_ - _Boundary: go_build script_ -- [ ] 4.2 (P) apiserver and xcecli meson builds pass the resolved value through - - Both `apiserver/meson.build` and `xcecli/meson.build` pass `XCE_DIRTY_FINGERPRINT` (from `get_option('dirty_fingerprint')`) into `go_build`'s env, matching the existing `XCE_GIT_COMMIT`/`XCE_BUILD_TIME` pattern exactly (same quoting behavior) - - Observable: a real commit-state fingerprint reaches `go build`'s actual invocation and is embedded in both binaries' Go build-info metadata (`go version -m`), once tasks 4.4/4.5 declare the consuming var +- [x] 4.2 (P) apiserver and xcecli meson builds pass the resolved value through + - Both `apiserver/meson.build` and `xcecli/meson.build` add `'XCE_DIRTY_FINGERPRINT=' + get_option('dirty_fingerprint')`, unquoted, identically positioned to the existing `XCE_GIT_COMMIT`/`XCE_BUILD_TIME` entries + - Observable confirmed live (independently re-verified by review with a distinct test value, fresh configure, and real `ninja` builds of both binaries): the value reaches `go build`'s real invocation and shows up in `go version -m`'s recorded `-ldflags` build setting for both apiserver and xcecli; matches the C-side `-DVERSION_DIRTY_FINGERPRINT=` byte-for-byte from the same configure; degrades to empty identically to the two pre-existing vars when omitted - _Requirements: 1.1, 4.1_ - _Boundary: apiserver/meson.build, xcecli/meson.build_ - _Depends: 4.1_ diff --git a/src/frontend/apiserver/meson.build b/src/frontend/apiserver/meson.build index 34398cb1..c8ecde81 100644 --- a/src/frontend/apiserver/meson.build +++ b/src/frontend/apiserver/meson.build @@ -58,6 +58,7 @@ custom_target('apiserver', 'BUILD_ROOT="@BUILD_ROOT@"', 'XCE_GIT_COMMIT=' + get_option('commit_id'), 'XCE_BUILD_TIME=' + get_option('build_time'), + 'XCE_DIRTY_FINGERPRINT=' + get_option('dirty_fingerprint'), go_build_program, '@INPUT@', '@OUTPUT@'], env: go_env, diff --git a/src/frontend/xcecli/meson.build b/src/frontend/xcecli/meson.build index e6226298..8abb9e04 100644 --- a/src/frontend/xcecli/meson.build +++ b/src/frontend/xcecli/meson.build @@ -14,6 +14,7 @@ custom_target('xcecli', 'BUILD_ROOT="@BUILD_ROOT@"', 'XCE_GIT_COMMIT=' + get_option('commit_id'), 'XCE_BUILD_TIME=' + get_option('build_time'), + 'XCE_DIRTY_FINGERPRINT=' + get_option('dirty_fingerprint'), go_build_program, '@INPUT@', '@OUTPUT@'], env: go_env,