Stop SDK-coverage check crashing on inherited methods (#5126)#5139
Merged
Conversation
…ape (#5126) `make coveragetest` (update_sdk_methods.py --coverage) crashed with KeyError: 'CurrentInputs' in write_markdown: a proto RPC can map to an SDK method that the SDK's own resource doc page does not surface. gripper gained GetCurrentInputs/GoToInputs (real proto RPCs, already documented in the Python and TypeScript references), but in Go they are inherited via framesystem.InputEnabled and rendered on that interface's page, not gripper's, so the per-resource Go scrape does not find them and the unguarded methods['go'][type][resource][go_method_name] access raised KeyError. Guard the mapped-method lookup: if the scraper did not find the mapped method for a given SDK, treat that SDK as not having it so the proto still documents in the SDKs that do surface it, instead of crashing. Verified by running the generator locally: it now completes for gripper (no KeyError) and the coverage check runs to completion. Note: with the crash gone, the coverage check now surfaces pre-existing coverage gaps that the crash had been masking (for example get_status listed unused across several components). Those are the check working as intended and are separate coverage-mapping decisions. Refs #5126
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Shannon Bradshaw (shannonbradshaw)
approved these changes
Jul 2, 2026
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.

make coveragetestcrashed withKeyError: 'CurrentInputs'inwrite_markdown. A proto RPC can map to an SDK method that the SDK's own resource doc page doesn't surface: gripper gainedGetCurrentInputs/GoToInputs(real proto RPCs, already documented in the Python/TS references), but in Go they're inherited viaframesystem.InputEnabledand rendered on that interface's page — not gripper's — so the per-resource Go scrape doesn't find them, and the unguardedmethods['go'][type][resource][go_method_name]access raisedKeyError. (Arm never crashed because it has no CSV rows for these.)Fix
Guard the mapped-method lookup: if a scraper didn't find the mapped method for a given SDK, treat that SDK as not having it, so the proto still documents in the SDKs that do surface it instead of crashing. Verified locally: the generator completes for gripper and the coverage check runs to completion.
Honest scope (this does NOT by itself close #5126)
get_statusunused across components) and exits 1 on them. So check-methods is still red — but for real, reported reasons, not a crash. Closing CI failure: SDK method coverage #5126 means a document-vs-ignore decision on each remaining gap (assessed separately).framesystem.InputEnabledinterface — a larger change to decide on.Refs #5126
🤖 Generated with Claude Code