Skip to content

Feat/add controller performance cache#163

Merged
cardosofede merged 9 commits into
mainfrom
feat/add_controller_performance_cache
May 20, 2026
Merged

Feat/add controller performance cache#163
cardosofede merged 9 commits into
mainfrom
feat/add_controller_performance_cache

Conversation

@cardosofede

Copy link
Copy Markdown
Contributor

No description provided.

@rapcmia

rapcmia commented May 19, 2026

Copy link
Copy Markdown
Contributor

Commit 863d6e5

Test condor/102

  • Setup a trading agent on binance perpetual using AVAX-USDT ✅
  • Test Executors page active executor data ✅
    • Started one grid executor
    • Executors page showed Active(1)
      • The active row displayed age, type, connector, pair, side, volume, and PnL
      • Clicking the executor opened the detail panel with grid details, chart, PnL, and volume
      • The active executor showed a stop button
  • Test Executors page performance values and summaries ✅
    • The grid executor volume matched the page summary
    • The PnL matched the page summary
    • Active performance values and summaries displayed correctly for the running executor
  • Test Executors page archived/completed executor visibility if that path is used ✅
    • The executor is terminated, it moves into History (1) after completion
    • close type was added for the archived executor
    • The archived row kept the last recorded values for PnL, volume, and age
    • Opening the terminated executor showed the same details and they matched the row data
  • Test Trade or positions summary for the same perpetual controller ✅
    • Successfully started a bot using grid_strike on docker image PR8240
    • Set keep_position: true and observed when executor is terminated
      • Check trade page, positions tab and confirmed position held is displayed
      • Tested again with grid executor and call executor/stop from hummingbot-api still works ok
  • Test Bots page if it reads controller performance affected by the API cache change
    • PNL does not match ❌
      image
      • Also found an error when i check the deployed bot from condor i got error:
        2026-05-19 14:39:29,992 - 17 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: object of type 'int' has no len()
        Traceback (most recent call last):
          File "/home/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
            return await c
                   ^^^^^^^
          File "/home/hummingbot/hummingbot/client/command/status_command.py", line 137, in status_check_all
            self.notify(await self.strategy_status())
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/hummingbot/hummingbot/client/command/status_command.py", line 78, in strategy_status
            st_status = self.trading_core.strategy.format_status()
          File "/home/hummingbot/hummingbot/strategy/strategy_v2_base.py", line 506, in format_status
            lines.extend(controller.to_format_status())
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
          File "/home/hummingbot/controllers/generic/grid_strike.py", line 153, in to_format_status
            f"NOT_ACTIVE: {len(level.custom_info['levels_by_state'].get('NOT_ACTIVE', []))}",
                           ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        TypeError: object of type 'int' has no len()
        
        • Check standalone hummingbot/8240 and development branch (source and docker) using same controller v2 (generic.gridstrike), not able to reproduce after use status command ✅
  • Test archived bots view if you use it ✅
  • Test one stop/start lifecycle flow for the affected controller ✅
    • When started, deployed v2 is displayed as active on bots page
    • When stopped, exits the bots page and goes to archive
      • Most of the test had orders filled perhaps these are recorded successfully

Deploy using hummingbot/8240

  • This test is still pending ❗
  • Test starting a perpetual controller/strategy that depends on initial position handling
  • Test that the initial position is detected or initialized correctly on startup
  • Test that position mode is set correctly for the affected perpetual pair
  • Test that the controller keeps running normally after startup without position-related failure
  • Also @nikspz can you confirm these checklist testing the hummingbot standalone PR too, thanks 🙏🏼

@rapcmia

rapcmia commented May 20, 2026

Copy link
Copy Markdown
Contributor

Commit 4173791

Also found an error when i check the deployed bot from condor i got error:

image
  • Run status command works

Test with hummingbot/8240

  • Build local docker image for Fix/initial positions failure hummingbot#8240
  • Deploy generic.pmm_mister using condor/102 and this PR
  • Test starting a perpetual controller/strategy that depends on initial position handling ✅
    image
    • Started a perpetual V2 controller with initial_positions configured.
      "amount": "2.7",
      "connector_name": "hyperliquid_perpetual",
      "side": "BUY",
      "trading_pair": "HYPE-USD"
      
    • Confirmed startup completed and the controller created normal open orders.
    • Confirmed the orchestrator logged Created initial position for controller ..., showing the initial position was loaded successfully.
      image
    • Checking the log files, confirmed no unexpected startup failure occurred while handling the initial position
    • Confirmed no live exchange position was created automatically, which matches the intended design of initial_positions
  • Test that the initial position is detected or initialized correctly on startup ✅
    • The startup log also confirmed the initial position was created, showing the configured value was initialized correctly and exposed in controller bot page.
    • The generic.pmm_mister adjusted its target/min/max base logic from the seeded initial position shown in status.
  • Test that position mode is set correctly for the affected perpetual pair ✅
  • Test that the controller keeps running normally after startup without position-related failure ✅

@cardosofede cardosofede merged commit 6930252 into main May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants