Skip to content

fix(lint): satisfy unwired-dead-code-untracked markers + clear pre-existing clippy/fmt fails#267

Merged
forkwright merged 1 commit into
mainfrom
chore/lint-dead-code-markers
Jul 17, 2026
Merged

fix(lint): satisfy unwired-dead-code-untracked markers + clear pre-existing clippy/fmt fails#267
forkwright merged 1 commit into
mainfrom
chore/lint-dead-code-markers

Conversation

@forkwright

Copy link
Copy Markdown
Owner

What

kanon lint now enforces WORKFLOW/unwired-dead-code-untracked (error severity), which postdates the akroasis#261 baseline and is currently live-blocking kanon gate --stamp. This fixes the 12 flagged sites:

  • 4 get the test-fixture marker (radio variant/stub mocks, hardware-serial protocol test doubles) — genuinely test-only.
  • 1 (kerykeion::store_forward::base_instant) references the existing akroasis#244 — the same TTL-never-invoked gap.
  • 7 (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.

Unrelated to the dead-code markers, but needed for a clean gate on this branch: cargo fmt (the lengthened reason strings needed rewrapping) and cargo clippy --workspace (which was already failing on main independent of this PR — koinon::baseline suboptimal_flops, 2 sites, fixed via clippy's own mul_add suggestion). Also added #[serde(deny_unknown_fields)] to akroasis::Config since the reason-string line shift moved that struct off its akroasis#261 baseline entry, re-exposing RUST/config-deny-unknown-fields.

Remaining

VOCAB/crate-name-collision (crates/koinon vs. the standalone koinon repo) is warning-severity, pre-existing, and not fixable in this repo alone (needs a fleet-wide hub-words.toml entry or a rename) — tracked in akroasis#264, left for an explicit naming decision. This is currently the only failing gate step; kanon gate --stamp cannot fully pass on main until it's resolved.

Verification

Full kanon gate --stamp on this branch: fmt, check (workspace), advisory-ignore parity, derive check, kanon fitness, cargo-deny, clippy (workspace), nextest (workspace, 757/757 passed) all PASS. Only kanon lint fails, solely on the VOCAB warning above.

@forkwright
forkwright enabled auto-merge (squash) July 16, 2026 19:14
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
forkwright force-pushed the chore/lint-dead-code-markers branch from 2c9b300 to c3cdfb8 Compare July 17, 2026 15:30
@forkwright
forkwright merged commit 3987d54 into main Jul 17, 2026
5 checks passed
@forkwright
forkwright deleted the chore/lint-dead-code-markers branch July 17, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant