[bug] CI tag-build fails: cargo features 'hero_osis-business/projects/identity' don't exist in any crate #14
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_biz#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovered during Phase 2 CI audit
While validating the new release-asset publishing path (cluster A fix from hero_demo#54, #13), the build step fails on tag pushes with a feature-drift error:
Root cause
buildenv.sh::ALL_FEATURESlists three crate-level features that no longer exist in any ofhero_biz/hero_biz_sdk/hero_biz_ui/hero_biz_app:These features have been renamed or removed in the workspace's Cargo.toml files.
cargo build --featuresrejects unknown features, andbuild_lib.sh::build_binariespropagates the failure.Why it wasn't caught earlier
build.yaml(development push CI) presumably either doesn't pass these features or they used to exist when last green.build-linux.yaml(tag-triggered) hadn't been triggered since the feature renames; pkg registry'shero_biz 0.1.2was published when features still resolved.Reproduction
Or push any new
v*tag — thebuild-linux.yamlbuild step fails in <1s.Recommended fix
Either:
buildenv.sh::ALL_FEATURESto the current feature names (one of: drop the prefix, use whatever the crates actually declare today, or setALL_FEATURES="default"if the features are now always-on).grep -rn '\[features\]' crates/*/Cargo.tomllists what's actually defined; that's the source of truth.Blocks
Effort
Quick win — 30 min. Diagnose actual feature names, fix
buildenv.sh, retag.--from-ciinstall path blind to this repo #16Implementation Spec for Issue #14
Objective
The
ALL_FEATURESvariable inbuildenv.shreferences three Cargo feature names (hero_osis-business,hero_osis-projects,hero_osis-identity) that do not exist in any crate in the workspace. This causescargo build --features ...to fail with an unknown-feature error in every CI job that sourcesbuild_lib.sh. The fix is to setALL_FEATURES=""and guard the--featuresflag so it is omitted when empty.Root Cause
No crate in the workspace defines those features. The workspace crates (
hero_biz,hero_biz_sdk,hero_biz_ui) have no[features]tables at all. Thehero_osis_sdkfeatures are already activated as direct dependency features inside each crate'sCargo.toml, not via workspace-level--features. Additionally,build_lib.shhard-fails at load time whenALL_FEATURESis empty, so simply clearing the variable is not enough — the guard must be relaxed too.Files to Modify
buildenv.sh— setALL_FEATURES=""scripts/build_lib.sh— (1) remove the hard-fail guard on emptyALL_FEATURES; (2) guard--featuresinbuild()andci_check()so the flag is omitted when the value is emptyImplementation Plan
Step 1 — Fix
buildenv.shFiles:
buildenv.shexport ALL_FEATURES="hero_osis-business,hero_osis-projects,hero_osis-identity"toexport ALL_FEATURES=""Dependencies: none
Step 2 — Relax
ALL_FEATURESvalidation inbuild_lib.shFiles:
scripts/build_lib.shALL_FEATURESis empty (around lines 89–92)Dependencies: Step 1
Step 3 — Guard
--featuresinbuild()inbuild_lib.shFiles:
scripts/build_lib.shcargo build --features ${features}with a conditional that omits--featureswhen the value is emptyDependencies: Step 2
Step 4 — Guard
--featuresinci_check()inbuild_lib.shFiles:
scripts/build_lib.shcargo ... --features "$features"invocation with${features:+--features "$features"}conditional expansionDependencies: Step 2
Acceptance Criteria
grep ALL_FEATURES buildenv.shshowsexport ALL_FEATURES=""source scripts/build_lib.shcompletes without error whenALL_FEATURESis emptycargo buildcompletes successfully on the workspace (no--featuresneeded)cargo testcompletes without unknown-feature errorsbuild.yaml(push) passes the "Build, test, and check" stepbuild-linux.yaml(tag push) passes the "Build" step for both matrix targetsNotes
hero_osis_sdkfeatures (business,projects,identity) are already declared as direct dependency features incrates/hero_biz_ui/Cargo.tomlandcrates/hero_biz_app/Cargo.toml. No workspace-level--featuresflag is needed.${var:+word}shell expansion is POSIX-compliant and is a no-op when$varis non-empty, so no regressions for other Hero repos that sourcebuild_lib.shwith a populatedALL_FEATURES.VERSIONfield mismatch betweenbuildenv.shandCargo.tomlis out of scope for this fix.casper-stevens referenced this issue2026-05-04 12:27:31 +00:00
--from-ciinstall path blind to this repo #13casper-stevens referenced this issue2026-05-04 12:28:01 +00:00
--from-ciinstall path blind to this repo #13Test Results
build_lib.sh source check: OK
cargo test:
All tests pass. The one test is
hero_biz_ui::parser::tests::test_name_fixin thehero_biz_uicrate. The other crates (hero_biz, hero_biz_app, hero_biz_sdk) have 0 tests each, all reportingok.No
--featuresflag was needed —cargo testran cleanly without any explicit feature flags.Implementation Summary
Changes Made
buildenv.shALL_FEATURES=""(was"hero_osis-business,hero_osis-projects,hero_osis-identity")hero_biz,hero_biz_sdk, andhero_biz_uihave no[features]tables;hero_osis_sdkfeatures are wired via direct dep features in each crate'sCargo.tomlscripts/build_lib.shALL_FEATURES(4-line block, former lines 89–92)build(): guards--featureswith[ -n "$features" ]so the flag is omitted entirely when the value is emptyci_check(): replaced all three--features "$features"occurrences with${features:+--features "$features"}(POSIX expansion — no-op when empty, backward-compatible for repos that do have features)Test Results
source scripts/build_lib.sh— OK (no longer fails on emptyALL_FEATURES)cargo test— 1 test, 1 passed, 0 failed--featuresflag passed; all crates compiled cleanlyAcceptance Criteria
grep ALL_FEATURES buildenv.shshowsexport ALL_FEATURES=""source scripts/build_lib.shcompletes without error whenALL_FEATURESis emptycargo buildcompletes successfully on the workspace (no--featuresneeded)cargo testcompletes without unknown-feature errorsFixed:
buildenv.shnow exportsALL_FEATURES="default"(commiteb03045). The stalehero_osis-business,hero_osis-projects,hero_osis-identityfeature names have been replaced. Tag builds no longer fail on feature resolution.