Refine Rust architecture boundaries
Deploy / deploy (push) Successful in 1m33s
CI / Rust Checks (push) Failing after 5m47s
CI / UI Checks (push) Has been skipped
CI / Frontend E2E (push) Has been skipped
CI / Deployment Manifests (push) Has been skipped

This commit is contained in:
github-ops
2026-06-21 08:58:32 +00:00
parent a31862aeeb
commit 7df9b48513
18 changed files with 1376 additions and 1052 deletions
+22
View File
@@ -39,6 +39,28 @@ MCP client
Input mapping переводит MCP arguments в REST request. Output mapping переводит
REST response в MCP tool result.
## Rust boundaries
В Community-коде закреплены следующие границы:
- `crank-core::domain` — доменные типы: operations, agents, users, secrets, observability, ids.
- `crank-core::ports` — интерфейсы внешних зависимостей: policy, audit, identity, protocol adapters, cache stores, metering.
- `crank-registry::records` — read/write records, которые возвращает storage layer.
- `crank-registry::requests` — request-структуры для persistence операций.
- `crank-registry::infrastructure` — PostgreSQL registry facade, pool config и extension migrations.
- `apps/admin-api/src/dto.rs` — HTTP payloads и view models. Service layer не должен владеть DTO-типами.
- `apps/admin-api/src/service/*` — application use-cases. Эти модули не импортируют `axum`.
- `crates/crank-community-mcp/src/transport.rs` — MCP Streamable HTTP transport: headers, accept negotiation, session id, JSON/SSE responses.
- `RuntimeExecutionRequest` — единая точка расширения runtime execution parameters. Новые auth/context/cache/metring параметры добавляются туда, а не через новые `execute_with_*` методы.
Границы проверяются скриптами:
```text
scripts/check-rust-boundaries.sh
scripts/check-rust-module-boundaries.sh
scripts/check-rust-code-health.sh
```
## Хранилище
PostgreSQL хранит: