desktop/src-tauri: cargo test --release fails to compile (dev-only migration symbols referenced from unconditional tests)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start by running cargo test --release in desktop/src-tauri to reproduce the missing-symbol errors. Inspect managed_agents/storage.rs around lines 494 and 514-515, then compare the dependent tests in managed_agents/storage_tests.rs around lines 541, 582, and 608. Done means the crate's release-profile test suite compiles and runs without the unresolved symbols.
Written by the indexing model from the issue text.
Description
Summary
cargo test --release does not compile in desktop/src-tauri. The test build fails with E0425: cannot find function copy_agent_keys_between_stores in module super (and the same for DEV_MIGRATION_MARKER).
Debug builds are unaffected, so nothing in CI catches it.
Cause
managed_agents/storage.rs gates both items on debug builds:
// storage.rs:494
const DEV_MIGRATION_MARKER: &str = "_dev_migration_v1";
// storage.rs:514-515
#[cfg(debug_assertions)]
fn copy_agent_keys_between_stores(...)
managed_agents/storage_tests.rs references them unconditionally (super::DEV_MIGRATION_MARKER at lines 541, 582, 608, and the function in the tests around them). Under --release, debug_assertions is off, the definitions vanish, and the test module no longer resolves them.
Scope
Present on main (076081bfc), not introduced by any in-flight branch — I hit it while trying to take a release-profile measurement on #6024 and ran it as a control on an unmodified tree before blaming my own change.
The practical consequence is that no one can run this crate's test suite under --release, which is exactly the profile you want for any performance measurement. I worked around it with --config profile.test.opt-level=2, which keeps debug_assertions on — usable, but it means optimized measurements of this crate are systematically conservative and nobody can easily check a real release build.
Fix
Gate the dependent tests to match their subject — #[cfg(all(test, debug_assertions))] on the tests that use the dev-only migration path — or drop the #[cfg(debug_assertions)] from the function and marker if they are meant to be reachable in release.
- Dominant language
- Rust
- Stars
- 33.7k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 239
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from block/buzz
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
workflow_sink's mention parser never masks code regions — @name inside a code span wakes the agent Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 Half a day Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·