Name:
[ADD/FIX] viin_ai: Phase 3.5 hardening + Phase 3.7 features (SRS v1.1 follow-up)
State:
Failed
finished in 19m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#23
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
fa73ae51d7a699ea7d3266f17a9e0c7579e340f4
Description:
[FIX] cluster ai17: address runbot lint + sql_template ACL failures (build 221687)
CI runner Viindoo runbot exposed real failures on PR #23 commit abcb66e
that local Chrome-flaky test runs had hidden:
* test_pylint test_eslint (267 violations) — eslint v6 on dev box could
not parse the ``es2022`` env key so every lint check silently exited
config-error; CI runs eslint v8 cleanly.
* test_pylint test_flake8 — 2 unused name lints
* test_pylint test_pylint — UserError missing translation
* viin_ai_agent.tests.test_sql_template — postgres ``operator does not
exist: jsonb ~~ unknown`` on ``res_partner.name LIKE ...``
Fixes:
page_editor.js:1484 — drop unused catch binding ``_err`` (eslint
no-unused-vars). The empty ``catch {}`` form is supported since
Odoo 17 ships ECMAScript 2019+ asset bundles.
mail_compose_message.py:19 — drop unused ``api`` import (no
decorators in this module).
test_sql_template.py:156-193 — restore ``p_visible`` local (was
flagged unused after the names→ids assertion rewrite). Switch the
SQL template to ``name::text LIKE '%%TPL-%%-PARTNER%%'`` and the
Python assertion to compare ids: in Odoo 17 ``res_partner.name``
is a translated ``Char``, persisted as jsonb (e.g.
``{"en_US": "TPL-VISIBLE-PARTNER"}``), so the previous direct
``name LIKE`` invokes the missing ``jsonb ~~`` operator. The
``::text`` cast matches the JSON-serialised form regardless of
which language key the row uses, and asserting on ids removes the
test's reliance on a specific language key in the SELECT clause.
test_parallel_tool_execution.py:25 + :366 — wrap the boom string
in ``_(…)``. Test fixtures still flow through Odoo's UserError
translation path so pylint's ``odoolint-translation-required``
rule needs to see ``_()`` even on hard-coded test text.
Tour JS files (brain_content_type_tokens, brain_floating_toolbar,
brain_slash_autosave, brain_slash_focus) — additional prettier
trailing-comma + parenthesis fixes that eslint v8 ``--fix``
surfaces over the v6 configuration error.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Branch:
17.0
Instance ID:
0
Age:
Up-time: