chore(native): decouple collector version from managed + versioning docs/rules#1228
Conversation
…bers + when to bump One short map of HSM's independent versions (agent / native collector library / collector product / API DTO / server), where each lives, and the rule for bumping each. Notably: the collector LIBRARY version (HSM_COLLECTOR_VERSION, C++ ABI/build, PATCH for behavior fixes) is distinct from the collector PRODUCT version (.module/Collector version, 3.4.x, shared with the managed collector). Points at the authoritative AGENTS.md rules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR #1228 Review —
|
| Doc claim | Verified in source |
|---|---|
Agent version → project(HsmAgent VERSION …) / HSM_AGENT_VERSION |
src/agent/CMakeLists.txt:21,120 (0.5.26) ✅ |
Collector library semver → HSM_COLLECTOR_VERSION_{MAJOR,MINOR,PATCH} |
src/native/collector/include/hsm_collector/hsm_collector.h:16-20 (0.6.0) ✅ |
Mirror in CMakeLists.txt project VERSION |
src/native/collector/CMakeLists.txt:7 (VERSION 0.6.0) ✅ |
Feeds find_package(hsm_collector x.y) + hsm_collector_version() |
CMakeLists.txt:6-7, header :239 (int32_t hsm_collector_version(void)) ✅ |
Product version native HSM_COLLECTOR_PRODUCT_VERSION |
hsm_collector.h:27 ("3.4.12") ✅ |
Product version managed .csproj <Version> |
src/collector/HSMDataCollector/HSMDataCollector.csproj:9 (3.4.12) — matches native in lockstep ✅ |
.module/Collector version sensor |
src/native/collector/src/hsm_collector.cpp:1378,7036 ✅ |
Shared API DTO .csproj |
src/api/HSMSensorDataObjects/HSMSensorDataObjects.csproj:6 (3.1.12) ✅ |
Server .csproj |
src/server/HSMServer/HSMServer.csproj:8 (3.40.33) ✅ |
| Self-update = "strictly greater" delivery key | src/agent/AGENTS.md:19-20 (semver major→minor→patch compare in src/update_checker.cpp) ✅ |
| Bump-rule pointers (agent / native AGENTS.md, root AGENTS.md "Versioning") | src/agent/AGENTS.md, src/native/collector/AGENTS.md, root AGENTS.md:107 all exist ✅ |
The "don't conflate the two collector numbers" section (library 0.x ABI vs. product 3.4.x release identity) is correct and is a genuinely useful clarification — these two numbers are easy to mix up.
Minor observations (non-blocking)
-
Not discoverable from the index.
aicontext/README.md's "Directory Structure" table listsfeatures/collector|server|storage|site|api|integrationsbut has no entry forfeatures/core/, and this new doc isn't linked from the README or any parent index. A reader following the documented "Start Here" path won't find it. Consider adding afeatures/core/row (or a "Versioning" pointer) toaicontext/README.md. Note this is a pre-existing gap —features/core/andfeatures/agent/already sit outside the README table — but this PR is a natural moment to close it. -
"conformance compares them byte-identically" is slightly stronger than the evidence. The byte-identical native/managed product-version rule is a maintenance instruction in
src/native/collector/AGENTS.md:28("Keep it byte-identical to the managed collector"). The conformance harness (hsm_collector_tests.cpp) runs a shared.hsmtestcorpus against both ports for behavior parity; I didn't find a check that asserts the two version strings are literally byte-equal. If such an assertion exists, a file/line pointer would strengthen the claim; otherwise consider softening to "kept in lockstep by convention" to avoid implying an automated guard that isn't there. -
Template sections omitted (fine). The doc uses only the header + a couple of sections from
features/_TEMPLATE_feature.md(no Invariants / Workflows / Tests). That's appropriate for a cross-cutting map doc rather than a component feature, so no change needed — just noting it's intentional divergence.
Verdict
Accurate, well-scoped, and useful — it consolidates version facts that are otherwise scattered across five build files and three AGENTS.md files, and every fact I checked is correct. The only actionable item is wiring it into the aicontext/README.md index (obs. 1) so it's actually discoverable; the byte-identical phrasing (obs. 2) is a nice-to-tighten. Approve.
…+ versioning docs Per the agreed model (one independent version per product), the native C++ collector now reports its OWN version as .module/Collector version instead of a pinned copy of the managed collector's number. Remove HSM_COLLECTOR_PRODUCT_VERSION; add HSM_COLLECTOR_VERSION_STRING (MAJOR.MINOR.PATCH from the existing macros); report it. Bump the collector 0.6.0 -> 0.6.1 (PATCH, the log-quality fix #1225 owed) and add the PATCH rule to src/native/collector/AGENTS.md. Rewrite aicontext/features/core/versioning/feature.md to the 4-independent-versions model (C++ collector / C# collector / server / agent). Conformance-safe: the corpus golden captures only the collector_version REGISTRATION (value wildcarded), so C#(3.4.x) vs native(0.x) divergence does not affect PR CI. NOTE: the nightly diff-fuzzer does a direct C#-vs-native byte-compare — if it emits the collector-version sensor value it will need that value excluded (build-specific, not portable); watch the nightly lane. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR #1228 Review —
|
…ctor chore(agent): bump 0.5.26 → 0.5.27 for the decoupled collector (#1228)
What
Per the agreed model — one independent version per product (C++ collector / C# collector / server / agent) — decouple the native collector's reported version from the managed collector.
HSM_COLLECTOR_PRODUCT_VERSION(the pinned copy of the managed3.4.12). The native collector now reports its own version as the.module/Collector versionsensor, via a newHSM_COLLECTOR_VERSION_STRING(MAJOR.MINOR.PATCH, built from the existing version macros). Bump the collector0.6.0 → 0.6.1(PATCH — the log-quality fix fix(collector): log quality — relabel runtime registrations, HTTP code, quiet stop-drop #1225 owed one) and syncCMakeLists.txt.src/native/collector/AGENTS.md— one standalone collector version; add the PATCH clause (a behavior/logic change with no ABI change); drop the "pinned to managed" section.aicontext/features/core/versioning/feature.md— the four independent versions and when to bump each.Effect
.module/Collector versionfrom a native collector now shows its own version (0.x) instead of the managed3.4.12. C# collectors still report their own3.4.x. The two are separate products and may diverge.Conformance
Safe for PR CI: the corpus golden captures only the
collector_versionregistration (path/description are_wildcards); the version value is not compared, and3.4.12appears nowhere in the corpus.Nightly watch: the diff-fuzzer does a direct C#-vs-native byte-compare. If it emits the collector-version sensor value, that value now legitimately differs (3.4.x vs 0.x) and should be excluded from the comparison (build-specific, not portable behavior). It is not a PR-CI lane.
🤖 Generated with Claude Code