Skip to content

docs(policy): deprecate non-namespaced registered resources#253

Merged
alkalescent merged 14 commits intomainfrom
DSPX-2496-rr-ns
Apr 10, 2026
Merged

docs(policy): deprecate non-namespaced registered resources#253
alkalescent merged 14 commits intomainfrom
DSPX-2496-rr-ns

Conversation

@alkalescent
Copy link
Copy Markdown
Contributor

@alkalescent alkalescent commented Mar 18, 2026

This PR documents the deprecation of non-namespaced registered resources and how to migrate existing resources using otdfctl.

Summary by CodeRabbit

  • Documentation

    • Clarified that namespaces can optionally contain registered resources; explained deletion cascade, uniqueness, lookup behavior, and namespaced enforcement
    • Introduced namespaced registered resource identifier formats and deprecated legacy non-namespaced formats
    • Added migration guidance and workflows for converting non-namespaced registered resources
    • Updated Authorization docs with concrete example identifiers and deprecation labels
  • Style

    • Broadened documentation linting vocabulary to accept plural and variant forms (e.g., namespace, FQNs, AAVs)

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating the documentation to reflect the deprecation of non-namespaced registered resources within the policy system. It introduces the concept of namespaced registered resources, provides clear examples of their Fully Qualified Names (FQNs), and outlines the necessary migration steps for existing resources. These changes ensure that the documentation aligns with the evolving policy architecture, guiding users towards the recommended, namespaced approach for managing registered resources.

Highlights

  • Deprecation of Non-Namespaced Registered Resources: Non-namespaced Registered Resources are now officially deprecated, with a future version requiring all Registered Resources to be associated with a namespace.
  • Migration Path Documented: Documentation now includes instructions on how to migrate existing non-namespaced Registered Resources using the otdfctl migrate registered-resources command.
  • FQN Examples Updated: Fully Qualified Name (FQN) examples for Registered Resources have been updated across the documentation to reflect the new namespaced structure and explicitly mark the deprecated non-namespaced format.
  • Namespace Scope Expansion: Namespaces are now explicitly documented as organizational containers for both attributes and optionally for registered resources, clarifying their expanded role.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively documents the deprecation of non-namespaced registered resources. The changes are consistent across all modified files, updating definitions, examples, and diagrams to reflect that registered resources are now namespaced. The documentation is clearer and more accurate as a result. I have one suggestion to further improve the migration instructions to make them more actionable for users.

Comment thread docs/components/policy/registered_resources.md
@github-actions
Copy link
Copy Markdown
Contributor

📄 Preview deployed to https://opentdf-docs-pr-253.surge.sh

@alkalescent alkalescent marked this pull request as ready for review April 1, 2026 14:01
@alkalescent alkalescent requested review from a team as code owners April 1, 2026 14:01
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 343b5830-7644-4a28-93ea-201761295d0f

📥 Commits

Reviewing files that changed from the base of the PR and between 14821d4 and 2b69737.

📒 Files selected for processing (1)
  • docs/sdks/policy.mdx

📝 Walkthrough

Walkthrough

This PR updates documentation and a Vale vocabulary: it introduces optional namespace scoping for Registered Resources, deprecates non‑namespaced Registered Resource FQNs and adds a migration workflow, and broadens Vale acceptance patterns to accept plural/variant forms.

Changes

Cohort / File(s) Summary
Vale vocabulary
\.github/vale-styles/config/vocabularies/Opentdf/accept.txt
Expanded acceptance patterns to match namespace variants, FQN/FQNs, and AAV/AAVs.
Registered Resources docs
docs/components/policy/registered_resources.md
Made Namespace optional in resource composition; introduced namespaced FQN format and deprecated non‑namespaced FQNs; added namespacing semantics (uniqueness, retrieval, deletion cascade) and NamespacedPolicy enforcement; added otdfctl migrate registered-resources migration guide, modes, auto-detection rules, and updated examples/model.
Policy & Authorization docs
docs/components/policy/attributes.md, docs/components/policy/index.md, docs/components/authorization.md, docs/sdks/policy.mdx
Clarified that Namespaces may contain registered resources; updated wording and examples; changed experimental labels to deprecated for certain FQN examples.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as otdfctl
  participant API as Authorization/API
  participant DB as RegisteredResourcesDB
  participant User as Operator
  rect rgba(200,230,201,0.5)
    User->>CLI: run migrate (dry-run|--commit|--interactive)
    CLI->>API: request migration plan
    API->>DB: scan resources & AAVs for namespace heuristics
    DB-->>API: return detection categories (deterministic/conflicting/undetermined/no-AAVs)
    API-->>CLI: return migration plan (changes, warnings)
    CLI-->>User: display plan (prompt if interactive)
    alt commit
      CLI->>API: execute migration (apply changes)
      API->>DB: create namespaced resources, tag legacy, update UUIDs
      DB-->>API: results & warnings
      API-->>CLI: migration result
      CLI->>User: summary and next steps
    end
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • jp-ayyappan
  • elizabethhealy
  • c-r33d

