Skip to content

docs: include PII redaction Rust API reference#280

Open
willkill07 wants to merge 1 commit into
NVIDIA:mainfrom
willkill07:docs/pii-redaction-rust-reference
Open

docs: include PII redaction Rust API reference#280
willkill07 wants to merge 1 commit into
NVIDIA:mainfrom
willkill07:docs/pii-redaction-rust-reference

Conversation

@willkill07

@willkill07 willkill07 commented Jun 16, 2026

Copy link
Copy Markdown
Member

Overview

Add the nemo-relay-pii-redaction crate to the generated Fern Rust library reference so the Rust API docs include the first-party PII redaction plugin surface.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Added nemo-relay-pii-redaction to the Rust API reference generator crate list.
  • Included the crate in the cargo doc --no-deps invocation and generated-source label.
  • Updated Fern cleanup copy that enumerates the Rust crates covered by the generated reference.

Where should the reviewer start?

Start with scripts/docs/generate_rust_library_reference.py; it is the durable source for the ignored generated Fern Rust API pages.

Validation:

  • just docs-api-reference
  • npx fern check --warnings (passed with the existing FDR redirects 403 warning)
  • npx fern docs broken-links --strict
  • git diff --check
  • Commit hook checks for the staged files

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to: none

Summary by CodeRabbit

  • Documentation
    • Extended Rust API reference documentation to include the nemo-relay-pii-redaction library, providing developers with comprehensive reference materials alongside existing NeMo Relay crates.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07 willkill07 requested a review from lvojtku as a code owner June 16, 2026 20:03
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 45d8f626-40c3-496e-8206-a77b31d66f88

📥 Commits

Reviewing files that changed from the base of the PR and between 2841a32 and 693b668.

📒 Files selected for processing (2)
  • scripts/docs/fern_cleanup.py
  • scripts/docs/generate_rust_library_reference.py
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (9)
{pyproject.toml,**/*.py}

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Maintain consistency between Python package names in pyproject.toml and import paths used throughout the codebase

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
**/*.{py,txt,toml,cfg,yaml,yml}

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update Python package names and top-level module imports during coordinated rename operations

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
{scripts/**,third-party/**}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

{scripts/**,third-party/**}: For third-party integration or patch changes, run patch validation with ./scripts/apply-patches.sh --check and relevant integration tests. Keep root ./scripts/*.sh wrappers for third-party flows
Run third-party patch bootstrap with ./scripts/bootstrap-third-party.sh
Run third-party patch validation with ./scripts/apply-patches.sh --check

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
**/*.py

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

**/*.py: Run Python formatting with uv run ruff format python
Run Python testing with uv run pytest -k "<pattern>"

**/*.py: Use Ruff with rule sets E, F, W, I for Python linting
Use Ruff formatter with line length 120 and double quotes for Python code formatting
Run ty for Python type checking
Use Python snake_case naming convention for Python identifiers
Include SPDX license header in all Python source files using hash comment syntax
Validate Python code with uv run pre-commit run --all-files to enforce Ruff linting and formatting, and ty type checking

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
**/*.{md,mdx,py,sh,yaml,yml,toml,json}

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

Keep package names, repo references, and build commands current

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}

📄 CodeRabbit inference engine (AGENTS.md)

Keep SPDX headers on source, docs, scripts, and configuration files. The project is Apache-2.0.

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
**/*.{rs,py,go,js,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions: Rust and Python use snake_case, C FFI exports prefixed nemo_relay_, Go uses PascalCase for public APIs, Node.js uses camelCase.

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go, WebAssembly, and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings, documentation,
integration patches, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
  wasm/       # wasm-bindgen WebAssembly binding and JS wrappers
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
third_party/  # P...

Files:

  • scripts/docs/generate_rust_library_reference.py
  • scripts/docs/fern_cleanup.py
🔇 Additional comments (2)
scripts/docs/generate_rust_library_reference.py (1)

23-33: LGTM!

Also applies to: 149-167

scripts/docs/fern_cleanup.py (1)

28-35: LGTM!


Walkthrough

Adds nemo-relay-pii-redaction to the Rust docs toolchain: the crate is registered in the CRATES config and GENERATED_BY metadata in generate_rust_library_reference.py, included in the cargo doc invocation via -p nemo-relay-pii-redaction, and appended to the supported surfaces list in SUPPORT_API_REFERENCE_TEXT in fern_cleanup.py.

Changes

nemo-relay-pii-redaction rustdoc integration

Layer / File(s) Summary
Crate config, metadata, and cargo doc invocation
scripts/docs/generate_rust_library_reference.py
CRATES tuple extended with nemo-relay-pii-redaction entry; GENERATED_BY string updated to include -p nemo-relay-pii-redaction; _run_cargo_doc passes the new -p flag to cargo doc.
Supported surfaces reference text
scripts/docs/fern_cleanup.py
SUPPORT_API_REFERENCE_TEXT updated to enumerate nemo-relay-pii-redaction alongside existing Rust library surfaces.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • NVIDIA/NeMo-Relay#278: Updates CI/docs tooling to include nemo-relay-pii-redaction in the set of published crate artifacts, directly parallel to this PR's rustdoc generation changes.
  • NVIDIA/NeMo-Relay#252: Adds product documentation (README/MDX) for the PII redaction plugin crate that this PR now wires into rustdoc generation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with 'docs' type and provides a clear, concise summary of the change under 72 characters.
Description check ✅ Passed The description is comprehensive, following the template structure with all required sections filled out including Overview, Details, Where to start, and Related Issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:S PR is small Documentation documentation-related lang:python PR changes/introduces Python code labels Jun 16, 2026
@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation documentation-related lang:python PR changes/introduces Python code size:S PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant