3di | Enhance metadata - #6981
Open
keithkirkwood-3di wants to merge 137 commits into
Open
keithkirkwood-3di wants to merge 137 commits into
keithkirkwood-3di wants to merge 137 commits into
Conversation
keithkirkwood-3di
marked this pull request as ready for review
July 16, 2026 14:42
ahcorde
requested changes
Sep 9, 2026
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…aries/Single-Package-Define-And-Use-Interface.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…S2-Nodes/Understanding-ROS2-Nodes.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…ospection.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…S2-Nodes/Understanding-ROS2-Nodes.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…on-guidelines.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…ut-Security.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
…roducing-ros2-security.rst Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: 3di Information Solutions <openrobotics@3di-info.com>
gbiggs
marked this pull request as ready for review
September 14, 2026 00:51
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.
Description
This PR introduces the mechanism and configuration for automated RST documentation enhancement checks required to support the new ROS documentation information architecture. All RST files created or modified in a pull request to the default branch (rolling) on
ros2_documentationare checked against rules defined intools/enhance.yaml:Document metadata
{PRODUCT}and{DISTRO}) or require the contributor to supply a non-empty value (e.g.area).Post-heading directives
.. short-description::Checks that the first prose paragraph after the primary document title is wrapped in a .. short-description:: directive... showmeta::Checks that a .. showmeta:: directive exists after the title area with the configured options (e.g. :order: area, content-type, experience).Pull request feedback
When enhancements are missing, the Enhance workflow posts a single Documentation enhancements summary review comment on the pull request. For each affected file, the comment lists:
.. meta::fields (labelled required or optional, with suggested values where configured), andThe tool is read-only: it does not modify RST files, emit inline commit suggestions, or post check annotations.
On subsequent workflow runs in the same PR, stale summary reviews are automatically minimised as Outdated and replaced with an updated summary if enhancements are still missing. When all issues are resolved, outdated reviews are cleared and no new comment is posted.
Testing
For security reasons, the new
Enhanceworkflow runs trusted code from the base branch of the PR (typicallyrolling), while processing content from the incoming head branch. This pattern (usingpull_request_targetin GitHub Actions) grants necessary write permissions for fork PRs (enabling inline suggestions and review comments) without executing untrusted code from forks.To test this PR locally or on a fork:
rolling) of your fork first.rollingwith new or edited.rstfiles.Changes
tools/enhance.yamlconfiguration for meta field rules and after_title directive rules (.. short-description::,.. showmeta::), with per-rule warning / error severity and suggested default values where applicable.tools/enhance_config.pyto load and validate enhancement rules from YAML.tools/ensure_enhancements.pyCLI to check changed RST files against the config, generate Documentation enhancements summary review comments, and emit GitHub Actions status outputs for CI. The tool is read-only and does not modify source files.tools/rst_utils.pyread-only helpers to detect.. meta::fields and the presence of.. short-description::/.. showmeta::directives.tools/supersede_enhancement_reviews.shto minimise outdated summary review comments via the GitHub GraphQL API..github/workflows/enhance.ymlworkflow to run enhancement checks on pull requests, supersede stale reviews, post summary review comments, and fail the job when error-severity rules are unmet.Makefilewith ensure-enhancements and supersede-enhancement-reviews targets, and extend test-tools to run the tools/tests/ unit suite (viaPYTHONPATH).tools/tests/test_ensure_enhancements.pyandtools/tests/test_rst_utils.py.tools/README.md.{PRODUCT}and{DISTRO}macro placeholders expanded by Sphinx inconf.py.Did you use Generative AI?
Yes - Cursor IDE, using models Composer 2.5, Gemini Pro 3.1, Flash 3.6, and Anthropic Sonnet 5 / Opus 5.
Additional Information
Issue: #6991