feat: add governed local Codex runtime

Analysed against 72ce771a10 files changedby 1012839419a-alt
Open PR on GitHub

Change-risk score

9.6out of 10Elevated
Repository health
6.6to7.2base 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 89% of this repository's own commits.

The largest health movement is in base.py, down 0.6. Nothing outside this PR depends on a contract it changed.

Files changed
10
in this diff
Contracts changed
0
removed or signature
Outside callers
0
not in this diff
Findings added
12
3 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-generati…social-listeningintellig…(app)flowprovidersrecordsuiflowworkflowapichannelscontrolpipeline
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 1,502 of 1,656 files at a readable size, grouped by directory and sized by lines of code. 10 changed here reach 12 more by import. 154 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, 8 changed by this PR and 11 that import one. 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 (12)
  • criticalcomplex method
    backend/agent_runtimes/codex_adapter.py:390

    _translate_event has cyclomatic complexity 28

  • criticalcomplex method
    backend/agent_runtimes/codex_adapter.py:65

    validate_config has cyclomatic complexity 27

  • highlow cohesion
    backend/agent_runtimes/base.py:150

    RuntimeAdapter has low cohesion (LCOM4=4): its 5 methods split into 4 groups that share no fields or calls

  • highcomplex method
    backend/agent_runtimes/codex_adapter.py:201

    invoke has cyclomatic complexity 20

  • mediumlow cohesion
    backend/agent_runtimes/codex_adapter.py:53

    CodexRuntimeAdapter has low cohesion (LCOM4=2): its 12 methods split into 2 groups that share no fields or calls

  • mediumbumpy road
    backend/agent_runtimes/codex_adapter.py:390

    _translate_event has 4 nested blocks at the same level (bumpy road)

  • mediumbumpy road
    backend/agent_runtimes/codex_adapter.py:201

    invoke has 4 nested blocks at the same level (bumpy road)

  • mediumbumpy road
    backend/agent_runtimes/codex_adapter.py:65

    validate_config has 4 nested blocks at the same level (bumpy road)

  • mediumlarge method
    backend/agent_runtimes/codex_adapter.py:201

    invoke is 110 lines long

  • mediumcomplex method
    backend/agent_runtimes/codex_adapter.py:322

    _detect_version has cyclomatic complexity 12

  • mediumcomplex method
    backend/agent_runtimes/codex_adapter.py:168

    _compose_argv has cyclomatic complexity 9

  • lowdry violation
    backend/agent_runtimes/codex_adapter.py:255

    13% of file duplicated; worst clone shares 13 lines with backend/agent_runtimes/pi_adapter.py

Resolved (3)
  • dry violation
    backend/models/automation.py
  • dry violation
    backend/schemas/operations_agent.py
  • dry violation
    backend/schemas/provider.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.

  • frontend/components/providers/primary-model-card.tsx2233admin 100% of 2 commits
  • frontend/app/(app)/operations-agents/page.tsx2233admin 100% of 2 commits
  • backend/agent_runtimes/pi_adapter.pyCurry 90% of 3 commits
  • backend/schemas/provider.pyCurry 49% of 3 commits
  • tests/unit/test_operations_agent_runtime_service.py2233admin 100% of 1 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/unit/security/test_provider_key_encryption.py
  • tests/unit/security/test_provider_key_masking.py
  • tests/unit/api/test_automations.py
  • tests/unit/agent_runtimes/test_base.py
  • tests/unit/agent_runtimes/test_bbx_adapter.py
  • tests/unit/agent_runtimes/test_miniflow_adapter.py
  • tests/unit/agent_runtimes/test_opentabs_adapter.py
  • tests/unit/agent_runtimes/test_pi_adapter.py

5 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.

feat: add governed local Codex runtime · 2233admin/opencli-Razormind #80 · Repowise