Two small follow-ups noticed while reviewing PR #360 commit e5217785 (slice #356).
1. if api.path: guard in GraphQLTransport.connect is dead code
# src/fastcs/transports/graphql/transport.py
for api in controller_apis:
if api.path:
validate_graphql_id(api.path[0])
self._server = GraphQLServer(controller_apis)
If a controller_api.path is empty, validation is silently skipped — but GraphQLServer._create_app immediately does id = controller_api.path[0], which raises IndexError. The guard buys nothing.
The other three transports' connect methods (RestTransport, EpicsCATransport, EpicsPVATransport) all call path[0] unconditionally and would also fail on an empty path — fail-fast there, opaquely deeper here. (The empty-path case itself is already tracked: any snippet that drops pv_prefix but doesn't call set_id would fail at runtime; #363 covers the snippet side.)
Suggested fix: drop the if api.path: guard so GraphQL fails fast at the same boundary as the others. If we ever decide empty paths should be tolerated, that's a foundation-level decision that belongs in FastCS.__init__, not per-transport.
2. Charset table missing PVA's 60-char PV name limit
docs/how-to/multiple-transports.md (the new "Choosing controller ids across transports" section, also added in this slice) shows the limit for CA but not PVA, even though validate_pva_id (slice #355) enforces the same 60-char ceiling:
| EPICS CA | `[A-Za-z0-9_-]+`, plus the 60-char PV name limit |
| EPICS PVA | `[A-Za-z0-9_-]+` |
Either repeat the 60-char note on the PVA row or hoist it to a sentence under the table that calls out "both EPICS transports also enforce a 60-character PV-name ceiling on the longest derivable prefix."
Both are small; bundling here so they don't each need their own issue.
Two small follow-ups noticed while reviewing PR #360 commit
e5217785(slice #356).1.
if api.path:guard inGraphQLTransport.connectis dead codeIf a
controller_api.pathis empty, validation is silently skipped — butGraphQLServer._create_appimmediately doesid = controller_api.path[0], which raisesIndexError. The guard buys nothing.The other three transports'
connectmethods (RestTransport,EpicsCATransport,EpicsPVATransport) all callpath[0]unconditionally and would also fail on an empty path — fail-fast there, opaquely deeper here. (The empty-path case itself is already tracked: any snippet that dropspv_prefixbut doesn't callset_idwould fail at runtime; #363 covers the snippet side.)Suggested fix: drop the
if api.path:guard so GraphQL fails fast at the same boundary as the others. If we ever decide empty paths should be tolerated, that's a foundation-level decision that belongs inFastCS.__init__, not per-transport.2. Charset table missing PVA's 60-char PV name limit
docs/how-to/multiple-transports.md(the new "Choosing controller ids across transports" section, also added in this slice) shows the limit for CA but not PVA, even thoughvalidate_pva_id(slice #355) enforces the same 60-char ceiling:Either repeat the 60-char note on the PVA row or hoist it to a sentence under the table that calls out "both EPICS transports also enforce a 60-character PV-name ceiling on the longest derivable prefix."
Both are small; bundling here so they don't each need their own issue.