fix: preserve work intent when normalizing permissions - #149
Open
giscebot wants to merge 1 commit into
Open
Conversation
pilipilisbot
approved these changes
Jul 28, 2026
pilipilisbot
left a comment
Owner
There was a problem hiding this comment.
Approved. I reviewed the intent-classifier normalizer, the enqueue path that applies the LLM result, and the dispatch path where work_intent controls write/push allowance, routing, and timeouts. Treating work_intent as canonical here matches the existing operational gate, and normalizing write_permission upward for work_allowed avoids silently misreporting an implementation request as review_only while preserving an audit trail through normalization_warnings.
Checked locally in an isolated temp virtualenv: /tmp/gab-pr149-venv/bin/python -m pytest tests/test_intent_classifier.py tests/test_parser.py (28 passed).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
work_intentas canonical when normalizing intent-classifier output.write_permissionvalues to matchwork_intentinstead of downgradingwork_allowedtoreview_only.normalization_warningsin intent-classifier metadata when a field is corrected.Why
A trusted PR comment asking
@giscebotto add an e2e test produced raw LLM output withwork_intent=work_allowedandwrite_permission=none. The previous normalizer silently converted that toreview_only, making the dashboard look like the LLM had classified the request as read-only.Tests
pytest tests/test_intent_classifier.py tests/test_parser.py