refactor(ceres): introduce application/transport/bus layers and thin mono routers#2138
Conversation
…ervice/mono Replace the monolithic mono_api_service.rs with focused modules for CL, edit, buck, admin, sync, tag, and shared logic. Move admin/group/bot ops into mono/admin, extract tag_ops for import repo APIs, and add mono ref upsert helpers for sync and merge flows. Update call sites across ceres, mono, and jupiter, and extract web sync path utilities with tests.
…mono routers Reorganize ceres into transport (Git protocol/pack), application (API, code_edit, build_trigger), infra, and bus, with legacy re-exports in lib.rs for mono compatibility. Extract post-receive handlers, CL lifecycle logic, and split jupiter converter into focused modules. Delegate CL/merge-queue orchestration from mono routers to MonoApiService, bump workspace deps, and document the new module layout in ceres/README.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffa2a535d8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let resource_type_value = ResourceTypeValue::try_from(resource_type) | ||
| .map_err(|err| MegaError::Other(err.to_string()))?; |
There was a problem hiding this comment.
Preserve bad-request status for invalid resource types
When a client calls the group-permission endpoints with an unknown resource_type, this now wraps the validation failure in MegaError::Other. The router maps this via ApiError::from, and ApiError treats Other errors without a [code:400] marker as HTTP 500 with a generic message; the previous router code returned ApiError::bad_request. Please keep this as a client validation error so invalid path parameters continue to return 400 instead of an internal-server-error response.
Useful? React with 👍 / 👎.
No description provided.