Poem

🐰
Namespaces sprout where resources play,
Old FQNs hop softly away,
A migrator hums to set things straight,
I nibble docs and celebrate —
New fields tidy up the way! 🌿

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: documenting the deprecation of non-namespaced registered resources. All file changes support this theme, with updates across multiple documentation files explaining the deprecation, namespace requirements, and migration guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-2496-rr-ns

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
docs/components/policy/registered_resources.md (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Switch this modified policy page to .mdx format.

This file is updated as .md, which conflicts with the documentation format rule.

As per coding guidelines, **/*.{md,mdx}: Documentation files should use .mdx format; name new pages kebab-case.mdx, and use index.mdx for section landing pages.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/components/policy/registered_resources.md` at line 1, This documentation
page is currently saved as a .md file but must follow the project's docs rule to
use .mdx; rename the file from registered_resources.md to kebab-case .mdx (e.g.,
registered-resources.mdx) or, if this is a section landing page, to index.mdx
inside a folder, and update any internal frontmatter or import usage to the .mdx
filename; ensure the top-level heading "Registered Resources" remains and that
the file extension and name follow the repository's .mdx naming conventions.
docs/components/policy/attributes.md (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Convert this updated doc page to .mdx.

The file is modified as .md, but the documentation convention requires .mdx.

As per coding guidelines, **/*.{md,mdx}: Documentation files should use .mdx format; name new pages kebab-case.mdx, and use index.mdx for section landing pages.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/components/policy/attributes.md` at line 1, The doc page titled
"Attributes" is currently written as a .md file; rename and convert it to a .mdx
file using the docs convention (use kebab-case for new page names, e.g.,
attributes.mdx) or if this is a section landing page turn it into index.mdx, and
ensure the file content is valid MDX (retain the "Attributes" heading and any
frontmatter) so it follows the **/*.{md,mdx} documentation guideline.
docs/components/authorization.md (1)

1-3: ⚠️ Potential issue | 🟡 Minor

Use .mdx for this documentation page.

This file is being modified as Markdown (.md), but docs standards require .mdx for documentation files.

As per coding guidelines, **/*.{md,mdx}: Documentation files should use .mdx format; name new pages kebab-case.mdx, and use index.mdx for section landing pages.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/components/authorization.md` around lines 1 - 3, The documentation page
"authorization.md" is in the wrong format; rename and convert it to MDX by
changing the filename to a kebab-case .mdx (e.g., authorization.mdx) or to
index.mdx if this is a section landing page, update frontmatter and any
MD-specific constructs to MDX-compatible syntax, and ensure the docs
build/config references the new .mdx file instead of the .md file.
docs/components/policy/index.md (1)

1-4: ⚠️ Potential issue | 🟡 Minor

Please migrate this updated policy doc to .mdx.

The changed page remains .md, which conflicts with the docs file-format rule.

As per coding guidelines, **/*.{md,mdx}: Documentation files should use .mdx format; name new pages kebab-case.mdx, and use index.mdx for section landing pages.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/components/policy/index.md` around lines 1 - 4, The file
docs/components/policy/index.md is still in .md and needs to be migrated to
.mdx: rename the page to use .mdx (use index.mdx for this section landing page)
and move/convert any frontmatter or markdown content into the new .mdx file
while preserving the existing YAML frontmatter fields (sidebar_position and
slug) or converting them to MDX-compatible export metadata; ensure the filename
follows the docs rule (section landing pages use index.mdx) and update any
internal imports/links that referenced docs/components/policy/index.md to point
to docs/components/policy/index.mdx.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@docs/components/authorization.md`:
- Around line 1-3: The documentation page "authorization.md" is in the wrong
format; rename and convert it to MDX by changing the filename to a kebab-case
.mdx (e.g., authorization.mdx) or to index.mdx if this is a section landing
page, update frontmatter and any MD-specific constructs to MDX-compatible
syntax, and ensure the docs build/config references the new .mdx file instead of
the .md file.

In `@docs/components/policy/attributes.md`:
- Line 1: The doc page titled "Attributes" is currently written as a .md file;
rename and convert it to a .mdx file using the docs convention (use kebab-case
for new page names, e.g., attributes.mdx) or if this is a section landing page
turn it into index.mdx, and ensure the file content is valid MDX (retain the
"Attributes" heading and any frontmatter) so it follows the **/*.{md,mdx}
documentation guideline.

In `@docs/components/policy/index.md`:
- Around line 1-4: The file docs/components/policy/index.md is still in .md and
needs to be migrated to .mdx: rename the page to use .mdx (use index.mdx for
this section landing page) and move/convert any frontmatter or markdown content
into the new .mdx file while preserving the existing YAML frontmatter fields
(sidebar_position and slug) or converting them to MDX-compatible export
metadata; ensure the filename follows the docs rule (section landing pages use
index.mdx) and update any internal imports/links that referenced
docs/components/policy/index.md to point to docs/components/policy/index.mdx.

In `@docs/components/policy/registered_resources.md`:
- Line 1: This documentation page is currently saved as a .md file but must
follow the project's docs rule to use .mdx; rename the file from
registered_resources.md to kebab-case .mdx (e.g., registered-resources.mdx) or,
if this is a section landing page, to index.mdx inside a folder, and update any
internal frontmatter or import usage to the .mdx filename; ensure the top-level
heading "Registered Resources" remains and that the file extension and name
follow the repository's .mdx naming conventions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d4d78d79-1ebf-47b7-8c5e-68d0566c3fda

📥 Commits

Reviewing files that changed from the base of the PR and between 70d68f6 and 28abb3a.

📒 Files selected for processing (6)
  • .github/vale-styles/config/vocabularies/Opentdf/accept.txt
  • docs/components/authorization.md
  • docs/components/policy/attributes.md
  • docs/components/policy/index.md
  • docs/components/policy/registered_resources.md
  • docs/sdks/policy.mdx

Comment thread docs/components/policy/registered_resources.md
Comment thread docs/components/policy/registered_resources.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/components/policy/registered_resources.md`:
- Around line 67-70: Update the "Namespace Deletion Cascade" section to
disambiguate API vs SDK behavior: explicitly state whether cascading
hard-deletes of Registered Resources (and their values) occur only for
API/admin-level namespace deletion or whether SDK calls only perform
soft-deletes (deactivation). Reference the SDK docs pages (docs/sdks/policy.mdx)
and attributes doc (docs/components/policy/attributes.md) in the text and add a
short sentence clarifying that SDK namespace operations are soft-delete only
while administrative/API endpoints can perform permanent hard-delete cascades,
or, if the API does not hard-delete, change the cascade wording to indicate
soft-delete of resources instead.
🪄 Autofix (Beta)

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 897ee3b7-a9b9-47bd-9625-0d93a29117aa

📥 Commits

Reviewing files that changed from the base of the PR and between 1f0418c and 4af541a.

📒 Files selected for processing (1)
  • docs/components/policy/registered_resources.md

Comment thread docs/components/policy/registered_resources.md
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/components/policy/registered_resources.md`:
- Line 94: Update the ambiguous "prune/cleanup" wording in the Migration
paragraph to name the exact commands (e.g., "otdfctl prune" and/or "otdfctl
cleanup") and add a direct link to the otdfctl command reference so operators
can run the correct command without guessing; edit the sentence containing
"prune/cleanup" and "otdfctl docs" to include those exact command names and a
full URL to the otdfctl prune/cleanup documentation.
🪄 Autofix (Beta)

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9a22389-f3e7-4a5a-83c1-93d5daead0c3

📥 Commits

Reviewing files that changed from the base of the PR and between 4af541a and 14821d4.

📒 Files selected for processing (2)
  • docs/components/policy/registered_resources.md
  • docs/sdks/policy.mdx
✅ Files skipped from review due to trivial changes (1)
  • docs/sdks/policy.mdx

Comment thread docs/components/policy/registered_resources.md
@alkalescent alkalescent enabled auto-merge (squash) April 8, 2026 13:58
@alkalescent alkalescent merged commit cf0b1f4 into main Apr 10, 2026
7 checks passed
@alkalescent alkalescent deleted the DSPX-2496-rr-ns branch April 10, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants