Skip to content

feat: AE-835 Add class based execution [Runtime] - #8

Merged
deanq merged 9 commits into
mainfrom
feat/AE-835-exec-cls
Jul 23, 2025
Merged

feat: AE-835 Add class based execution [Runtime]#8
deanq merged 9 commits into
mainfrom
feat/AE-835-exec-cls

Conversation

@pandyamarut

@pandyamarut pandyamarut commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR introduces a modular class-based execution that extends the existing function execution capabilities. The core change allows remote execution of class methods with persistent instance management across multiple calls.

Key Methods:

execute_class_method(): Main orchestrator that handles class method execution.

_get_or_create_instance(): Instance lifecycle either reuses existing class instances or creates new ones based on request parameters.

cleanup_instances(): removes stale instances based on configurable timeouts.

Signed-off-by: pandyamarut <pandyamarut@gmail.com>
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut requested a review from deanq July 3, 2025 20:51
@pandyamarut pandyamarut changed the title feat: AE-835 Add class based execution [Draft] Add class based execution [Discard] Jul 15, 2025
@pandyamarut
pandyamarut marked this pull request as draft July 15, 2025 17:22
@pandyamarut pandyamarut changed the title [Draft] Add class based execution [Discard] feat: AE - 835 Add class based execution [Runtime] Jul 15, 2025
@pandyamarut
pandyamarut marked this pull request as ready for review July 15, 2025 17:23
@deanq deanq changed the title feat: AE - 835 Add class based execution [Runtime] feat: AE-835 Add class based execution [Runtime] Jul 18, 2025

@deanq deanq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new file, test_input_class.json

{
  "input": {
    "execution_type": "class",
    "class_name": "TestClass",
    "class_code": "class TestClass:\n    def __init__(self, value):\n        self.value = value\n    \n    def get_value(self):\n        return f'Value is: {self.value}' ",
    "method_name": "get_value",
    "constructor_args": [
      "gAWVCQAAAAAAAACMBWhlbGxvlC4="
    ],
    "constructor_kwargs": {},
    "args": [],
    "kwargs": {},
    "create_new_instance": true
  }
}

...that way we can test functionality with a class payload

Comment thread handler.py Outdated
Comment thread handler.py
Signed-off-by: pandyamarut <pandyamarut@gmail.com>
@pandyamarut
pandyamarut requested a review from deanq July 20, 2025 05:17
@deanq

deanq commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator

Check again. Logger.de() would error. Don't rush your commits.

Signed-off-by: pandyamarut <pandyamarut@gmail.com>

@deanq deanq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're introducing more complexity with the class-based execution, let's have unit test coverage on this. Under tests, there's integration and unit.

Comment thread handler.py Outdated
@deanq
deanq merged commit 6d6505e into main Jul 23, 2025
10 checks passed
@deanq
deanq deleted the feat/AE-835-exec-cls branch July 23, 2025 18:52
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