[db-executable-env] Phase 1: ExecutableEnvironment + ExecutableTool skeleton#2467
Draft
aniruddh-alt wants to merge 2 commits into
Draft
Conversation
Abstract base for envs that run user-supplied dotted-path executors. Subclasses provide the per-call execution context (DB conn, HTTP client, FS root, ...) via _build_execution_context. The base owns batch step() dispatch to _step_one, the _absorb_result post-hook, and the close lifecycle. This phase ships the skeleton: class shape, batch step() dispatch, and abstract _build_execution_context hook. Concrete _step_one (executor resolution, ToolResult validation, output_schema validation, _absorb_result invocation) lands in a follow-on phase. ExecutableTool is a small ToolParams subclass enforcing a non-empty executor dotted path. First phase of the db-executable-env trunk chain; targets the trunk branch, will integrate to main with the rest of the feature.
This was referenced May 20, 2026
[db-executable-env] Phase 2: DatabaseExecutableEnvironment + tool + connection-config skeleton
#2468
Draft
Strips "skeleton phase", "arrives in a later phase", and "future HTTPExecutableTool" framing from docstrings and NotImplementedError messages. The PR description carries the skeleton framing; the code should describe what the symbol is, not which PR introduced it. Also renames test_step_one_is_skeleton to test_step_one_raises_not_implemented to match the cleaned-up exception.
kaisopos
approved these changes
May 22, 2026
shanghongsim
approved these changes
Jun 2, 2026
Contributor
|
Limited understanding of what has been discussed for this PR design so far. Approving cautiously. Would be good if someone else more familiar with the northstar design can look it over |
Contributor
Author
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Phase 1 of the db-executable-env phase chain, target branch:
aniruddh-alt/db-executable-env-trunk.What changed: Adds the abstract
ExecutableEnvironmentbase class andExecutableTool— the middle layer that future executable transports (database, HTTP, filesystem, MCP) will subclass.Why: We need a shared executor-resolution / lifecycle layer before adding concrete transports. Mirrors Oumi's inference engine hierarchy (
BaseInferenceEngine → RemoteInferenceEngine → AnthropicInferenceEngine). Replaces the monolithic PR #2441 with phase-sized units that each leave the trunk in a buildable, testable state.Phase chain context
aniruddh-alt/db-executable-env-trunk(will become integration PR tomainonce all phases land)_step_oneimplementation, DB env engine + dialect guards, error wrapping + audit, example, postgres integration tests)What's in this PR (244 lines)
src/oumi/environments/executable_environment.pystep()→_step_onedispatch,_build_execution_contextabstract hook,_absorb_resultandclosedefault no-ops._step_oneraisesNotImplementedError(skeleton).src/oumi/environments/executable_tool.pyToolParamssubclass that enforces a non-emptyexecutordotted path.src/oumi/environments/__init__.pyExecutableEnvironmentandExecutableTool.tests/unit/environments/test_executable_environment.py_step_one, defaults are no-ops.tests/unit/environments/test_executable_tool.pyWhy a skeleton phase
Each phase in this chain leaves the trunk buildable. The skeleton ships the shape (subclasses can be written against the abstract surface) but raises
NotImplementedErrorfrom_step_oneso no caller is misled into thinking execution is wired. Implementation lands in a follow-on phase.The batch
step(calls: list[tuple[str, dict[str, Any]]]) -> list[ToolResult]signature matchesBaseEnvironment.stepexactly — fixing the signature mismatch flagged on PR #2441.Related issues
(No associated issue — direct continuation of the work that lived in PR #2441.)
Before submitting
pytest tests/unit/environments/— 67/67 passing on this branch.