Skip to content

fix(ai-gateway): pii service docs - #8286

Open
tomek-labuk wants to merge 3 commits into
mainfrom
fix/pii-service-docs
Open

tomek-labuk wants to merge 3 commits into
mainfrom
fix/pii-service-docs

Conversation

@tomek-labuk

@tomek-labuk tomek-labuk commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Context: https://kongstrong.slack.com/archives/CDSTDSG9J/p1795473046060069

Testing

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly.
  • Add new pages to the product documentation index (if applicable).

@tomek-labuk
tomek-labuk requested a review from a team as a code owner November 24, 2026 12:26
@kong-ksai
kong-ksai Bot requested a review from a team November 24, 2026 12:26
@netlify

netlify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 47d95aa
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6b0586444944d0f6d3a53f00
😎 Deploy Preview https://deploy-preview-8286--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@kong-ksai

kong-ksai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ KSAI Review: Finished


Run report (federated) · 1 paid run · $0.0974 total
# Engine Result Model Turns Cost
1 opencode2 success deepseek-ai/deepseek-v4.1-flash/high 28 $0.0974

Reviewing cost $0.0974

@kong-ksai kong-ksai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Check Result
Scope Frozen scope: the two changed files, app/_includes/md/ai-gateway/v2/policies/pii-service.md and app/_kong_plugins/ai-sanitizer/index.md, between base 570dd4c and head 8e7d480. 86 added lines, no deletions, no other path in the diff.
Mandate Ran default-code-review (adversarial) on the added score section and its example table: attacked every claim against the plugin and policy schemas, the example files, the sibling policy page and the shared includes. No source comments, callers or code paths exist in this diff.
Findings 1 Medium
Findings audit Independent audit completed: 1 kept, 1 removed, 0 with insufficient evidence, 0 added.

Docs-only change: one 43-line section is added to the plugin page and to the shared AI Gateway include, and the diff touches nothing else in the frozen scope.

One factual defect survives: the added sentences about score bounds and a missing score contradict both repository schemas, and the same wrong sentence is now published twice.

The precedence rules, the nrp examples and the service's rejection message describe AI PII service behaviour that no repository file records, so this pass can neither confirm nor refute them.

Structure, table syntax, headings, links and output-block markers in the added lines match repository conventions; no further defect was found in the frozen scope.

Comment thread app/_kong_plugins/ai-sanitizer/index.md Resolved
@kong-ksai
kong-ksai Bot removed the request for review from a team November 24, 2026 12:31

@juliamrch juliamrch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Added a suggestion to simplify the text, apply it as you see fit

Comment on lines +44 to +47
The `score` is the confidence value that a custom pattern assigns to its matches.
The score only matters when a custom pattern and a built-in entity type, such as `email` or `nrp`, match the same text.
In that case, the higher score is used, and the custom pattern takes precedence when scores are equal.
Without an overlapping match, a custom pattern is redacted at any score above `0`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
The `score` is the confidence value that a custom pattern assigns to its matches.
The score only matters when a custom pattern and a built-in entity type, such as `email` or `nrp`, match the same text.
In that case, the higher score is used, and the custom pattern takes precedence when scores are equal.
Without an overlapping match, a custom pattern is redacted at any score above `0`.
The `score` is the confidence value that a custom pattern assigns to its matches.
The score matters when a custom pattern and a built-in entity type (like `email` or `nrp`), match the same text. In that case:
* The plugin uses the higher score.
* If scores are equal, the custom pattern takes precedence over the built-in entity.
If no built-in entity matches the same text, the plugin redacts a custom pattern's matches at any score above `0`.

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