ci(release): build release candidates with the release profile - #199
Merged
Conversation
The RC was built as a debug build to keep logging enabled, back when we were
stripping logging from production builds. That reasoning no longer holds:
- `logging` is in the crate's default feature set, so the production flags
`--release --no-default-features --features logging` resolved to exactly
the default feature set. Nothing was being stripped.
- Logging is gated at runtime by `--enable-logging` / ANT_ENABLE_LOGGING,
not by the build profile at all.
So the debug build bought nothing, while giving the RC a different optimisation
level and different runtime characteristics from the artifact it is a candidate
for. Soak-testing it produced weak evidence about what actually ships, which
matters more if the RC goes out on a beta channel on production (V2-843).
Drop the profile conditional and build every target with `--release`.
`is_prerelease` still gates the crates.io publish and the GitHub pre-release
flag; archive asset names are unchanged.
Also correct the `logging` feature comment, which documented a stripping
behaviour the release workflow did not implement.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dirvine
approved these changes
Aug 7, 2026
dirvine
left a comment
Member
There was a problem hiding this comment.
Reviewed exact head 817e826ee27bf77cf1ab559d4da24fb686c92c10.
The release workflow now consistently builds and archives the release profile for both release candidates and final releases. I verified that:
- the removed
profile_dir/build_flagsoutputs have no stale references; is_prereleaseretains its publishing and GitHub pre-release uses;loggingremains in the default feature set;- the workflow parses as valid YAML;
- the diff has no whitespace errors;
- all current CI checks pass across Linux, macOS and Windows, including the no-logging build and security audit.
No blocking issues found. Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear issue
V2-868 — https://linear.app/autonominetwork/issue/V2-868/stop-using-debug-builds-for-the-release-candidate
Risk tier
Compatibility
Semver impact
Test evidence
Per T0, repo CI plus local verification of the build the workflow now performs:
.github/workflows/release.ymlparses as valid YAML.cargo build --releasesucceeds (5m43s). Output isELF 64-bit LSB pie executable, stripped, 19M — a genuine release artifact.cargo fmt --all -- --checkclean.--enable-logging --log-level debug; it emitted INFO and DEBUG records normally. This is the crux of the issue — the debug build was never what enabled logging.profile_dir/build_flags/debugreferences remain in the release workflow.is_prereleaseretains both of its other uses: gating the crates.io publish job and setting the GitHub pre-release flag.ant-node-cli-<friendly_name>.tar.gz|zip) unchanged across all five matrix targets, so downstream consumers — testnet deployment, auto-upgrade, canaries — are unaffected.Why the original reasoning is obsolete
Two independent reasons:
default = ["logging"], so the production flag set--release --no-default-features --features loggingresolved to exactly the default feature set. Logging was never actually stripped from production builds.--enable-logging/ANT_ENABLE_LOGGING, not by the build profile. Whether an RC logs was never a build-time decision.Issue step 2 ("find a route that does not require a debug build") therefore needs no work — that route already exists and is the one operators use.
New dependency
none
ADR
n/a — Tier 0.
Mitigation / rollback
Single-commit revert of a CI workflow change; it affects nothing until the next release run. If an RC built this way proves problematic, revert and the following RC is a debug build again. Note the intended consequence: RC binaries are now stripped, so panic backtraces lose function names — exactly as production behaves today.