Skip to content

Add device variables and support for multi-device execution in AI Scriptless - #50

Draft
3dgiordano wants to merge 2 commits into
developmentfrom
AI_SCRIPTLESS_DEVICE_VARIABLES
Draft

3dgiordano wants to merge 2 commits into
developmentfrom
AI_SCRIPTLESS_DEVICE_VARIABLES

Conversation

@3dgiordano

Copy link
Copy Markdown
Collaborator

This pull request introduces significant improvements to device variable handling and validation in the scriptless automation tooling. The changes add support for a new "device" variable type, enhance validation and error messaging around device assignments, and expose new utility functions for device management and analysis. Additionally, comprehensive tests have been added to ensure correctness of the new behaviors.

Device variable support and validation:

  • Added support for a "device" variable type, including proper serialization of device identifiers and capabilities, and ensured that unset devices are represented as None (runtime picker) rather than an empty string (tools/ai_scriptless/variables.py). [1] [2]
  • Modified the handling of the special DUT variable to allow assignment of a default device while preventing changes to its type or runtime status, with clear error messages if such modifications are attempted (tools/ai_scriptless/variables.py).

Device-related utility functions:

  • Introduced device_declarations to enumerate all declared device variables and their assignments, and referenced_variable_names to find all variable names referenced by steps for argument binding (tools/ai_scriptless/variables.py, tools/ai_scriptless/__init__.py). [1] [2] [3]

Validation and error messaging:

  • Added handset_constant_note, a function that warns when a device parameter is pinned to a literal device id, which is not supported by the backend and will cause test execution to fail (tools/ai_scriptless/definitions.py, tools/ai_scriptless/__init__.py). [1] [2] [3]

Testing enhancements:

  • Added comprehensive tests to verify correct behavior for device variable creation, modification, serialization, handling of the DUT variable, and validation of constant device assignments (tests/test_ai_scriptless_script.py, tests/test_ai_scriptless_definitions.py). [1] [2] [3]

Internal API and import updates:

  • Exposed new device-related functions and constants in the module's public API and updated imports in manager and test files to use them (tools/ai_scriptless/__init__.py, tools/ai_scriptless_manager.py). [1] [2] [3] [4] [5]

These changes collectively enhance the robustness and clarity of device variable management in scriptless automation, improving both developer experience and runtime reliability.

@3dgiordano

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

…DEVICE_VARIABLES

# Conflicts:
#	tools/ai_scriptless_manager.py

Co-authored-by: 3dgiordano <797057+3dgiordano@users.noreply.github.com>

Copilot AI commented Oct 6, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merged development and resolved the conflict in tools/ai_scriptless_manager.py. Merge commit: b0ccfbb.

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