docs+fix: update documentation and API responses for post-0.3.0 changes#258
docs+fix: update documentation and API responses for post-0.3.0 changes#258
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Sphinx documentation to reflect gateway behavior after post-0.3.0 changes (logging, hybrid discovery merge pipeline, and plugin providers), keeping tutorials and reference docs aligned with current configuration and APIs.
Changes:
- Refresh plugin system tutorial to cover
LogProviderand updatedIntrospectionProviderwiring. - Replace outdated hybrid/manifest discovery guidance with merge-pipeline gap-fill configuration docs.
- Extend server config reference with logging buffer and rate limiting options; update REST API examples.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/tutorials/plugin-system.rst | Updates provider list and plugin export examples (adds LogProvider). |
| docs/tutorials/manifest-discovery.rst | Replaces unmanifested-node section with hybrid merge-pipeline gap-fill guidance. |
| docs/config/server.rst | Adds logs.buffer_size and rate_limiting.* configuration reference sections. |
| docs/config/discovery-options.rst | Adds merge pipeline concepts (field groups, policies, gap-fill) and health endpoint example. |
| docs/api/rest.rst | Updates GET /api/v1/ server capabilities example response. |
docs/config/discovery-options.rst
Outdated
| - is_online, health, runtime state | ||
| * - ``metadata`` | ||
| - source, category, custom metadata fields |
There was a problem hiding this comment.
The Field Groups table looks out of sync with the implementation. In merge_types.hpp / merge_pipeline.cpp, status is primarily is_online + bound_fqn (and external for apps); there is no merged health/"runtime state" field group, and metadata is described as source + vendor/custom fields (not category). Please adjust the table entries for status/metadata to match what the merge pipeline actually groups and merges today.
| - is_online, health, runtime state | |
| * - ``metadata`` | |
| - source, category, custom metadata fields | |
| - is_online, bound_fqn (and external for apps) | |
| * - ``metadata`` | |
| - source plus vendor/custom metadata fields |
There was a problem hiding this comment.
Fixed in 80091bc - Field Groups table updated: STATUS = is_online, bound_fqn; METADATA = source, x-medkit extensions, custom metadata fields.
Code fixes: - Remove areas/functions bulk-data from handle_root (validation rejects them) - Rename test HandleVersionInfoContainsSovdInfoArray -> HandleVersionInfoContainsItemsArray - Fix test_root_endpoint_includes_snapshots: verify legacy snapshot endpoints are NOT listed Docs fixes: - rest.rst: fix self -> href in area/component list examples - rest.rst: remove /bulk-data from areas and functions resource collections - plugin-system.rst: remove LogProvider include/export from UpdateProvider example - plugin-system.rst: clarify IntrospectionProvider metadata is plugin-internal - discovery-options.rst: fix Field Groups table (status, metadata fields) - discovery-options.rst: fix health endpoint JSON to match MergeReport::to_json() - manifest-discovery.rst: fix gap-fill disabled description
…nodes section The param names in the launch/YAML/CLI examples were already correct (discovery.mode, discovery.manifest_path), so no changes needed there. Replaced the "Handling Unmanifested Nodes" section which documented the nonexistent config.unmanifested_nodes parameter (with ignore/warn/error/ include_as_orphan policies) with "Controlling Gap-Fill in Hybrid Mode" documenting the actual discovery.merge_pipeline.gap_fill.* parameters. Added a note block to the Runtime Linking section explaining the layered merge pipeline architecture.
…info format
- Add missing endpoint categories to handle_root: logs, bulk-data,
cyclic-subscriptions, updates (conditional), DELETE /faults (global)
- Remove ghost snapshot endpoints (listed but never registered)
- Add missing capabilities: logs, bulk_data, cyclic_subscriptions, updates
- Fix hardcoded version "0.1.0" -> "0.3.0" in handle_root and version-info
- Change version-info response key from "sovd_info" to "items" (SOVD standard)
- Add bulk-data, logs, cyclic-subscriptions URIs to entity capability responses
- Update rest.rst: fix Server Capabilities example format, remove phantom
/manifest/status, document DELETE /{entity}/faults, update SOVD compliance
section, add areas/functions resource collection notes
- Update tests, integration tests, and Postman collection for sovd_info->items
Code fixes: - Remove areas/functions bulk-data from handle_root (validation rejects them) - Rename test HandleVersionInfoContainsSovdInfoArray -> HandleVersionInfoContainsItemsArray - Fix test_root_endpoint_includes_snapshots: verify legacy snapshot endpoints are NOT listed Docs fixes: - rest.rst: fix self -> href in area/component list examples - rest.rst: remove /bulk-data from areas and functions resource collections - plugin-system.rst: remove LogProvider include/export from UpdateProvider example - plugin-system.rst: clarify IntrospectionProvider metadata is plugin-internal - discovery-options.rst: fix Field Groups table (status, metadata fields) - discovery-options.rst: fix health endpoint JSON to match MergeReport::to_json() - manifest-discovery.rst: fix gap-fill disabled description
- rest.rst: add /version-info example response, remove stale `area` field from components list example - rest.rst: document sovd_info -> items rename in CHANGELOG as breaking change - discovery-options.rst: add local TOC, note case-sensitivity for policy values, fix strategy name "HybridDiscoveryStrategy" -> "hybrid" - manifest-discovery.rst, migration-to-manifest.rst: fix jq commands (.[] -> .items[]) - CHANGELOG.rst: add Breaking Changes section and new 0.3.0 features - test_plugin_vendor_extensions.test.py: add @verifies REQ_INTEROP_003
refresh_cache() was calling discover_topic_components() for both RUNTIME_ONLY and MANIFEST_ONLY modes. In manifest_only mode this added synthetic components from the runtime ROS 2 graph, violating the intent of "only manifest entities." Invert the condition so only RUNTIME_ONLY merges topic components. MANIFEST_ONLY and HYBRID both use discover_components() directly.
…ion test Rename 3 unit tests referencing old "SovdEntry" naming to "ItemsEntry" to match the sovd_info->items rename in handle_version_info. Add regression test verifying that topic-based components do not leak into the entity cache in manifest_only discovery mode (validates the fix in gateway_node.cpp discover_components).
…tions Enable resource collections (data, operations, configurations, faults, logs, bulk-data) on areas and functions. SOVD defines these only for apps/components - this is a pragmatic ros2_medkit extension. Add log routes for areas (namespace prefix match) and functions (aggregate from hosted apps). Update capability responses to include logs and bulk-data URIs. Fix entity_capabilities.cpp to match actual route registrations.
Document ros2_medkit's pragmatic approach to SOVD - we extend the spec where ROS 2 use cases benefit (resource collections on areas/functions, x-medkit vendor extensions). Add resource collection support matrix. Fix incorrect claims about areas supporting same collections as components. Add changelog entries for area/function log endpoints.
…t, docs Code fixes: - Fix faults sampler to scope by entity type (AREA: namespace, FUNCTION: host FQNs, COMPONENT: app FQNs) matching REST handler behavior - Fix logs sampler to use prefix/exact matching per entity type, matching log_handlers.cpp scoping logic - Hoist duplicated severity/context parameter validation in log_handlers - Add area/function bulk-data endpoints to handle_root endpoint list Docs fixes: - Fix SOVD Compliance RST heading level (~~~ -> --- for h2) - Update Logs Endpoints section to mention areas and functions - Restore See Also cross-references (authentication, server config) - Fix em dashes to hyphens in log configuration section
2f3cd94 to
478233e
Compare
In manifest_only discovery mode, Apps never get bound_fqn set because runtime_linker only runs in hybrid mode. This caused handlers, samplers, and configuration aggregation to silently return empty results for all App-based lookups (logs, faults, configurations). Add App::effective_fqn() that prefers bound_fqn when available, falling back to deriving the FQN from ros_binding (namespace_pattern + node_name). Replace all direct bound_fqn accesses in handler_context, log_handlers, fault_handlers, gateway_node samplers, thread_safe_entity_cache config aggregation, and plugin_context with effective_fqn() calls. Update test_bulk_data_api for areas now returning 200 (entity capabilities extended) and test_scenario_discovery_manifest timeout for log aggregation.
Pull Request
Summary
Fix outdated documentation, API response bugs, and a discovery bug after merge pipeline, logging, and plugin system changes landed on main. Extend entity capabilities for areas/functions and fix cyclic subscription sampler scoping.
Breaking changes:
GET /version-inforesponse key renamed fromsovd_infoto SOVD-standarditemsGET /root endpoint restructured: flat string endpoint list, newcapabilitiesobject,api_base/name/versionfieldssqlite3tomcapCode fixes:
gateway_node.cpp)handle_root: logs, bulk-data, cyclic-subscriptions, updateshandle_root: logs, bulk_data, cyclic_subscriptions, updateshandle_root(listed but never route-registered)bulk-data,logs,cyclic-subscriptionsURI fields to entity capability responsesApp::effective_fqn()workaround for manifest_only mode wherebound_fqnis never set - derives FQN from ros_binding fallback. Replace all directbound_fqnaccesses in handlers, samplers, config aggregation, and plugin context (Set bound_fqn from ros_binding at manifest parse time #262)Documentation fixes:
/version-infoexample response in rest.rstself->hrefin area/component list examples (matching actual code)areafield from components list example.[]->.items[]).. contents::TOC and case-sensitivity note for policy valuesHybridDiscoveryStrategy->hybridin health examplemerge_types.hppMergeReport::to_json()DELETE /{entity}/faults, areas/functions resource collection notes@verifies REQ_INTEROP_003to test_plugin_vendor_extensionsIssue
Type
Testing
test_bulk_data_api,test_scenario_discovery_manifestsphinx-buildcompletes with zero warningsChecklist
Follow-up issues
sovd_info->itemsrename in web UIsovd_info->itemsrename in Foxglove extension