AX Principle 10 requires all three categories (Good, Bad, Ugly) for
every test function. TestWorker_HandlePing had only Good; add Bad
(invalid payload) and Ugly (zero SentAt edge case).
Co-Authored-By: Charon <charon@lethean.io>
Test function names lacked the required {Good,Bad,Ugly} suffix mandated
by AX Principle 10. Renamed HandlePing and HandleGetStats (missing suffix),
and _NoManager/_Profile/_UnknownType variants to _Bad/_Bad/_Ugly.
Co-Authored-By: Charon <charon@lethean.io>
AX-1 (Predictable Names): the local variable `pr` is an abbreviation
that requires context to decode. Renamed to `peerRegistry` across all
test functions so the type is self-evident at the point of use.
Co-Authored-By: Charon <charon@lethean.io>
AX-10 requires test functions follow TestFilename_Function_{Good,Bad,Ugly}.
TestWorker_SetMinerManager tested only the happy path with no suffix.
Co-Authored-By: Charon <charon@lethean.io>
TestConvertMinerStats did not follow the AX Principle 10 test naming
convention (TestFilename_Function_{Good,Bad,Ugly}). Renamed to
TestWorker_ConvertMinerStats_Good to match the required pattern.
Co-Authored-By: Charon <charon@lethean.io>
- Updated `Worker.handleDeploy` to handle STIM bundles using `ExtractProfileBundle` and `ExtractMinerBundle`.
- Used `PeerConnection.SharedSecret` as the password for decryption.
- Implemented logic for `BundleProfile`, `BundleMiner`, and `BundleFull`.
- Fixed broken files `pkg/node/dispatcher.go` and `pkg/node/peer.go` to ensure compilation and testing.
- Updated tests in `pkg/node/worker_test.go` and added coverage for deployment logic.