Major Refactor of Aura Engine and Tooling Foundation - #140
Major Refactor of Aura Engine and Tooling Foundation#140google-labs-jules[bot] wants to merge 1 commit into
Conversation
This commit represents a major refactoring of the core agent execution engine, replacing a broken, insecure, and simulated system with a stable, in-process, and testable foundation centered around the Aura language.
Key changes include:
1. **Aura Execution Engine (`aura_executor.py`):**
* Replaced the insecure `subprocess`-based tool-calling mechanism with a safe and efficient `importlib`-based approach. This eliminates command injection vulnerabilities and allows for direct, in-process tool execution.
* Refactored the script into a reusable library with a dedicated `execute_aura_script` function, improving testability and modularity.
* Corrected the broken `builtin_print` function to properly handle Aura objects.
2. **Aura Language Interpreter (`aura_lang/`):**
* Introduced a native `Boolean` type to the language, complete with AST nodes, parsing logic, and interpreter support.
* Fixed multiple critical bugs in the interpreter's evaluation logic, including a flawed truthiness check for `if` statements and incorrect operator precedence for boolean comparisons.
* Ensured the interpreter consistently returns `Object` types, preventing `None` from leaking out.
3. **Tooling and Testing:**
* Refactored `tooling/hdl_prover.py` from a command-line script into a callable library function, aligning with the new execution model.
* Created a new, reliable integration test (`tooling/test_aura_integration.py`) that validates the entire refactored workflow, from the executor to the interpreter to the tools.
* Documented a known, persistent bug in the interpreter's `if` statement within the test file, deferring its resolution to a future, dedicated task.
4. **Dependency Management:**
* Cleaned and corrected the root `requirements.txt` file, removing spurious entries and adding the actual missing dependencies required by the test suite.
This foundational work deprecates the old, non-functional FSM-based system and establishes a sound architecture upon which the rest of the repository's tools and tests can be systematically refactored.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
|
To generate Unit Tests for this PR, please click here. |
This commit overhauls the agent's core execution engine, replacing an insecure and non-functional
subprocess-based system with a stable, in-process Aura language interpreter and executor. It introduces a native boolean type to Aura, fixes critical interpreter bugs, and establishes a reliable integration test for the new architecture. This lays the groundwork for a full-repository refactoring.PR created automatically by Jules for task 11887741464273797372