Problem
The generated Configuration::default() user-agent in src/apis/configuration.rs is baked in by the regen workflow, which passes the crate version read at regen time (--http-user-agent "hotdata-rust/${PACKAGE_VERSION}" / packageVersion= in .github/workflows/regenerate.yml).
This is the wrong place to set it: at regen time we don't know what version will ship. A regen is just a set of changes; the release tooling later decides which version rolls them out (and the bump kind). So the generated default UA always reflects the version committed at the last regen, not the version actually published — it lags, and we've had to hand-correct it during release (e.g. it read hotdata-rust/0.3.2 while cutting 0.4.0).
Note this only affects the raw Configuration::default() path. The ergonomic ClientBuilder already computes hotdata-rust/{CARGO_PKG_VERSION} at compile time, so hotdata::Client users are unaffected.
Proposed fix
Move the generated default user-agent version update into the publish step (scripts/release.sh), not regen:
- Regen should stop pinning a concrete version into the generated UA (or pin a neutral placeholder).
release.sh prepare (which already bumps Cargo.toml to the known release version) should also rewrite the user_agent line in src/apis/configuration.rs to match, so it ships correct.
The release step is the only point where the version is actually known.
Problem
The generated
Configuration::default()user-agent insrc/apis/configuration.rsis baked in by the regen workflow, which passes the crate version read at regen time (--http-user-agent "hotdata-rust/${PACKAGE_VERSION}"/packageVersion=in.github/workflows/regenerate.yml).This is the wrong place to set it: at regen time we don't know what version will ship. A regen is just a set of changes; the release tooling later decides which version rolls them out (and the bump kind). So the generated default UA always reflects the version committed at the last regen, not the version actually published — it lags, and we've had to hand-correct it during release (e.g. it read
hotdata-rust/0.3.2while cutting0.4.0).Note this only affects the raw
Configuration::default()path. The ergonomicClientBuilderalready computeshotdata-rust/{CARGO_PKG_VERSION}at compile time, sohotdata::Clientusers are unaffected.Proposed fix
Move the generated default user-agent version update into the publish step (
scripts/release.sh), not regen:release.sh prepare(which already bumpsCargo.tomlto the known release version) should also rewrite theuser_agentline insrc/apis/configuration.rsto match, so it ships correct.The release step is the only point where the version is actually known.