elastic / elastic/ai-github-actions
Fix Unicode normalization in add_labels allowlist sanitization
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Summary
This fixes Unicode canonical-equivalence handling in add-label pre-sanitization so allowlist matching does not drop valid labels when NFC/NFD forms differ.
### What changed
- Updated `.github/workflows/gh-aw-fragments/safe-output-add-labels.md` to normalize both:
- configured `classification-labels` entries, and
- requested `add_labels` values
using `normalize('NFC')` before exact allowlist matching.
- Recompiled workflows so generated lock files include the same fix:
- `.github/workflows/gh-aw-issue-triage.lock.yml`
- `.github/workflows/gh-aw-dependency-review.lock.yml`
- Added a regression test:
- `tests/test_safe_output_add_labels.py`
## Why
Issue triage could drop canonically equivalent Unicode labels (for example `café` NFC vs `cafe\u0301` NFD) because matching was trim-only and relied on raw string equality.
## Validation
- `make compile`
- `make lint-workflows`
- `make test` (with `UV_CACHE_DIR=/tmp/gh-aw/agent/uv-cache`)
Closes #1170.
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Bug Hunter](https://github.com/elastic/ai-github-actions/actions/runs/26510114586)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
---
> [!NOTE]
> This was originally intended as a pull request, but the git push operation failed.
>
> **Workflow Run:** [View run details and download bundle artifact](https://github.com/elastic/ai-github-actions/actions/runs/26510114586)
>
> The bundle file is available in the `agent` artifact in the workflow run linked above.
To create a pull request with the changes:
```sh
# Download the artifact from the workflow run
gh run download 26510114586 -n agent -D /tmp/agent-26510114586
# Fetch the bundle into a local branch
git fetch /tmp/agent-26510114586/aw-fix-1170-unicode-label-normalization.bundle refs/heads/fix-1170-unicode-label-normalization:refs/heads/fix-1170-unicode-label-normalization-bd8e9266f1afcf51
git checkout fix-1170-unicode-label-normalization-bd8e9266f1afcf51
# Push the branch to origin
git push origin fix-1170-unicode-label-normalization-bd8e9266f1afcf51
# Create the pull request
gh pr create --title 'Fix Unicode normalization in add_labels allowlist sanitization' --base main --head fix-1170-unicode-label-normalization-bd8e9266f1afcf51 --repo elastic/ai-github-actions
```
Contributor guide
Assessment
This issue has not been assessed yet.