Repository navigation
Conversation
|
📖 Docs preview: https://docs-73963rk63-golem-cloud.vercel.app Built from commit |
noise64
force-pushed
the
python-sdk-wheel
branch
from
November 18, 2026 12:47
5615a63 to
4cf68b1
Compare
noise64
force-pushed
the
python-sdk-wheel
branch
from
November 18, 2026 23:58
4cf68b1 to
1dc8767
Compare
noise64
force-pushed
the
python-sdk-wheel
branch
from
November 20, 2026 13:38
1dc8767 to
3867fb5
Compare
- A rejected requirement with a direct reference shows `name @ <URL omitted>`, because the URL can contain credentials. - The CLI output schema and its generator include `assemblePython`. - GOLEM_PYTHON_SDK_WHEEL in .golem-sdk-overrides resolves against the file's directory. - A missing SDK wheel error tells how to build it. - `cargo make cli-integration-tests` skips the python tag, which needs a built wheel. - The golem-build skill lists `assemblePython:`, and the Python template AGENTS.md says that package sources fail the build.
# Conflicts: # cli/golem-cli/src/model/cli_output/tests.rs
This branch has not been deployed
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.
Part of GOL-1853. Stacked on #4519 (PY-04), which is stacked on #4518 (PY-03) and #4516 (PY-02).
This PR lets the Golem CLI create, build, deploy and invoke Python components. The CLI links
golem-python-assemblerand builds a component from the application's modules and thegolem-py-sdkwheel. It runs no Python, uv or C compiler on the host.python(aliaspy) is a new guest language. It has no tool requirements. Bridges are not generated for Python, soBridgeSdkTargetKind::supportsis false for it, and manifest validation rejects a Python component that declares agent or tooldependencies. A Python component would otherwise fail later in bridge generation, with an error that does not name the cause.assemblePythonbuild step names the source directory, the entry modules, thepyproject.tomland the output. The step reads the wheel thatGOLEM_PYTHON_SDK_WHEELnames. The wheel is not published, so the step fails with a repair hint when the variable is not set or names a missing file. A relative path in.golem-sdk-overridesresolves against the file's directory. The test layer of the SDK overrides points it at the workspace wheel, whichcargo make python-sdk-wheelbuilds.project.dependenciesmay list only the exactgolem-py-sdk==<version>of the CLI, compared with PEP 503 names. Third-party packages are not assembled into components yet, so the step fails instead of building a component that cannot import them..partialfile and renames it after the build succeeds, so a failed build keeps the last valid component. The up-to-date check covers the source file times, the list of source files, thepyproject.toml, the step and the BLAKE3 hash of the wheel. The wheel contains the prepared assets, so its hash also covers them. The file times alone do not show a removed or renamed module, so the task marker hashes the list of files. The marker id is the build directory and the output path, not the full step, because builds with other entry modules or wheels write the same output; with an id from the full step, switching from configuration A to B and back to A found A's old marker and kept B's component. This follows the existing external-command marker.intopath inside the source directory, also when the path reaches it through a symbolic link or a..after one.fs::resolve_pathresolves both paths as the filesystem does, also for directories that do not exist yet; a symbolic link to a missing target fails the build. Such a component would be an input of the next build: it would change the build entropy and the source list, and its own time would count as a source time, so even an unchanged build would assemble again.pyproject.toml(tool.uv.sourcesentries and uv index or find-links settings) before any application code runs. The error names each setting but not its value, because a source URL can contain credentials. A rejected requirement with a direct reference showsname @ <URL omitted>for the same reason. The SDK always comes from the wheel of the CLI, so a project source would otherwise be ignored silently.GOLEM_PYTHON_SDK_WHEELstays the way to build with a local wheel.pythontemplate has one component with aCounterAgent. The Python templates are built-in only in dev mode, because the SDK is not published. In public mode,golem newand a manifest that names thepythonbuilt-in template fail with an error that names the global--dev-modeflag, instead ofNo templates are available. The namepythonis reserved only in dev mode, so in public mode a manifest may still declare and use its ownpythontemplate. The template AGENTS.md guide usesgolem --dev-modein its examples, and thegolem-new-projectandgolem-edit-manifestskills list Python as available in dev mode. The schema, the template layout upgrade, the template AGENTS.md guide,sdks/python/README.md(getting started), the learn app-manifest reference, thegolem-buildandgolem-edit-manifestskills and the CLI output schema name the new language and step. The template AGENTS.md also says that package sources fail the build.tests/app/python_agents.rsscaffolds the template with the real CLI. One test deploys it, checks unequal updates on two agents, kills and restarts the server, and checks the recovered state. It then checks that an unchanged build skips the assembly and keeps the bytes, and that a changed module rebuilds and redeploys. The other test checks that an unsupported type hint, an import error, a third-party dependency and path or Git sources for the SDK each fail with their cause and keep the last component. Two more tests check that removing an imported module fails the next build and keeps the last component, and that switching the entry modules from A to B and back to A assembles A again. The last test checks that anintoinside the source directory fails without writing there, also through a directory alias on Unix, and that with the default output two unchanged builds skip the assembly and an edited module assembles again.CI: no CI job builds the wheel or the prepared assets. The Python tests therefore have their own
pythontag and are in no it-cli shard.cargo make cli-integration-tests-pythonbuilds the wheel first and runs them locally.cargo make cli-integration-testsskips thepythontag, because it does not build the wheel. This does not satisfy the behavioral CI gate; where the SDK CI belongs is not decided yet.Limits: the wheel is not published. Build errors reach the CLI as text; the structured, bounded diagnostic channel follows in GOL-2256, as Dávid decided. Methods are synchronous and support only the scalar types of #4518. Python guest bridges and third-party packages are not supported.
Tests
The changed shared contracts are the CLI commands and output for the new language and build step, and the Python WIT of #4516. The caller tests are the
python_agentsCLI integration tests, whichcargo make cli-integration-tests-pythonruns after it prepares the assets and builds the wheel, and theapp_newCLI integration tests. One of them checks that public mode lists every language except Python and that dev mode lists every language. Thegolem-clilibrary tests check the template sets in both modes and the--dev-modeerrors.