hero_archipelagos_core: drop tracing/release_max_level_warn — propagates via feature unification, kills info!/debug! logs in unrelated workspace consumers #212
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_archipelagos#212
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?
Summary
hero_archipelagos_core'sCargo.tomlenablestracing/release_max_level_warn. Because Cargo features unify across a workspace, this turns onSTATIC_MAX_LEVEL = WARNin any workspace that transitively depends onhero_archipelagos_corefrom any one of its members. Everyinfo!anddebug!call site is then statically replaced by a no-op in release builds — across the whole workspace, not just the archipelagos app.Setting
release_max_level_*on a library crate is a well-known Rust anti-pattern; only end-binary crates should set static max levels.Reproduction (in
lhumina_code/hero_browser)And which crate enabled it:
The
hero_browserworkspace pulls archipelagos in only viacrates/hero_browser_app(the Archipelagos integration crate), butcargo build --workspace --releaseunifies features across all members, so the daemon binaryhero_browser_server— which has nothing to do with archipelagos — ends up with all info-level logs erased at compile time.User-visible symptom
Every release run of
hero_browser_serverprints this on startup, then proceeds with no info logs at all:This warning is emitted by
tracing-subscriber(filter/env/builder.rs:284), telling us correctly that the runtime filterhero_browser=infois asking for traces that the compile-timeSTATIC_MAX_LEVEL = WARNhas already deleted.Why this is
hero_archipelagos's bug, not the consumer'srelease_max_level_warnis a legitimate end-app choice — it shrinks the binary by erasing trace points.hero_archipelagos_coreis a library. Its consumers should choose their own static max level (or leave it alone for the binary).Proposed fix
release_max_level_warn(and any othermax_level_*/release_max_level_*) fromhero_archipelagos_core'stracingdependency features.cargo metadataparse) that fails when any non-binary workspace member adds amax_level_*feature ontracing. Cheap, prevents recurrence.Impact
Fixes silent info/debug log loss in every Hero workspace that links archipelagos through any path. For
hero_browserthis means production observability comes back (log levels currently visible: WARN and ERROR only). Also silences the startup warning that's been tagging along forever.