Skip to content

[IMP] various: implement sandbox log filtering and enhance stability#150

Merged
sea-odoo merged 13 commits into
betafrom
feature/sandbox-log-filtering
Apr 28, 2026
Merged

[IMP] various: implement sandbox log filtering and enhance stability#150
sea-odoo merged 13 commits into
betafrom
feature/sandbox-log-filtering

Conversation

@sea-odoo
Copy link
Copy Markdown
Contributor

@sea-odoo sea-odoo commented Apr 25, 2026

This PR consolidates several improvements for the odev framework, focusing on AI sandbox stability and core utility testing.

Key changes:

  • Sandbox Stability: Prevent self-updates and optimize logs for AI orchestrations.
  • Enhanced Testing: Comprehensive unit tests for RpcConnector, RpcModel, SSHCrypt, and DataStore.
  • Core Fixes: Fixes for argument rescue logic, repo date logic, and circular dependency reporting.
  • Dependency Management: Resolved Paramiko conflicts and updated vulnerable packages.

@sea-odoo sea-odoo changed the base branch from main to beta April 25, 2026 16:10
@sea-odoo sea-odoo force-pushed the feature/sandbox-log-filtering branch from 845d272 to 24f59f9 Compare April 25, 2026 16:12
@sea-odoo sea-odoo changed the title test: add comprehensive unit tests for core components [IMP] various: implement sandbox log filtering and enhance stability Apr 25, 2026
@sea-odoo sea-odoo force-pushed the feature/sandbox-log-filtering branch 3 times, most recently from 114137b to 845d272 Compare April 25, 2026 16:24
Add a token-efficient log filtering mechanism for the AI sandbox to suppress noisy HTTP logs and strip redundant metadata. This improves AI context clarity and reduces token usage. Also, fix RepositoriesSection.get_date to return a default epoch for new versions to ensure the initial pull logic works correctly.

Assisted-by: gemini-3-flash <noreply@google.com>
- Robust ODOO_LOG_REGEX to handle aligned logs (multiple spaces).
- Suppress odoo-bin command and info messages in AI sandbox to save tokens.
- Remove redundant database name from pretty-printed logs.

Assisted-by: gemini-3-flash <noreply@google.com>
Fixed a bug where comma-separated lists (captured by 'addons' argument) were not correctly rescued from unknown flags, causing Odoo to misinterpret flags following '-i' as module names.

Assisted-by: gemini-3-flash <noreply@google.com>
Assisted-by: Gemini 3 Flash <noreply@google.com>
@sea-odoo sea-odoo force-pushed the feature/sandbox-log-filtering branch from 845d272 to 012983d Compare April 25, 2026 16:26
brinkflew
brinkflew previously approved these changes Apr 27, 2026
Copy link
Copy Markdown
Contributor

@brinkflew brinkflew left a comment

Choose a reason for hiding this comment

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

LGTM, except for the failing tests

- Fix duplicate test name test_16 in test_database.py
- Mock GitConnector in TestGitCommands to avoid real cloning and hangs
- Fix LOG_WERKZEUG_REGEX to handle standard Werkzeug logs
- Restore HOME_PATH in OdevTestCase.tearDownClass for better test isolation

Assisted-by: antigravity <noreply@google.com>
…class

- Add odoobin_process_class property to Odev with getter/setter
- Add should_skip_update() hook method to Odev (replaces direct AI_SANDBOX checks)
- Replace OdoobinProcess.run AI_SANDBOX checks with odev.should_skip_update()
- Add OdoobinProcess.get_stream_filter() as an overridable hook (returns None)
- Remove _ai_sandbox_filter from core OdoobinProcess (moved to plugin)
- Update all OdoobinProcess instantiation sites to use odev.odoobin_process_class

Assisted-by: claude-sonnet-4-5 <noreply@google.com>
…e() in OdoobinProcess

Remove the odev.should_skip_update() call from OdoobinProcess.run — core stays
completely unaware of sandbox concepts. Instead, add an overridable
_print_run_info() that always prints by default; AI_OdoobinProcess overrides it
to be a no-op to save tokens inside the sandbox.

Assisted-by: claude-sonnet-4-5 <noreply@google.com>
Comment thread odev/common/odev.py Outdated
Comment thread odev/common/odev.py Outdated
Comment thread odev/common/python.py
…m core

Core odev now relies solely on ODEV_SKIP_GIT_UPDATE for update suppression,
leaving AI-specific behavior entirely to the plugin.

Assisted-by: claude-sonnet-4-5 <noreply@google.com>
- Revert check_release and rename __should_update_now to _should_update_now
- Implement native stream filtering in run_script (supporting None to skip)
- Move AI-specific sandbox logic entirely to the plugin via overrides
- Rename progress to stream_filter and update all call sites

Assisted-by: claude-sonnet-4-5 <noreply@google.com>
@sea-odoo sea-odoo force-pushed the feature/sandbox-log-filtering branch from 47e3e55 to d61d155 Compare April 27, 2026 17:35
Comment thread odev/common/odev.py Outdated
Comment thread odev/common/odev.py Outdated
brinkflew
brinkflew previously approved these changes Apr 27, 2026
…n loading

- Add `_odoobin_process_class` to `OdevFrameworkMixin` for flexible Odoo process specialization.
- Refactor plugin loading to use direct imports and ensure `odev.plugins` namespace is correctly populated.
- Minor improvements to `OdoobinProcess` representation and output formatting.

Assisted-by: gemini-3-flash <noreply@google.com>
- Revert plugin path fallback logic in `plugins` property.
- Remove extra newline in `_print_run_info` to keep output compact.

Assisted-by: gemini-3-flash <noreply@google.com>
- Use richer console output for the Odev run message.
- Restore the extra newline after the command for better readability.

Assisted-by: gemini-3-flash <noreply@google.com>
Comment thread odev/common/odoobin.py Outdated
@brinkflew
Copy link
Copy Markdown
Contributor

And the tests are failing again

…re logger.info for info_message to ensure tests can capture it\n- Remove custom rich styling and extra spacing\n\nAssisted-by: gemini-3-flash <noreply@google.com>
@sea-odoo
Copy link
Copy Markdown
Contributor Author

And the tests are failing again

fixed

@sea-odoo sea-odoo merged commit 8a8279f into beta Apr 28, 2026
6 checks passed
@sea-odoo sea-odoo deleted the feature/sandbox-log-filtering branch April 28, 2026 12:27
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