[refactor](trx-rs): resolve all improvement areas (P0-P3)
Addresses every item in docs/Improvement-Areas.md:
P0 - Plugin signing: new src/trx-app/src/plugins.rs with SHA-256 checksum
manifest, filename allowlisting, API version compatibility checks,
and cross-platform file permission validation.
P1 - Session store mutex poisoning: all .unwrap() calls on RwLock/Mutex in
auth.rs replaced with .unwrap_or_else(|e| e.into_inner()) + warning logs.
- TCP listener rate limiting: added ConnectionTracker with per-IP connection
cap (10 concurrent connections per IP).
- RigState refactoring: decoder fields grouped into DecoderConfig and
DecoderResetSeqs sub-structs with #[serde(flatten)] for wire compat.
- spawn_blocking timeout: satellite pass computation wrapped in 30s timeout.
P2 - Command handler macro: rig_command! macro generates 7 unit-struct command
implementations, reducing ~200 lines of boilerplate.
- Protocol versioning: added protocol_version field to ClientEnvelope and
ClientResponse; improved unknown command error handling in parse_envelope.
- Unsafe string: replaced from_utf8_unchecked with safe from_utf8().expect().
- Dead code: removed 2 unnecessary annotations, documented remaining 4.
P3 - Tests: added 4 unit tests for history_store.rs (round-trip, expiry, etc).
- FT-817 VFO: improved inference for ambiguous same-frequency case.
- Configurator: implemented serial port detection via tokio_serial.
- Plugin versioning: integrated into plugin manifest (api_version field).
- Naming: documented as intentional semantic distinctions, not inconsistencies.
https://claude.ai/code/session_01Gj1vEkP6GKVcVaMqzFW885
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Generated
+15
@@ -2428,6 +2428,17 @@ dependencies = [
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cpufeatures",
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sharded-slab"
|
||||
version = "0.1.7"
|
||||
@@ -2964,7 +2975,10 @@ name = "trx-app"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dirs",
|
||||
"hex",
|
||||
"libc",
|
||||
"serde",
|
||||
"sha2",
|
||||
"thiserror 2.0.17",
|
||||
"toml",
|
||||
"tracing",
|
||||
@@ -3063,6 +3077,7 @@ dependencies = [
|
||||
"clap",
|
||||
"dialoguer",
|
||||
"tempfile",
|
||||
"tokio-serial",
|
||||
"toml_edit 0.22.27",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user