Skip to content

fix(pylon,theatron,diaporeia): resolve all kanon lint violations#1919

Merged
forkwright merged 1 commit intomainfrom
fix/lint-interface
Mar 21, 2026
Merged

fix(pylon,theatron,diaporeia): resolve all kanon lint violations#1919
forkwright merged 1 commit intomainfrom
fix/lint-interface

Conversation

@forkwright
Copy link
Owner

Summary

  • Apply Rust 2024 edition patterns across all three interface-layer crates (pylon, theatron-core/tui/desktop, diaporeia)
  • pubpub(crate) for internal items, #[allow]#[expect] with reasons, as casts → try_from/try_into, import reordering, #[must_use] annotations, test naming
  • Create per-crate .kanon-lint-ignore files documenting all legitimate suppressions with WHY comments (re-exported pub items, multi-line .instrument() false positives, TUI view indexing, terminal coordinate casts)
  • Split large structs (MemoryFact 17→3 sub-structs, TabState 14→11+streaming sub-struct, OpsState module extraction)

Validation

  • kanon lint crates/pylon — 0 violations
  • kanon lint crates/theatron — 0 violations
  • kanon lint crates/diaporeia — 0 violations
  • cargo check --workspace — clean
  • cargo test --workspace — all tests pass
  • cargo fmt --all -- --check — clean

Test plan

  • CI passes all checks (cargo check, test, clippy, fmt)
  • Verify no behavioral changes — all fixes are mechanical lint compliance
  • Confirm .kanon-lint-ignore entries have accurate WHY justifications

@github-actions
Copy link

⚠️ Large PR detected — 100 files, 2748 lines changed.

Consider splitting into smaller PRs for easier review. Not a blocker, just a signal.

Apply Rust 2024 edition patterns across the three interface-layer crates:
- pub → pub(crate) for internal items, with .kanon-lint-ignore for re-exports
- #[allow(lint)] → #[expect(lint)] with reason strings
- as casts → try_from/try_into where applicable
- #[must_use] on pub functions returning Result/Option
- Import ordering per standards (std → external → crate)
- test_ prefix → behavior-driven names for test helpers
- tokio::spawn .instrument() multi-line false positives → ignore file
- Struct field grouping (MemoryFact, TabState) for >12 fields

Per-crate .kanon-lint-ignore files document all legitimate suppressions
with WHY comments. All three crates pass kanon lint with 0 violations.
@forkwright forkwright merged commit 595d148 into main Mar 21, 2026
12 of 19 checks passed
@forkwright forkwright deleted the fix/lint-interface branch March 21, 2026 20:56
@sonarqubecloud
Copy link

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