rust-migration S0: axum server skeleton + /api/version (#122) - #140
Open
t2vi wants to merge 1 commit into
Open
Conversation
First strangler-fig phase of ADR 0033. New Rust crate in server/ alongside
the .NET project (cargo sees only .rs, dotnet only .cs).
- axum 0.8 app: config (env names unchanged), tracing from LOG_LEVEL,
AppError -> JSON, AppState + UpdateCache (port of .NET UpdateCache),
graceful shutdown on SIGINT/SIGTERM.
- GET /api/version ported — {current,latest,release_url}, same shape as
.NET; version = server/Cargo.toml package version (0.1.7).
- Integration tests (tower oneshot) mirror api-tests/version.hurl.
- nginx dual-routes /api/version -> :3001 (Rust), /api/ -> :3000 (.NET).
- Dockerfile stage 0 builds the binary; entrypoint runs it on :3001.
- .github/workflows/rust.yml: fmt + clippy -D warnings + test --locked.
- .dockerignore added (was missing) — keeps build context lean.
Deferred from the issue's S0 list, with rationale:
- SQLx pool + baseline schema SQL -> S2 (#124), first actual DB use.
- utoipa/Scalar -> when a 2nd endpoint exists.
- arrgh-core/arrgh-metadata crate split -> S4/S6 when there's code to move.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
First phase of the Rust server migration — ADR 0033 (private overlay).
Part of epic #120. Closes #122.
What lands
A Rust
arrgh-servercrate inserver/, alongside the .NET project.cargoonly compiles.rs,dotnetonly.cs— they coexist until S10.config.rs(env var names unchanged —DatabasePath,PluginHostUrl,DownloadDir,JwtSecret), tracing fromLOG_LEVEL,AppError→{"error": …}JSON,AppState+UpdateCache(port of the .NETUpdateCachesingleton), graceful shutdown on SIGINT/SIGTERM.GET /api/versionported — body{ current, latest, release_url }, byte-identical shape to .NET. Version =server/Cargo.tomlpackage version (0.1.7), compiled in.server/tests/version.rs,tower::oneshot, mirrorsapi-tests/version.hurl(current isString + semver; plus the update-available path)./api/version→:3001(Rust),/api/→:3000(.NET). Longest-prefix match; one block added per phase, catch-all deleted at S10.cargo build --release;entrypoint.shruns the binary on:3001beside the .NET server..github/workflows/rust.yml—cargo fmt --check+clippy -D warnings+test --locked, path-filtered toserver/**..dockerignore— was missing; added soserver/target(380 MB) etc. stay out of the build context.Deferred from the S0 checklist (with rationale)
0001_baseline.sql(EF schema reproduction)arrgh-core/arrgh-metadatacrate splitVerify locally
🤖 Generated with Claude Code