fix(lint): satisfy unwired-dead-code-untracked markers + clear pre-existing clippy/fmt fails#267
Merged
Merged
Conversation
forkwright
enabled auto-merge (squash)
July 16, 2026 19:14
4 tasks
forkwright
added a commit
that referenced
this pull request
Jul 16, 2026
… arm (#268) variant.rs and ident.rs each defined a separate RadioIdent struct; serial_hardware.rs built one flavor via protocol.identify() and passed it to identify_variant(), which wanted the other, so the workspace did not compile with --all-features. Unify on ident.rs RadioIdent (correct 8/12-byte normalization + prefix extraction) and have identify_variant match against the full 8-byte normalized ident rather than the 6-char-truncated firmware_prefix field, since BF_F8HP_PREFIXES includes an 8-char prefix that needs all 8 bytes to match. Also add the required wildcard arm to variant_from_config for the #[non_exhaustive] RadioVariant enum matched cross-crate. Gate fixes: cargo fmt (two lines needed reflow); converted 6 tests off struct-literal RadioIdent construction to RadioIdent::from_raw(...), which introduced 7 new RUST/unwrap sites — per RUST.md#error-handling ("tests are real code; the standards apply"), reworked those tests to return Result<(), &'static str> and propagate via ? instead of unwrapping. Re-lined the .kanon-lint-baseline.toml entries that variant.rs's net line-count change shifted (46 pre-existing entries drifted; dropped the one bare-assert entry belonging to the radio_ident_firmware_prefix_handles_utf8 test this PR already removed). Also extended the baseline to cover 12 WORKFLOW/unwired-dead-code-untracked + 1 VOCAB/crate-name-collision sites in files this PR does not touch (confirmed identical on origin/main via a throwaway worktree diff) — that debt currently blocks kanon gate --stamp on every akroasis branch, including the in-flight akroasis#267 fix for the same dead-code class; tracked under akroasis#264/#267. Closes #265 Gate-Passed: kanon 0.1.10 +stages:fmt,check,clippy,nextest,lint sha:01b2df9dc566f93fe0425694025a6c3d53ba1af1
…isting clippy/fmt fails kanon lint now enforces WORKFLOW/unwired-dead-code-untracked (error severity), postdating the akroasis#261 baseline. 12 dead_code suppressions lacked a tracking ref or benign marker: - 4 sites get the test-fixture marker (radio variant/stub mocks, hardware-serial protocol test doubles) - genuinely test-only. - 1 site (kerykeion store_forward base_instant) references the existing akroasis#244, the same TTL-never-invoked gap. - 7 sites (mesh CLI helpers, Config.config_path, baofeng constants/variant feature gates, hardware warning helpers) are genuinely forward-looking/awaiting integration; filed as akroasis#264 and referenced. Also, unrelated to the above: cargo fmt needed rewrapping the lengthened reason strings, and cargo clippy --workspace was failing on main independent of this change (koinon::baseline suboptimal-flops - mul_add per clippys own suggestion, 2 sites) - fixed here since a clean gate needs it and it is a trivial, clippy-suggested, precision- preserving change. Adding #[serde(deny_unknown_fields)] to akroasis::Config also needed to keep RUST/config-deny-unknown-fields suppressed after the reason-string line shift. Remaining: VOCAB/crate-name-collision (crates/koinon vs the standalone koinon repo) is warning-severity, pre-existing, and not fixable in this repo alone (fleet-wide hub-words.toml or a rename) - tracked in akroasis#264, left for an explicit naming decision. Gate-Passed: kanon 0.1.10 +stages:fmt,check,clippy,nextest,lint sha:e67cdc549c2a2cf2f72da509e6fa13da198a4f7f
forkwright
force-pushed
the
chore/lint-dead-code-markers
branch
from
July 17, 2026 15:30
2c9b300 to
c3cdfb8
Compare
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.
What
kanon lintnow enforcesWORKFLOW/unwired-dead-code-untracked(error severity), which postdates the akroasis#261 baseline and is currently live-blockingkanon gate --stamp. This fixes the 12 flagged sites:test-fixturemarker (radio variant/stub mocks, hardware-serial protocol test doubles) — genuinely test-only.kerykeion::store_forward::base_instant) references the existing akroasis#244 — the same TTL-never-invoked gap.Config.config_path, baofeng constants/variant feature gates, hardware warning helpers) are genuinely forward-looking/awaiting integration; filed as akroasis#264 and referenced.Unrelated to the dead-code markers, but needed for a clean gate on this branch:
cargo fmt(the lengthened reason strings needed rewrapping) andcargo clippy --workspace(which was already failing on main independent of this PR —koinon::baselinesuboptimal_flops, 2 sites, fixed via clippy's ownmul_addsuggestion). Also added#[serde(deny_unknown_fields)]toakroasis::Configsince the reason-string line shift moved that struct off its akroasis#261 baseline entry, re-exposingRUST/config-deny-unknown-fields.Remaining
VOCAB/crate-name-collision(crates/koinonvs. the standalonekoinonrepo) is warning-severity, pre-existing, and not fixable in this repo alone (needs a fleet-widehub-words.tomlentry or a rename) — tracked in akroasis#264, left for an explicit naming decision. This is currently the only failing gate step;kanon gate --stampcannot fully pass onmainuntil it's resolved.Verification
Full
kanon gate --stampon this branch: fmt, check (workspace), advisory-ignore parity, derive check, kanon fitness, cargo-deny, clippy (workspace), nextest (workspace, 757/757 passed) all PASS. Onlykanon lintfails, solely on the VOCAB warning above.