Skip to content

Stop SDK-coverage check crashing on inherited methods (#5126)#5139

Merged
btshrewsbury-viam merged 2 commits into
mainfrom
fix/coverage-partial-sdk-methods
Jul 2, 2026
Merged

Stop SDK-coverage check crashing on inherited methods (#5126)#5139
btshrewsbury-viam merged 2 commits into
mainfrom
fix/coverage-partial-sdk-methods

Conversation

@btshrewsbury-viam

Copy link
Copy Markdown
Collaborator

make coveragetest crashed with KeyError: 'CurrentInputs' in write_markdown. A proto RPC can map to an SDK method that the SDK's own resource doc page doesn't surface: gripper gained GetCurrentInputs/GoToInputs (real proto RPCs, already documented in the Python/TS references), but in Go they're inherited via framesystem.InputEnabled and rendered on that interface's page — not gripper's — so the per-resource Go scrape doesn't find them, and the unguarded methods['go'][type][resource][go_method_name] access raised KeyError. (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)

  • Crash fixed; check functional again. With the crash gone, the coverage check now surfaces pre-existing gaps it had been masking (e.g. get_status unused 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).
  • Go gripper Inputs: documented only where the SDKs surface them per-resource (Python/TS, which already existed). Go's inherited Inputs are not added here; documenting them too would require teaching the Go scraper to follow the embedded framesystem.InputEnabled interface — a larger change to decide on.

Refs #5126

🤖 Generated with Claude Code

…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
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit f4dc0b5
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6a46d003b05ad500085a7bbf
😎 Deploy Preview https://deploy-preview-5139--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 38 (🔴 down 7 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Jul 2, 2026
@btshrewsbury-viam btshrewsbury-viam merged commit 65014d7 into main Jul 2, 2026
13 checks passed
@btshrewsbury-viam btshrewsbury-viam deleted the fix/coverage-partial-sdk-methods branch July 2, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI failure: SDK method coverage

3 participants