application tier

application-translate

Forge module: owns the translation_cache migration backing infrastructure-translate's Postgres cache (Sprint 0.65 Gate 1.5 Q1)

Forge module: owns the translation_cache migration backing infrastructure-translate's Postgres cache (Sprint 0.65 Gate 1.5 Q1)

Tierapplication
Roleunclassified (baselined)
Pathcrates/application/translate
Edition2021
Targetsapplication_translate
Public items6 across 0 modules
Tests2

What it is for

application-translate — the Forge module that owns the translation_cache migration backing infrastructure-translate's Postgres cache (Sprint 0.65, Gate 1.5 Q1).

Thin by design: no routes, no services — just the migration, so every consumer (application-cms, baloo, happydiving, spanish-novels) shares one cache schema instead of each declaring its own. A host registers it like any other module and migrate_pending runs at boot.

Why this does not use sqlx::migrate!

sqlx::migrate! records its versions in the shared _sqlx_migrations table. In a host that ALSO runs a platform migration set (every forge host does — application_engine::run_platform_migrations), that table already holds versions 1..N from a completely different series, and this module's migrator resolves only version 1. sqlx then refuses to run at all:

migration 2 was previously applied but is missing in the resolved migrations

which aborts BOOT, not a test. Module migrations therefore go through application_core::apply_module_migrations, which keys on (module, filename) in forge_module_migrations and cannot collide with another series — the same route application-parties takes.

Capabilities

TranslateModule

application-translate — the Forge module that owns the translation_cache

Item
pub struct TranslateModule
TranslateModule :: fn new() -> Self
TranslateModule :: fn name(& self) -> & 'static str
TranslateModule :: fn version(& self) -> & 'static str
TranslateModule :: fn migrations(& self) -> Vec <MigrationSet>
TranslateModule :: async fn migrate_pending(& self, pool : & PgPool) -> Result <u32, MigrationError>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct TranslateModuleThe application-translate module identity
TranslateModule :: fn new() -> Self
TranslateModule :: fn name(& self) -> & 'static str
TranslateModule :: fn version(& self) -> & 'static str
TranslateModule :: fn migrations(& self) -> Vec <MigrationSet>
TranslateModule :: async fn migrate_pending(& self, pool : & PgPool) -> Result <u32, MigrationError>

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

Shares tier application with 120 other crates: application-agreements, application-ai, application-analytics, application-approvals, application-assessments, application-audit-log, application-auth, application-billing, … (120 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)application
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/application/translate
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`application-core`applicationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["application-translate"]
  SELF -->|runtime| n_application_core["application-core"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libapplication_translate`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfaceyes
async runtimenone detected
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
CARGO_PKG_VERSIONsrc/lib.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests2
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root100

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc16
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 1
    "No rustdoc detected" : 5

Metrics

MetricValue
Rust source files1
Source lines103
Code lines59
Public API items6
Public modules0
Tests2
Examples0
Cargo features0
Direct runtime dependencies3
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "method" : 5
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 59
    "Blank or comment" : 44

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All application · Manual