Repository navigation
feat: add a tested Temporal workflow skeleton - #10
Merged
Merged
Conversation
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.1-sol;session=sha-256-64:dfcf609669cdcf62;surface=exec
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.1-sol;session=sha-256-64:15d0baeba38dd4ff;surface=exec
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.
Why
The indexer needs Temporal workflows. Today nothing tests the Python SDK against the pinned dev server. A tested echo workflow gives later slices a working base.
Behavior change
The package depends on
temporalio.tbhbgraph.temporaladds a ping workflow that calls an echo activity. It also addsrun_worker(address, task_queue), which takes the server address as an argument. A pytest test starts the pinned//:temporaldev server on a free localhost port. The test then runs the worker and the workflow. It checks the echoed result and stops the server.pytest_testreceives the binary throughpath_toolsandTEMPORAL_BINARY.Decisions
Chose an in-process dev-server start in pytest over a bash helper call. The test needs the Python client in the same process. Chose
sandboxed=Falseon the workflow, since the sandbox fails to import the package and its Click dependency.Risk
Tech debt, two items. Windows skips the dev-server test, the same gap as #5. A port taken between the best-effort scan and the start fails the test without a retry.
Security debt: the workflow runs outside the Temporal sandbox. The sandbox's determinism checks don't run. The workflow doesn't do I/O. Later slices add I/O, and the exposure grows with it. Re-enable the sandbox once the plugin package stops importing Click at workflow load.
Verification
bazelisk test //...: all targets pass, with 100% branch coverage. The pytest log shows the dev server start, the ping workflow echo through the activity, and the server stop.bazelisk run //:format: clean diff afterward.bazelisk test //:ruff_test //:pyrefly_test //:deptry_test //:pylint_test //:vulture_test //:complexipy_test //:bandit_test //:pytest_test: all pass.bazelisk test //:pip_audit_test: passes.uv lockwithuv0.13.7:temporalio1.36.1 is at least five days old.tbhbdev alpha pr check: 137 code lines, 169 raw lines.Opened-by: LLM effort=medium;harness=claude-code:2.1.331;model=anthropic:claude-sonnet-5-5;session=sha-256-64:c0f9bb806fecbdfc;surface=cli
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.1-sol;session=sha-256-64:dfcf609669cdcf62;surface=exec
Assisted-by: LLM effort=medium;harness=claude-code:2.1.331;model=anthropic:claude-haiku-5-5;session=sha-256-64:c0f9bb806fecbdfc;subagent=sha-256-64:093f04a7d32cf99a;surface=cli