feat: add Turkish semantic policy signals
Summary
The built-in semantic-policy classifier only recognized English natural-language risk instructions. This adds Turkish equivalents so default enforcement identifies the same high-risk intents in both languages.
Changes
- Adds Turkish signals for bulk data deletion, external data transfer, privileged-access grants, system actions, and code or command execution.
- Preserves all existing English signals, public APIs, categories, and confidence behavior.
- Adds parameterized regressions that classify and deny each Turkish instruction under the default policy.
Testing
PYTHONPATH=src python3direct classification and default-denial check for all five Turkish signal categoriespython3 -m py_compile src/agent_os/semantic_policy.py tests/test_semantic_policy.py
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.
Welcome to the Agent Governance Toolkit! Thanks for your first pull request. Please ensure tests pass, code follows style (ruff check), and you have signed the CLA. See our Contributing Guide.
AI-generated review output. Treat it as untrusted analysis and verify before acting. No security issues found.🤖 AI Agent: security-scanner — View details
AI-generated review output. Treat it as untrusted analysis and verify before acting.🤖 AI Agent: breaking-change-detector — API Compatibility
API Compatibility
Severity
Change
Impact
High
Added
_SIGNALS_TR dictionary and integrated it into the _SIGNALS dictionary in semantic_policy.py.If any existing code relies on the
_SIGNALS dictionary without expecting the new Turkish signals, it may lead to unexpected behavior or classification results.
Medium
Modified the
_SIGNALS dictionary by extending it with new Turkish signals.Existing users of
_SIGNALS may experience changes in behavior if they are not prepared for the additional Turkish signal patterns.
AI-generated review output. Treat it as untrusted analysis and verify before acting.🤖 AI Agent: test-generator — `agent-governance-python/agent-os/src/agent_os/semantic_policy.py`
agent-governance-python/agent-os/src/agent_os/semantic_policy.py
test_turkish_signal_edge_cases -- Validate edge cases for Turkish signals, such as partial matches or mixed-language instructions.test_invalid_turkish_regex_patterns -- Ensure invalid or malformed Turkish patterns do not cause runtime errors.agent-governance-python/agent-os/tests/test_semantic_policy.py
test_turkish_signal_confidence_thresholds -- Verify confidence thresholds for Turkish signals align with expected values.test_turkish_signal_category_overlap -- Test scenarios where Turkish instructions could match multiple categories to ensure correct classification.
AI-generated review output. Treat it as untrusted analysis and verify before acting.🤖 AI Agent: docs-sync-checker — Docs Sync
Docs Sync
README.md -- Turkish semantic policy signals section needs updateCHANGELOG.md -- missing entry for added Turkish semantic policy signals
AI-generated review output. Treat it as untrusted analysis and verify before acting. Welcome, and thank you for contributing! 🎉 Your addition of Turkish semantic policy signals is well-structured and includes thorough test coverage—great job! Before merging, please address the following: Refer to CONTRIBUTING.md for guidance.🤖 AI Agent: contributor-guide — View details
AI-generated review output. Treat it as untrusted analysis and verify before acting. TL;DR: 0 blockers, 0 warnings. The changes are well-implemented and maintain security and compatibility. No issues found. Clean change.🤖 AI Agent: code-reviewer — View details
#
Sev
Issue
Where
PR Review Summary
| Check | Status | Details |
|---|---|---|
| 🔍 Code Review | ⚠️ Missing | No current-run comment |
| 🛡️ Security Scan | ⚠️ Missing | No current-run comment |
| 🔄 Breaking Changes | ⚠️ Missing | No current-run comment |
| 📝 Docs Sync | ⚠️ Missing | No current-run comment |
| 🧪 Test Coverage | ⚠️ Missing | No current-run comment |
Verdict: ⚠️ AI review incomplete; ready for human review
AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims.
@microsoft-github-policy-service agree
@MohammadHaroonAbuomar @liamcrumm gentle nudge: this PR has been awaiting a code-owner review for over 3 business days. Could one of you take a look when you have a moment? Thanks.
Applied the requested follow-ups in 61d001cb:\n\n- added Turkish cspell terms for this PR so spell-check can pass\n- added a benign Turkish negative test to ensure safe instructions are not denied\n- expanded Turkish risk regexes to include common de-asciified variants (for example: tum/kayitlari, calistir/yurut, gonder/yukle) so the noted evasion pattern is covered in this PR\n\nPlease re-review when convenient.
Addressed the latest review in :\n\n- Added and to the inline in .\n- Rebased content to current terms to avoid merge conflicts from PR-local term drift.\n\nPlease re-check when convenient.
Addressed the latest review in commit 6759f6f.
- Added raporu and göster to the inline cspell:ignore in test_semantic_policy.py.
- Rebased .cspell-repo-terms.txt content to current main terms to avoid merge conflicts from PR-local term drift.
Please re-check when convenient.
@sinannar PR now looks good to me. You have branch conflicts you need to resolve.
Addressed the latest Copilot review feedback in commit 1e8b4de. Reverted the unrelated .cspell-repo-terms.txt dictionary rewrite; Turkish spell-check coverage remains scoped to inline cspell:ignore directives in the two changed Python files.
Follow-up on the latest Copilot review: commit 5ad6912 keeps .cspell-repo-terms.txt exactly aligned with current main. This is a conflict-only synchronization required by GitHub mergeability, not new PR-specific dictionary content; Turkish spell-check terms remain scoped to inline cspell:ignore directives in the two changed Python files.