Repository navigation
Conversation
_resolve_prompt_guidance interpolated the title into a SQL literal unescaped. A title such as "Client's Refund Policy" made the filter invalid, GuidanceManager.filter returned its error payload dict, and iterating it raised AttributeError, so act() failed before starting. Escape single quotes in the literal.
djl11
force-pushed
the
fix/guidance-title-quote
branch
from
September 25, 2026 22:21
3cf1317 to
cb5c39b
Compare
This branch has not been deployed
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
_resolve_prompt_guidancebuildstitle = '{identifier}'without escaping. When a guidance title contains an apostrophe (for exampleprompt_guidance=["Client's Refund Policy"]), SQLite rejects the clause.GuidanceManager.filterthen returns itsinvalid_filtererror payload, which is a dict, instead of a list. The next line iterates that dict's keys, soprimitives.actor.act(...)fails before the inner actor starts, withAttributeError: 'str' object has no attribute 'guidance_id'.The fix escapes single quotes in the literal by doubling them, which is the standard SQL escape. The rest of the function is unchanged.
Type of change
Areas touched
unify/common/_async_tool/)unify/db/)tests/,conftest.py,parallel_run.sh)Test plan
New regression test
tests/guidance_manager/test_gm_environment_exclusion.py::test_resolve_prompt_guidance_title_with_apostrophe.blackandautoflakeare clean on the changed files.Behavior / migration notes
None.
Checklist
feat(scope):,fix(scope):,refactor(scope):,chore(scope):, etc.)try/exceptadded defensively — only around specific, recoverable errors.agents/rules/no-temporal-comments.md).agents/rules/no-test-info-in-production-code.md)AGENTS.md/ARCHITECTURE.mdif I changed architectural conventions (not applicable)An AI agent (Breken, using Claude) found this bug, wrote the fix and the test, and submitted the PR from the
breken-aiaccount.🤖 Generated with Claude Code