docs(rails): document rail manifests and action-backed surfaces - #2259
docs(rails): document rail manifests and action-backed surfaces#2259Pouyanpi wants to merge 2 commits into
Conversation
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
a9d74e9 to
2e40996
Compare
📝 WalkthroughWalkthroughThis change adds documentation for ChangesRail documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/rail-manifests.mdx`:
- Line 68: Remove the docs_url entry from the minimal rail manifest example,
since it references a source file rather than a published documentation route.
Do not add a replacement unless a corresponding rendered Fern route exists in
docs/index.yml.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 9d0af288-19a8-4760-9f24-1421d8711933
📒 Files selected for processing (5)
docs/configure-rails/actions/creating-actions.mdxdocs/configure-rails/actions/index.mdxdocs/configure-rails/actions/rail-outcomes.mdxdocs/index.ymldocs/reference/rail-manifests.mdx
| categories=("input",), | ||
| capabilities=("allow", "block"), | ||
| tags=("built-in",), | ||
| docs_url="docs/configure-rails/guardrail-catalog/community/example-rail.mdx", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the source file path from docs_url.
This value points to a source file path. It does not identify a published documentation route. The referenced navigation does not contain example-rail.
Remove docs_url from this minimal example. Add a rendered Fern route only when the example has a published page.
Proposed fix
- docs_url="docs/configure-rails/guardrail-catalog/community/example-rail.mdx",As per path instructions, derive internal documentation routes from docs/index.yml and do not use source-path-style links.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| docs_url="docs/configure-rails/guardrail-catalog/community/example-rail.mdx", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/reference/rail-manifests.mdx` at line 68, Remove the docs_url entry from
the minimal rail manifest example, since it references a source file rather than
a published documentation route. Do not add a replacement unless a corresponding
rendered Fern route exists in docs/index.yml.
Sources: Coding guidelines, Path instructions
There was a problem hiding this comment.
this is part of the manifest's contract, it is an example
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '=== Candidate manifest implementation files ==='
fd -t f -a 'manifest|manifests' . | sed -n '1,160p'
printf '%s\n' '=== docs_url declarations, validation, and consumers ==='
rg -n -C 4 '\bdocs_url\b' . -g '!**/.git/**' | sed -n '1,360p'
printf '%s\n' '=== Target page ==='
cat -n docs/reference/rail-manifests.mdx | sed -n '1,280p'
printf '%s\n' '=== Documentation navigation entries ==='
rg -n -C 3 'rail-manifests|example-rail|guardrail-catalog' docs/index.yml docs -g 'index.yml' -g '*.mdx' | sed -n '1,260p'Length of output: 60496
@Pouyanpi, verification confirms this.
RailMetadata.docs_url uses a repository-relative documentation source path. Built-in rail manifests use the same format. tests/rails/llm/test_builtin_rail_manifests.py verifies that each non-HTTP docs_url value resolves to a repository file.
The docs_url value on Line 68 is correct for the manifest contract. The original finding is withdrawn.
✏️ Learnings added
Learnt from: Pouyanpi
Repo: NVIDIA-NeMo/Guardrails PR: 2259
File: docs/reference/rail-manifests.mdx:68-68
Timestamp: 2026-08-07T12:37:47.643Z
Learning: In the NVIDIA NeMo Guardrails library, `RailMetadata.docs_url` is a manifest-contract field that uses a repository-relative documentation source path, such as `docs/configure-rails/guardrail-catalog/community/guardrails-ai.mdx`. This field is validated as a repository file path by `tests/rails/llm/test_builtin_rail_manifests.py`. The Fern-route requirement applies to links in `docs/**/*.mdx`, not to `RailMetadata.docs_url` values in Python manifest examples.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
You are interacting with an AI system.
Documents rail manifests and their action-backed execution surfaces.
Summary by CodeRabbit
output_mapping.