refactor(lint): make each dead-code suppression falsifiable, and finish the crate rename - #462
Merged
Merged
Conversation
added 2 commits
August 21, 2026 11:25
…ds it Every suppression carried a tracking ref, which satisfied the letter of `WORKFLOW/unwired-dead-code-untracked`, but each named a direction rather than a consumer: "await daemon integration", "staged for the akroasis hardware backend". Nothing can ever contradict a reason like that, so the suppression can sit accurate and permanent at the same time — which is the condition the rule exists to surface, not a state it should be able to reach. Each reason now names the issue whose landing makes the suppression provably wrong: - mesh status/node tables need a live `NodeDb` and `GatewayBridge`; the CLI has neither and says so in three explicit constants. #83 supplies them. - the baofeng protocol constants and variant API are consumed only by the `hardware-serial` protocol module, which #79 qualifies. - the hardware warning helpers have no constructor anywhere outside their own file, while the detect path already runs without surfacing them. #410 owns the caller-initiated detect surface where they belong. - the `Config` struct is not staged work at all. It is loaded and discarded, so the surface aborts unrelated commands while its one key does nothing; that is #461. The mapping was derived by reading each consumer rather than by matching issue titles, and every named helper was confirmed to still have zero references outside its defining file.
Renaming the crate moved the code but left every description of it behind, so the repo documented a `koinon` crate that no longer exists: the README domain map and architecture diagram, CLAUDE.md and AGENTS.md, `docs/ARCHITECTURE.md`, the lexicon, both `_llm` corpora, and fourteen comments still explaining which crate owned what. A reader following any of them landed on nothing. The README and lexicon now carry both halves with their own etymologies rather than one entry rewritten in place, because the split was a division of concepts and a single renamed row would have hidden that. Three things were stale in a way a search for the old name would not have surfaced on its own: - `fuzz/Cargo.lock` still resolved `koinon` at 0.5.0. The fuzz workspace is detached, so nothing in the main workspace's resolution reaches it and it had been two releases behind before this rename touched it. - `crates/stoicheion/.kanon-lint-ignore` suppressed `RUST/pub-visibility` for a gap that no longer exists. Measured both ways: 38 bare `pub` items across the crate's non-lib files, and the rule reports nothing repo-wide with the ignore removed. A suppression that suppresses nothing states something untrue about the code and would silently absorb a real violation later. - `.kanon-lint-baseline.toml` still carried the two `koinon` collision entries its own reason described as "deferred to a fleet naming decision" — the decision this rename made. `storage.rs` also stopped indexing to build a slice. `&public_key_bytes()[..]` tripped `RUST/indexing-slicing`, which clippy cannot catch here because `indexing_slicing` is allow-by-default restriction; `.as_slice()` says the same thing without an index expression.
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.
Two commits, both finishing work issue 264 started. Neither closes it — the
issue's own
Done whenis satisfied by these, but the closing call belongs onthe issue rather than in a merge parser.
1. Suppressions that can be disproved
All 7 dead-code suppressions carried a tracking ref, which satisfied the letter
of
WORKFLOW/unwired-dead-code-untracked. Each named a direction rather thana consumer — "await daemon integration", "staged for the akroasis hardware
backend". Nothing can ever contradict a reason like that, so a suppression can
be accurate and permanent at once, which is the condition the rule exists to
surface rather than a state it should reach.
Each now names the issue whose landing makes it provably wrong:
main.rs:11mesh tablesNodeDb+GatewayBridge; the CLI has neither and says so in three constants. 83 is the Meshtastic connection layer that supplies thembaofeng/constants.rs,variant.rshardware-serialgated and consumed only by the protocol module; 79 qualifies exactly that protocol, naming the same magic bytes and variant handlinghardware/warnings.rs×3HardwareWarningis constructed nowhere outside its own file while the detect path already runs without surfacing warnings; 410 owns the caller-initiated detect surfacemain.rs:63ConfigThe mapping was derived by reading each consumer, not by matching issue titles,
and every named helper was confirmed to still have zero references outside its
defining file.
2. Finishing the rename
The crate split moved the code and left every description of it behind, so the
repo documented a
koinoncrate that no longer exists: the README domain mapand diagram, CLAUDE.md, AGENTS.md,
docs/ARCHITECTURE.md, the lexicon, both_llmcorpora, and 14 comments explaining which crate owned what.stoicheion/tests/smoke.rsdescribed itself as "smoke tests for thekoinonpublic API".
The README and lexicon carry both halves with their own etymologies rather than
one row renamed in place, because the split divided two concepts and a rename
would have hidden that.
Three were stale in ways searching for the old name would not surface:
fuzz/Cargo.lockstill resolvedkoinonat 0.5.0. That workspace isdetached, so no main-workspace resolution reaches it; it was two releases behind
before this rename touched it. This one is not cosmetic —
security.ymlrunscargo audit --file fuzz/Cargo.lockand osv-scanner reads--lockfile=fuzz/Cargo.lock, so both scanners were auditing dependency versionsthat are not the ones being built.
crates/stoicheion/.kanon-lint-ignoresuppressed nothing. It exemptedRUST/pub-visibilityfor a gap the rule no longer has. Measured both ways: 38bare
pubitems across the crate's non-lib files, and the rule reports nothingrepo-wide with the ignore removed. Deleted — a suppression that suppresses
nothing states something untrue about the code and would absorb a real
violation later.
.kanon-lint-baseline.tomlstill carried the twokoinoncollisionentries its own reason described as "deferred to a fleet naming decision" —
the decision the rename made.
storage.rsalso stopped indexing to build a slice.&public_key_bytes()[..]trippedRUST/indexing-slicing, which CI's clippycannot catch because
indexing_slicingis an allow-by-default restriction lint;.as_slice()says the same thing without an index expression. That line camefrom PR #449, so it is this lane's own drift rather than inherited.
Verification
utilities/pre-push-verify.sh, whole workspace plus the nested fuzz workspace:FMT_EXIT=0 CLIPPY_EXIT=0 TEST_EXIT=0 NESTED_WORKSPACE_EXIT=0 POLICY_SCRIPTS_EXIT=0 LOCKFILE_LOCKED_EXIT=0— 1145 tests, 0 failed.That run required fixing the harness itself, in metis-ops rather than here: its
nested-workspace phase ran
cargo nextest run, and a workspace whose onlytargets are fuzz binaries has no test targets, which nextest's default reports
as
error: no tests to run(exit 4). Every branch touchingfuzz/wastherefore unpassable while the fuzz workspace was in its correct state. It now
passes
--no-tests=warn, which still prints the zero-test line so an empty runstays visible.