Name:
[Campaign] Brain v17 Complete: v1.4 + v2.0 Foundation — WI-1..WI-11
State:
Killed
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#22
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
a9d3e1c8a42064a992b266b2ad090e25d555e11f
Description:
[FIX] viin_ai_agent: contain UNIQUE constraint test in cr.savepoint to prevent transaction poison
The test_tool_technical_name_unique negative-path test triggered a
psycopg2 IntegrityError without isolating it via cr.savepoint(). The
poisoned outer transaction surfaced an ERROR-level odoo.sql_db log line
that the runbot post-install sweep tagged as failure (PR #22 build
campaign-brain-v17-complete-...221679, "duplicate key value violates
unique constraint viin_ai_tool_viin_ai_tool_technical_name_unique").
Apply the canonical pattern already used in viin_brain test suites
(test_brain_property, test_brain_tag, test_brain_template): wrap the
violation in env.cr.savepoint() and silence the expected ERROR log via
mute_logger('odoo.sql_db'). Tighten the assertion from bare Exception
to psycopg2.IntegrityError.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Branch:
17.0
Instance ID:
0
Age:
Up-time:
Not finished