Skip to content

fix(privacy): avoid replacing bare values in prose - #3905

Open
ranxi2001 wants to merge 1 commit into
volcengine:mainfrom
ranxi2001:fix/skill-privacy-placeholder
Open

fix(privacy): avoid replacing bare values in prose#3905
ranxi2001 wants to merge 1 commit into
volcengine:mainfrom
ranxi2001:fix/skill-privacy-placeholder

Conversation

@ranxi2001

Copy link
Copy Markdown
Contributor

Description

Prevent skill privacy placeholderization from rewriting configured bare values
that merely appear at the start of ordinary prose after a colon or equals sign.
Bare assignments now match only when the configured value is followed by
optional horizontal whitespace and then LF, CRLF, or end of input. Quoted-value
replacement behavior and the placeholder format remain unchanged.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Fixes #3791

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Anchor unquoted colon/equal assignment values to line boundaries with an escaped pattern.
  • Preserve separators, leading/trailing horizontal whitespace, and LF/CRLF endings.
  • Add regression coverage for prose, CRLF, regex-special values, and quoted-value compatibility.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing focused unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Commands run:

python -m pytest -o addopts='' tests/server/test_privacy_config_service.py -k placeholderization -q
python -m ruff format --check openviking/privacy/skill_placeholder.py tests/server/test_privacy_config_service.py
python -m ruff check openviking/privacy/skill_placeholder.py tests/server/test_privacy_config_service.py
python -m mypy --follow-imports=skip --ignore-missing-imports openviking/privacy/skill_placeholder.py
python -m compileall -q openviking/privacy/skill_placeholder.py tests/server/test_privacy_config_service.py
git diff --check upstream/main...HEAD

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable.

Additional Notes

The focused helper tests report 5 passed with four pre-existing Pydantic
deprecation warnings. The complete privacy service module was attempted, but
service-level cases require the unavailable ragfs_python native binding and
one existing extraction case invokes configured VLM I/O. make check-deps
stops because CMake is absent on this host. No native code is changed by this PR.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Skill privacy placeholderizer over-redacts secret values appearing in prose

1 participant