fix: derive capabilities and stop letting unknown firmware fields degrade responses (v1.3.2) - #15
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ig1q3oNdhzkBtzbATQMWi
Co-authored-by: RedAces <redaces@gmx.de> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ig1q3oNdhzkBtzbATQMWi
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ig1q3oNdhzkBtzbATQMWi
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ig1q3oNdhzkBtzbATQMWi
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.
Ships 1.3.2.
Fixes
has_matl_stationis now derived, not copied. The rawhasMatlStationfield is AD5X-only — a Creator 5 Pro omits it entirely (verified on pid 41 / firmware 1.9.4) while reporting a fully populatedmatlStationInfowith four loaded slots. It parsed asNone, so consumers gating on it saw no material station on exactly the models that have one. The parser already computed the correct value for its own heuristic and discarded it; that value is now what the field exposes, typedboolrather thanbool | None.GenericResponseand its children forbade them, so one unrecognized firmware key raisedValidationErrorandsend_product_commandreturned a bareFalse— indistinguishable from rejected credentials, whichff-5mp-hassreports to the user as a wrong check code. Nested models (MatlStationInfo,SlotInfo,IndepMatlInfo,FFGcodeToolData) were the half that was easy to miss: a child that rejects a field fails the whole response. Outbound request-parameter models keepextra="forbid", where it catches our own typos./gcodeListno longer discards file metadata on an unknown field, and the names-only fallback now logs what it cost.Notes
style:commit is a repo-wideblackpass, verified AST-identical and kept separate from the fixes.