Implement wire protocol as wool-protocol namespace package#2
Draft
conradbzura wants to merge 5 commits intomainfrom
Draft
Implement wire protocol as wool-protocol namespace package#2conradbzura wants to merge 5 commits intomainfrom
conradbzura wants to merge 5 commits intomainfrom
Conversation
ec1d923 to
7406525
Compare
7406525 to
a2c07fc
Compare
a2c07fc to
f6b8a68
Compare
436a6f9 to
30cc069
Compare
7d19d4e to
eee14cf
Compare
Add .gitignore, LICENSE (Apache 2.0), and README for the wool-protocol repository. Include build hooks for git-based versioning and gRPC import fixup.
Add CI/CD infrastructure for the wool-protocol repo: test runner, release cutting, publishing, PR labeling and validation, branch syncing, and issue templates.
Implement Wool's wire protocol as a namespace package importable as wool.protocol. Includes protobuf definitions for task and worker messages, gRPC service wrappers, and the service registry.
Add 18 tests covering the wool.protocol public surface: task module exports and protobuf messages, worker module exports with servicer/stub/message verification, ProtobufImportError wrapping, and the service registry mapping.
eee14cf to
4c850a2
Compare
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.
Summary
Implement Wool's wire protocol — protobuf schemas, generated Python bindings, and wrapper modules — as a namespace package importable as
wool.protocol. Include protobuf definitions for task and worker messages, gRPC service wrappers, a service registry, and CI/CD workflows for testing, releasing, and repo hygiene.Closes #1
Proposed changes
Add
wool.protocolnamespace packageCreate protobuf schemas (
task.proto,worker.proto) defining the gRPCWorkerservice, task dispatch messages (Task,Result,Exception,TaskVersionEnvelope), and the response streaming protocol (Ack,Nack,Response). Add wrapper modules undersrc/wool/protocol/providing a clean public API with error handling and a service registry. Configurepyproject.tomlwith package metadata, build hooks for git-based versioning and gRPC import fixup, and dependencies.Add CI/CD workflows
Add 7 workflow files for test execution (pyright + pytest across Python 3.11–3.13), release cutting, publishing, PR validation, labeling, and branch sync. Include 6 composite actions and supporting shell scripts for versioning, publishing, and setup.
Add protobuf wrapper tests
Add tests for the wrapper modules (
task.py,worker.py,exception.py,__init__.py) covering public API exports, error handling, and the service registry.Test cases
TestTaskModuletaskmodule is importedTasksymbolTaskclasstask.pypublic exportTestTaskModuletaskmodule is importedResultsymbolResultclasstask.pypublic exportTestTaskModuletaskmodule is importedExceptionsymbolExceptionclasstask.pypublic exportTestTaskModuletaskmodule is importedTaskVersionEnvelopesymbolTaskVersionEnvelopeclasstask.pypublic exportTestTaskModuletaskmodule is imported__all__Exception,Result,Task,TaskVersionEnvelope,Workertask.py__all__TestWorkerModuleworkermodule is importedWorkerServicersymbolworker.pypublic exportTestWorkerModuleworkermodule is importedWorkerStubsymbolworker.pypublic exportTestWorkerModuleworkermodule is importedWorkerMetadatasymbolWorkerMetadataclassworker.pypublic exportTestWorkerModuleworkermodule is imported__all__Ack,Nack,Response,StopRequest,Void,WorkerMetadata,WorkerServicer,WorkerStub,add_WorkerServicer_to_serverworker.py__all__TestProtobufImportErrorImportErrorwith message "No module named 'foo'"ProtobufImportErrorwrapping itexception.pyTestServiceRegistryprotobufpackage is importedadd_to_serverdictWorkerServicertoadd_WorkerServicer_to_server__init__.pyregistryImplementation plan
task.proto,worker.proto) and configurepyproject.tomlwith package metadata, build hooks, and dependenciestask.py,worker.py,exception.py,__init__.py) undersrc/wool/protocol/with public API, error handling, and service registrytests/protocol/) covering TM-001 through SR-001