Feat: add server and clean some things#156
Merged
Merged
Conversation
Marc-AnthonyG
requested changes
Jun 30, 2026
Marc-AnthonyG
approved these changes
Jul 2, 2026
Marc-AnthonyG
requested changes
Jul 2, 2026
Marc-AnthonyG
left a comment
Member
There was a problem hiding this comment.
Wait there is some deps that might not be cross compile compatible
Co-authored-by: Marc-Anthony <78452236+Marc-AnthonyG@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Tracel SDK by introducing an optional HTTP server for dispatching registered jobs, refactors job registration/execution to support a validate-then-run flow, and removes the tracel-macros proc-macro crate while updating some repository/product links and examples.
Changes:
- Added an (feature-gated) Axum/Tokio-based server module to
tracel-app, enabling fire-and-forget job execution viaPOST /{job_name}. - Refactored
JobRegisterto split validation from execution and added unit tests for the new behavior. - Removed
tracel-macrosand updated workspace/deps and release workflow accordingly; added new MNIST examples for dry-run and server usage.
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates some URLs, adds new CLI link, but still contains macro-based Quick Start content that no longer matches the code. |
| examples/mnist/examples/mnist-server.rs | New example demonstrating Server usage with multiple jobs/defaults. |
| examples/mnist/examples/mnist-dry-run.rs | New example demonstrating a “dry-run” execution path. |
| examples/mnist/Cargo.toml | Adds server feature (and enables it by default) to compile the server example. |
| crates/tracel/src/lib.rs | Removes macros re-export but crate-level docs still reference macros/register. |
| crates/tracel/Cargo.toml | Adds a server feature that forwards to tracel-app/server. |
| crates/tracel-macros/src/lib.rs | Deleted proc-macro implementation for #[register]. |
| crates/tracel-macros/Cargo.toml | Deleted crate manifest for tracel-macros. |
| crates/tracel-app/src/server/mod.rs | Implements the HTTP server and request handler wiring. |
| crates/tracel-app/src/server/error.rs | Adds ServerError and maps JobRegisterError into server-facing errors. |
| crates/tracel-app/src/lib.rs | Feature-gates the new server module. |
| crates/tracel-app/src/job.rs | Introduces erased validate/run function types used by JobRegister. |
| crates/tracel-app/src/job_register.rs | Splits dispatch into validate + run, adds error enum + unit tests. |
| crates/tracel-app/src/cli/mod.rs | Adapts CLI dispatch to the new JobRegisterError flow and renames default job field. |
| crates/tracel-app/src/cli/error.rs | Refactors CLI error types and adds From<JobRegisterError> mapping. |
| crates/tracel-app/Cargo.toml | Adds feature flags and optional deps for the server implementation. |
| Cargo.toml | Updates repository metadata, adds server deps, and switches tracel-client to a git dependency. |
| Cargo.lock | Updates lockfile for dependency/source changes (including new server-related deps). |
| .gitignore | Ignores .claude/ directory. |
| .github/workflows/publish.yml | Removes publishing steps for the deleted tracel-macros crate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Marc-AnthonyG
approved these changes
Jul 2, 2026
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.
Changes :
tracel-apptracel-macrocrateJobRegisterand fragment its logictracel-apperrors to be more organizedHow the Server module works
The Server exposes registered jobs as POST endpoints at /{job_name}. When a request arrives, it follows a two-phase flow:
JobRegister. If the job name is unknown → 404; if the body is invalid → 400.spawn_blocking), and the server immediately returns 200 with the message"Job '{name}' has started running", making it a fire-and-forget dispatch. Execution errors are logged tostderrbut not returned to the caller.Jobs are registered via a builder API (
Server::new().register(job)) and the server binds with Axum/Tokio.