feat(chat): wire chat role into ProviderResolver.resolve_with_fallback (#55)

Analysed against a1307cd34 files changedby lunnynight
Open PR on GitHub

Change-risk score

9.3out of 10Elevated
Repository health
6.3to6.8base against this head

This change sits in the top third of this repository's own risk distribution, the band worth reviewing closely. It is riskier than 78% of this repository's own commits.

No changed file lost health in this diff. Nothing outside this PR depends on a contract it changed.

Files changed
4
in this diff
Contracts changed
0
removed or signature
Outside callers
0
not in this diff
Findings added
7
2 resolved

Blast radius on the repo map

Every file in the repository, grouped into its own directories and sized by lines. The ones this PR changes are lit, and everything that imports them is marked.

backendchromecompatdocsfrontendiiiopenspecscriptstestsapibrowser_act_packsschemasservicesskillsworkflowdify_gra…appcomponentslibchangesintegrationunitecommercelead-generationsocial-listeningintellige…(app)flowrecordsuiunlumen-uiflowworkflowapichannelscontrolpipeline
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 1,488 of 1,631 files at a readable size, grouped by directory and sized by lines of code. 4 changed here reach 2 more by import. 143 are too small to see at this width, which is what the frame below is for.

Inside backend

agent_runtimesapibrowser_act_packschannelscontrolimage_st…llmmigratio…plan_irpluginsschemassecurityservicesskillsworkflowv1ecommercelead-generat…social-listeningversionsintelligencebrows…cr…opencli_…skil…agen…in…jo…__i…im…inte…cu…pi…exe…val…capa…cont…op…workf…url…image_s…op…plugin…prov…reco…cor…loo…tr…tasks…capabili…compiler…data_ope…dataflow…demand_a…dify_im…ex…fl…hda_tem…htt…int…joy…kat…las…nat…native_intell…nati…no…open…opencli_hd…patcher.pyresea…research_o…runti…runtime_regis…situa…swarm…tool_…trigg…tur…turb…tur…work…brow…cha…co…dashbo…image_st…nodes.…oper…ope…pr…pro…studi…st…ta…work…od…co…report…simula…SK…SK…SK…

630 files, 2 changed by this PR and 2 that import one. This PR changes 3 files in total, spread across more than one top-level directory. Click any directory above to frame it instead.

Changed

What this PR added, and what it took away

Introduced findings are the ones inside the lines this PR added, not the file's existing ones. The resolved column is the only place in the product that lists them.

Introduced (7)
  • mediumdry violation
    tests/integration/test_chat_failover_api.py:160

    45% of file duplicated; worst clone shares 20 lines with tests/integration/test_chat_failover_api.py

  • mediumduplicated assertion block
    tests/integration/test_chat_failover_api.py:159

    assertion block at lines 159-160 is duplicated in tests/integration/test_chat_failover_api.py

  • mediumduplicated assertion block
    tests/integration/test_chat_failover_api.py:183

    assertion block at lines 183-185 is duplicated in tests/integration/test_chat_failover_api.py

  • mediumduplicated assertion block
    tests/integration/test_chat_failover_api.py:206

    assertion block at lines 206-208 is duplicated in tests/integration/test_chat_failover_api.py

  • mediumduplicated assertion block
    tests/integration/test_chat_failover_api.py:252

    assertion block at lines 252-254 is duplicated in tests/integration/test_chat_failover_api.py

  • lowprimitive obsession
    backend/api/v1/chat.py:560

    _chat_xml takes 6 parameters

  • lowprimitive obsession
    backend/api/v1/chat.py:346

    _chat_with_client takes 5 parameters

Resolved (2)
  • function hotspot
    backend/api/v1/chat.py
  • io in loop
    backend/api/v1/chat.py

Who else knows this code

The primary author of each changed file by share of its recent commits, mined from git history. Advisory: it says who has context, not who must review.

  • tests/unit/llm/test_resolver.pyCurry 100% of 2 commits
  • backend/llm/resolver.pyCurry 99% of 2 commits
  • backend/api/v1/chat.pyCurry 99% of 7 commits

Tests that cover this change

Test files that import a file this PR changes. Not a coverage measurement: it is the import graph, so it says which tests are worth running, not which lines they reach.

  • tests/integration/test_chat_api.py
  • tests/skills/test_loop.py
  • tests/unit/llm/test_pr_e_consumers.py

2 changed files have no test importing them.

Get this on your own pull requests

This page came from an index of 2233admin/opencli-Razormind. No model calls, no configuration, and it refreshes on every push. Install the bot and every pull request gets one of these.