Skip to content

docs: define sensitivity and protection method#151

Merged
asteier2026 merged 6 commits into
mainfrom
asteier2026/docs/sensitivity
May 15, 2026
Merged

docs: define sensitivity and protection method#151
asteier2026 merged 6 commits into
mainfrom
asteier2026/docs/sensitivity

Conversation

@asteier2026
Copy link
Copy Markdown
Contributor

Changes include:

  • Documentation for how sensitivity and protection method are assigned.

@asteier2026 asteier2026 requested a review from a team as a code owner May 11, 2026 16:02
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR adds a new "Key concepts" section to docs/concepts/rewrite.md that formally defines Sensitivity (with a table of high/medium/low levels and their leakage weights) and Protection method (with a table of all five methods: replace, generalize, suppress_inference, remove, leave_as_is). It addresses previous review feedback requesting concrete level definitions and a table format for protection methods.

  • Sensitivity table introduces the three discrete levels and their exact leakage weights (1.0 / 0.6 / 0.3), making the downstream leakage mass formula in the Configuration section self-consistent.
  • Protection method table replaces what was previously a run-on sentence with scannable rows that align with the enum values used in the codebase.

Confidence Score: 5/5

Documentation-only change; no code paths are modified.

The change touches only a Markdown documentation file, adding two reference tables that are consistent with the leakage weights and enum values already present elsewhere in the document and codebase. There is no runtime risk.

No files require special attention.

Important Files Changed

Filename Overview
docs/concepts/rewrite.md Adds a 'Key concepts' section with a Sensitivity table (high/medium/low levels with leakage weights) and a Protection method table (replace, generalize, suppress_inference, remove, leave_as_is) — documentation-only change with minor prose awkwardness.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Entity detected] --> B[Assign Sensitivity]
    B --> C{Sensitivity level}
    C -->|high - weight 1.0| D["Direct identifiers\n(names, IDs, contacts)"]
    C -->|medium - weight 0.6| E["Quasi-identifiers\n(location, occupation, age)"]
    C -->|low - weight 0.3| F["Generic attributes\n(widely shared traits)"]
    D & E & F --> G[Assign Protection Method]
    G --> H{Method chosen}
    H --> I[replace\nSynthetic alternative]
    H --> J[generalize\nBroader category]
    H --> K[suppress_inference\nRewrite surrounding text]
    H --> L[remove\nDelete entirely]
    H --> M[leave_as_is\nNo change needed]
    I & J & K & L --> N[Leakage scoring]
    M --> O{strict_entity_protection?}
    O -->|True| P[Override → active protection]
    O -->|False| N
    P --> N
Loading

Reviews (6): Last reviewed commit: "Update docs/concepts/rewrite.md" | Re-trigger Greptile

Comment thread docs/concepts/rewrite.md Outdated
Comment thread docs/concepts/rewrite.md Outdated
Comment thread docs/concepts/rewrite.md Outdated
Comment thread src/anonymizer/engine/schemas/rewrite.py Outdated
asteier2026 and others added 3 commits May 13, 2026 08:43
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Comment thread docs/concepts/rewrite.md
Comment thread docs/concepts/rewrite.md
Copy link
Copy Markdown
Collaborator

@lipikaramaswamy lipikaramaswamy left a comment

Choose a reason for hiding this comment

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

looks good, provides more clarity on the total risk management approach we describe in the devnote.

Comment thread docs/concepts/rewrite.md Outdated
Co-authored-by: lipikaramaswamy <31832945+lipikaramaswamy@users.noreply.github.com>
@asteier2026 asteier2026 merged commit 17b9970 into main May 15, 2026
11 checks passed
@asteier2026 asteier2026 deleted the asteier2026/docs/sensitivity branch May 15, 2026 17:45
asteier2026 added a commit that referenced this pull request May 15, 2026
* feature: add docs for sensitivity and protection method

* fix: address review feedback on sensitivity

* fix: undoing change I made to wrong PR

* Update docs/concepts/rewrite.md

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix: add more detail and organization to definitions

* Update docs/concepts/rewrite.md

Co-authored-by: lipikaramaswamy <31832945+lipikaramaswamy@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: lipikaramaswamy <31832945+lipikaramaswamy@users.noreply.github.com>
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.

3 participants