Skip to content

Upgrading from 6.x to 7.0

The order that moves a 6.1 project to 7.0 — manifest, environment, HTTP vocabulary, layers, data port, deployment — and what fails when a step is missed.

7.0 is a major release, and the foundation every 7.x builds on: HTTP speaks the http crate’s types on a server of nestrs’s own, every edge runs one pipeline whose layers read the unit they wrap, a queue is pushed through its type and kept on Redis Streams, a resource opens once per named instance, and every edge runs its work through one unit-of-work port. This page is the order to take the changes in: a 6.1 workspace goes in, a 7.0 one comes out, and each step ends on something you can check. The changelog says why each change was made; this page says what to do about it.

You need the 6.1 project building, and — for a queue on Redis — its 6.x workers left running until they drain the 6.x jobs (step 18). Most steps are compile errors, so the compiler finds every site; a step that changes behaviour alone says so, and What fails if you get it wrong lists what the boot, a log or the wire shows when one is missed.

  1. Move the CLI and the manifest. nestrs update installs the 7.0 CLI, whose scaffolds, lint and doctor follow the release. In the root Cargo.toml, the nest-rs requirement under [workspace.dependencies] goes from 6.1 to 7.0, and a few features move with it — the umbrella counts 30 capabilities:

    6.17.0
    interceptors, exception-filtersnothing: nest_rs::core::{Interceptor, ExceptionFilter, interceptor}
    filtersnothing: an exception filter whose Exception is dyn Error + Send + Sync (step 10)
    workernothing: queue and schedule carry what a job needs; the job deadline is nest_rs::core::JOB_TIMEOUT
    redis, for a queue on Redisredis-queue — redis alone is now the connection
    graphql, with #[authorize] on a resolvergraphql and authz
    testing, with TestApp and no other HTTP featuretesting and http, or HeadlessApp
    oauth-serverunchanged; it now enables authn too, since its guard runs an authn Strategy
    Cargo.toml
    # before
    nest-rs = { version = "6.1", features = ["queue", "redis"] }
    # after
    nest-rs = { version = "7.0", features = ["redis-queue"] }

    redis-schedule is new, and only a job firing once across replicas needs it (step 14). Then, in the same pass:

    • Move the toolchain to Rust 1.100, the release 7.0 builds on: channel = "1.100" in rust-toolchain.toml, rust-version = "1.100" in the root Cargo.toml, and the rust image’s tag in a Dockerfile. rustup installs it on the next cargo run; an older one makes cargo refuse before it builds anything, naming each nest-rs crate and the rustc 1.100 it requires.
    • Drop poem from [workspace.dependencies] and from every member that declares it, a test’s [dev-dependencies] included: nothing a nestrs application writes names it (step 8).
    • Move testing off the root line that a pre-7.0 nestrs new wrote, onto each app’s [dev-dependencies] (nest-rs = { workspace = true, features = ["testing"] }), so no release binary links the harness.
    • Deny the discarded Result that a pre-7.0 nestrs new left open: add [workspace.lints.clippy] let_underscore_must_use = "deny" to the root manifest and [lints] workspace = true to each member, which inherit nothing otherwise.
    • Without seaorm, a Uuid or a chrono DateTime on a GraphQL type or operation of yours needs features = ["uuid", "chrono"] on your own async-graphql line, and a chrono type you serialize needs serde on your own chrono line. With seaorm, nothing changes.
    • Raise the libraries you name beside nestrs to the floors 7.0 builds on: tokio 1.54, uuid 1.29, rmcp 3.8 and redis 1.8. The framework pins redis at =1.8, so a redis = "=1.7" line of yours no longer resolves; a requirement such as 1.7 takes 1.8 with no edit.
    • A library the framework re-exported for its own expansions — nest_rs::core::{serde, validator, schemars}, nest_rs::http::{serde, validator}, nest_rs::queue::serde_json — is a dependency of your own where your code names it, but for validator, which your code names at nest_rs::pipes::validator; #[input], #[expose] and #[config] still need none.
    • A script running nestrs g resource <name> then nestrs g migration create_<name> drops the second line: the resource writes its table’s migration, from the columns it now takes (nestrs g resource posts title:string body:text). A later change to the table takes a migration of its own name, add_<column>_to_<table>.
    • A script running nestrs g migration create_<name> before nestrs g resource <name> drops the first line, for the same reason: a resource whose table a registered migration creates is refused. Over a migration you keep, write the feature and its entity alone, nestrs g feature <name> then nestrs g entity <name>.

    Take the patched rustls while the lockfile moves — 0.23.44 carries RUSTSEC-2026-0285:

    Terminal window
    nestrs update
    cargo update -p rustls
    cargo check --workspace

    The check now fails on the calls steps 4 to 14 change. A refusal beyond them names the rule it applies: 7.0 judges every decorated method by one grammar, and the changelog lists what it refuses.

  2. Declare each process’s environment, and let main load it. A process that declares no <PREFIX>_ENV runs as production, where 6.x took it for development: it reads .env.production rather than .env.development, serves no development surface, and refuses what production refuses. A local run outside nestrs run dev — cargo run, an IDE’s run configuration, a script — declares <PREFIX>_ENV=development on the process; the variable cannot live in .env. A deployment that never set it sets <PREFIX>_ENV=production, which silences the boot’s no environment declared; running as production line.

    6.x7.0
    #[tokio::main] on a binary’s main — an app, a migrate or seed tool#[nest_rs::main], and the tokio line a crate carried only for it dropped (its tests keep theirs as a dev-dependency)
    let _environment = Environment::init(); on main’s first linedelete the line and its use: #[nest_rs::main] publishes the .env cascade before main runs; a binary without it calls nest_rs::config::load_cascade(dir, Environment::from_env()) first thing
    Environment::default() or Environment::from_env() expected to be Development when <PREFIX>_ENV is unsetProduction; branch on Environment::declared() to tell an undeclared process apart, or on is_deployed() for a development convenience
    !matches!(Environment::from_env(), Environment::Production | Environment::Staging) in a Config::defaults() of your owna Surface field, read with is_open() (step 6); !Environment::from_env().is_deployed() where you branch on the profile yourself
    a scaffolded project’s URLs in .envmove them to .env.development and .env.test; export <PREFIX>_ENV := "development" in db.just
    a development or test run reaching Redis on redis://127.0.0.1/, or storage on https://rustfs:9000 with the nestrs pair, with no variable setname them in .env.development and .env.test — <PREFIX>_REDIS__URL, <PREFIX>_STORAGE__URL, ENDPOINT, ACCESS_KEY, SECRET_KEY: no profile names an address or a credential
    <PREFIX>_GRAPHQL__PLAYGROUND=true, <PREFIX>_GRAPHQL__DISABLE_INTROSPECTION=false or <PREFIX>_LOG_FORMAT=text in .env.developmentdelete the lines: a declared development or test profile serves the playground, answers introspection and writes text logs; a deployment writes JSON
    a scaffolded project’s .env holding <PREFIX>_AUTHN__SECRET=dev-only-insecure-secret-change-me-32bdelete that line; put <PREFIX>_AUTHN__SECRET= and the output of openssl rand -hex 32 in .env.local (and another in .env.test if your suites sign tokens), and your own in every deployed environment
    a scaffolded project’s .env.test naming redis://localhost:6379redis://localhost:6379/1, so the suites never push on the database the development app drains

    #[nest_rs::main] builds the same runtime as #[tokio::main] and ends the process within the shutdown budget: under #[tokio::main], the runtime’s drop waits for every blocking call still running, so a hook abandoned while it waited on one held the exit past every bound. A second SIGINT or SIGTERM during the way down now exits at once, with code 130 or 143.

  3. Rename the variables that moved. A crate in a family puts the family first in its namespace, so the OAuth client and resource server read <PREFIX>_OAUTH__CLIENT__* and <PREFIX>_OAUTH__RESOURCE__* — the same string as their paths, nest_rs::oauth::client and nest_rs::oauth::resource. Rename them wherever the deployment sets them: the .env files, the chart’s values, the platform’s secrets.

    6.x7.0
    <PREFIX>_OAUTH_CLIENT__CLIENT_ID<PREFIX>_OAUTH__CLIENT__CLIENT_ID
    <PREFIX>_OAUTH_CLIENT__CLIENT_SECRET<PREFIX>_OAUTH__CLIENT__CLIENT_SECRET
    <PREFIX>_OAUTH_CLIENT__AUTH_URL<PREFIX>_OAUTH__CLIENT__AUTH_URL
    <PREFIX>_OAUTH_CLIENT__TOKEN_URL<PREFIX>_OAUTH__CLIENT__TOKEN_URL
    <PREFIX>_OAUTH_CLIENT__REDIRECT_URL<PREFIX>_OAUTH__CLIENT__REDIRECT_URL
    <PREFIX>_OAUTH_CLIENT__USERINFO_URL<PREFIX>_OAUTH__CLIENT__USERINFO_URL
    <PREFIX>_OAUTH_CLIENT__SCOPES<PREFIX>_OAUTH__CLIENT__SCOPES
    <PREFIX>_OAUTH_RESOURCE__RESOURCE<PREFIX>_OAUTH__RESOURCE__RESOURCE
    <PREFIX>_OAUTH_RESOURCE__AUTHORIZATION_SERVERS<PREFIX>_OAUTH__RESOURCE__AUTHORIZATION_SERVERS
    <PREFIX>_OAUTH_RESOURCE__SCOPES_SUPPORTED<PREFIX>_OAUTH__RESOURCE__SCOPES_SUPPORTED
    <PREFIX>_OAUTH_RESOURCE__BEARER_METHODS_SUPPORTED<PREFIX>_OAUTH__RESOURCE__BEARER_METHODS_SUPPORTED
    <PREFIX>_OAUTH_RESOURCE__RESOURCE_NAME<PREFIX>_OAUTH__RESOURCE__RESOURCE_NAME
    <PREFIX>_OAUTH_RESOURCE__RESOURCE_DOCUMENTATION<PREFIX>_OAUTH__RESOURCE__RESOURCE_DOCUMENTATION
    <PREFIX>_OAUTH_RESOURCE__RESOURCE_POLICY_URI<PREFIX>_OAUTH__RESOURCE__RESOURCE_POLICY_URI
    <PREFIX>_OAUTH_RESOURCE__RESOURCE_TOS_URI<PREFIX>_OAUTH__RESOURCE__RESOURCE_TOS_URI
    <PREFIX>_OAUTH__CLIENTS, the registered clients an app’s own oauth config read (the demo’s)<PREFIX>_OAUTH__SERVER__CLIENTS, read by nest_rs::oauth::server::OAuthServerConfig<P> (step 9); the rest of that config moves under the module’s own domain word — the demo’s SIGN_IN_RESOURCES and DEFAULT_ORG_ID are <PREFIX>_SIGN_IN__RESOURCES and <PREFIX>_SIGN_IN__DEFAULT_ORG_ID
    <PREFIX>_STORAGE__BUCKET=media<PREFIX>_STORAGE__URL=s3://media (or s3://media/some/prefix)
    <PREFIX>_STORAGE__ENDPOINT= (empty for AWS)unset
    <PREFIX>_STORAGE__TLS_CERT / TLS_KEY, set and ignoredremoved: the boot now fails naming them
    <PREFIX>_HTTP__FAIL_SECURE_STRICTremoved: no mount is left for it to guard, and the boot says it retired
    <PREFIX>_HTTP__CORS_MAX_AGE<PREFIX>_HTTP__CORS_MAX_AGE_SECS, whole seconds from 1 to 86400, or 0 for no Access-Control-Max-Age
    <PREFIX>_HTTP__CORS_EXPOSED<PREFIX>_HTTP__CORS_EXPOSED_HEADERS, the field it sets
    <PREFIX>_HTTP__SECURITY_HEADERS<PREFIX>_HTTP__SECURITY_HEADERS_ENABLED
    <PREFIX>_HTTP__HSTS, FRAME_OPTIONS, CONTENT_TYPE_OPTIONS, REFERRER_POLICY, CROSS_ORIGIN_OPENER_POLICY, CROSS_ORIGIN_RESOURCE_POLICY, CROSS_ORIGIN_EMBEDDER_POLICY, PERMISSIONS_POLICY, CONTENT_SECURITY_POLICYthe same name after SECURITY_HEADERS_: <PREFIX>_HTTP__SECURITY_HEADERS_HSTS, …
    <PREFIX>_REDIS__WORKER__SHUTDOWN_TIMEOUT_SECS<PREFIX>_QUEUE__SHUTDOWN_TIMEOUT_SECS (step 17)
    <PREFIX>_GRAPHQL__EMIT_SDL<PREFIX>_GRAPHQL__EMIT — on by default under a declared development profile, so a .env.development setting it drops the line
    <PREFIX>_GRAPHQL__SCHEMA_PATH<PREFIX>_GRAPHQL__EMIT_PATH, a relative path now the app crate’s: apps/api/schema.graphql becomes schema.graphql, the default
    <PREFIX>_GRAPHQL__DISABLE_INTROSPECTION<PREFIX>_GRAPHQL__INTROSPECTION, its opposite, and the boot refuses the old key set: DISABLE_INTROSPECTION=false is INTROSPECTION=true. On by default under a declared development or test profile, so a .env.development setting it drops the line
    <PREFIX>_OPENAPI__EMIT_DOCUMENT<PREFIX>_OPENAPI__EMIT — on by default under a declared development profile
    <PREFIX>_OPENAPI__DOCUMENT_PATH<PREFIX>_OPENAPI__EMIT_PATH, relative to the app crate: apps/api/openapi.json becomes openapi.json, the default
    <PREFIX>_LOG, in a .env file or the deploymentRUST_LOG, unprefixed: the console’s filter is the ecosystem’s variable alone, and a real RUST_LOG outranks one a committed file writes
    <PREFIX>_OPENTELEMETRY__SERVICE_NAMEOTEL_SERVICE_NAME, unprefixed — or nothing: the service is named after the binary
    <PREFIX>_OPENTELEMETRY__SERVICE_VERSION, SERVICE_ENVIRONMENT, SERVICE_INSTANCE_IDOTEL_RESOURCE_ATTRIBUTES=service.version=…,deployment.environment.name=…,service.instance.id=… — the version defaults to the binary’s
    <PREFIX>_OPENTELEMETRY__OTLP_ENDPOINTOTEL_EXPORTER_OTLP_ENDPOINT
    <PREFIX>_OPENTELEMETRY__SAMPLE_RATIO=0.1OTEL_TRACES_SAMPLER=parentbased_traceidratio and OTEL_TRACES_SAMPLER_ARG=0.1
    <PREFIX>_OPENTELEMETRY__METRIC_INTERVAL_SECS=5OTEL_METRIC_EXPORT_INTERVAL=5000, in milliseconds
    <PREFIX>_OPENTELEMETRY__TLS_CA_CERT, TLS_CERT, TLS_KEY (or their _FILE)OTEL_EXPORTER_OTLP_CERTIFICATE, OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE, OTEL_EXPORTER_OTLP_CLIENT_KEY, each a path to the PEM file

    OpenTelemetry’s are the specification’s own, so they take no prefix: no ACME_ renames OTEL_*, nor RUST_LOG. Under a prefix of your own, the rest holds with ACME_ for NESTRS_. Every one of them — every namespaced variable, in fact — can now be given as a file instead, through its _FILE spelling; see the ConfigService API. A name you miss is not silent: the boot names it and its new spelling, as shown below.

  4. If you write decorators on nest-rs-codegen, depend on it from a proc-macro crate only, and use its root items alone, the kit semver covers. Read a decorator’s arguments through Grammar: a key = value grammar is one const G: Grammar = Grammar::new("attr", &["key", …]), and G.parse2(args, |arg| …) refuses an unknown key and a repeated one before the closure sees a key; the closure reads the key’s value through Arg, which refuses a bare key that needs one, and reads a key that takes no value through arg.input(). Collect an item’s refusals in Refusals and report them at once; read a duration with duration_millis, derive a name with pascal_case or snake_case, take a marker attribute off an item with take_flag_attr, take_single_attr or take_path_list, and pass the finished expansion through reroot. Emit a framework path as ::nest_rs_<concern>::<item>, an item the docs show, and your own as ::<your_crate>::…. Everything else in nest_rs_codegen moved to __private and is not API — the job and pair tables, JobDecorator, job_key, transactional_value, CrudDeclaration, RoutePath, MountPath, VersionedEdge among them. The repository’s clippy.toml refuses syn::meta::parser, syn::Attribute::parse_nested_meta and syn::MetaList::parse_nested_meta; copy those three entries if your crate should hold the same line.

  5. Follow the remaining renamed types and signatures. Each row is a compile error, so the compiler finds every site:

    6.x7.0
    an exhaustive match on a framework enum (ApiVersioning, Action, WsReply, …)the same ending in _ =>, its arm the default your code means
    nest_rs::resource::{expose, wire_enum}nest_rs::seaorm::expose, nest_rs::core::wire_enum
    nest_rs::resource::{PkLoadable, RelatedTo, RelationKey, RelationPage, SoleForeignKey}nest_rs::seaorm::graphql::{…}
    nest_rs::resource::sea_ormnest_rs::seaorm::sea_orm
    a pub use re-exporting an entity’s relation marker beside it, By<Column> (posts::ByAuthorId)posts::__ByAuthorId, the marker #[expose] emits for a via relation, hidden like the rest of its expansion
    nest_rs::resource::{serde, validator, schemars, chrono, uuid, serde_json, tracing, async_trait}, nest_rs::resource::graphql::{async_graphql, dataloader}nest_rs::pipes::validator, nest_rs::graphql::{async_graphql, dataloader}, or a dependency of your own on any other
    nest_rs_seaorm::TARGET, nest_rs::resource::TARGETnest_rs_seaorm::target::ORM, nest_rs::seaorm::target::LOADER (the strings are unchanged)
    nest_rs::health::unresolved_hostnest_rs::core::unresolved_host
    nest_rs::core::operation_log::EDGESnest_rs::core::Edge::ALL, each word through Edge::as_str
    an item through nest_rs::core::{access, app, container, discoverable, discovery, env_flag, env_prefix, error, error_message, layer, layer_chain, lifecycle, module, request_scope, trace_context, transport}::… (nest_rs::core::container::Container)the same item at nest_rs::core::… (nest_rs::core::Container): an item has one path, and those modules are private
    nest_rs::core::problem::{Code, Problem, ToProblem}, nest_rs::core::problem::code::CONFLICTnest_rs::core::{Code, Problem, ToProblem}, nest_rs::core::code::CONFLICT
    nest_rs::core::operation_log::Edge, nest_rs::core::panic_messagenest_rs::core::Edge, nest_rs::core::panic::panic_message
    nest_rs::core::trace_context::field::…nothing public: the framework writes the correlation fields, and trace_id, span_id and actor_id come from context
    nest_rs::social::providers::github::…, nest_rs::social::providers::google::…nest_rs::social::…
    EventBus::subscribe(listener) on a bus of your owna #[listeners] host with an #[on_event] method
    nest_rs::pipes::{ValidateProbe, MaybeValidateFallback}, nest_rs::graphql::{ValidateProbe, MaybeValidateFallback}, nest_rs::ws::resolve_ws_data_pipenothing public: the decorators emit them
    nest_rs::pipes::ValidationPipe, Piped<ValidationPipe<T>, E>, nest_rs::pipes::Validnothing: every edge validates what it decodes; a hand-written check runs nest_rs::pipes::validator::Validate and converts with nest_rs::pipes::PipeError::from
    #[input] on a DTO an edge only sends#[output] (nest_rs::core::output), Serialize and JsonSchema alone — not a compile error: #[input] still compiles, carrying a Deserialize and rules nothing reads
    any other item that was #[doc(hidden)] at a crate’s rootnothing public: __private is not API
    async_trait from nest_rs::http, ws, graphql, guards or queuenest_rs::core::async_trait, or use nest_rs::prelude::*
    input from nest_rs::http, ws, mcp or queuenest_rs::core::input, or use nest_rs::prelude::*
    use nest_rs::guards::prelude::*;use nest_rs::core::{Layer, UnitContext, async_trait, injectable}; and use nest_rs::guards::{Denial, Guard, GuardFor}; — the names the guard uses
    nest_rs::http::{current_request_scope, with_request_scope}nest_rs::core::{current_request_scope, with_request_scope}
    nest_rs::opentelemetry::LogFormatnest_rs::core::logging::LogFormat, the one type it re-exported
    EnvPrefix::var(nest_rs::core::logging::var::FILTER)"RUST_LOG": the console’s filter is the ecosystem’s variable, which no prefix renames
    nest_rs::http::{version_path, versions_declare, join_path, normalize_mount_path, literal_mount_path, declared_versions}nothing public: #[controller], #[gateway] and the framework’s own mounts call them
    nest_rs::ws::{ReplyValue, ReplyOutcome, ErrorReport, HandlerFailed} and their fallbacks, nest_rs::ws::targetnothing public: #[messages] emits them; a handler returns its value or its Result
    nest_rs::ws::nest_rs_http::…nest_rs::http::…, which the ws feature turns on
    nest_rs::guards::GuardSpecs(vec![…]), nest_rs::pipes::PipeSpecs(vec![…]) seeded by handGlobalGuards<(…)>, GlobalPipes<(…)> in the providers of the module main boots
    nest_rs::core::layer_chain::GlobalSpecsnothing public: each family’s pool is a declaration the root module lists — GlobalGuards, GlobalPipes, GlobalInterceptors, GlobalExceptionFilters
    nest_rs::mcp::hosts_on(container, path)Discovery::new(container).meta::<McpHostMeta>(), filtered on meta.path()
    nest_rs::mcp::current_container() in a tool’s bodyan #[inject]ed field on the #[mcp] host, or a Scoped<T> parameter
    nest_rs::schedule::nest_rs_database::TransactionPolicynest_rs::database::TransactionPolicy, which the schedule feature turns on
    scope: Scope<E, A> on a route, its Condition applied to a query of the handler’s own (nest_rs::authz::http::Scope)the query in the service, through Repo::<E>::scoped(A::ACTION), which applies the caller’s filter itself
    Correlation::mint()Correlation::minted(None)
    TlsConfig, CorsConfig, SecurityHeadersConfigHttpTls, HttpCors, HttpSecurityHeaders
    method.retries, method.queue on a ProcessMethodmethod.options().retries(), method.queue()
    entry.provider, entry.method, entry.replicas on a ScheduledMethod (likewise ListenerMethod, HealthIndicator, SocialProviderEntry)entry.host(), entry.method(), entry.replicas()
    entry.provider_type_id(), Discovered’s provider_type_id, CronJobMeta::provider()entry.host_type_id(), host_type_id, CronJobMeta::host()
    BootStep::InitHook { provider, .. }BootStep::InitHook { host, .. }
    entry.run, entry.wire, entry.build, entry.declaration_index, entry.provider_type_name or entry.module on a registry entrynone: only the boot runs a discovered entry
    a CronJobMeta { … } registered by handCronJobMeta::new(module_path!(), host, method, trigger, run), then .with_timeout(…), .with_transaction(TransactionPolicy::Pool), .with_replicas(Replicas::One), .with_key(…) for each field you set away from its default
    Bound { count, why }Bound::new(count, why)
    let _otel = OpenTelemetry::init("api")?;let _otel = OpenTelemetry::init()?; — the service is the binary’s name and version
    OpenTelemetryModule in the root’s importsdelete it: main’s let _otel = OpenTelemetry::init()?; is the whole wiring; the module stays only where a provider injects Arc<Metrics>
    .with_test_telemetry() on a TestApp::builder(), and nest-rs-testing’s opentelemetry featuredelete them: a suite asks nothing of telemetry, and logs through the console the boot installs
    OpenTelemetryError::InitMissing matchednothing: no module refuses; App::run refuses an OTLP endpoint no exporter serves with nest_rs::core::UnservedExportError
    an app’s main with no OpenTelemetry::init()let _otel = OpenTelemetry::init()?; as its first line, with the opentelemetry feature on the app’s nest-rs, wherever a deployment sets OTEL_EXPORTER_OTLP_ENDPOINT
    OpenTelemetryConfig::new("api"), OpenTelemetryConfig::from_env("api")?OpenTelemetryConfig::default(), OpenTelemetryConfig::from_env()?; service_name: Some("api".into()) to name the service otherwise
    .with_log_filter(f), .with_log_format(x), .with_log_source_location(b), .with_otlp_endpoint(e), .with_service_version(v), .with_deployment_environment(d), .with_trace_sample_ratio(r), .with_metric_interval(i) on an OpenTelemetryConfigthe field in a literal over its base: OpenTelemetryConfig { trace_sample_ratio: 0.1, ..OpenTelemetryConfig::from_env()? }; a ratio outside [0, 1] now fails init_with instead of being clamped
    OpenApiLicense { name, identifier: Some(id), url: None }OpenApiLicense::new(name).with_identifier(id)
    the queue’s Processor traitnothing: a consumer is a #[processor] host and its #[process] methods
    envelope::seal(payload) and envelope::open(value) from the queue crate, in a driverthe port seals before enqueue and opens in its worker; the type is Envelope at the crate’s root — see Writing a driver
    a driver’s own worker Transport, its fetch loop and its retriesa JobConsumer bound as a BoundConsumer: the port’s QueueWorker runs the loop, the attempt and the drain
    CheckpointStore::clearnothing: the backend lets a job’s checkpoint go in the settle that ends the job
    check_duplicate_queue_claims(&methods)nothing: the port’s worker refuses two methods on one queue at boot
    RedisWorkerModule::for_root(cfg), from nest_rs::redisQueueModule::for_root(cfg), from nest_rs::queue, beside RedisQueueModule, which now binds the consumer too
    RedisWorkerConfig { shutdown_timeout }QueueConfig { shutdown_timeout }; the lease is RedisQueueModule::for_root(RedisQueueConfig { lease })
    RedisWorker::new(), spawned in a testQueueWorker::new(), from nest_rs::queue
    the queue crate’s tracing re-exporta tracing dependency of your own
    async fn hit(&self, key: &str, limit: Throttle) -> Decision on a rate-limit store of your own-> Result<Decision, ThrottlerStoreError>: your client’s failure as Err(ThrottlerStoreError::new(error)), never a decision of your own, and no log line
    MaskReplyError::Irreconcilable(serde_json::Error)MaskReplyError::Irreconcilable(DecodeError)
    ProblemDetails::from_error(status, title, err) with any Displaythe same with &err, an error, whose decode failure it says without the value; a sentence of your own is .with_detail(…)
    problem.extensions moved or compared as a serde_json::Map*problem.extensions: the map is boxed, so a Result carrying the problem stays under clippy’s result_large_err threshold; indexing, get and insert read through the box unchanged
    panic_message(payload) borrowed as a &stran owned String, any decode failure in it said without the value
    post: Bind<Update, PostsService> on a route, nest_rs::seaorm::Bind#[authorize(Update, bind = PostsService)] on the route and post: Authorized<Update, PostEntity> as its parameter, nest_rs::seaorm::Authorized; the route’s whole path, its controller’s included, names the id alone (/{id}, /{id}/publish)
    nest_rs::seaorm::graphql::bind::<A, S>(ctx, &id) or bind_required::<A, S>(ctx, &id) in a resolver#[authorize(A, bind = S)] on the operation and an Authorized<A, E> parameter, its id argument synthesised; a nullable lookup is #[crud]’s generated query, or CrudService::access in the body
    a hand-written Authorize<A, E> parameter on a route that is not #[public]#[authorize(A, E)] on the route, the parameter dropped
    #[public] and _authz: Authorize<Read, post::Entity> on a route#[public(Read, post::Entity)], the parameter dropped: the same gate, the same reads, and no line a cleanup can take for unused
    #[public] on a route loading its row with CrudService::access in the body#[public(Read, bind = PostsService)] and a post: Authorized<Read, PostEntity> parameter
    #[public] on a GraphQL operation, a WS message or an MCP operation reading rows under define_visitor#[public(Read, post::Entity)], returning the wire type: a read under a bare #[public] now answers nothing, and .fields([...]) holds there
    a covered WS message or MCP operation stating no posture, or gated on a #[subject], reading rows#[authorize(Read, Entity)]: such a read now answers nothing, as on a route
    a #[field_resolver] or a relation serving a visitor’s rowsa root field naming them, #[public(Read, Entity)], or a query returning what it read: a nested read answers a visitor nothing
    a guard of your own covering a route, a message or an operation, its phase() left at the defaultfn phase(&self) -> GuardPhase { GuardPhase::Authentication }, or Authorization: the boot reads it
    a route, a message or an operation under ThrottlerGuard or another guard identifying no one, alone#[public] on the unit, a guard identifying a caller beside it, or for an MCP host writing its own handler McpModule::for_root(McpAccess::Public)
    HttpRouteMeta::scoped_guarded, HttpRouteMeta::access_is_implicit, HttpRouteParts::scoped_guardednothing public: the boot reads the composed chain
    nest_rs::authz::http::AbilityShapingnothing public: #[authorize] declares the gate, and each wire row judges itself
    a hand-written get or user override on a #[crud] block, kept only for its #[api] textapi(get(summary = "…", description = "…")) in the #[crud] arguments, the override deleted
    paginate = … on a #[crud] block that writes its list operation by handthe key dropped: nothing generated read it, and your method bounds its own list
    a #[crud] block generating get, update or delete under a controller path naming a parameter (/orgs/{org}/users)those operations written by hand, reading every parameter, or the resource mounted under a path naming none: the generated ones answered 500 on every request
    #[crud(service = svc, entity = E, output = Dto, create = CreateDto, update = UpdateDto)]#[crud(service = UsersService)], naming the type of the service svc holds: every type is read off the service’s CrudService, Creatable and Updatable impls and the entity’s #[expose], and every operation reaches it through the host’s #[inject] field of that type
    a bare #[crud(service = svc, entity = …, output = …)] over a read-only service (list, get and delete by default)#[crud(service = UsersService, ops = [list, get])], or ops = [list, get, delete] beside a Deletable impl: the default is all five
    a #[crud(service = svc, entity = …, output = …)] that left create or update out, over a service implementing Creatable or Updatable#[crud(service = UsersService, ops = [list, get, delete])], the operations it served: without ops, the block serves every write its service implements
    a #[controller] or #[resolver] injecting one type in two fieldsone field: the container holds one instance of the type, and the second field is refused at compile time
    <E as PkLoadable>::Wire, <E as RelatedTo<P, V>>::Wire<E as Exposed>::Wire, nest_rs::seaorm::Exposed

    Name your own log target by the constant the feature declares, as a 7.0 scaffold does (pub const TARGET: &str = "features::chat"; in chat/mod.rs), and file an error field through the framework’s one walk of a chain:

    crates/features/src/chat/ws/gateway.rs
    use nest_rs::core::error_message;
    tracing::warn!(target: "features::chat", error = %e, "broadcast failed");
    tracing::warn!(target: crate::chat::TARGET, error = %error_message(&e), "broadcast failed");
  6. Import a module bare to read its environment, pin a config as a struct literal, and open an instance by its type. Every module owning a config is imported bare to read its variables, and for_root takes only the value it pins — never None. A module’s config is one value, pinned through for_root as a struct literal over its base: every with_* helper is gone. A config’s Default is its one base — no loopback URL, no development credential, and what a development run opens a Surface left to the profile, closed in a deployment — and a pinned config reads the process environment, never .env. A struct gaining fields within 7.x keeps a literal ending in ..Default::default() compiling, as the semver policy promises.

    6.x7.0
    SeaOrmModule::for_root(None), RedisModule::for_root(None), ThrottlerModule::for_root(None), AuthnModule::for_root(None), HttpModule::for_root(None) — any X::for_root(None)the bare import, SeaOrmModule, RedisModule, …: it reads <PREFIX>_<NS>__* over the defaults, and for_root only pins
    X::for_root(Some(cfg))X::for_root(cfg)
    OAuthServerModule::for_root::<P>(None)OAuthServerModule::<P>; a pin infers P from its value, OAuthServerModule::for_root(cfg)
    ConfigModule::for_root() first in a root’s importsdelete it: the cascade needs no import, and the first config the boot loads registers Environment and says an undeclared one at info
    HttpConfig::default().with_global_prefix(p) (and every config with_*)the field in a struct literal over ..Default::default()
    HealthConfig::default().with_probe_deadline(Duration::from_millis(400))HealthConfig { probe_deadline: Duration::from_millis(400), ..Default::default() }
    impl Config for MyConfig { fn from_env(…) } beside #[config(namespace = "…")]delete it: #[config] writes it, each field reading <PREFIX>_<NAMESPACE>__<FIELD>, its name in SCREAMING_SNAKE, through the reader its type chooses. A field your from_env read under another key is renamed, or its key is renamed in the deployment; a field it read with env.json takes #[config(json)], one with env.count #[config(bounds = RANGE)] on an Option<usize>, its range a CountBounds, one it judged itself #[config(with = your_fn)] (fn(&ConfigService, Field, T) -> Result<T>); a fn defaults() goes: what it set moves to Default, what it opened by profile to a Surface field, and a value that differs by profile to .env.development and .env.test. Fields that depend on each other, and a generic config, whose bounds the derive does not write, keep the impl under #[config(namespace = "…", from_env = "manual")]
    a duration field window_secs: u64 or timeout_ms: Option<u64> read through DURATION.read(env, …)window: Duration with #[config(bounds = WINDOW)], its default in Default; Option<Duration> only where None turns it off. The field’s key takes the range’s unit after it (WINDOW_SECS), so no variable moves
    DurationBounds::secs("WINDOW_SECS", "MyConfig::window", floor, ceiling) (or millis)DurationBounds::secs(floor, ceiling): the key and the path are the field’s, which #[config(bounds = …)] binds the range to as MyConfig::WINDOW
    Floor::UnitsOrOff(bound)Floor::Units(bound) on an Option<Duration> field: 0 from the environment and None in code are off because the field is an Option
    BOUNDS.key(), BOUNDS.field(), BOUNDS.check(namespace, field, value)MyConfig::WINDOW.key(), .field().path(), .check(namespace, value) — a value set through another type’s field names it, MyConfig::WINDOW.pinned_through("MyOptions::window").check(namespace, value); var(namespace) and var_or_field(namespace) name the variable whole
    a count held to a range by a with = reader of your own#[config(bounds = RANGE)] with const RANGE: CountBounds = CountBounds::new(floor, ceiling) on a usize
    fn reader(env: &ConfigService, key: &str, base: T) -> Result<T> named by with = readerfn reader(env: &ConfigService, field: Field, base: T) -> Result<T>: field.key() is the key, field.path() the path a value set in code is refused under
    nest_rs::http::{MAX_CONNECTION_FLOOR, MAX_CONNECTION_CEILING}, {SSE_KEEP_ALIVE_FLOOR, SSE_KEEP_ALIVE_CEILING}, {UNIT_TIMEOUT_FLOOR, UNIT_TIMEOUT_CEILING}MAX_CONNECTION_BOUNDS, SSE_KEEP_ALIVE_BOUNDS, UNIT_TIMEOUT_BOUNDS, each one DurationBounds named on the field
    a field of a type of your own read with env.parseimpl FromSetting for YourType, saying what a refused value was expected to be
    ConfigModule::for_feature::<C>() in a module’s importsdelete it: the provider that injects Arc<C> loads C. A module reading C only in a register of its own calls ConfigModule::provide_feature::<Unnamed, C>(builder) from its collect
    SeaOrmConfig { connect_timeout_secs: Some(5), statement_timeout_secs: Some(10), max_connections: Some(20), min_connections: Some(2), .. }connect_timeout: Duration::from_secs(5), statement_timeout: Duration::from_secs(10), max_connections: 20, min_connections: 2 — unset is Default’s 10 s, 15 s, 10 and 0, which the pool is now always handed
    AuthnConfig { leeway_secs: Some(45), expires_in_secs: Some(7200), explicit_typing: Some(false), .. }leeway: Duration::from_secs(45), expires_in: Duration::from_secs(7200), explicit_typing: false — Default holds 30 s, an hour and true
    ThrottlerConfig { limit: Some(120), window_secs: Some(30), .. }limit: 120, window: Duration::from_secs(30) — Default holds 60 a minute
    HttpConfig { max_body_bytes: Some(n), .. }max_body_bytes: n — Default holds 2 MiB, and there is no off
    HttpTls::from_files(cert, key)?.with_reload_secs(300), or .with_reload_secs(0).with_reload(Some(Duration::from_secs(300))), or .with_reload(None) to stop the watch; a pinned Some(Duration::ZERO) fails the boot
    HttpModule::for_root(HttpConfig { port: 3002, ..Default::default() }) — a pin of what varies by machine or by app — beside <PREFIX>_HTTP__* keys in .env filesno pin — a listed controller brings HttpModule bare — and <PREFIX>_HTTP__PORT=3002 in the app’s own apps/<app>/.env, read over the root’s under development and test; the deployment sets it on the process. A pin takes its whole namespace off every .env file, and the boot names each key it shadows
    RedisModule::for_root(RedisConfig { …, ..Default::default() }) relying on the loopbackurl written in the pin, or <PREFIX>_REDIS__URL in the deployment: no profile holds a URL, and a pinned config reads the process environment, never .env
    StorageModule::for_root(StorageConfig { …, ..Default::default() }) relying on the development pairthe pair from the deployment’s environment in every profile; plain HTTP stays open in development and test over ..Default::default()
    GraphqlConfig { emit_sdl, schema_path, .. }, OpenApiConfig { emit_document, document_path, .. }emit and emit_path on both; a relative emit_path is resolved against the app crate’s directory
    GraphqlConfig { disable_introspection: false, .. }introspection: Surface::Open: the field says what it serves, as playground does
    GraphqlConfig { playground: true, introspection: true, emit: true, .. }, OpenApiConfig { enabled: true, emit: true, .. }, ServerTimingConfig { enabled: true }, StorageConfig { allow_http: true, .. }, and the same with falseSurface::Open, or Surface::Closed, from nest_rs::config: each field is a Surface, ByProfile in Default, and its variable keeps its name and reads the same booleans
    a surface read as a bool, config.enabledconfig.enabled.is_open(), resolved where it is used; an emit reads writes(), whose ByProfile opens under development alone
    #[config(namespace = "…", defaults = Self::for_profile)], or fn defaults() in an impl Config, setting a field by profilea field it opened is a Surface, ByProfile in Default, and the code using it asks is_open(); a value that differs by profile and opens nothing (a pool size, a level) goes in .env.development and .env.test, never in a Default reading the profile; delete the function and the key
    ..GraphqlConfig::defaults(), ..StorageConfig::defaults(), any ..T::defaults() or C::defaults()..Default::default(), C::default(): a config has one base. Drop use nest_rs::config::Config; if it was there for that
    GraphqlModule::for_root(GraphqlConfig { …, ..Default::default() }) expecting the playground or introspection in developmentnothing to change: a pin closes nothing it does not name
    a suite asserting that GraphqlModule, bare or pinned over ..Default::default(), answers a plain GET with 405, or refuses introspection, under the test profilepin playground: Surface::Closed or introspection: Surface::Closed: the test profile opens both
    OpenApiModule::for_root(OpenApiConfig { …, ..OpenApiConfig::default() }) expecting /api servedserved in development and test only; enabled: Surface::Open written in the pin opens it everywhere
    an HttpConfig, StorageConfig, AuthnConfig, GraphqlConfig, WsConfig, McpConfig, OAuthClientConfig or OpenTelemetryConfig literal written out wholethe same, ending in ..Default::default() — each gained fields (shutdown_timeout; operation_timeout, read_timeout, tls; jwks_uri, algorithms, tls; the graphql-ws bounds, ping_interval, ping_timeout; message_timeout, connect_timeout, disconnect_timeout, ping_interval, ping_timeout; operation_timeout, max_concurrent_sessions, session_idle_timeout, ping_interval, ping_timeout; tls)
    McpModule::for_root(McpOptions { server: Some(identity), .. })McpModule::for_root(identity)
    McpModule::for_root(McpOptions { config: Some(cfg), server: Some(identity) })McpModule::for_root((identity, cfg)) — the declaration first, the config last; McpAccess::Public leads when the app opens the endpoint, (McpAccess::Public, identity, cfg)
    env.get("KEY") and env.list("KEY", default) in a from_envenv.get("KEY")? and env.list("KEY", default)? — a _FILE read can fail
    env.seconds("KEY", base), or any env.* reader asked for a key ending in _SECS or _MSa DurationBounds::secs(…) or DurationBounds::millis(…) declared beside the config and named on the field, #[config(bounds = …)]; a hand-written overlay binds it once, BoundedSetting::new(RANGE, Field::new("KEY", "MyConfig::field")), and reads SETTING.read(env, base)?; see Variables
    serde_json::from_str over a structured variable in a from_env of your ownenv.json::<T>("KEY")?, which refuses it naming the variable, where it failed and the type it expected, never the value
    setting.shown() in a refusal of your ownsetting.refuse("<what was expected>") — the variable is named, the value never
    OpenTelemetryConfig::from_env(name) returning Result<_, ConfigError>it returns Result<_, OpenTelemetryError>; a ConfigError of its own variables is inside OpenTelemetryError::Config
    Err(OpenTelemetryError::InvalidLogFilter { value, .. })Err(OpenTelemetryError::LogSettings(error)) — it names the variable or OpenTelemetryConfig::log_filter, never the directive
    LogFormat::resolve(raw)LogSettings::from_env()?.format, or LogFormat::parse with LogFormat::ByProfile; what comes back may be ByProfile, so ask it writes_json(), never == LogFormat::Json
    LogFormat::by_profile()LogFormat::ByProfile, which LogFormat::default() now is, resolved where the console is built; LogFormat::by_profile() == LogFormat::Json is LogFormat::ByProfile.writes_json()
    tracing_subscriber::fmt().with_env_filter(…).with_writer(ConsoleWriter::get()).init() in a binary with no Appnest_rs::core::logging::install_console(&LogSettings::from_env()?)
    nest_rs::config::crypto_provider()nothing to call: the framework installs the provider its clients and listeners use
    let opts = config.connect_options();let opts = config.connect_options()?;, refused for an empty URL, an unverified sslmode, a certificate file the URL or a libpq variable names that this process cannot read, a connect budget or a pool bound out of range, or a minimum above the maximum
    RedisConnection::connect(url), connect_within(url, budget)RedisConnection::connect(&config)
    conn.manager()the connection itself — it is ConnectionLike and Clone
    Material { bytes, path: None }Material::inline(bytes)
    Throttle { limit, window } and its fields, on the rate limiterThrottle::new(limit, window), .limit(), .window() — a window under a millisecond is refused
    ThrottlerGuard::new(store, limit)gone: ThrottlerModule builds the guard; a ThrottlerConfig literal gains pseudonym_key
    a String or a format! given to SeaOrmConfig::url, RedisConfig::url, StorageConfig::access_key / secret_key, ThrottlerConfig::pseudonym_key, AuthnConfig::secret / private_key, or client_secret on OAuthClientConfig, GithubSocialConfig, GoogleSocialConfigthe same with .into(): each is a nest_rs::core::Secret<String> (in an Option where it was one); a literal "…".into() compiles as it was
    config.url, config.secret, config.client_secret read as a stringconfig.url.expose_secret(): Debug prints <redacted> in its place
    a secret field of your own config, kept out of logs by a hand-written Debug or by no Debugpub api_key: Secret<String> and #[derive(Debug)], read with expose_secret(); a custom(function = …) rule on it takes &Secret<String>
    a password held as a String in an #[input] DTO#[schemars(with = "String")] pub password: Secret<String>, read with expose_secret(): its #[validate(length(…))] still judges the value, and what serializes the DTO writes "<redacted>"

    Two values of one type are two types. String-keyed injection is gone: a second Redis, or a second value your app builds, is a named instance — a type of its own, declared #[instance] pub struct Cache; — and a resource opened more than once is imported per instance: RedisModule::<Cache> bare, or RedisModule::for_root((Cache, cfg)) to pin. A second Valkey reads <PREFIX>_REDIS__CACHE__*. See Instances.

    6.x7.0
    #[inject(key = "cache")] cache: Arc<RedisConnection>#[inject] cache: Arc<RedisConnection<Cache>>
    App::builder().provide_keyed("cache", RedisConnection::connect(&cfg).await?)RedisModule::<Cache> in the root’s imports to read the environment, RedisModule::for_root((Cache, cfg)) to pin
    #[inject(key = "x")] client: Arc<T>, a value your app builds#[inject] client: Arc<XClient>, a newtype, or Arc<Instanced<X, T>>
    .provide_keyed("x", value), a value your app builds.provide(XClient(value)), or .provide(Instanced::<X, _>::from(value))
    container.get_keyed::<T>("x")container.get::<XClient>(), or container.get::<Instanced<X, T>>()
    KeyedDependencyError, matched after a bootnothing: a missing type is AccessGraphError or MissingDependencyError
    RedisError::InvalidUrl { endpoint, source }, ConfigNotResolvedError { type_name } in a patternthe same ending in ..: each holds more
    a RedisError variant’s source moved out as a redis::RedisError, or found in its chain with downcast_ref::<redis::RedisError>()*source, and downcast_ref::<Box<redis::RedisError>>(): the client’s error is boxed, so a Result carrying a RedisError stays under clippy’s result_large_err threshold, and the bare type’s downcast now finds nothing; a method reads through the box unchanged

    A module of your own that owns a config, written by hand:

    6.x7.0
    fn for_root(config: impl Into<Option<C>>) -> CSetup { ConfigModule::setup(config) }fn for_root(config: C) -> CSetup { ConfigModule::setup(config) }, and the module imported bare reads its environment: an impl Module whose collect calls ConfigModule::provide_feature::<Unnamed, C>(builder), or a #[module] whose provider injects Arc<C>
    ConfigModule::setup::<M, C>(cfg)ConfigModule::setup::<M, C, Unnamed>(cfg), or no turbofish; it takes the value to pin, never None
    ConfigModule::provide_feature::<C>(None, builder)ConfigModule::provide_feature::<Unnamed, C>(builder), what a bare import reads
    ConfigModule::provide_feature::<C>(Some(cfg), builder) in a setup of your ownConfigModule::provide_root(cfg, builder), the declaration a for_root pins
    a hand-written Namespaced impl setting DECLARATIONleave it out: a hand-written impl answers by its type name
  7. Compose the container, and follow the lifecycle’s order. The boot now refuses what 6.x left to chance — a provider listed and never built, a binding made twice, an override nothing reads — and a lifecycle hook runs its dependencies first. Each row is a compile error or a boot refusal naming what to fix:

    Providers and modules

    6.x7.0
    providers = [Foo, Foo as dyn Trait]providers = [Foo as dyn Trait]: the binding holds Foo under its own type too
    Foo listed in one module and Foo as dyn Trait in anotherlist it once, as the binding, and import that module where Arc<Foo> is injected
    a scope = request or scope = transient provider, or an edge host, bound as dyn Traitbind a plain #[injectable] singleton; reach a scoped provider through a Scoped<T> parameter
    a request-scoped or transient provider listed in two modules, or one type registered under two scopesregister it once
    two modules importing each other, a provider of one injecting the other’smove what both need into a module both import
    a provider injecting a type a hand-written module or a for_root registers, from a module that does not import itimport that module in the provider’s module
    an Option<Arc<T>> field whose T a module the app imports provides, outside the consumer’s importsimport that module in the consumer’s module
    a singleton holding Option<Arc<T>> of a request-scoped or transient Treach it through a Scoped<T> parameter, or make the consumer request-scoped
    request-scoped or transient providers injecting each othermove what both need into a third provider, pass the value as an argument, or publish an event
    #[injectable(scope = transient)] on a layer a #[process], #[scheduled] or #[on_event] site binds#[injectable], a singleton: the site builds it once
    T::from_container(&container) on a decorated typenone: the container builds T; read it with container.get::<T>(), or register it with <T as Discoverable>::register(builder) in a test
    T::from_scope(&scope) on a request-scoped or transient providerscope.get::<T>()
    AuthnGuard::from_container(&c), Storage::from_container(&c), McpMount::from_container(&c)AuthnGuard::new(strategy), Storage::connect(&config), the container’s; the boot builds an MCP mount when it serves the path
    provide_factory_after::<T, A, _, _>(f), and the same for the declared and dyn formsprovide_factory_after::<T, (A,), _, _>(f)
    a module filling a registry the app reads from an OnApplicationBootstrap hookContainerBuilder::provide_wiring("<crate>::<registry>", wire) in its register
    builder.provide_meta(TransportContribution { name: "MyTransport", build: |c| Ok(Box::new(MyTransport::new(c)?)) })builder.provide_transport(|c| MyTransport::new(c)) — named MyTransport, read off the type
    a feature module importing HttpModule (or GraphQL’s, OpenAPI’s) to declare it serves over HTTPdrop the line where the module lists a host, which brings its edge’s module bare; a module listing none keeps a bare HttpModule (GraphqlModule, OpenApiModule) in its imports, and the app keeps a for_root only to pin a config
    an edge adapter importing its port alone, and the app root importing HttpModule, GraphqlModule, QueueModule or ScheduleModule beside it, or an adapter importing them itself (WsModule and HttpModule for a gateway, McpModule or HttpModule for a tool)drop the line, unless the root pins a value (McpModule::for_root stays where it declares the identity or the opening): a host a module lists brings what serves its edge, bare, so a controller reads <PREFIX>_HTTP__*, a gateway <PREFIX>_WS__* and a tool <PREFIX>_MCP__*. A module listing no host, an interceptor’s, keeps its import, and the queue’s backend binding (RedisQueueModule) stays at the root. Nothing refuses the old shape: it still runs one transport of each type
    SeaOrmModule beside SeaOrmDatabaseModule, or RedisModule beside a Redis binding, neither pinneddelete the resource’s line: a binding imports the resource it runs on, by its instance. The pair still boots, and a root names the resource only to pin it (RedisModule::for_root(cfg)) or for a connection it injects with no binding
    ThrottlerModule at the root for a controller binding ThrottlerGuardThrottlerModule, bare, in that controller’s adapter, and the root drops the line unless it pins a policy; a root’s RedisThrottlerModule still supersedes the in-process store
    a container built by hand importing GraphqlModule, HealthModule, OpenApiModule, McpModule, StaticFilesModule or OAuthResourceModule, seeding the module’s configseed HttpConfig::default() beside it: each imports HttpModule
    a container built by hand importing a module that lists a controller, a gateway, a resolver, an #[mcp] or #[process] hostseed what its edge’s module reads beside it (HttpConfig, WsConfig, GraphqlConfig, McpConfig, QueueConfig): the host brings that module, and a container built by hand drains no factory
    McpModule::for_root(..) declaring an identity or McpAccess::Public at two importsdeclare each at one; the other imports leave it out, or import McpModule bare
    an impl Module or impl DynamicModule written by handthe same with _: Collecting<Self> after the builder in collect and _: Registering<Self> in register; reach another module with builder.import::<M>() in both, and drop mark_collected, mark_registered and a leading Self::collect
    App::new::<AppModule>()?, and a match on UnresolvedFactoryErrorApp::builder().module::<AppModule>().build().await?, the one boot: every module owning a config queues a factory, which the synchronous boot refused
    App::builder().provide_meta(x) or .provide_wiring(name, wire)attach it from the register of a module the app imports (ContainerBuilder::provide_meta, provide_wiring)
    ReachableProviders::reaches(Some(&set), id), ReachableProviders(set) built by handReachableProviders::of(container, "<what you discover>")?.reaches(id); a test boots the modules it means through TestApp, HeadlessApp or App::builder, which seal the set they reach
    a match on InertHost::BoundUnderAnotherKey, or on DuplicateProviderError { type_name }drop the arm; read DuplicateProviderError’s first, second and scopes with .., and match InertHost with a _ arm
    ProviderCycleError { module, type_names }, ContestedDeclarationError { … } naming every fieldread chain and scope; first and second; each with ..
    nest_rs::core::is_framework_owned(origin)nest_rs::core::inert_host(container, origin, host).is_the_apps(), which reads the composition
    report_inert_host!(target: …, what: …, origin: …), in an edge of your ownthe same with host: and container:, so the line names its cause

    A container built by hand, and a test’s overrides

    6.x7.0
    let container = Container::builder().provide(x).build();.build()? in a function returning a Result, .build().expect("…") in a test: build returns what it refuses
    a test building a module by hand (Container::builder().import::<M>()) whose collect queues a configprovide the config first (.provide(C::default())), or boot M through TestApp — build otherwise returns ContainerError::LateFactory naming it
    a test configuring a transport or running a wiring over Container::builder()boot through TestApp or HeadlessApp, importing the modules whose entries the test means
    override_arc::<RecordingUpstream>(upstream) where the app binds HttpUpstream as dyn Upstreamoverride_dyn::<dyn Upstream>(upstream.clone()) — override the key the consumers inject
    an override of a type no module, factory or seed provides, read back with container().getprovide it with provide / provide_arc instead: a seed, not a double
    an override of a #[controller] (or another edge host)override the provider the controller injects
    a seeded config outside its ranges or its validate() rulesseed a value a read would accept
    TestApp::builder() … .build_headless() in a suite without http, and in a KitBackend’s fn appHeadlessApp::builder() … .build_headless()
    a KitBackend’s fn app(&self) and fn lease(&self) -> Durationfn app(&self, lease: KitLease) and fn lease(&self, lease: KitLease) -> Duration: KitLease::Brief the lease you had, a few seconds for a networked backend (a renewal goes a third into it, so a runner stalled past the rest lapses it), KitLease::Lasting one longer than a stalled runner with your connection’s bounds as wide; lapse and take lapse a lease of either kind
    .use_guards_global(…), .use_pipes_global(…), .use_interceptors_global(…) or .use_exception_filters_global(…) on TestApp::builder()nothing for the app’s suite, which boots the module declaring them; a test of a feature declares its pool on a root module of its own, #[module(imports = [Feature], providers = [GlobalGuards<(G,)>])]
    a suite arming the app’s outbox by hand (container.get_dyn::<dyn OutboxStore>()…arm())delete it: TestApp and HeadlessApp arm the outbox of an app binding a store and a queue backend, as the relay does at boot
    a service test installing Executor::Pool(pool) with with_request_executor or with_job_executor, and an ability with with_abilityapp.unit(ability, || svc.call()) as a request, app.system_unit(|| svc.call()) as a job, on a TestApp booting the binding — nest-rs’s authz and database features beside testing
    EphemeralDatabase::create::<M>() held in a tuple beside the app it seedsTestApp::builder()…ephemeral_database::<M>(), held and dropped by the app; app.container().get::<DatabaseConnection>() reaches it to seed rows. EphemeralDatabase::create stays for a test that boots no app
    a test helper signing a bearer with app.container().get::<JwtService>(), or with a private key the suite commits.ephemeral_signing_key() on the builder, then app.bearer(&claims) — the app verifies the test’s key in place of its own, for its own audience and issuer — nest-rs’s authn feature beside testing
    an AuthnConfig a suite seeds to verify its own tokensdelete it: the app reads its audience and issuer from its .env, and ephemeral_signing_key replaces its key alone
    app.socket(path).bearer(token) on a WsAppapp.socket(path).header("authorization", app.bearer(&claims))
    a test reading silence from next_frame(), next_message(), next_event() or next_item(id), which now wait sixty secondsname its bound: expect_silence(within), next_frame_within(within), next_message_within(within), next_event_within(within), next_item_within(id, within)

    Lifecycle hooks and the way down

    6.x7.0
    hosts named so their hooks run in the wanted order (AaFirst, ZzLast)inject the provider whose hooks must run first: its hooks then run before yours at init and after yours at shutdown
    a hook reaching another provider through Container::get and relying on that provider’s hook having runinject that provider, so the graph orders the two
    app.init().await? on a TestAppdelete it: TestApp::builder().build() already ran the init phases, which run once per app
    a shutdown hook that expects what its init filledif let Some(..): it now also runs after a failed or interrupted init
    a one-shot command reaching the pool around the container, its teardown skippedlet app = App::builder()…build().await?; app.init().await?; … app.close().await;
    a test that could not run the shutdown hooksTestApp::close(), HeadlessApp::close(), WsApp::close()
    a module ending its resource in a Dropbuilder.provide_close::<T, _, _>(|t| async move { … }) beside the factory
    a provider injecting Arc<DatabaseConnection> only for a lifecycle hookgo through its service and Repo: the hook runs in a unit of work, its writes committing together on its Ok
    an emit from a task spawned at construction, relied on to be dropped silentlyemit from an #[on_module_init] hook or later: the listeners are live before the first hook
    a test matching a factory’s error at the top of a boot errorthe boot error is FactoryFailedError; find E in its chain (err.chain()) or read {err:#}
    an impl Transport written by handthe same with fn stop_bound(&self) -> Duration — its drain window plus SHUTDOWN_SETTLE_TIMEOUT, at most MAX_STOP_BOUND (a day) — and async fn listen(&mut self) -> anyhow::Result<Listening> binding its socket, which serve then serves on

    App::run and App::close need a runtime with its time driver, as #[nest_rs::main] and #[tokio::test] build it. A #[nest_rs::main] program that built an app and never serves it (a one-shot command) keeps running at the first SIGTERM, its app Draining: read AppLifecycle::stopping() to stop, or a second signal exits it.

  8. Write HTTP code on nestrs’s HTTP vocabulary. 6.x’s HTTP surface was poem’s; 7.0’s is nest_rs::http — Request, Response, Body, HttpError, Endpoint, the extractors — over the http crate’s head types, which it re-exports, and the server underneath is nestrs’s own on hyper. A route’s path is OpenAPI’s path templating. Each row is a compile error unless it says otherwise:

    Routes and handlers

    6.x7.0
    #[get("/:id")]#[get("/{id}")]
    #[get("/files/*rest")]#[get("/files/{*rest}")]
    #[get("/@:handle")]#[get("/@{handle}")]
    #[get("/:id<\\d+>")]#[get("/{id}")] with Path<u64>, or a pipe
    #[controller(path = "/orgs/:org")]#[controller(path = "/orgs/{org}")]
    a root catch-all (/*rest) that also served /the catch-all (/{*rest}) and a route at / beside it (#[get("/")]) — not a compile error: / otherwise answers the fallback’s 404
    a handler reading an empty parameter: /a//b matched /a/{x}/b with x emptynothing reaches it — /a//b answers the fallback’s 404; a value that may be absent travels in the query string
    use poem::web::{Json, Path, Query} in a controlleruse nest_rs::http::{Json, Path, Query} — and Form, Multipart, Header<T>, ClientIp, RawBody
    -> poem::Result<T>, poem::Error::from_status(s)-> nest_rs::http::Result<T>, HttpError::from_status(s)
    impl poem::error::ResponseError for MyErrora domain error: impl nest_rs::core::ToProblem for MyError (step 9); an answer that is no problem document: impl nest_rs::http::ResponseError for MyError — status(), and as_response() for a body of its own; render only, since the edge files a 5xx’s chain
    req: &poem::Request as a handler parameterreq: &nest_rs::http::Request, or the extractor for what it reads
    poem::web::Data<&T>an #[inject] field on the controller, or Scoped<T> for a request-scoped provider
    use nest_rs::http::poem::…nest_rs::http::{Request, Response, Json, IntoResponse}; ProblemDetails answers through nest_rs::http::ResponseError / IntoResponse
    field.into_byte_stream() through nest_rs::http::PartExtField::into_byte_stream() on nest_rs::http::Multipart’s field
    RawBody::extract_with_limit(&mut poem_body, n) in an extractor of your ownthe extractor implements nest_rs::http::FromRequest, whose RequestBody extract_with_limit takes; a handler reads body.into_bytes_limit(n)
    body: Valid<Json<T>>, Valid(input): Valid<Json<T>> — and over Query, Form, Path, HeaderJson(input): Json<T>: every extracted value is held to the rules its type declares, with nothing to wrap
    nest_rs::http::Piped<P, E>, read through into_inner() or Derefnest_rs::pipes::Piped<P, E> spelled out in the handler’s signature, bound Piped(value) — into_inner() and Deref still read it
    Piped<P, E> behind a type alias, or read with FromRequest on a route registered on HttpRoutesthe carrier spelled out where #[routes] reads it; by hand, extract E, then Piped::<P, E>::apply(extracted.into_inner()) — Piped is no extractor
    impl nest_rs::http::IntoInner for MyExtractor<T>impl nest_rs::pipes::Source for MyExtractor<T> (type Value, into_value), and nest_rs::pipes::validator::Validate when T declares rules
    SseEvent::retry(ms)SseEvent::message("").retry(Duration::from_millis(ms))
    match event { SseEvent::Message { .. } => … }none: an event is written, never read back
    SseEvent::message(serde_json::to_string(&payload)…), with a fallback body when it failsSseEvent::json(&payload): a payload that does not serialize sends no event — its chain is filed and the stream ends there
    SseSettings::respond(stream), answering poem’s SSEthe same, answering a Response marked to end at the shutdown signal
    PATCH /<resource>/{id} on a #[crud] controllerPUT /<resource>/{id} — a wire change, no compile error
    impl RouteResponseShaper / ResponseShaping on poem::Request, poem::Response, poem::Resultthe same impl on nest_rs::http::{Request, Response, Result}
    challenge::stamp_bearer_error on a poem::Responsethe same call on nest_rs::http::Response
    set_created_location(&mut res, caller_path(req), id) beside #[http_code(201)] and #[api(response = T)]return Created<Json<T>>: Ok(Created::at(id, Json(dto))) — the Location is written on the path the caller addressed, and the document reads the 201, the Location and T off the return type, an alias included
    set_next_link(&mut res, caller_path(req), first, cursor)return Paginated<Json<Vec<T>>>: Ok(Paginated::new(Json(items), first, page.next_cursor)) — the Link is written on the path the caller addressed, and the document declares it and T
    ClientOrigin::of(&poem::Request)ClientOrigin::of(&nest_rs::http::Request)
    Rust’s #[deprecated] on a #[routes] handler or a #[controller] struct#[api(deprecated = "YYYY-MM-DD")] on each route’s handler, the date its Deprecation header states — see OpenAPI operations

    Route records, self-mounts and the fallback

    6.x7.0
    HttpVerb::Get, HttpVerb::Post, …Method::GET, Method::POST, … (nest_rs::http::Method)
    route.verb, route.path, route.handler, any field of an HttpRouteMetathe accessor of the same name: route.method(), route.path(), route.handler()
    route.masked on an HttpRouteMetaroute.names_an_entity(): the route’s posture names an entity, a subject a table holds. Which properties a grant may withhold is no route’s to say: every route answers judged rows, and each #[expose]d type’s schema says it on the property, its description reading Field-level authorization applies: reads null where the caller’s ability withholds it
    meta.routes, meta.path, meta.controller, meta.token, meta.versions on an HttpControllerMetameta.routes(), meta.path(), meta.controller(), meta.token(), meta.versions()
    an HttpRouteMeta { … } or HttpControllerMeta::new(…) built by handnone: a #[controller] struct and a #[routes] block record each route
    route.throttled on an HttpRouteMetanone: a guard declares the 429 it answers in Guard::denial_statuses, and the route’s OpenAPI document lists it
    route.success_status() == 200, a u16route.success_status() == Some(200); None is a status only the handler knows, a (StatusCode, B) pair, a bare StatusCode or a built Response, which the document lists under 2XX
    fn mount(c: &Container, route: poem::Route) -> poem::Route on a hand-written Controllera #[controller] struct and a #[routes] block; a surface registering entries of its own is a self-mount, below
    HttpEndpointMeta::new(path, label, mount), with .exempt()HttpEndpointMeta::new(&SITE, path, label, |c, routes| { routes.route(Method::GET, &path, ep); }) over static SITE: Handler = nest_rs::http::declare_endpoint::<M>("M", path, posture), M the type that mounts it: .exempt() becomes Posture::Public, a mount the global pool gates Posture::Gated; meta.handler().posture() reads a mount’s posture
    route.nest(path, ep) in a self-mountroutes.route_any(&path, ep), at exactly path; its subtree is registered as {path}/{*rest}
    HttpFallbackMeta::new(path, owner, |c, route| route.at(…))HttpFallbackMeta::new(path, owner, |c| BoxEndpoint::new(ep))
    MethodTable::new().get(ep).into_endpoint()routes.route(Method::GET, &path, ep); the table answers 405 with Allow and HEAD
    nest_rs::http::matched(ep)nothing: every entry records its template
    view.route() as a Cow<str>view.route(), an Option<&str>
    nest_rs::graphql::async_graphql_poem::…gone: GraphqlModule mounts the schema; an app serving a schema of its own over poem depends on async-graphql-poem itself
    nest_rs::ws::poem::…, nest_rs::ws::GatewayEndpointgone: a gateway names no poem type, and #[messages] mounts it
    nest_rs::ws::CloseCode matched exhaustivelythe same with a _ arm: it is nestrs’s own #[non_exhaustive] enum, with the same variants

    The transport and its tests

    6.x7.0
    TestApp::builder().http(HttpTransport::new().compression(true))TestApp::builder().provide(HttpConfig { compression: true, ..Default::default() }), or nothing when the app’s HttpModule::for_root already pins the value
    HttpTransport::new().bind(addr) handed to HeadlessApp::spawn_transportHttpTransport::from_config(&HttpConfig { host, port, ..config })?, config read from the app’s container
    HttpTransport::new().mount(path, |container| endpoint)an HttpEndpointMeta attached by the providing module’s Discoverable::register, as above
    VersionSelector::new(strategy, header, default)HttpConfig { versioning, version_header, default_version, .. }
    Box::new(http_transport).serve(cancel) driven by handhttp_transport.listen().await? first; the port it bound is in Listening::addresses
    TestClient::new(transport.take_endpoint()?) on a hand-booted transporttransport.take_endpoint()?.call(request), or TestApp
    HttpCors { .. }.into_middleware()nothing: set HttpConfig::cors, which the transport checks at boot
    HttpConfig { trusted_proxies: vec![ip], .. }vec![ip.into()], or vec![trusted_proxy!("10.42.0.0/16")] for a literal, checked as the program compiles ("…".parse()? for a value read at run time): an entry is a TrustedProxy
    ClientOrigin::resolve(forwarded, forwarded_for, real_ip, peer, &[ip])&[ip.into()] for the last argument
    ClientIp’s ip compared with ::ffff:a.b.c.d on a listener on [::]a.b.c.d: a mapped address is the IPv4 address it carries — not a compile error
    an OPTIONS from a listed origin that relied on the CORS layer’s 403nothing, or a guard: it reaches its route now, 405 with Allow where none answers — not a compile error
    HttpCors { methods: vec!["TRACE".into()], .. }drop the forbidden method; list the methods a page sends (PUT, DELETE, …)
    a CORS policy without max_age, whose preflight a browser kept a daymax_age: Some(Duration::from_secs(86_400)), or <PREFIX>_HTTP__CORS_MAX_AGE_SECS=86400 — not a compile error: a preflight otherwise carries no Access-Control-Max-Age
    a write guarded by If-Match against the ETag of a read compression encodedread the tag the write sends from an unencoded answer (a request without Accept-Encoding) — not a compile error: an encoded answer’s strong tag is now sent weak (W/"…", RFC 9110 §8.8.3), and a weak tag matches no If-Match
    current_body_limit().unwrap_or(RawBody::DEFAULT_LIMIT)current_body_limit()
    normalize_error_response(poem_response)normalize_error_response(response), with a nest_rs::http::Response
    use poem::test::{TestClient, TestForm, TestFormField, TestResponse, TestJson};use nest_rs::testing::{TestClient, TestForm, TestFormField, TestResponse, TestJson};
    use poem::http::{StatusCode, header}; in a suiteuse nest_rs::http::{StatusCode, header};
    TestClient<BoxEndpoint<'static, poem::Response>>, TestClient::new(poem_endpoint)TestClient, TestClient::new(endpoint) over a nest_rs::http::Endpoint
    resp.0.into_body().into_vec().await?resp.0.into_body().into_bytes().await?
    resp.0.into_body().into_json::<T>().await?resp.json().await.value().deserialize::<T>()
    resp.0.header("x-name")resp.0.headers().get("x-name")
    .filter(|event| event.level == "error") over logs.events()logs.events_at(tracing::Level::ERROR)
    a test catching a request’s unwind (catch_unwind around TestApp::http()…send())the 500 the request now answers: a handler that panics is answered and its connection serves on

    A response header a route sets — a #[response_header], a handler, a surface setting a security header or Server — now wins over the deployment’s <PREFIX>_HTTP__* default, which fills only a response that sets none: a deployment relying on its global value to override a route’s removes the route’s header. A Scoped<T> or a service bind = S loads through whose module the app does not import fails the boot.

  9. Follow the error and authentication types. An error nobody meant for the client is answered opaquely and its chain logged, on every edge: a client reads a sentence only from a deliberate client error — a ToProblem type, WsError, a Problem — and every failure names its class by one code. An error carries its cause as a source chain rather than a format!ted string.

    6.x7.0
    async fn f(&self) -> async_graphql::Result<T> { Ok(self.svc.f().await?) } over a foreign errorreturn the error, -> Result<T, MyError>, and implement nest_rs::core::ToProblem for what the client may read; or convert explicitly: async_graphql::Error::new(..), nest_rs::graphql::problem_error(&e)
    a Result alias over a foreign error as a resolver’s returnspell Result<T, MyError>
    a GraphQL client reading the parser’s rendering out of a syntax error’s message, --> 1:46 and the source linelocations for the place, and the message, Syntax error at line 1 column 46: expected name, for what the grammar expected: it no longer holds the document
    a WebSocket client reading a handler error’s textthe handler returns WsError::new(..) or an error implementing ToProblem; anything else answers "internal error"
    McpError::internal_error(e.to_string(), None) over an error you did not buildnest_rs::mcp::problem_error(&e) (a ToProblem error), .opaque()?, or the ToProblem error returned from an operation spelled Result<T, E>
    impl nest_rs::http::ResponseError for MyError beside its impl ToProblem, two matches over one enumthe ToProblem impl alone, which makes MyError a ResponseError answering the problem it says, its type and title included: a route spelled Result<T, MyError> and ? in a body answering nest_rs::http::Result<T> both answer it
    ? on an anyhow::Error in a body answering nest_rs::http::Result<T>, HttpError::from(anyhow_error).opaque()?, or the route spelled anyhow::Result<T>: either answers the opaque 500, the chain filed
    HttpError::from(StatusCode::NOT_FOUND), StatusCode::NOT_FOUND.into(), a route returning Result<T, StatusCode>HttpError::from_status(StatusCode::NOT_FOUND), the route returning nest_rs::http::Result<T>
    impl nest_rs::http::ResponseError for MyError alone, its status() a matchimpl nest_rs::core::ToProblem for MyError: Some(Problem::new(status, code)) per variant, None for one the client is owed no word of — or no impl and .opaque()? where every variant is one
    an ExceptionFilter answering a domain error with ProblemDetails::…().with_type(uri).with_title(t) through HttpViewProblem::new(status, code).with_type(uri, title) in the error’s ToProblem, best in a const: every edge answers the type — extensions.type and extensions.title on GraphQL, data.type and data.title on WebSocket and MCP — and the filter goes
    service_error.status(), service_error.as_response() on a ServiceErrorHttpError::from(service_error).status(), .into_response(), or service_error.to_problem(): ServiceError is a ToProblem error, no longer a ResponseError, and ? on it into an HttpError is unchanged
    .opaque() over a borrowed error, or one that is only Displayan owned std::error::Error that converts into Box<dyn Error + Send + Sync>: it logs the whole chain; JobError::retry / abort, WsReply::from_handler_error and OccurrenceLockError::new take the same
    ServiceError::internal(format!("password hashing failed: {e}"))ServiceError::internal_because("password hashing failed", e)
    ServiceError::internal(&reason), reason a local String or a borrowed &strServiceError::internal(reason.clone()) or .to_owned(): the detail is 'static; a String or a &'static str passes unchanged
    ServiceError::Internal(msg) built or matchedServiceError::internal(msg); match ServiceError::Internal { .. }, the detail, then the cause’s chain, read as err.source()’s Display
    err.source() of a ServiceError::Validation or a ServiceError::Db, downcast to ValidationErrors or DbErrthe variant’s own field: ServiceError::Validation(errors), and ServiceError::Db(err), a RepoError to match on; source() says the failure as error_message does
    err.source() of a ServiceError::Internal, walked to the cause internal_because was given and downcasta variant of your own error holding it, for a failure a caller decides on: source() is one sentence, what error_message says of the detail and the cause’s chain, with nothing beneath it
    ServiceError::Masking(msg) built or matchednothing: the variant is gone, as no path built it. A wire row’s refusal is the edge’s own answer, and a failure of your own is ServiceError::internal(msg)
    AuthError::Failed(format!("…: {e}")), AuthError::Failed(msg)AuthError::failed_because("…", e), AuthError::failed(msg)
    AuthError::Unavailable(detail) or AuthError::Unavailable { detail, retry_after } builtAuthError::unavailable(detail, retry_after), or AuthError::unavailable_because(detail, retry_after, e)
    match err { AuthError::Failed(msg) => … }, AuthError::Unavailable { detail, retry_after } matchedAuthError::Failed { .. }, AuthError::Unavailable { retry_after, .. }, the detail read as err.source()’s Display or the chain as nest_rs::core::error_message(&err)
    err.to_string() on an AuthError::Failed or Unavailable, read for its detailnest_rs::core::error_message(&err): the Display is "authentication failed" or "authentication unavailable" alone
    async fn authenticate(&self, req: &mut poem::Request) in a Strategyasync fn authenticate(&self, req: &mut nest_rs::http::Request)
    req.raw_path_param("provider"), req.params::<Q>() in a strategyreq.path_param("provider"), and Query::<Q>::from_request(req, &mut RequestBody::new(Body::empty())).await
    bearer_token(req), basic_credentials(req)bearer_token(req.headers()), basic_credentials(req.headers())
    jwt.verify(token)?the same with .await before the ? — a verification may fetch an issuer’s JWK Set; verify_handshake stays synchronous
    JwtConfig, from the authn cratenest_rs::authn::AuthnConfig, with the same fields and variables
    JwtOptions { algorithm: …, ..JwtOptions::new(secret) }, or options.algorithm = …let mut options = JwtOptions::new(secret); then options.algorithms = vec![…]
    jsonwebtoken::Algorithm passed to JwtOptions::algorithms or AuthnConfig::algorithmsnest_rs::authn::Algorithm, the same variants; "RS256".parse::<Algorithm>() fails with UnknownAlgorithmError
    Algorithm::default(); #[derive(Serialize, Deserialize)] over a field holding an Algorithm; algorithm.family()name the algorithm (Algorithm::HS256); store algorithm.as_str() and read it back with parse::<Algorithm>(); match the variants
    a match on JwtKey naming every variantthe same with a _ arm: it gains Jwks
    PasswordError::InvalidHash(e) with e: argon2::password_hash::Error; error == othere: Arc<dyn Error + Send + Sync> — downcast it, or read the chain; match with a pattern
    #[inject] meter: Arc<OpenTelemetryMeter>#[inject] metrics: Arc<Metrics>
    meter.u64_counter("x").build().add(1, &[KeyValue::new("k", "v")])metrics.counter("x").add(1, &[Attribute::new("k", "v")])
    meter.f64_histogram("x").with_unit("ms").with_boundaries(b).build()metrics.histogram_with("x", Describe::default().with_unit("ms"), &B), B a &'static [f64]
    AccessTokenResponse { access_token, token_type: "Bearer".into(), expires_in }AccessTokenResponse::bearer(access_token, expires_in), plus .with_scope(granted) when the issuer grants another scope than the one requested
    a token handler returning Result<Json<AccessTokenResponse>>, Ok(Json(…))Result<AccessTokenResponse>, Ok(…): it answers Cache-Control: no-store, and the document reads the body off the return type
    a token endpoint authenticating its clients through AuthnGuard<S>ClientAuthenticationGuard<S> over the same strategy: §5.2’s invalid_client, 401 with the Basic challenge over the Authorization header, 400 without
    a token route reading Form<AccessTokenRequest>, or code decoding it with serderequest: AccessTokenRequest, the handler parameter: the type derives no Deserialize, and its refusals are invalid_request
    if request.grant_type != "client_credentials" { return Err(TokenError::UnsupportedGrant) }nothing: request.grant_type is a GrantType (GrantType::ClientCredentials), and a grant the endpoint does not serve is refused unsupported_grant_type before the handler runs
    request.scope read as an Option<String> and narrowed to the client’s scopes by handclient.scope_for(&request.scope)?: scope is §3.3’s Vec<String>, and the grant is strict — none asked is the whole registration, an unregistered scope invalid_scope
    a client registry in a config of your own, checked by a strategy calling authenticate_against_registryOAuthServerModule::<P> in the module’s imports, P your payload, read from <PREFIX>_OAUTH__SERVER__CLIENTS; the token route binds #[use_guards(ClientGuard<P>)], which the module provides with its strategy, and Arc<OAuthServerConfig<P>> is injectable where you read the registry
    ClientSecretBasicStrategy<P> and ClientAuthenticationGuard<ClientSecretBasicStrategy<P>> in a module’s providers, behind a guard alias of your owndelete both lines and the alias: OAuthServerModule::<P> provides them, and the route binds nest_rs::oauth::server::ClientGuard<P>
    <OAuthServerConfig<P> as Namespaced>::NAMESPACEOAuthServerConfig::<P>::NAMESPACE, with Namespaced in scope
    exp: jwt.expiry() in a claims literal, pub exp: u64 on a claims type the app signsdelete both: the signer stamps exp, its expires_in after iat; a token living another time names it with exp: jwt.expiry_in(secs), as a sign_handshake’s claims must
    .requires_scope("posts:read")pub const POSTS_READ: Scope = Scope::new("posts:read"); (nest_rs::guards::Scope) once, then .requires_scope(POSTS_READ)
    <PREFIX>_OAUTH__RESOURCE__SCOPES_SUPPORTED repeating the scopes your rules gate onOAuthResourceModule::for_root([POSTS_READ, …]) (or ([…], config) beside a pinned config), and delete the variable; a deployment still setting it advertises its list instead
    a social authorize handler building its 302 from provider.authorize(&jwt, resource) — Set-Cookie, Location, a 404 for an unknown providerOk(providers.authorize(&provider, &jwt, resource)?): a SocialRedirect, the 302 with the cookie and Cache-Control: no-store, or the 404
    a nestrs g auth dev-token handler returning Json<DevTokenResponseDto> with two #[response_header] linesResult<AccessTokenResponse>, Ok(AccessTokenResponse::bearer(self.jwt.sign(&claims)?, self.jwt.ttl_secs())), with oauth-server among the features crate’s nest-rs features; delete the DTO — the old one still compiles
    hash_password(p)? stored or compared as a Stringa Secret<String>: store it as is, and pass hash.expose_secret() to verify_password
    the development-token route’s DevOnlyGuard and DevTokenAudit, written by an earlier nestrs g authnest_rs::authn::DevelopmentOnlyGuard, bound with #[use_guards] on the controller and listed in its module’s providers; delete authn/http/guard.rs and authn/http/audit.rs
    TokenError::InvalidClient built or matchedTokenError::InvalidClient(TokenEndpointAuthMethod::ClientSecretBasic) for a client refused over the Authorization header, ClientSecretPost for credentials in the body, None for none; matched as InvalidClient(_)
    TokenError::InvalidClient answered for a rejected resource-owner passwordTokenError::InvalidGrant (400 invalid_grant)
    RegisteredClient { client_id, client_secret, scopes, payload } / AuthenticatedClient { payload, scopes }RegisteredClient::new(client_id, client_secret, scopes, resources, payload) / AuthenticatedClient::new(client_id, scopes, resources, payload): the RFC 8707 resources the client’s tokens may be minted for
    response.access_token, tokens.access_token / id_token / refresh_token, JwtKey::Hmac(secret) or JwtKey::Pem { private_pem, .. } read as a string.expose_secret() on each: they are nest_rs::core::Secret<String>
    profile.email.as_deref(), profile.name.clone() on a SocialProfileprofile.email.as_ref().map(|e| e.expose_secret().as_str()): a provider’s email and name are Option<Secret<String>>, which Debug prints as Some(<redacted>)
    a client registry in configuration, [{"client_id": …, "scopes": […], "payload": …}]each client lists "resources": [...], the URIs of the resource servers it calls; a registry without it fails the boot
    jwt.sign(&claims) minting an access token another app verifiesjwt.sign_for(audience, &claims), audience the resource it is for — at a token endpoint client.audience_for(&request.resource)?, which answers RFC 8707’s invalid_target for a resource the client is not registered for; sign stamps this app’s own audience, for what it mints for itself
    <PREFIX>_AUTHN__AUDIENCE set to <PREFIX>_OAUTH__RESOURCE__RESOURCE beside OAuthResourceModuledelete it: the resource is the audience. Keep it only for an audience your authorization server mints by policy
    <PREFIX>_AUTHN__ISSUER beside OAuthResourceModule naming anything but an entry of <PREFIX>_OAUTH__RESOURCE__AUTHORIZATION_SERVERSthat entry, exactly, or no ISSUER: a token’s iss must then be one of them
    AuthnModule imported at the root beside OAuthResourceModuledelete the line: the module imports the verifier it binds. Keep AuthnModule::for_root(cfg) only to pin a configuration in code — not a compile error, the bare line is merely redundant
    AuthenticatedClient::actor_id() read as Noneit is the client’s client_id — not a compile error; code keying “a machine caller” on None reads the principal’s type
    PrincipalIdentity::actor_id returning None for a machine principalits subject — the client id when it acts for itself (RFC 9068 §2.2)
    an OAuth authorize handler building its 302 from authorization.url and authorization.transaction — Location, a hand-written Set-CookieOk(client.authorize(&jwt, provider, resource)?), under Result<AuthorizationRedirect>: the 302 with the cookie and Cache-Control: no-store, documented by the type; behind a social provider, the SocialRedirect SocialRegistry::authorize answers
    the callback’s own parsing of the transaction cookieOAuthClient::transaction_from(req.headers().get_all(header::COOKIE).iter().filter_map(|field| field.to_str().ok()))
    impl SocialSignIn for S with async fn sign_in(&self, profile, resource) (E0050)async fn sign_in(&self, profile: SocialProfile, tokens: TokenSet, resource: Option<&str>), TokenSet from nest_rs::oauth::client: the provider’s access token and the refresh token it issued; _tokens when you keep neither
    an OAuthClientConfig { … }, GithubSocialConfig { … } or GoogleSocialConfig { … } literal listing every field (E0063)add authorization_parameters: AuthorizationParameters::default(), or end the literal with ..Default::default()
    a social callback strategy of your own reading provider, code, state and the cookieAuthnGuard<SocialStrategy<S>> on the callback route, SocialStrategy<S> and the guard in the module’s providers, and impl SocialSignIn for S saying who a SocialProfile is — the rest, §4.1.2.1’s error included, is the strategy’s
    jwt.sign(&serde_json::json!({ … })), or sign/sign_for on claims with no PrincipalIdentity (E0277)#[derive(PrincipalIdentity)] on the claims struct, #[principal(actor)] on the field naming the subject: claims with no sub field are stamped it. A test forging a token hands it to app.bearer(&claims), which signs what it is given
    claims sign or sign_for mints naming no client_idpub client_id: String on the claims, the client the token is issued to — the one a user signed in through, a machine client’s own — set in each literal; a test’s claims name one too (client_id: "e2e".into()). Not a compile error: sign answers a SignError naming the claim
    JwtOptions built in code with no issuer or no audienceset both: options.issuer = Some(…) and options.audience = Some(…); JwtService::new refuses naming each it lacks
    jwt.sign(&claims)?, sign_for or sign_handshake in a Result<_, AuthError> (E0277)a handler answers nest_rs::http::Result, into which SignError and AuthError each convert on their own status; a service holds #[from] SignError in its own error. TokenError does already, so ? needs no map_err
    .map_err(|e| TokenError::Sign(e.into())) over sign_for or authorize, TokenError::Sign(anyhow!(…)) built? for the first; TokenError::Sign(SignError::new("…")) for the second: the variant holds a SignError
    .opaque() over sign, sign_for, client.authorize or providers.authorizedelete it — not a compile error: ? answers the same opaque 500
    impl SocialProvider overriding authorize to return Result<AuthorizationRedirect, AuthError>, or matching AuthError::Failed { .. } from sign, authorizeResult<AuthorizationRedirect, SignError>, built with SignError::new or SignError::because; nest_rs::core::error_message(&error) reads what failed
    redirect.url read, redirect.url.push_str(…) in a provider’s overrideredirect.url(): read-only, and no setter appends to it
    redirect.transaction, redirect.set_cookie()delete them: return the redirect, whose answer alone carries the cookie, with Cache-Control: no-store. A test reads Set-Cookie off redirect.into_response()
    a RegisteredClient’s client_secret readnothing outside the crate reads it (E0616): it is the registry’s to compare
    client.authorize(&jwt, provider), provider.authorize(&jwt)client.authorize(&jwt, provider, resource), provider.authorize(&jwt, resource): the RFC 8707 resource the sign-in asks for, or None, signed into the transaction
    client.exchange(&jwt, provider, transaction, state, code).await?let response = OAuthClient::callback(&jwt, provider, transaction, req.uri().query().unwrap_or_default())?; then client.exchange(response).await? — callback reads state, code and §4.1.2.1’s error off the query itself; response.resource() reads the resource back
    a SocialProvider::exchange override taking the transaction, state and codethe same override taking the matched AuthorizationResponse, and building its answer with TokenSet::new(access_token), .with_id_token(…), .with_refresh_token(…)
    #[module(imports = [SocialModule, …])], providers enabled by their credentialsimport each provider’s module in its place: GithubSocialModule, GoogleSocialModule, each importing SocialModule
    a SocialProviderEntry { … } of your ownSocialProviderEntry::new::<AcmeProvider, AcmeSocialModule>(key, AcmeSocialConfig::NAMESPACE, build), and a #[module(imports = [SocialModule])] pub struct AcmeSocialModule; the app imports
    Ability::can(action, &model) under a grant resting on a relation, which answered truefalse: Repo::<E>::can(action, &model).await? asks SQL, one indexed query
    Predicate::matches on a relational predicatefalse: Ability::can is the instance check
    nest_rs::authz::graphql::ability(ctx)?, ctx.data::<Arc<Ability>>()nest_rs::authz::graphql::ability()?, nest_rs::authz::current_ability()
    with_ability(ability, fut) in a request, running the body under an ability the service builtthe caller’s rules in the AbilityFactory: with_ability only narrows — what both allow inside a unit holding an ability, nothing installed in a request no ability guard authorized
    with_ability(ability, fut) in a job, to act for a principalunchanged: in a job, which holds none, the body runs under ability
    an Ability attached by a guard of your own (cx.attach(ability)), or installed with with_ambient(Arc::new(ability), fut)AbilityGuard<F> over an AbilityFactory, after the authentication guard: the ability guard is the one place an ability comes from
    ab.cannot(action, E).requires_scope(scope)ab.cannot(action, E): a denial holds whatever the token carries. To let a narrower token through, gate the grant with requires_scope instead
    ab.cannot(action, E).fields([...])drop .fields: a denial hides rows, never columns. Narrow what a grant exposes with the grant’s own .fields
    ab.can(Action::Update, E).fields([...]), on Create or on Manage, written to narrow the write’s replythe list is both what the write sets and what its reply shows, so a reply narrower than the write cannot be declared. List each column the write chooses, and its reply shows them. Dropping the list answers every exposed column on that write, whose reply reads its own grant, never Read’s. A column a service sets by itself goes on the list or in before_save
    FieldSet::Only(cols) read against a wire keythe set holds Column::as_str(), the table’s name: fields.permits(column.as_str()). Only a column_name tells the two apart
    RuleSpec<'_, E> naming what cannot returns, a helper’s return type or a binding’sRuleSpec<'_, E, Cannot>, Cannot from nest_rs::authz; a grant’s stays RuleSpec<'_, E>
    masked_item_for::<A, E, _>(ctx, item) on a subscription’s itemnothing: build the wire row in the stream, .map(|event| Post::from(&event.post)), and the posture judges each item for its subscriber where the socket polls it, an item its grants refuse leaving the stream
    model_attrs(derive(PartialEq, Serialize, Deserialize)) — or a Serialize or Deserialize in the entity’s #[derive] — and use serde::{Deserialize, Serialize} on an #[expose]d entityrefused at the derive: delete both, and the features crate’s serde line if nothing else names serde. #[expose] writes the wire type’s serde, so the Model derives none. Keep model_attrs(derive(PartialEq)) only where your code compares rows
    Json(model), WsReply::reply(&model) answering a rowits exposed type, Json(User::from(&model)): once the derive goes, a raw Model answers nowhere, and its hidden columns with it
    a route, message, GraphQL field, tool or resource answering a Model no #[expose] decorates, deriving Serialize, JsonSchema or SimpleObject itself — Json<secret::Model>, Vec<…>, Option<…>, a stream’s items, #[api(response = secret::Model)]refused at the type, a row crosses no wire: #[expose] the entity and answer its exposed type, or answer a DTO naming the columns it answers; the derive on the row then goes too
    a Serialize or Deserialize written by hand on an #[expose]d Model or ModelEx, or derived above #[expose]; #[output] or #[input] on one; a JsonSchema on one; with the graphql feature, a SimpleObject, InputObject or #[Object] on onerefused, each writing or reading columns no mask shapes: answer the exposed type, User::from(&model), and take the inputs #[expose(input(..))] declares. A row kept in a cache or a queue payload is its exposed type too, or a DTO of its own that lists what it holds
    a blanket of your own over one of those traits, impl<T: Serialize> Audited for T, beside a specific impl on an #[expose]d Model or ModelEx, impl Audited for ModelE0119, since rustc reads what #[expose] emits on the row as an impl upstream could make hold. Delete the row’s impl: the exposed type already meets the blanket, User::from(&model).audit(), and an impl on it would overlap the same way. A row that keeps its own bounds the blanket on a trait of yours, implemented on the exposed types
    #[derive(Default)] and #[wire_enum] on an enum a hidden column alone holds, there for the maskoptional: drop both — a hidden column’s type needs no serde, and no reply rebuilds it
    a hand-written impl WireModelDefaults, or use nest_rs::authz::WireModelDefaults#[expose(name = "…")] on the entity: the trait is gone, and the wire type is the decorator’s alone
    Ability::mask, mask_many or masked_reply on a row or a valuegone: build the exposed type from the row, User::from(&row), which judges it for the caller whose ability is installed there
    a subscription pushing the wire row its publisher built (PostPublishedEvent { post: Post })carry the row, post: Model, and build the wire row in the stream: a wire row answers only the caller whose ability judged it, so the publisher’s answers no subscriber and leaves the stream, one error line each
    ab.can(Action::Read, E).fields([...]), or on Manage, leaving out a column the reply cannot answer null#[expose(nullable)] on each column the grant may withhold, or an Option column: the grant fails build() otherwise, naming the column. The field reads null for that caller, nullable in every edge’s schema, its key still required
    a GraphQL client of a member selecting a column the member’s grant withholds, which answered FORBIDDEN refusing the selection (or data: null over a list)the column reads null on each row and nothing is refused, since the schema now says it is nullable
    #[authorize(Action, Entity, unmasked)] or #[public(Action, Entity, unmasked)], on any edge#[authorize(Action, Entity)]: no reply mask is left to leave to the body, so the key is refused naming why
    unmasked beside a posture on a #[subject] (#[authorize(Manage, Transcoding, unmasked)]) whose body reads rows through Repo#[authorize(Manage, Transcoding)]: a posture naming a capability opens its unit’s reads to the caller’s ability as an entity’s does, each row it answers judged for that caller. A visitor’s reads stay withheld there
    #[wire_default] or #[wire_default(expr)] on a hidden columndelete it: no reply rebuilds a row, so the attribute is refused naming why
    a wire type built by struct literal (User { id, name, .. }) or read back with serde (serde_json::from_*::<User>)User::from(&row): a wire row carries a private proof of its judgement and has no Deserialize. A test reading a reply decodes serde_json::Value, or a type of its own
    a wire row handed to WsServer::broadcast, emit_to or emit from a requesta DTO every recipient may read, or a row a job built: a row judged for the caller pushing it refuses on a push to other connections
    a route under #[authorize(Update, E)] answering the row it wrote to a caller whose Read grants refuse that row403, the write rolled back, where the reply was masked at Update’s fields; in a GraphQL mutation’s reply the row answers its key alone. A write-only client answers 204 or the key
    a GraphQL query or subscription answering a row its caller’s grants refuse, built by hand ({ members { id } } over a list the body put a stranger’s row in)FORBIDDEN, the key included: a refused row answers its key in a mutation’s reply alone. A list fails closed whole, and a subscription item holding such a row bare, in a list, an Option or a Result leaves the stream. A Repo read never hands a body such a row
    a wire row a job built kept past the job (a cache, a static) and answered by a route, a message or a tool500 and an error line: a row a job built answers inside a job and on a push to other connections alone. Build the row where it answers, from the Model the job kept
    a client reading a write’s reply as Update’s .fields cut it ({ "id", "title" } under .fields([Id, Title]))the reply holds what the caller may read, every column its Read grants permit, whatever the write’s own list: .fields on a write names what it may set. A column Read withholds reads null there as on any reply, where a write grant with no list answered every exposed column

    A project scaffolded by an earlier nestrs g auth keeps sub: Option<Uuid> in its claims, which cannot hold a client’s own id; the JWT page shows the claims a 7.0 scaffold writes, whose subject is always present. Optionally, the claims’ two hand-written impls may be derived: #[derive(PrincipalIdentity)] on the struct, #[principal(actor)] on the field actor_id returned, and #[principal(tenant)] and #[principal(scopes)] on those tenant_id and scopes read, then delete impl AmbientValue and impl PrincipalIdentity. Kept, they compile as before. An http://localhost OAuth or social-login redirect, a protected resource’s or an issuer’s loopback http URI, serve a declared development or test profile alone.

  10. Move every layer onto the unit context. One pipeline runs every unit on every edge, and every layer reads it through UnitContext — see Execution context and the request lifecycle. Each row is a compile error unless it says otherwise; work through them in this order, guards first, since an interceptor or a filter often reads what a guard attached.

    Guards

    6.x7.0
    a guard’s async fn check_http(&self, req: &mut Request)async fn check_http(&self, cx: &mut UnitContext<'_>): the request through HttpView::of(cx)?.request() — request_mut() to read the body and set it back — and the route’s #[meta] and posture through cx.reflector()
    a guard’s check_graphql, check_ws_message or check_mcpone async fn check(&self, cx: &mut UnitContext<'_>): the field, message or operation through cx.switch_to::<GraphqlView>(), WsView or McpView, its name through cx.handler().address()
    one decision written twice, in check_http and in an in-band entrythe decision once, in check: check_http runs it unless the guard overrides it, which it does only where the request differs from the unit (it reads the request, or a value missing at the request means something else)
    an impl Guard writing only check_http, or nothingits decision in check, which check_http runs: check has no default. A guard whose decision is the request’s alone — an authentication guard in the global pool — keeps check_http and admits the units the request carries: async fn check(&self, _cx: &mut UnitContext<'_>) -> Result<(), Denial> { Ok(()) }; one admitting an in-band request reads Posture::Gated there, to refuse what its principal is absent from
    a guard whose decision is a field’s, a message’s or an operation’s alone, registered with use_guards_globalthe same check, and async fn check_http(&self, _cx: &mut UnitContext<'_>) -> Result<(), Denial> { Ok(()) } beside it: a pooled guard’s check now runs on every request too
    impl Layer for X {}, empty#[derive(Layer)] on the struct — #[layer(priority = …)] for an override of Layer::priority; a layer overriding serves keeps its impl
    #[derive(Default)] beside #[injectable] on a struct with no fieldnothing: a fieldless struct, unit or braced, is built as written
    a tracing::warn! or error! a guard files before returning its Errthe denial names why — Denial::forbidden("…").with_reason("banned_author") — and the guard its target, fn target(&self) -> &'static str { crate::TARGET }: the edge files each denial once, guard denied … on that target, with the reason and, when the denial keeps a cause (.with_source(err)), the whole chain from its own text down
    cx.ambient::<Claims>() with an else returning Denial::internal("… must run first"), a value an earlier guard must have attachedcx.require::<Claims>()?: its absence is a 500 the edge files once at error, naming the guard and the type
    a guard reading the principal in two bodies, check_http for the route’s wiring gap and check for /graphql’s visitorone check calling cx.require::<Claims>()?, and fn expected_principal(&self) -> Option<PrincipalClaim> { Some(PrincipalClaim::of::<Claims>()) }: absent, it is the caller’s 401 on every edge, and nothing attaching it fails the boot
    an authentication guard of your own, beside a guard declaring expected_principalfn produced_principal(&self) -> Option<PrincipalClaim> { Some(PrincipalClaim::of::<Claims>()) } on it: the boot reads who attaches the principal
    a guard that reads a principal where one is and decides a visitor itself, declaring it through expected_principalPrincipalClaim::of::<T>().or_visitor(): nothing attaching it stays a warn
    a Denial::Unauthorized(…), Forbidden(…), RateLimited { … } or other variant built or matchedits constructor — Denial::forbidden(…), Denial::rate_limited(…) — and, to tell denials apart, denial.http_status() and denial.bearer_error(): Denial’s fields are private
    impl HttpGuard for X {}, GraphqlGuard, WsGuard, McpGuardimpl GuardFor<HttpView> for X {}, GuardFor<GraphqlView>, GuardFor<WsView>, GuardFor<McpView>
    req.extensions_mut().insert(value) in a guard, read back with Ctx<T>cx.attach(value), with impl AmbientValue for T {} beside the type; a guard after it reads cx.ambient::<T>()
    use nest_rs::http::Ctx;, a Ctx<T> parameteruse nest_rs::core::Ambient;, an Ambient<T> parameter — named for the ambient context it reads, the same parameter on a route, a resolver, a message handler and a tool; nest_rs::prelude::* carries it
    a Strategy::Principal or an AbilityFactory::Actor that is not your own type ((), &'static str)a type of your own implementing AmbientValue and Clone — the guard attaches it; a Claims gains impl AmbientValue for Claims {}, or derives it with its PrincipalIdentity (step 9)
    if Reflector::new(req).is_public() { return Ok(()) } in an authentication guardif matches!(cx.reflector().posture(), Posture::Public | Posture::InBand) { return Ok(()) } — /graphql is InBand, each operation declaring its own posture
    nest_rs::guards::prelude::HttpRequestHttpView, and nest_rs::http::Request for the type it holds
    a Denial::Unavailable { retry_after_secs, reason } built in fullDenial::unavailable(retry_after_secs, reason) — and .with_source(err) to keep what failed
    the graphql, mcp or ws feature of nest-rs-throttler or nest-rs-guardsnothing: a guard’s edges are its GuardFor declarations, and ThrottlerGuard declares every view
    nest_rs::guards::{GuardEndpoint, GuardExt}, a guard wrapped around an endpoint by hand#[use_guards] on the controller or gateway, or the app’s global pool: each edge runs its own guard stage
    #[use_guards(X)] #[force_guards(X)] on a method#[force_guards(X)]
    a guard, interceptor, filter or pipe overriding Layer::priority to run before a broader scope’s layersdeclare it at that broader scope, or list it first there: a priority orders within one scope
    #[use_guards(…)] beside a handler listing an authorization guard before the authentication guard it readslist the authentication guard first, or declare the pair on the controller
    nest_rs::authz::graphql::authorize::<A, E>(ctx)?, ws::authorize::<A, E>(event), mcp::authorize::<A, E>()? in a hand-written body#[authorize(A, E)] on the operation, or nest_rs::authz::class_gate::<A, E> on its unit’s context
    nest_rs::authz::gate::<A, E>(&ability) and GateVerdictnest_rs::authz::class_gate::<A, E>(cx)

    What a site declared, and what a unit carries

    6.x7.0
    nest_rs::http::Reflector, HandlerMetadata, Reflector::new(req)cx.reflector()
    req.extensions().get::<Throttle>() in a guard, for a route’s #[meta(Throttle(..))]cx.reflector().get::<Throttle>() — the method’s value over its controller’s
    req.extensions().get::<Public>() in a guardcx.reflector().is_public()
    a #[meta(..)] repeated on every route of a controllerone #[meta(..)] under #[controller], a route’s own overriding it
    GraphqlOperationContext, McpOperationContextGraphqlView, McpView
    a value an interceptor, a middleware or a test put in the request’s extensions, read back with Ctx<T>the value made ambient around what reads it — nest_rs::core::with_ambient(Arc::new(value), next.run(cx)), or cx.attach(value) before next.run(cx) — or attached by a guard; Ambient<T> reads no extension
    a value of your own in a tokio::task_local! carried by handimpl AmbientValue for T {}, added with with_ambient or cx.attach, read with ambient::<T>()
    RequestContinuation::current()RequestContinuation::capture(Continuation::Task), or the continuation the work is
    another driver’s after_commit re-installing the scope and the ability around held workcapture RequestContinuation::capture(Continuation::Commit) and read current_executor_scope() where the work is registered; run it inside the capture

    The guards in front of /graphql, /mcp and a socket

    6.x7.0
    GraphqlAbilityBridge<AuthnGuard, AuthzGuard> as dyn GraphqlOperationGuard in a module’s providersEndpointGuards<GraphqlView, (AuthnGuard, AuthzGuard)>
    McpAbilityBridge<AuthnGuard, AuthzGuard> as dyn McpOperationGuard in a module’s providersEndpointGuards<McpView, (AuthnGuard, AuthzGuard)>
    an impl GraphqlOperationGuard / impl McpOperationGuard of your owna Guard with check_http and impl GuardFor<HttpView>, listed in EndpointGuards<…>
    AllowAllMcpGuard as dyn McpOperationGuardMcpModule::for_root(McpAccess::Public) in the app’s root
    GlobalPoolOperationGuard, GlobalPoolMcpGuardnothing: the transport runs the global pool at the /graphql and /mcp requests
    forward_principal!(Claims); in a module, ctx.data::<Claims>()? in a resolvernothing in the module; a claims: Ambient<Claims> parameter on the operation, no argument of the schema
    nest_rs::core::ambient::<Claims>() read by hand in a resolver, a message handler or a tool, with an .ok_or(…) of its owna caller: Ambient<Claims> parameter — not a compile error: the hand-written read still compiles, and the parameter answers a miss opaquely, its type filed at error
    LoaderScope as dyn GraphqlBatchContext in a module’s providers, use nest_rs::seaorm::graphql::LoaderScope;nothing: a DataLoader batch carries the request’s ambient values itself
    impl McpToolContext for X (capture, around), provided as dyn McpToolContextan interceptor making the value ambient (cx.attach, with_ambient), in GlobalInterceptors<(…)> or #[interceptor(stage = unit)], read with nest_rs::core::ambient::<T>()
    #[use_guards(G)] beside an #[mcp] host writing rmcp’s ServerHandlerEndpointGuards<McpView, G> declared by a module, or the host’s tools under #[tools]
    impl SocketContext for MyBridge listed as dyn SocketContext, carrying a value from the upgrade into each messagea guard on the gateway (or the app’s pool) attaching the value with cx.attach(value) in check_http: the connection carries it into every message and hook
    nest_rs::ws::{SocketContext, Captured, BoxFuture}nothing: the seam is gone
    app.graphql_socket().data(ability) to subscribe as a callerapp.graphql_socket().ability(ability), an Arc<Ability> (testing with authz); attach(..) takes any other value a guard attaches, data(..) a context value alone

    Pipes

    6.x7.0
    fn transform_body(&self, v: &mut Value) -> Result<(), PipeError> on a global pipefn transform(&self, cx: &UnitContext<'_>, argument: ArgumentKind, v: &mut Value) -> Result<(), PipeError>, acting when argument == ArgumentKind::Body
    fn transform_graphql_variables(&self, v: &mut Value)the same transform, on ArgumentKind::Variables
    fn transform_ws_data(&self, event: &str, v: &mut Value)the same transform, on ArgumentKind::Data; the event is cx.handler().address(), or cx.switch_to::<WsView>()’s event()
    App::builder().use_guards_global([guard::<AuthnGuard>(), guard::<AuthzGuard>()]) in main, and use nest_rs::guards::{AppBuilderGuardsExt, guard};GlobalGuards<(AuthnGuard, AuthzGuard)> in the providers of the module main boots, use nest_rs::guards::GlobalGuards;, and main keeps App::builder().module::<AppModule>(): a suite booting that module runs the pool, so delete the copy it made (.use_guards_global(…) on TestApp::builder())
    App::builder().use_pipes_global([pipe::<P>()]), through nest_rs::guards::AppBuilderPipesExt or nest_rs::pipes::AppBuilderPipesExtGlobalPipes<(P,)> in the providers of the module main boots
    nest_rs::guards::{PipeSpec, PipeSpecs}, nest_rs::guards::{GuardSpec, GuardSpecs, guard}, nest_rs::pipes::{PipeSpec, PipeSpecs, pipe}, nest_rs::core::{InterceptorSpec, ExceptionFilterSpec, interceptor(), exception_filter()}, nest_rs::core::layer_chain::GlobalSpecsnothing: the pools are the declarations above, a decorator builds its own layer list, and the registries are no API
    GlobalGuards<…> or another pool listed in a feature’s modulethe module the app boots lists it: one an imported module lists fails the boot

    Interceptors and exception filters

    6.x7.0
    impl Interceptor from nest_rs::interceptors, async fn intercept(&self, req: Request, next: Next<'_>) -> Result<Response>nest_rs::core::Interceptor, async fn intercept(&self, cx: &mut UnitContext<'_>, next: Next<'_>) -> Outcome: run the rest with next.run(cx).await, the request through HttpView::of(cx)?.request(), the reply through response_mut() once it returned — see Interceptors
    impl ExceptionFilter from nest_rs::exception_filters, async fn catch(&self, err: E) -> Responsenest_rs::core::ExceptionFilter, async fn catch(&self, err: &E, cx: &mut UnitContext<'_>) -> Caught: match HttpView::of(cx) { Ok(view) => Caught::Answered(view.respond(response)), Err(_) => Caught::Declined }, Caught::Problem(problem) or Caught::Declined — see Error handling
    impl Filter from nest_rs::filters, #[use_filters(F)], use_filters_global([filter::<F>()])an exception filter whose type Exception = dyn Error + Send + Sync, bound with #[use_exception_filters(F)] or GlobalExceptionFilters<(F,)> in the providers of the module main boots; #[use_filters] is refused naming it
    LayerKind::FilterLayerKind::ExceptionFilter
    use nest_rs::interceptors::AppBuilderInterceptorsExt;, AppBuilderExceptionFiltersExt, AppBuilderFiltersExt, and App::builder().use_interceptors_global([interceptor::<I>()]), .use_exception_filters_global([exception_filter::<F>()])GlobalInterceptors<(I,)> and GlobalExceptionFilters<(F,)> from nest_rs::core, in the providers of the module main boots
    #[nest_rs::http::interceptor(priority = n)], a module bringing it to every handler#[injectable] on the struct and GlobalInterceptors<(I,)> in the providers of the module main boots, at the handler stage: a bare #[interceptor] is refused naming it. Around the guards, #[nest_rs::core::interceptor(stage = unit)], which its module’s import brings; the order within a stage is Layer::priority on the struct’s Layer impl
    a layer listed twice at the root, providers = [P, GlobalPipes<(P,)>]providers = [GlobalPipes<(P,)>], each pool alike: a pool registers what it lists unless the app already does. The longer form still boots, and a layer a module lists stays that module’s
    a type in a pool that no decorator makes a provider, registered by hand or by a factory#[injectable] on it, or a Discoverable impl: a pool’s entries are providers, and the compiler says so where the pool names it
    #[use_interceptors] / #[use_exception_filters] on a #[controller] onlyalso on a #[resolver] and beside its fields, a #[gateway] and beside a #[subscribe_message], an #[mcp] host and beside its #[tool], #[prompt], #[resource] and #[resources] methods, a #[processor], #[scheduled] or #[listeners] block
    an interceptor or exception filter written around a gateway’s handler bodies by hand#[use_interceptors(...)] / #[use_exception_filters(...)] on the #[gateway] or beside a #[subscribe_message]
    a global interceptor or filter written for HTTP requests alonethe same with fn serves(&self, unit: Unit) -> bool { unit == nest_rs::http::unit::REQUEST } on its Layer impl — not a compile error: without it, it now runs around every unit on every edge

    The unit of work and the framework’s internals

    6.x7.0
    nest_rs::seaorm::DbContext, listed or built by handnothing: importing SeaOrmDatabaseModule makes every edge run each unit as a unit of work
    nest_rs::http::MappedError on a filter’s responsenothing: a failed unit never commits, whatever a filter answered
    nest_rs::http::{CarriedUnits, carried_units}nothing: the transport runs a /graphql or /mcp request on the pool itself
    const GATE: Option<fn(&poem::Request) -> Option<poem::Response>> on a RouteResponseShaperconst GATE: Option<for<'b> fn(&mut UnitContext<'b>) -> Result<(), Failure>>, refusing with a Denial (Err(denial.into()))
    HttpBootCheck::new(|container| …) listed as a provider’s metadataa step on ContainerBuilder::provide_wiring: it runs in every app importing the module
    nest_rs::guards::layer_chain::{LayerSpec, LayerSite}nest_rs::core::{LayerSpec, LayerSite}
    nest_rs::guards::{dispatch, RouteShaper, GraphqlSite, run_layered_graphql_chain, run_layered_mcp_chain, GuardAsWsMessageCheck}, nest_rs::http::{GlobalGuardsActive, Public}, nest_rs::ws::{WsMessageCheck, EventLayerTable, gateway_endpoint}, nest_rs::graphql::GraphqlFederationGuard, nest_rs::authz::run_ability_chainnothing: the decorators’ expansions call each edge’s own stage, which is no API
    nest_rs::guards::denial_to_graphql_error, denial_to_ws_error, denial_to_mcp_errornest_rs::graphql::denial_to_graphql_error, nest_rs::ws::denial_to_ws_error, nest_rs::mcp::denial_to_mcp_error
    nest_rs::guards::denial_to_http_response, denial_to_http_errora guard returns its Denial; an extractor answers a ProblemDetails or an error of its own implementing ResponseError
    nest_rs::guards::NoBearerChallengenest_rs::http::challenge::NoBearerChallenge
    two #[meta(Tag::new(..))] on one method or one hostone: the boot refuses the second

    An anonymous caller of an #[authorize] route that is not #[public] is refused 401, where the visitor’s rules used to decide it: declare the route #[public(A, E)] to serve visitors.

  11. Move data onto the unit of work. Every edge — a request, a GraphQL operation, a WebSocket message, an MCP operation, a job, a tick, a listener, a lifecycle hook — runs its work through one port, nest_rs::database::UnitOfWork, which SeaOrmDatabaseModule binds. Delete the data contexts from your authz modules first: WsDataContext as dyn SocketContext leaves authz/ws/module.rs — and nestrs g ws now writes none: a gateway’s adapter imports AuthzModule itself, as an HTTP adapter does — and McpDataContext as dyn McpToolContext leaves authz/mcp/module.rs; the edges open their units themselves. An app reaching a #[crud] host, a route or field under #[authorize(A, bind = S)], or the service a GraphQL-exposed entity names (#[expose(service = S, graphql)]) imports SeaOrmDatabaseModule, which imports the SeaOrmModule opening its pool: 6.x booted without it and failed every call such a host made; 7.0 refuses the boot naming it.

    6.x7.0
    nest_rs::worker::JobContextnest_rs::database::UnitOfWork (with OpenUnit)
    nest_rs::worker::JobTransaction (PerAttempt, Pool), ScheduledMethod::transaction, CronJobMeta::transactionnest_rs::database::TransactionPolicy (PerUnit, Pool)
    nest_rs::worker::JobSettlement, Unhonoured, BACKEND_REMEDYnest_rs::database::{Settlement, Unhonoured, BACKEND_REMEDY}
    nest_rs::worker::run_in_job_context(ctx, transaction, fut, ok, unhonoured)nest_rs::database::run_unit(unit_of_work, UnitSpec::new(unit, scope, policy), fut, ok, unhonoured)
    nest_rs::worker::TARGET, nest_rs::worker::context, nest_rs::schedule::nest_rs_worker::JOB_TIMEOUTgone; the job bound is nest_rs::core::JOB_TIMEOUT, and nothing files on nest_rs::worker any more
    nest_rs::seaorm::WorkerDbContext; nest_rs::seaorm::ws::WsDataContext, mcp::McpDataContext; the seaorm ws and mcp featuresnest_rs::seaorm::SeaOrmUnitOfWork; nothing: delete them
    a database driver’s request interceptor and JobContextone UnitOfWork, bound through nest_rs::database::provide_unit_of_work, which also runs every lifecycle hook in a unit; it implements settle_net, and Executor::atomic to offer an atomic block (Writing a driver)
    a match on ExecutorScope, TransactionPolicy or RepoError outside its crateadd a _ arm that fails closed
    Result<T, DbErr> from Repo, a RepoSelect, a page read or CrudService (list, access, create, update, delete), and retry_on_conflict’s answer; Err(DbErr::RecordNotUpdated), DbErr::RecordNotFound, DbErr::RecordNotInserted or DbErr::AccessDenied matched; ServiceError::Db(db_err)nest_rs::seaorm::RepoError: RepoError::NotFound, RepoError::Forbidden { columns, .. } (a create its scope refuses names no column), RepoError::UniqueViolation(key) with key.constraint(), ForeignKeyViolation, SerializationFailure, QueryCanceled, Other { .. }. ? into a ServiceError is unchanged, and no reader of it prints the server’s message or detail; a DbErr of your own (a migration, a seed, a transaction you opened) becomes one with RepoError::from
    a DbErr ?-ed into an anyhow::Result: Migrator::up(conn, None).await? in your migrations crate’s migrate helper and binary, a seed’s statements.map_err(RepoError::from) before the ?, the helper answering Result<(), RepoError>: an anyhow report of a DbErr prints the row a data migration refused. nestrs g migration regenerates migrator.rs with the helper
    Repo::<E>::conn(), and a query run on it (Entity::find()….all(&conn), active.insert(&conn))Repo::<E>::scoped(action) with its own methods, then .all(); an ability-less read Repo::unscoped, an insert Creatable::create_from_active or Repo::insert_unscoped(active)
    .all(&conn), .one(&conn), .count(&conn), .exists(&conn) on Repo::scoped, with_tombstones, unscoped, unscoped_by_id.all(), .one(), .count(), .exists(): a RepoSelect<E> runs on the ambient executor
    use sea_orm::{QueryFilter, QueryOrder, QuerySelect} for a Repo selectdelete the import: filter, order_by, order_by_asc, order_by_desc, order_by_with_nulls, limit, offset and apply_if are RepoSelect<E>’s own
    .query(), .as_query(), .into_query(), select_only, column, column_as, expr_as, group_by, having, distinct, join or a lock_* method on a Repo selectgone: narrow with the select’s own methods, and read a related row through its own service’s loader, under its own filter
    an expression as a Repo select’s order key (.order_by_asc(Expr::col(…)))a column of the entity; an order by anything else is not offered in 7.0
    raw text in a service’s condition: Expr::cust and its cust_with_*, custom_keyword, Expr::Custom, Expr::CustomWithExpr, Keyword::Custom, Func::cust, cast_as, as_enum, Expr::AsEnum, Expr::Constant, sea_query::Enum, OptionEnum::None, ArrayType::Enum, BinOper::Custom, PgFunc::json_exists, json_value, json_query, json_table, Order::Field, OnConflict::constraint, order_by_customs, partition_by_customsea-query’s typed builders (Func::lower, PgFunc::to_tsquery, Condition), their values bound; where only raw text can say it, a JSON path among it, #[expect(clippy::disallowed_methods, reason = "…")], once your project has the clippy.toml nestrs new writes, and an empty one in crates/migrations, where raw DDL stays free
    #[sea_orm(select_as = …, save_as = …, save_array_as = …)] on an entity, under that clippy.tomlthe derive expands to cast_as beside the struct, so the #[expect] goes on the module holding the entity: #![expect(clippy::disallowed_methods, reason = "…")] at the top of its file
    #[derive(DeriveActiveEnum)] with db_type = "Enum" and no rs_type, under that clippy.tomlrs_type = "String", which expands to nothing the list names; or #![expect(clippy::disallowed_methods, clippy::disallowed_types, reason = "…")] on its module
    Repo::insert_unscoped(active, &conn), resolve_unique_slug(&conn, column, …)Repo::insert_unscoped(active), resolve_unique_slug::<E>(column, …)
    a secret column typed as a newtype with a hand-written Debug (PasswordHash), and an impl Debug for Model / ModelEx restating every column to hide itpub password_hash: Option<Secret<String>> and #[derive(Clone, Debug, DeriveEntityModel)]; the service reads hash.expose_secret()
    #[expose] on a secret columnrefused at compile time: drop the #[expose] — a Secret never crosses the wire
    a row or a struct serialized with its secret and read back (a cache, a payload)a Secret serializes as "<redacted>": store the value itself, read through expose_secret(), where you mean to keep it
    nest_rs::seaorm::Executor, LazyTransaction, FinalizeOutcomenothing: the edge’s unit installs and settles the handle, and Repo reads it
    Executor::Txn(txn), a transaction you opened and installedan atomic block, nest_rs::database::atomic(work), for a Repo write; a db.begin() of your own runs its statements on txn, which Repo never joins, and commits out of the framework’s sight
    CommitError, and its is_retryable_conflict()nest_rs::seaorm::retry::is_retryable_conflict(&err) on the DbErr of a commit() of your own, or RepoError::SerializationFailure(_) on what retry_on_conflict answers
    nest_rs::seaorm::{with_request_executor, with_job_executor}(executor, fut); nest_rs::seaorm::with_executor or nest_rs::database::with_executorno public function installs an executor of its own: the edge’s unit runs the body, and a service test runs it through app.unit(ability, || …) or app.system_unit(|| …)
    nest_rs::seaorm::{current_executor, ExecutorScope, current_executor_scope}nest_rs::database::{ExecutorScope, current_executor_scope}; a statement of a service’s own goes through Repo
    Unhonoured { reason, retryable }, JobTimedOut { timeout }Unhonoured::new(reason, retryable) (or ::retryable, ::deterministic), JobTimedOut::new(timeout)
    a service catching a unique violation on the request’s transaction and querying onan insert that may meet the row holding its key: Repo::<E>::insert_unscoped_or_existing(active, [key]), which answers Insertion::New or Insertion::Existing and aborts nothing; any other statement: run it in nest_rs::database::atomic and match RepoError::UniqueViolation(_)
    matches!(err.sql_err(), Some(SqlErr::UniqueConstraintViolation(_))) to tell a taken keymatches!(err, RepoError::UniqueViolation(key) if key.constraint() == Some("users_email_key"))
    fn soft_delete_column() -> Option<Column> { Some(Column::DeletedAt) } on a CrudServicedelete it: #[expose(..., soft_delete)] alone stamps and hides
    .filter(live_condition::<E>()) after a Repo read, CrudService::live_read_filter(), audit_soft_delete_bindings()delete them: every Repo read carries the condition; live_condition::<E>() stays for a query outside Repo
    a Repo read meant to see deleted rows (admin, retention)Repo::<E>::with_tombstones(action)
    a restore through Repo::update (clearing deleted_at)not offered in 7.0: update hides the row
    impl SoftDeletable for Entity by hand#[expose(..., soft_delete)] on the entity
    a create handler or service method stamping the tenant or the author (active.org_id = Set(auth.org_id), create_in_org), and the #[crud] op it overrodea Create grant pinning the column — .when(|p| p.eq(Column::OrgId, actor.org_id)) — and #[crud]’s generated create, or Creatable::create; the author is a Create grant of its own, for a subject that can author
    active.status = Set(Draft) before a create#[expose(default = Status::Draft)] on the column, which the create input does not carry
    id: Set(Uuid::now_v7()), created_at: Set(now) on a row built for Repo::insert_unscoped..Default::default(): the insert fills the key on an exposed entity, and created_at under timestamps; a table no transport exposes takes DEFAULT uuidv7() on its key in its migration
    #[expose(..., timestamps)] on an entity with created_at and no updated_at, refusedaccepted: updated_at is stamped when the entity has one
    a unique column on a soft_delete table, unique_key()a partial unique index, … WHERE deleted_at IS NULL
    params.after_uuid()params.cursor().map_err(|refused| nest_rs::http::pipe_error(&refused))?
    Page::next_cursor: Option<Uuid>; Repo::page, Repo::relation_pages, CrudService::page, RelationKey::after taking Option<Uuid>Option<PageCursor>: PageCursor::from(uuid) builds one, cursor.to_string() is its text
    a Page { items, next_cursor, has_more } literalPage::new(items, next_cursor, has_more)
    SeaOrmHealthModule in imports; nest_rs::seaorm::SeaOrmHealthIndicator named in codedelete both: SeaOrmModule attaches the pool’s indicator, and HealthModule checks every resource the app or its features opened
    a hand-written #[readiness] async fn redis(&self) sending PING over an injected RedisConnectiondelete it: RedisModule attaches each instance’s PING — a method named redis beside it fails the boot
    report.details.keys().copied() as &'static str; IndicatorReport { name: "x", .. }&Cow<'static, str> keys; name: "x".into()

    Readiness waits on every resource the app opens. 6.x checked the pool only beside SeaOrmHealthModule, and no Valkey or store; an app importing HealthModule now answers /health/ready and /health/startup 503 while its own or a feature’s database, any Valkey instance or the store is down, so the orchestrator takes the replica out of rotation until it is back. Each of those probes sends SELECT 1, a PING per instance and one page of the bucket’s listing — a request a store billing per request bills.

    A GraphQL operation is a unit of work, and each mutation root field a savepoint settled on the answer that field gives: a failed nullable root field answers null and rolls back alone; a Non-Null root field’s null reaching data rolls the whole operation back and runs no later root field; a mutation naming one root field twice runs it once, its copies merged, and one naming it twice with different arguments is refused. Return Result<Option<T>> from a mutation whose work must stand beside a sibling’s failure, and put the writes that stand or fall together in one field. A batch’s operations no longer share one transaction. A driver whose executor offers no atomic block answers every GraphQL mutation INTERNAL.

  12. Follow each edge’s own moves: storage, GraphQL, WebSocket and MCP.

    6.x7.0
    Storage::new(Arc::new(config))Storage::connect(&config).await?, which opens and proves the store
    storage.bucket_name()storage.url(), the URL shown without credentials
    StorageConfig { bucket: "media".into(), endpoint: "https://…".into(), .. }StorageConfig { url: "s3://media".into(), endpoint: Some("https://…".into()), .. }; endpoint: None is AWS
    storage.list(prefix)?storage.list(prefix), the stream itself
    StorageError::Get(e) and its siblings, e an object_store::ErrorStorageError::Get { store, source }, whose source says the failure by its kind and holds no object_store::Error: error_message reads it
    matches!(e, object_store::Error::NotFound { .. }) on a downloadmatches!(e, StorageError::NotFound { .. }), no object_store in your manifest
    a line on nest_rs::storage filtered by its key fieldthe field is gone: each names its store, and trace_id the call
    StorageError::Presign { method: String, .. }method is an http::Method
    ObjectMetadata { byte_size } / ObjectEntry { .. } built by handboth are #[non_exhaustive]: read them, never build them; byte_size is u64
    let url: String = storage.presign_put(&key, ttl).await?let put = storage.presign_put(&key, &SignedPut::new("audio/mpeg"), ttl).await?, then hand the client put.url, put.method and put.headers, which it sends verbatim
    let url: String = storage.presign_get(&key, ttl).await?storage.presign_get(&key, ttl).await?.url
    a presign ttl past 7 days, or under 1 seconda ttl within SigV4’s bounds: anything else is StorageError::Unsignable
    keeping the content type supplied at upload, since head could not read itstorage.head(&key).await?.and_then(|meta| meta.content_type)
    Scoped::<T>::from_context(ctx)? in a resolver, a message or a tool bodya cache: Scoped<T> parameter on the method; a miss is answered opaquely and filed
    ctx.data::<DataLoader<L>>()? or ctx.data_unchecked::<DataLoader<L>>() in a resolvera loader: &DataLoader<L> parameter, on a root field as on a #[field_resolver], which the boot checks
    a #[field_resolver]’s &DataLoader<L> parameter, L a Loader written by hand and seeded through GraphqlContextSeedL as a method of a #[dataloader] impl block, the parameter naming the loader it generates; or a ctx: &Context<'_> parameter and ctx.data::<DataLoader<L>>()?, which the boot does not check
    a tokio::sync::broadcast provider, and a #[listeners] host feeding it, behind a #[subscription]#[inject] bus: Arc<EventBus> and self.bus.stream::<E>(), from nest_rs::events; a subscription needing no Err returns the bare impl Stream
    nest_rs::ws::WsScopeErrornothing
    #[query] + #[graphql(entity)]#[entity], with GraphqlConfig::federation
    GraphqlContextSeed { owner_type_id: || Some(TypeId::of::<R>()), lifetime, seed }GraphqlContextSeed::new(Some(TypeId::of::<R>), lifetime, seed)
    ErrorReport(error).into_frame(event)Err(error) returned from the #[subscribe_message] handler: its frame is rendered by the error’s type
    impl Gateway for X { async fn dispatch(..) } written by hand#[subscribe_message] methods in a #[messages] block: #[messages] alone writes a Gateway
    WsReply::unknown(event)WsReply::unknown()
    WsReply::payload_error(event, &error) with any Displaythe same with any Into<DecodeError> — a serde_json::Error among them — reported without the value
    WsError::with_details(message, map); the class read off WsError::errorsWsError::new(message).with_errors(map) for a field map; the class at frame.code (and reason, required_scopes, retry_after_secs); a class from a Problem, WsError::from_problem
    refused.origin(), refused.expected() on an OriginRefusednothing public: the surface files each refused origin itself, at warn
    ServerInfo, returned by a host’s get_infonest_rs::mcp::ServerConfig
    rmcp’s Parameters, named from rmcp in an operation’s signaturenest_rs::mcp::Parameters, the framework’s own type with rmcp’s shape
    an impl McpHost written by handthe same with negotiate_initialize
    McpIdentity::declared(name, title)#[mcp(name = …, title = …)], or the app’s own McpIdentity literal
    McpIdentity::new("assistant", env!("CARGO_PKG_VERSION")) in McpOptions::serverMcpModule::for_root(McpIdentity { title: Some(…), ..Default::default() }), or the bare import: the name, version and description are the binary’s; its name and version fields report others
    McpIdentity::new(name, version).title(…).instructions(…), any settera literal over Default: McpIdentity { name: Some(…), version: Some(…), title: Some(…), instructions: Some(…), ..Default::default() }
    McpIdentity::is_empty()== McpIdentity::default(): its fields are public
    nest_rs::mcp::{tool, tool_router, tool_handler, prompt, prompt_router, prompt_handler, schemars, ToolRouter, PromptRouter} in a host writing ServerHandler by hand, nest_rs::mcp::{handler, transport, LocalSessionManager, StreamableHttpServerConfig, StreamableHttpService}nest_rs::mcp::rmcp::…: nest_rs::mcp keeps rmcp whole there, and #[tools] needs none of them
    nest_rs::mcp::{CallToolResult, ContentBlock, ServerCapabilities, ProtocolVersion}nest_rs::mcp::model::…
    nest_rs::http::Scoped, nest_rs::ws::Scoped, nest_rs::graphql::Scoped, nest_rs::mcp::Scopednest_rs::core::Scoped, which nest_rs::prelude names: one type on every edge
    nest_rs::authz::masked_output_ambient, nest_rs::authz::graphql::masked_value_for, nest_rs::authz::mcp::masked_value_for, nest_rs::authz::ws::masked_reply_for in a body#[authorize(Action, Entity)], and the exposed type built from the row, User::from(&row), judged for the caller where it is built
    nest_rs::http::RejectedCredential, nest_rs::http::RequestDeadlinenothing: authn’s guards write the first and the edge the second, and neither is a developer’s to name
    validator::ValidationError in a custom(function = …) rule, on a validator line of your manifestnest_rs::pipes::validator::ValidationError, and delete the line if nothing else names the crate
    .map_err(|e| problem_error(&e))? in an operation answering McpErrorreturn the ToProblem error itself from an operation spelled Result<T, E>
    #[mcp] struct Host<T>, #[tools] impl<T> Host<T>a non-generic host type per instantiation
    nest_rs::mcp::McpMount, endpoint, resolve_operation_guardthe #[mcp] host; a request’s guards are the transport’s
    a suite calling nest_rs::testing::mcp::call_tool on a gated endpoint whose guard names no subjectcall_tool_statelessly, or have the guard name its caller: the handshake is otherwise refused 403
    two #[mcp] hosts on one path declaring one prompt namerename one, or give each host its own path: the boot refuses the pair
    a host serving resources by hand — #[tool_router] tools, a get_info, list_resources / read_resource parsing its URIsits tools, prompts and resources under #[tools]: #[resources] lists, #[resource(template = "post://{id}")] reads, id a typed parameter, each beside #[authorize(…)] or #[public]
    a McpError::resource_not_found(…) built for a row the caller may not readOk(None) from the #[resource] method, answered Resource not found under the NOT_FOUND class
    a #[resource] reading one row with CrudService::access(&*self.svc, Action::Read, id) and a match over Access#[authorize(Read, bind = PostsService)] and a post: Authorized<Read, PostEntity> parameter, no id: Uuid: Denied, Missing and an id no v7 answer Resource not found, and the body runs on the row alone
    #[public] on a message or an MCP operation behind an upgrade or an endpoint whose guards authenticate itnothing: the guards cover it, and the boot refuses a #[public] that could open nothing there. #[authorize(Action, Subject)] where it needs a gate
    a hand-written Posture::Gated self-mount (declare_endpoint) with no guard, which served every caller after one warnGlobalGuards covering it, or Posture::Public where it is open on purpose: the boot refuses it
    #[authorize(Action, Entity, unmasked)] on a message only because it returns a bare value or a Result behind an alias#[authorize(Action, Entity)]: nothing reads the reply back, and unmasked is refused
    a #[prompt], or a #[tool] answering ContentBlock or InputRequiredResult, beside #[authorize(Action, Entity)]nothing: the posture stands as written, since no mask reads the answer back
    input: Valid<T> on a GraphQL argument, a WebSocket payload or a job; Parameters<Valid<T>> on MCP; nest_rs::mcp::Validinput: T, Parameters<T>: each edge validates what it decodes
    Piped<P, T> on a GraphQL argument, a WebSocket payload or a job, Parameters<Piped<P, T>> on MCP; nest_rs::mcp::PipedPiped<P> from nest_rs::pipes, whose wire value is the pipe’s In, bound Piped(value)

    An app-wide exception filter or #[interceptor(stage = unit)] now also runs around a WebSocket frame no handler reads, an event none serves or a frame no envelope holds, as it runs around a route’s 404; WsView::event reads _OTHER there. One assuming a handler stood behind every message narrows itself on that word. No compile error says so.

  13. Push through the queue’s type, on the port’s handle. A feature injects Arc<nest_rs::queue::Jobs>, which the backend’s binding registers, where it injected the backend’s producer. push_to::<Q>(job) and the string-taking push(name, job) are gone: a push names the queue’s #[queue] marker and answers with a PushReceipt naming the job’s id; push_with takes PushOptions for a delay or a unique key:

    crates/features/src/audio/service.rs
    queue: Arc<dyn JobProducer>,
    jobs: Arc<Jobs>,
    // …
    self.queue.push_to::<AudioQueue>(TranscodeCommand { file }).await?;
    self.jobs.push(AudioQueue, TranscodeCommand { file }).await?;

    The queue section lists every call a producer changes, push_many and push_json included, under Your code. QueueName is now the checked name a backend receives, so a queue’s type is Queue: <AudioQueue as QueueName>::NAME becomes <AudioQueue as Queue>::NAME. A push_many that fails after the backend accepted part of it answers QueueError::PartiallyQueued, carrying the receipts of the jobs already queued: a caller that retries the whole batch on any error leaves those out.

    A push inside a transaction is filed after its commit. On an app binding seaorm and a queue backend, a push in a mutating request, a GraphQL mutation, a message or an attempt is written into the transaction and filed once it commits — never lost, never left behind by a rollback. That table, nestrs_outbox, is the framework’s migration, created by nestrs g migration nestrs_outbox then nestrs run db up (or Box::new(nest_rs::seaorm::queue::OutboxMigration) in your migrator’s migrations()). An event whose listener pushed only to wait for the commit pushes in the service, inside the transaction. A push meeting a unique key another job holds answers Ok and is dropped at info after the commit, where it answered UniqueKeyHeld. See Producing jobs.

  14. Check what each consumer declares. A #[process] method compiles as it did, and these read differently now:

    • retries = N runs a failed attempt again after a backoff — one second after the first failure, doubling, at most five minutes — where 6.x ran it again at once. A Problem carrying with_retry_after(n) holds it back at least n seconds when that is longer, stretched by up to a fifth, what it asks counted up to an hour, where 6.x read no such wait. See Retries and failure.
    • A job failing with a client’s error dead-letters at once. A JobError::abort(…), or a ServiceError or a Problem with a 4xx, dead-letters on its first attempt, where 6.x retried it until the budget was spent; return JobError::retry where a later attempt may succeed — a row the producer has not committed yet.
    • A delivery whose process died has a limit of its own. An OOM kill or a pod killed mid-job still spends no retry: the job runs again at the same attempt, as in 6.x. But a job whose deliveries end that way three times in a row is dead-lettered without running, where 6.x ran it again every time. See Crashes, and the stall limit.
    • A job a newer release pushed is handed back, not failed. During a rolling deploy, a 7.0 worker meeting a job sealed by a later wire format runs nothing, spends no attempt and puts it back as stored, due a minute later, with a warn; 6.x failed such a job and spent its retries. A job still unread a day after its first hand-back — a rollout that stopped — is dead-lettered, naming both versions.
    • A job ends within its timeout, ten minutes by default: a #[process], #[every], #[cron] or #[after] method running longer declares timeout = "…" covering its longest run, up to "24h". An attempt past its timeout is cut and fails retryably; a job whose commit does not answer within the database’s statement budget plus a second is dead-lettered rather than retried, since its writes may have landed.
    • concurrency = N is accepted again, per method and per replica, and so are throttle(limit, window) and a Checkpoint<S> parameter; see Concurrency and scaling. A #[process] method may take an Attempt — the job’s id and attempt — beside its job.
    • The tenant travels with every job, like the actor: a tenant id threaded by hand into every payload becomes fn tenant_id(&self) -> Option<String> on the claims’ PrincipalIdentity, read with nest_rs::core::current_tenant_id() in the service, in the request and in every job it pushes.
    • Delivery is at least once, so a handler stays idempotent. On Redis a job runs again only once a delivery’s lease lapses — its worker crashed, froze, or was cut off past the lease — and what the first delivery writes after that lands nowhere. See At least once, and the fence.
    • A queue name is checked: 1 to 128 of [A-Za-z0-9_.-]. A name holding : or whitespace no longer compiles, so that queue takes a new name, and its 6.x jobs are drained in step 18 under the old one.

    A scheduled job that should fire on one replica rather than all of them can now say so with replicas = "one", beside RedisScheduleModule: each occurrence fires once across the replicas, and a run that outlasts its period overlaps the next one, fired by another replica. A job is its crate, its type and its method, so renaming one of them starts a new job — two, for the rolling deploy that ships the rename — unless key = "…" pins the identity its boot line names. See Firing once across replicas.

    An event emitted inside a transaction waits for it. EventBus::emit in a mutating request, a GraphQL mutation, a WebSocket message, an MCP operation, a queue attempt, a scheduled tick or a lifecycle hook runs its listeners once the transaction commits — outside it, each listener in a transaction of its own, under the emitter’s scope and ability — and never when it rolls back; 6.x ran them inline, inside it. A listener that relied on writing inside the emitter’s transaction now writes in its own, and code that opens a transaction itself emits after its own commit. See What waits for the commit.

    6.x7.0
    an #[on_event] method logging its own failure and returning ()return Result<(), E>: the bus rolls the call back and reports the error with its chain
    a listener relying on its writes landing one statement at a time#[on_event(transactional = false)]
    a listener running past ten minutes#[on_event(timeout = "…")], at most "24h", or a queue job it pushes
    a cross-cutting concern around jobs written inside every #[process] methodan interceptor bound with #[use_interceptors] on the #[processor] block, reading QueueView (step 10)
    ListenerMethod::wire(container, bus)none: only the boot runs a discovered entry

    A GraphQL operation returning a bare value — i32, Vec<T>, an impl Stream subscription — now runs its resolver’s guards and the app-wide ones, where 6.x served it past a deny-all #[use_guards]. An operation that answered only because of that gap now needs the posture its guards ask for. An operation returning a renamed Result — use async_graphql::Result as GqlResult, or a type alias — is read as one, so its error is a field error where 6.x served it as data.

  15. Boot every app, and read its first lines. A 7.0 boot names what it cannot use rather than falling back in silence. No nest_rs::config warning means no variable under a namespace the app reads went unread, none sits in a .env file beside a config the app pins in code, and none spells such a namespace with other separators, in another case or one misspelled segment away; a namespace nowhere near any the app reads is taken for another binary’s and stays silent, so check the names the app should read against the env-var reference. Every resource the framework opens is proved at boot, each attempt a warn: a Postgres not listening yet, starting or full is waited for within <PREFIX>_SEAORM__CONNECT_TIMEOUT_SECS, a refused login fails at once naming the host and the SQLSTATE; a bucket that does not exist fails the boot naming <PREFIX>_STORAGE__URL, a key the store rejects fails it naming the credential variables, and any other 403, most often a policy refusing the listing, leaves one warn. A deployed profile reaching a backend in plaintext off this machine is one warn per opening and the connection opens all the same: Redis is reached in plaintext outside a dev profile, Postgres is reached in plaintext outside a dev profile and a signal is exported over plain HTTP outside a dev profile; write rediss://, sslmode=verify-full or https:// to close it. A provider declaring a #[liveness], #[readiness] or #[startup] indicator in an app that does not import HealthModule is a warn too — host not served: the health probes are not mounted, with the host, its module and the import that serves it, and so is a host seeded or registered by a hand-written module with nothing importing what its edge runs on — host not served: its edge's transport is not attached, with the host and the import — or an instance of a controller, gateway or MCP host, which those edges do not mount whatever is imported — host not served: its edge does not mount an instance, with the host and a hint to list it. A host the app links but never reaches — a scheduled method, a #[process] method, a listener, a lifecycle hook, a health indicator — is a warn naming its cause and the remedy when it is this app’s own code, and a debug line when it belongs to a dependency (cause="dependency"). A configuration refusal’s first line names the variable it refuses — invalid value for <PREFIX>_HTTP__PORT: … — and a validation failure lists each field beside its variable. The boot’s last line is app ready at info, naming the addresses bound. An HTTP route no guard covers and no #[public] opens, which 6.x served after one unguarded routes detected warning, now stops the boot naming every such route: bind a guard on its controller, the route or the app’s global pool, or mark it #[public] where it is open on purpose. A guard counts only if it identifies or authorizes, by its phase(). A WebSocket message and an MCP operation take the same rule, and a #[public] message or MCP operation behind a guard that authenticates stops the boot, the word having nothing to open.

  16. Regenerate every client from the 7.0 document, and move what it read off the wire:

    • Every problem document names its class in code — INVALID_ARGUMENT, UNAUTHENTICATED, FORBIDDEN, INSUFFICIENT_SCOPE, NOT_FOUND, CONFLICT, RATE_LIMITED, UNAVAILABLE, INTERNAL and the classes of 405 to 426 — and its type is about:blank. An opaque 5xx carries code and no detail, where it said "internal error"; read the code. On WebSocket, the class sits beside the field map: data.code, data.reason, data.requiredScopes, data.retryAfterSeconds where they were under data.errors, which is now the field map alone; on MCP, a pipe’s field map is under error.data.errors, its class at error.data.code; GraphQL reads extensions.code.
    • A GraphQL field error names a field as the schema spells it: extensions.errors.orgId, where it read org_id, at every depth, under the rename rule the input declares. HTTP, WebSocket and MCP keep the name serde reads.
    • A value that does not decode is answered naming where, never what was sent: query parameter `p`: …, form field `p`: …, JSON body at `p`: …, and the same place in a WebSocket frame, an MCP argument refusal and a job’s dead-letter reason. A client matching poem’s or serde’s sentence meets the framework’s.
    • A failed GraphQL field is present as null beside its error, whose path names it; a Non-Null field’s null climbs to its nearest nullable parent, data itself from a root field. A client branching on a missing key reads null.
    • A refusal never hands a client’s value back: a GraphQL error names the argument and the type, an MCP unknown task names no id.
    • A paginated #[crud] list links its next page in Link: </posts?first=20&after=…>; rel="next" (RFC 8288), where 6.x sent the cursor alone in x-next-cursor; follow the link, or read after off its query. The last page has no Link. A stale or mangled cursor answers 400 (a field error on GraphQL) instead of the first page.
    • A #[crud] update is PUT /{id}, where it was PATCH.
    • A route’s document lists what its guards answer: 401 and 503 on an authenticated route, 403 where an ability can refuse, 429 under a rate limit, and security read off the guards.
    • A route’s default tag is its controller’s token — posts, not PostsController — and a #[crud] route no longer takes its entity’s name (Post). A generator grouping by tag renames its classes or files; keep a name with tags("…").
    • An #[expose]d timestamp reads …Z at UTC, where an unmasked route wrote +00:00: one instant, now spelled as a masked route already spelled it. A client parsing RFC 3339 sees no change; one comparing strings does.
    • Sockets close by their standard: a frame past the cap closes 1009 Message Too Big on a gateway and on graphql-ws, where it closed 1011; an admitted upgrade an in-process test drives answers 426; a handshake offering no graphql-ws subprotocol answers 400 naming the two it accepts. A WebSocket envelope is the object { "event": …, "data": … }; an array is refused as no envelope.
    • The GraphQL path answers 405 with Allow — POST for a plain GET with the playground off, POST, GET, HEAD for another method — and a sub-path of it is 404.
    • MCP: a session shared across principals answers 404, as does a DELETE of a session the endpoint does not hold; sessions stored before 7.0 are refused on restore, so their clients open new ones once; a body that is no JSON-RPC message answers 400 with -32700 or -32600, where it answered 415, a message carrying a stray result or error, or a repeated id, among them; an unknown tool answers -32602 under NOT_FOUND. A request naming no session that is no initialize answers 400, where it answered 422; a JSON-RPC response sent with no session answers 400 with -32600, where it was accepted 202. A tool or prompt asking its client for input at 2026-07-28 answers an InputRequiredResult: the peer’s elicit and create_message are refused at that revision.
    • A token endpoint answers RFC 6749 §5.2’s JSON: 401 invalid_client with a Basic challenge for a client refused over the Authorization header, 400 invalid_client for one that sent its credentials in the body or none, 400 invalid_request for a request that does not parse, and 400 invalid_grant for a rejected password; a 503 authentication answer carries Retry-After: 1 at least.
  17. Update the deployment.

    • HTTP has bounds of its own. A replica holds at most <PREFIX>_HTTP__MAX_CONCURRENT_CONNECTIONS open connections, 10 000 by default — WebSockets included: raise it, with the file limit (ulimit -n), for a replica holding more, and keep it at or above a proxy’s upstream cap. An HTTP/2 connection runs at most 200 streams and a header list of at most 16 KiB; on HTTP/1, a head past 64 KiB answers 431. A connection that sends no complete head within <PREFIX>_HTTP__HEADER_READ_TIMEOUT_SECS (30 s) is closed; a kept-alive one idle past <PREFIX>_HTTP__IDLE_TIMEOUT_SECS (75 s) is closed — behind a load balancer whose backend keep-alive is longer (Google Cloud’s is 600 s), set it above the balancer’s (620), or the balancer reuses a connection as it closes and answers 502; a peer that stops reading is dropped after <PREFIX>_HTTP__SEND_TIMEOUT_SECS (60 s).
    • A request runs 20 seconds by default, down from 30 (<PREFIX>_HTTP__REQUEST_TIMEOUT_SECS), counted from its arrival, its body’s reading included; a body that stops arriving answers 408 after <PREFIX>_HTTP__BODY_READ_TIMEOUT_SECS (10 s), or that budget’s 503 when it stops within the budget’s last gap. A WebSocket message and an MCP operation are cut at 20 s too (<PREFIX>_WS__MESSAGE_TIMEOUT_SECS, <PREFIX>_MCP__OPERATION_TIMEOUT_SECS), and a WebSocket connection hook has <PREFIX>_WS__CONNECT_TIMEOUT_SECS and DISCONNECT_TIMEOUT_SECS. Handlers longer than 20 s raise their timeout, the window and the pod’s grace period together. A Redis budget, a statement bound or a storage operation set at 18 s or more under an authentication guard, a queue or a rate limiter is refused at boot: keep it under the 18-second net.
    • MCP sessions are capped: 1 024 per endpoint (<PREFIX>_MCP__MAX_CONCURRENT_SESSIONS, about 110 KiB each), idling out after <PREFIX>_MCP__SESSION_IDLE_TIMEOUT_SECS (five minutes) unused — what the server writes to a session no stream carries is no use, a call waiting on its answer is; a session is served to the principal that opened it alone, and a principal naming no subject opens none on a gated endpoint (initialize answered 403). The graphql-ws socket waits 3 s for connection_init (<PREFIX>_GRAPHQL__CONNECTION_INIT_TIMEOUT_SECS, up to 60, for a client fetching a token first), and caps a message at 64 KiB and a socket at 100 operations (<PREFIX>_GRAPHQL__MAX_MESSAGE_BYTES, <PREFIX>_GRAPHQL__MAX_SOCKET_OPERATIONS).
    • A socket pings a silent peer: a gateway’s and a graphql-ws one send a Ping once the peer has sent nothing for 20 s, and drop a peer that sends nothing back within 20 s more (<PREFIX>_WS__PING_INTERVAL_SECS, PING_TIMEOUT_SECS, and the same under <PREFIX>_GRAPHQL__). Every client answers a Ping as it reads, a browser included; a client that holds a socket without reading it turns the Pings off with 0. An MCP session’s client holding its stream is sent MCP’s ping on it the same way, its session closed when nothing comes back (<PREFIX>_MCP__PING_INTERVAL_SECS, PING_TIMEOUT_SECS).
    • A browser’s Origin is checked at both WebSocket upgrades and at /mcp, CORS on or off: a browser app on another origin is listed in <PREFIX>_HTTP__CORS_ORIGINS, and behind a proxy that terminates TLS or rewrites Host, a same-origin browser is refused until the proxy is listed in <PREFIX>_HTTP__TRUSTED_PROXIES and sends Forwarded or X-Forwarded-Proto and X-Forwarded-Host. With CORS origins set, the server’s own origin is listed too. A * admits every origin; the list is read as origins, so null, a path, a trailing / or a Unicode host fails the boot at that entry — write the ASCII form, https://xn--9ca.example.
    • Server-Timing is off outside development and test: a staging dashboard or a synthetic check reading it sets <PREFIX>_SERVER_TIMING__ENABLED=true.
    • OAuth and OpenTelemetry follow the outbound policy: every <PREFIX>_OAUTH__CLIENT__*_URL of a provider is https, and REDIRECT_URL https — loopback http in a declared development or test profile alone; a provider or an https:// collector signed by a private authority is trusted through <PREFIX>_OAUTH__CLIENT__TLS_CA_CERT or the file OTEL_EXPORTER_OTLP_CERTIFICATE names. A flow begun before the deploy that renames the OAuth transaction cookie to __Host-oauth_tx fails its callback once; the user signs in again.
    • KEDA reads the stream’s length now: a redis-streams trigger on nestrs:queue:{<queue>}:jobs, with streamLength where a list trigger had listLength, counting the jobs waiting and running. A trigger naming the 6.x list reads zero forever. Keep minReplicaCount: 1 on a queue that takes delayed pushes or retries — they wait off the stream, and only a running worker files them back; see On queue depth, with KEDA.
    • An ACL confined to the framework’s prefix now runs every Redis binding, and each page gives its rule whole — the commands a binding sends, those inside its Lua scripts included, since Redis checks them against the caller’s ACL as well: the queue under ~nestrs:queue:*, the rate limiter under ~nestrs:throttler:* and a schedule’s claims under ~nestrs:schedule:*; an app running several gives one user each rule. A dashboard or an ACL written for the rate limiter’s 6.x keys follows it to nestrs:throttler:buckets:*.
    • The rate limiter on Redis counts each bucket under a pseudonym keyed by <PREFIX>_THROTTLER__PSEUDONYM_KEY: set it, the same 32 bytes or more on every replica, or the boot refuses. 6.x’s buckets, named by the client’s address, expire with their window; see Redis, shipped.
    • TLS: rediss:// is verified against the URL’s host, and a Valkey whose certificate chains to an authority only Mozilla’s roots held needs it in the system’s store or in <PREFIX>_REDIS__TLS_CA_CERT; TLS_CERT and TLS_KEY name a client certificate, each with its _FILE form, and #insecure fails the boot — see the Redis variables. Postgres connects with sslmode=verify-full unless sslmode=disable in the URL, or libpq’s PGSSLMODE=disable beside a URL naming no mode, turns it off: allow, prefer, require and verify-ca fail the boot, naming PGSSLMODE where it set one, and a server without TLS needs one of those two written. An authority named in libpq’s PGSSLROOTCERT, which 6.x read, is read as libpq reads it — the root of verification beside a URL naming no sslrootcert — so a server only the system’s store vouches for fails the boot, and a certificate file one of them names that cannot be read fails it at once, naming where it is set.
    • Shutdown ends within bounds you can read. HTTP stops waiting for open connections once <PREFIX>_HTTP__SHUTDOWN_TIMEOUT_SECS runs out, 20 seconds by default, where 6.x waited for every one: a request still running is dropped unanswered and a download is cut, while a stream with no end of its own — an #[sse] stream, an MCP session’s GET stream — ends at the signal, a gateway’s WebSocket closes with 1001 Going Away after the message it is answering, and a graphql-ws socket completes each subscription, then closes the same way. A socket a hand-built self-mount upgraded ends with its handler or the process; half a second more lets what it stopped unwind. The worker hands back what still runs before its drain window closes — 20 by default, down from 30, read from <PREFIX>_QUEUE__SHUTDOWN_TIMEOUT_SECS where 6.x read <PREFIX>_REDIS__WORKER__SHUTDOWN_TIMEOUT_SECS: the window is the queue port’s now, so it survives a backend swap. A running attempt gets all of it but a reserve of one connection budget, so 10 seconds by default to finish where 6.x let it run the whole 30. A scheduled tick still running gets 5 seconds and is then stopped. The shutdown hooks — OnModuleDestroy, BeforeApplicationShutdown, OnApplicationShutdown — then share one 5-second budget, OpenTelemetry’s final flush takes 3 seconds at most, and the console’s 1: 29.5 seconds, inside the 30 Kubernetes grants by default. A window you widen — HTTP’s or the worker’s — needs terminationGracePeriodSeconds at least 9.5 seconds above it plus any preStop delay, which Kubernetes counts inside the grace; a worker pod you gave 45 seconds for the old 30-second drain can keep its drain and its grace, or drop both to the defaults. See the way down.
    • Deregistration is the platform’s: on Kubernetes, give each serving container a preStop hook with the sleep action (Kubernetes 1.30 or later) and raise its grace by as much, since the HTTP transport stops accepting at the signal and Kubernetes removes the endpoint at the same time. See leaving the load balancer first.
    • Operation lines say how each unit ended. A request dropped at the window, or by a client that reset its connection, files its http.request line with outcome="cancelled" and no status or bytes, a handler that panics outcome="panic" with status=500, and a stream ended at the signal outcome="cancelled" beside its status; every other edge files both words too, and an MCP tool that answered isError: true files outcome="error". The request line names its path template (/posts/{id}), not the path; a method outside RFC 9110’s is _OTHER; a WebSocket event no handler serves is _OTHER; user_agent, operation_name and an MCP operation’s name moved to the spans (user_agent.original, graphql.operation.name, mcp.operation.name). A root field files graphql.field, an operation graphql.operation, a lifecycle hook lifecycle.hook. A 5xx is filed once, by the edge: service error surfaced as 500 and token request failed read request failed / request unavailable on nest_rs::http, a handler’s 503 at warn. See the table in Logs.
    • A span says Error for the server’s own failure alone. A ws.message, a graphql.operation, a graphql.field and a graphql.subscription record no error.type and no status for a failure their caller earned, as an HTTP 4xx does not; their line still files outcome="error". An alert counting those spans in Error reads the server’s failures alone, and one meant to count every failure reads the line. No compile error says so.
    • A library’s own lines are clamped. rmcp’s, h2’s, rustls’s, tungstenite’s, sqlx-postgres’s and the OTLP exporter’s lines are written only once RUST_LOG names the library (info,rmcp=info), and that directive writes what the library quotes; see the libraries the framework wires.
    • Every duration has a range, checked at boot whether it comes from the environment or is pinned in code, and a value outside it fails the boot naming the variable — the env-var reference gives each one. Where 0 is off it still is; in code, off is None, and a pinned Some(Duration::ZERO) fails the boot. A value 6.x accepted — a worker drain window of 0 or above an hour, a zero connect timeout or window, a token lifetime past thirty days, a connection ceiling past a day — has to move.
    • Every app that authenticates names its issuer and its audience: <PREFIX>_AUTHN__ISSUER, the issuer its tokens name, and <PREFIX>_AUTHN__AUDIENCE, its own canonical URI — an app that mints and verifies its own tokens names its origin as both. A resource server under OAuthResourceModule reads both off its resource and sets neither, but names its ISSUER when it mints access tokens too. A scaffolded app holds them in apps/<app>/.env for the development and test profiles alone: add <PREFIX>_AUTHN__ISSUER=http://localhost:<port> and <PREFIX>_AUTHN__AUDIENCE=http://localhost:<port> beside an app’s port when it was scaffolded before 7.0, and client_id: "dev-token".to_owned() to the claims its /auth/dev-token route builds.
    • Valkey 9.1, on one server, Sentinel or Cluster — Redis is no longer a supported server, and the scheme of <PREFIX>_REDIS__URL declares the topology: rediss://, rediss-sentinel:// or rediss-cluster:// (see Valkey topologies). Run noeviction on a server holding the rate limiter or the schedule, whose keys carry an expiry; a server holding the queue alone may run a volatile-* policy, never allkeys-*, which can evict a job — see Eviction.
  18. Drain each Redis queue’s 6.x jobs. 6.x kept a queue’s jobs at the root of the keyspace; 7.0 keeps them on a stream under nestrs:queue:{<queue>} and reads nothing 6.x left, so keep the 6.x workers running until those keys are empty — Upgrading queues from 6.x.

  • A GraphQL client leaving a required variable out, $id: ID! with no default, reads Variable "$id" of required type "ID!" was not provided., and the operation runs nothing: it used to run, @skip(if: $x) keeping its selection, @include(if: $x) dropping it, and an argument’s root field alone failing. Send the variable, or declare it a default. A client relying on @skip or @include ignoring a default now reads what its document says.

  • A GraphQL client sending null for a variable its type declares Non-Null, $hint: String! sent null, or [1, null] for $ids: [ID!], reads Variable "$hint" of non-null type "String!" must not be null. (or … must not hold null at "ids[1]".), and the operation runs nothing: a nullable argument read the null, and a mutation ran its root fields. Declare the variable nullable, or send a value.

  • A GraphQL object with no key to answer reads {}, where it read null: { org { name @skip(if: true) } }, or a type condition applying to nothing the value is, { node { ... on Post { title } } } over a Comment. An object selected twice at one place, { org { name @skip(if: true) } org { id } } or two copies one of whose every field failed, reads what each copy selects, where whichever finished first hid the other. A client reading that null as “no object” reads the value’s None alone now.

  • A GraphQL document selecting a list of lists twice at one place with different selections, { grid { a } grid { b } } with grid: [[Cell!]!]!, or two fragments each selecting grid otherwise, answers each cell’s a and b, where it answered one copy’s cells and lost the other’s.

  • A GraphQL type condition on a union spread where a member of it is resolved, { user { ... on SearchResult { ... on User { name } } } } with SearchResult a union holding User, answers the member’s fields, where it answered {}. Spread where a member is resolved among types the union does not hold, it is copied once per member, and nested deep enough reads Query is too complex. once its copies would pass max_complexity.

  • A GraphQL document selecting one key twice at one place with different fields or arguments under different type conditions, { a: user { id } ... on Query { a: org { id } } }, reads an INVALID_ARGUMENT refusal at the copy that differs and runs nothing, where it answered both fields under one key. Give each copy its own alias.

  • A GraphQL document selecting one key twice at one place in two shapes, whichever types its copies are selected on, { search { ... on User { x: name } ... on Org { x: size } } } with name: String! and size: Int!, reads an INVALID_ARGUMENT refusal, the operation selects "x" more than once at one place with different response shapes, at the copy that differs, and runs nothing, where it answered a string for one row and a number for the next. Give each copy its own alias.

  • A GraphQL subscription whose root names other than one field — a second root field, subscription { a b }, one twice, one through a fragment, or one under @skip or @include — reads an INVALID_ARGUMENT refusal, the subscription selects "b" beside "a" at its root, and opens nothing, where it streamed each root field’s items beside the other’s, each copy’s twice, and nothing for a fragment (GraphQL §5.2.3.1). Open one subscription per root field, on one socket.

  • A GraphQL document spreading its fragments again past max_complexity reads Query is too complex. before anything walks it, a __typename at the end of them included, which was answered; so does one whose arguments copy or scan more than twice what the request may carry, max_body_bytes on a POST and max_message_bytes on a graphql-ws socket, a key repeated with thousands of arguments among them. max_complexity: None leaves a fragment’s repeats at ten million. Spread less, or raise the limit, which also holds a score under one that its repeats pass.

  • A GraphQL subgraph whose guards identify no caller, federation: true under a rate limit alone or no guard at all, fails the boot, where it served its SDL through _service to anyone. List a guard identifying the router, an authentication or authorization guard in GlobalGuards or an EndpointGuards<GraphqlView, …>, or, for a subgraph only its router reaches on a private network, open it: federation_sdl: Surface::Open (<PREFIX>_GRAPHQL__FEDERATION_SDL=true).

  • A GraphQL document whose fields below a list read more than 4 KiB of arguments, which each row reads again, query($v: String) { rows { f(x: $v) } } with a large $v, reads Query is too complex. and runs nothing, where every row copied the value. Read the value once, on a root field or one only objects stand above, or raise max_list_argument_bytes (<PREFIX>_GRAPHQL__MAX_LIST_ARGUMENT_BYTES), None or 0 to turn it off.

  • A GraphQL document holding a fragment no operation spreads reads Fragment "F" is never used for the first in its text alone, where validation listed each beside the document’s other errors. It was refused either way.

  • A Data type a resolver reads off its Context and its request does not hold answers the opaque internal error, the type filed at error, where the client read Data `…` does not exist. A loader read so whose owner the app does not import moves to a &DataLoader<L> parameter, and its boot says which import.

  • A guard declaring a status outside 400 to 599 in denial_statuses refuses the boot, naming the guard and the status: list what its Err paths answer, an error each.

  • A (StatusCode, Json<T>) route whose T has no schema does not compile (E0277), as a bare Json<T> route does not: derive it with #[output].

  • A client generated from /api-json reads 2XX where it read 200 on a route whose status the handler computes, new responses on every operation, and a text or bytes body where it read none: a generated type naming 200 for one moves, or the route says #[http_code(200)] where its status never varies.

  • McpSetup::from(x), StaticFilesSetup::from(x), OAuthResourceSetup::from(x), or .into() to one of them, does not compile (E0277): a setup has one way in, so write McpModule::for_root(x), which takes the same value.

  • A lone Redis binding over a seeded RedisConnection now reads the RedisConfig of the module it imports, so a suite with <PREFIX>_REDIS__URL unset is refused naming the variable: seed the RedisConfig beside the connection.

  • An import of Scoped from an edge, of rmcp’s macros or types from nest_rs::mcp’s root, an McpIdentity setter, of wire_enum from nest_rs::resource, or of an item through a module nest_rs::core or nest_rs::social no longer opens fails to compile (E0432, E0599): steps 5 and 12 list each with what replaces it. #[wire_enum(graphql)] or #[expose(..., graphql)] without the graphql feature fails naming the feature to add.

  • An McpIdentity stating a name with no version behind it, or a version, a title, a description, a website or icons with no name behind them, refuses the boot in a process no #[nest_rs::main] started, naming the literal to write; the binary fills both anywhere else.

  • A bare #[interceptor], or stage = handler, does not compile: #[interceptor] declares what a module brings around the guards and takes `stage = unit` , then where the other goes. #[injectable] on the struct and GlobalInterceptors<(I,)> in the providers of the module main boots (step 10); one that must see a refusal or a 404 is #[interceptor(stage = unit)].

  • A type in a pool no decorator makes a provider does not compile: `X` is not a provider a module or an app-wide pool can register, where the pool names it. #[injectable] on it, or a Discoverable impl.

  • A singleton provider of the root injecting a layer only a pool lists fails the boot with UnbuiltProviderError: only an app-wide pool's declaration lists it … list it in `AppModule`'s `providers` . A module injecting one fails the access graph, naming the root as the owner: list the layer in a module both reach.

  • A pool naming a layer whose module the root does not import boots now, where it was refused: the pool registers the layer as the root’s, from what the root reaches. Import the module when you meant its provider and its configuration.

  • A suite calling app.bearer(…) on an app booted without .ephemeral_signing_key() panics naming the builder call; 7.0’s bearer signs with a key of the test’s own, never the app’s. The key on an app that provides no JwtService, or one whose JwtService the suite seeded, refuses the boot.

  • A binary whose main installs no exporter, run where the deployment sets OTEL_EXPORTER_OTLP_ENDPOINT (or a signal’s own endpoint) — a platform injecting it into every pod included — fails App::run before serving, naming the variable and the line to add: 6.x booted it and exported nothing. Add let _otel = OpenTelemetry::init()?; to main, or set OTEL_SDK_DISABLED=true where that binary exports nothing. A suite, which boots without run, is never refused.

  • A .env file or a deployment still setting <PREFIX>_LOG filters nothing: the console logs at info, or at what RUST_LOG says, and says once at warn on nest_rs::app that the variable is read by nothing (variable read by nothing since 7.0, read_as naming RUST_LOG). Rename it RUST_LOG (step 3).

  • nestrs g migration create_posts — or create_post — after nestrs g resource posts writes nothing: a migration creates the table `post` already: `crates/migrations/src/m…_create_posts.rs` . The resource wrote it; a change to the table takes a name of its own.

  • nestrs g resource posts after nestrs g migration create_posts writes nothing either: the same sentence, then the two ways through — that migration removed with its two registrations, or the feature and its entity written alone.

  • A deployment still setting <PREFIX>_OPENTELEMETRY__* exports nothing through it: OpenTelemetry::init names each such variable once at warn on nest_rs::opentelemetry (variable read by nothing since 7.0, read_as naming the specification’s variable that replaced it). Set the OTEL_* of step 3. An OTEL_EXPORTER_OTLP_PROTOCOL other than http/protobuf fails the boot naming it.

  • An OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER or OTEL_LOGS_EXPORTER naming an exporter nestrs does not build — console, zipkin, prometheus, a misspelling — fails OpenTelemetry::init with invalid value for OTEL_TRACES_EXPORTER: must name otlp, …, naming the variable and never its value; so do none beside otlp, otlp named for a signal no endpoint reaches, and, in a binary built without the otlp feature, any value but none. 6.x read none of them: a deployment that set one for another service’s sake unsets it, or sets none. none and OTEL_SDK_DISABLED=true are honoured, so a signal they switch off exports nothing, and the boot line says off (OTEL_TRACES_EXPORTER=none).

  • An OpenTelemetry variable nestrs cannot honour fails OpenTelemetry::init naming it and never its value: OTEL_EXPORTER_OTLP_COMPRESSION other than gzip or none (zstd included), OTEL_PROPAGATORS other than tracecontext,baggage (b3, jaeger, none, or one of the two alone), OTEL_TRACES_SAMPLER naming a sampler the SDK does not build (xray, jaeger_remote, a name not in lowercase), OTEL_TRACES_SAMPLER_ARG outside 0 to 1, an OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE other than cumulative, delta or lowmemory, and OTEL_CONFIG_FILE. 6.x read none of them: unset it, or set what the sentence accepts.

  • OTEL_EXPORTER_OTLP_HEADERS beside an http:// endpoint on another host fails the boot naming both variables, since the collector’s credential would cross the network in clear; so does such an endpoint carrying a query, naming the variable that set it. Export over https://, or to a collector on loopback (localhost, 127.0.0.1, [::1]), which keeps receiving both, dialled past any proxy the environment names.

  • A number the SDK reads that is not a whole number — an OTEL_BSP_* or OTEL_BLRP_* setting (digits alone, as the SDK reads them), a span limit or OTEL_ATTRIBUTE_COUNT_LIMIT, an export timeout or OTEL_METRIC_EXPORT_INTERVAL — fails OpenTelemetry::init naming the variable, where the SDK kept its default in silence. Write it in milliseconds, or as a count, or unset it.

  • Userinfo in an OTLP endpoint (https://key@collector:4318), which no request carries, fails the boot naming the variable or the pinned otlp_endpoint, over https:// and to loopback too: the collector never saw the credential, and answered 401. Move it to OTEL_EXPORTER_OTLP_HEADERS (authorization=Basic%20…).

  • A query on OTEL_EXPORTER_OTLP_ENDPOINT (or the pinned otlp_endpoint) fails the boot naming it: the signal’s path landed inside the query, and the export at the collector’s root. Set each signal’s own endpoint with its query (OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, …), used as given, or move the parameter to a header.

  • A headers pair the SDK dropped in silence — no =, an empty key or value, a name no header may carry — fails the boot naming the variable; and a signal’s own headers variable set empty now reads as unset, so the general OTEL_EXPORTER_OTLP_HEADERS reach that signal too, as the specification orders.

  • OTEL_RESOURCE_ATTRIBUTES is percent-decoded, as the resource specification writes it: a % meant literally is written %25, and a member with no =, an empty key or an escape that does not decode fails the boot naming the variable, where the SDK dropped the member or exported the escape as written.

  • A batch processor’s queue or batch size of 0, or a batch above its queue (OTEL_BSP_MAX_EXPORT_BATCH_SIZE above OTEL_BSP_MAX_QUEUE_SIZE, 2048 when unset; the OTEL_BLRP_* pair alike), fails the boot naming the variable: a queue of none dropped every span or log record, and the SDK lowered the batch to the queue in silence. Write a positive size, the batch at most the queue.

  • An OTEL_BSP_SCHEDULE_DELAY or OTEL_BLRP_SCHEDULE_DELAY of 0, on which the SDK’s worker polled its channel without pause, a core per processor, or an OTEL_BSP_MAX_QUEUE_SIZE or OTEL_BLRP_MAX_QUEUE_SIZE above 1,048,576, which the SDK allocates whole when the processor starts, fails the boot naming the variable, the queue’s sentence saying what the ceiling costs. Write a delay of 1 ms or more, and a queue within the ceiling.

  • A zero export timeout is no limit now, as the specification reads it: the processor’s bound (OTEL_BSP_EXPORT_TIMEOUT, OTEL_METRIC_EXPORT_TIMEOUT, OTEL_BLRP_EXPORT_TIMEOUT, 30 s by default) cuts the export, where a zero cut every export before it was sent. Both at zero fail the boot naming them: set one to a bound in milliseconds.

  • A blank OTEL_SERVICE_NAME, an empty or blank service.name in OTEL_RESOURCE_ATTRIBUTES, or an empty or blank pinned service_name fails the boot naming it, where the app exported under the blank name. Write the service’s name, or leave it unset for the binary’s. A binary built without the otlp feature holds to it too, and fails on an OTEL_RESOURCE_ATTRIBUTES that does not read.

  • A filter on an OpenTelemetry variable does not hold what it must reads an OpenTelemetry variable is passed over now, its expected field reason; it names, too, each specification variable this build serves nowhere (OTEL_LOG_LEVEL, OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, …).

  • A pipeline stripping colour escapes from a text console finds none: the console colours a terminal alone, and NO_COLOR off one.

  • A binary built without the otlp feature with an endpoint set — OTEL_EXPORTER_OTLP_ENDPOINT, a signal’s own, or a pinned otlp_endpoint — fails the boot naming it and the feature, rather than export nothing in silence. Build it with the umbrella’s opentelemetry feature, or switch the signal off (OTEL_TRACES_EXPORTER=none, or OTEL_SDK_DISABLED=true).

  • A filter matching the boot line’s traces=off (no endpoint) reads traces="off (no endpoint)" on a text console now; JSON is unchanged.

  • A log setting pinned through OpenTelemetry::init_with — a log_filter, log_format or log_source_location in the config it takes — gives way to RUST_LOG, <PREFIX>_LOG_FORMAT or <PREFIX>_LOG_SOURCE_LOCATION where one is set, the .env cascade’s included, where 6.x kept the pin. Leave the variable unset where the pin must hold.

  • A client comparing the OpenAPI document’s info reads the binary’s package name and version in info.title and info.version, where 6.x published nestrs API and 0.1.0; pin <PREFIX>_OPENAPI__TITLE and VERSION to keep others. An MCP endpoint nobody named reports the binary’s name and version where it reported rmcp’s.

  • A hand-written impl Config left beside #[config] fails to compile, conflicting implementations of trait Config (E0119): delete it, or say from_env = "manual". A field whose type no reader reads names the one it needs (Duration is read through its bounds, #[config(bounds = …)]), a field named for a unit (window_secs) names the field it should be, a DurationBounds::secs given a key and a path fails to compile (two arguments, not four), a range on a type no range holds names the five that are (Duration, Option<Duration>, usize, u32, Option<usize>), and a range of the other kind is refused at its name in the attribute, expected CountBounds, found DurationBounds. A #[config(count)] of a 6.x-style config fails to compile naming what replaced it, #[config(bounds = RANGE)] with a CountBounds on the Option<usize>; ConfigService::count is gone with it, and an Option<usize> pinned at Some(0) with its variable unset fails the boot: unlimited in code is None.

  • An associated constant of your own named for a field — const PORT on a #[config] with a field port — fails to compile, duplicate definitions with name PORT: #[config] binds every field to the constant named for it. Rename yours.

  • A count past its ceiling fails the boot naming the variable and the range, from the environment or pinned in code, never quoting the value: a deployment setting one past it has to move, or turn the limit off where 0 does that. <PREFIX>_HTTP__MAX_BODY_BYTES runs to a tebibyte; <PREFIX>_MCP__MAX_REQUEST_BODY_BYTES, <PREFIX>_WS__MAX_MESSAGE_BYTES and <PREFIX>_GRAPHQL__MAX_MESSAGE_BYTES to a gibibyte; <PREFIX>_MCP__MAX_CONCURRENT_SESSIONS to 1048576, a million idle sessions holding over 100 GiB; <PREFIX>_GRAPHQL__MAX_DEPTH to 33, past which async-graphql’s own recursion bound refuses the document anyway; <PREFIX>_GRAPHQL__MAX_COMPLEXITY to ten million; <PREFIX>_GRAPHQL__MAX_BATCH_SIZE to 1024; <PREFIX>_GRAPHQL__MAX_SOCKET_OPERATIONS to ten thousand; <PREFIX>_GRAPHQL__MAX_REPRESENTATIONS to a hundred thousand; <PREFIX>_THROTTLER__LIMIT to a billion, and at least 1, where 0 used to boot and deny every request; <PREFIX>_SEAORM__MAX_CONNECTIONS and MIN_CONNECTIONS to 262143, Postgres’s own ceiling, MAX_CONNECTIONS at least 1.

  • <PREFIX>_SEAORM__MIN_CONNECTIONS above MAX_CONNECTIONS fails the boot naming both, where sqlx clamped it in silence and kept fewer idle than asked for.

  • A deployment still setting <PREFIX>_HTTP__CORS_MAX_AGE sends no Access-Control-Max-Age: the boot says it at warn as retired (variable read by nothing since 7.0), read_as naming CORS_MAX_AGE_SECS.

  • A deployment still setting a security header’s flat key (<PREFIX>_HTTP__HSTS, <PREFIX>_HTTP__CONTENT_SECURITY_POLICY, …) fails the boot as retired, naming the key it became — <PREFIX>_HTTP__CONTENT_SECURITY_POLICY is read by nothing since 7.0 — set <PREFIX>_HTTP__SECURITY_HEADERS_CONTENT_SECURITY_POLICY: …: read by nothing, it would have left the header to its default, and a Content-Security-Policy, Permissions-Policy or Cross-Origin-Embedder-Policy it set not sent at all. One still setting CORS_EXPOSED or the bare SECURITY_HEADERS has the default in its place — the exposed list empty, every default-on header sent, both more closed than what it set — and the boot says each at warn as retired, read_as naming CORS_EXPOSED_HEADERS and SECURITY_HEADERS_ENABLED. Move each to its row in step 3.

  • ConfigModule::for_feature left in an import list fails to compile; a config no provider of an imported module injects is no longer loaded — read it through a provider, or queue it from the module’s collect.

  • X::for_root(None) left in an import list fails to compile — for_root takes the value it pins, expected XConfig, found Option<_> — and so does RedisModule::for_root((Cache, None)): write the bare import, X or RedisModule::<Cache>, which reads the same variables.

  • ConfigModule::for_root() left in an import list fails to compile (no function or associated item named for_root): delete the line, nothing replaces it. A process declaring no <PREFIX>_ENV still says so once at info, in every app that reads a config — apps nestrs new scaffolded included, which never said it in 6.x. An app that reads no config gets no Environment: a provider injecting it, or a test overriding it, is refused at boot naming the type — read Environment::from_env() there.

  • async_trait or input imported from an edge — nest_rs::http, ws, graphql, guards, queue or mcp — fails to compile:

    Terminal window
    error[E0432]: unresolved import `nest_rs::http::async_trait`

    Import it from nest_rs::core, its one path, or through nest_rs::prelude::*; nest_rs::guards::prelude is gone the same way, and nest_rs::opentelemetry::LogFormat is nest_rs::core::logging::LogFormat.

  • A provider still injecting Arc<dyn JobProducer> fails the boot: no binding registers a backend’s contract any more, and the refusal names the handle to inject, Arc<nest_rs::queue::Jobs>. A push still passing a third argument, JobProducerExt imported, or push_json fails to compile: the handle’s push takes the marker and the job, push_with the options too.

  • McpOptions, or posture: Posture::InBand on it, fails to compile: McpModule::for_root takes an McpIdentity, an McpAccess or an McpConfig, alone or as a tuple, and McpAccess has Public alone: a gated endpoint is the bare import, McpModule.

  • A value breaking its type’s rules that 6.x let through, because no Valid wrapped its parameter, is now refused at the edge that decodes it: 400 validation failed with its errors on HTTP, a field error under INVALID_ARGUMENT on GraphQL, an error frame on WebSockets, invalid_params on MCP, and a job dead-lettered at once. A service that validated such an input itself no longer sees it, and its ServiceError::Validation, which 6.x answered 422, answers 400 wherever it is still raised: one mistake, one status, whoever checks it. 422 stays ServiceError::Invalid’s, a well-formed value the service refuses on business grounds. Keep validate() only where the service builds the input — from a provider’s profile, a seed.

  • A #[crud] block that left create or update out, over a service that implements Creatable or Updatable, serves that write once its keys are dropped, with no compile error: POST and PUT on a controller, createX and updateX on a resolver, each behind the block’s guards and the caller’s grants. List ops with the operations it served to keep the write closed.

  • A #[controller] or #[resolver] injecting one type in two fields fails to compile at the second field (`again` injects `UsersService`, which `svc` already injects): both held the one instance the container provides. Two fields spelling the type two ways (UsersService and users::UsersService, or an alias), or under two cfgs that both hold, fail at the struct’s decorator with rustc’s E0119, conflicting implementations of trait …::Injects<UsersService>. Keep one field.

  • A GraphQL #[crud] resolver named apart from its wire type answers new field names with no compile error: the names come off the resolver’s name (AlbumsResolver → albums), where they came off output = (PagedAlbum → pagedAlbums), and a client asking the old field gets Unknown field. Name the resolver after its resource, or write the operation by hand under the name the client asks.

  • A #[crud] host named in the singular over a noun ending in s reads its resource as that noun without the s: StatusResolver serves statu and status, where output = Status gave status and statuss, and StatusController documents List Statu. Name the host in the plural, as a module is (StatusesResolver → status, statuss), or write the operation by hand under the name the client asks.

  • A Create grant the create cannot complete — an org-wide Manage that lets a caller who authors nothing reach an insert whose author no grant pins — answers the insert’s NOT NULL violation as a 500, filed at error on nest_rs::orm. Grant Create only where the grants pin every column the server owns, and Update and Delete beside it where Manage stood.

  • An HTTP-only guard in the global pool whose decision moved into check runs it at every GraphQL field, WebSocket message and MCP operation too, where HttpView::of(cx)? refuses each with the opaque 500: the edge files every refusal at error (guard denied …, status=500), its guard field naming the guard and its error chain the edit. Keep its decision in check_http and admit the units in check (Ok(())).

  • An Ambient<T> no guard attached on a resolver, a message handler or a tool — the value an authentication guard attaches, read on an operation the guard never reached — answers the edge’s opaque internal error, and the type is filed once at error (graphql operation failed, websocket message failed, mcp operation failed, its error field naming the type). Attach it at the request — EndpointGuards<…>, the gateway’s guards — or on the operation. A principal a guard there produces, read on a #[public] operation by a caller it did not identify, is that caller’s UNAUTHENTICATED instead: read nest_rs::core::ambient::<P>() where the operation serves a visitor too.

  • A global guard whose decision is a unit’s alone — a field’s, a message’s, an operation’s, written only in check — now runs it on every request too: every route, the WebSocket upgrade and the /graphql and /mcp requests answer its refusal (a 403, or the 500 of a guard reading a view the request does not have), filed once on the guard’s target. Admit the request in its check_http (Ok(())) where its decision is the unit’s alone, or write its decision so it holds for a request too.

  • A domain error keeping its ResponseError beside its ToProblem fails to compile:

    Terminal window
    error[E0119]: conflicting implementations of trait `ResponseError` for type `PostError`

    Delete the ResponseError impl: the ToProblem one answers on HTTP too, by ? as from a route. A ? on an anyhow error or a StatusCode in a body answering nest_rs::http::Result<T> fails to compile with E0277 (? couldn’t convert the error): write .opaque()?, or HttpError::from_status(status).

  • A route 6.x served unguarded stops the boot:

    Terminal window
    Error: routes no guard identifying a caller covers and none marks `#[public]`: POST /thing (create), GET /thing (read) — a route runs such a guard or is open on purpose; list `GlobalGuards<(...)>` in the providers of the module the app boots, bind `#[use_guards(...)]` on a controller or a gateway, `EndpointGuards<View, (...)>` on an endpoint carrying units, or open it on purpose: `#[public]` on a route, a message or a GraphQL operation, `McpModule::for_root(McpAccess::Public)` on an MCP endpoint. A guard that identifies no one, a rate limit or one of your own declaring no `phase()`, covers nothing: declare its `GuardPhase::Authentication` or `Authorization`, or write `#[public]`

    Bind a guard where the route should be closed, and write #[public] where it is open on purpose.

  • A route under a rate limit alone, or under a guard of your own declaring no phase(), stops the boot the same way, as does a message under an upgrade running no other guard, an operation under such a /mcp, a hand-written MCP handler there and a gated self-mount:

    EdgeWhat stopsWhat boots
    HTTP#[use_guards(ThrottlerGuard)] or GlobalGuards<(ThrottlerGuard,)> and no posture#[public] on the route, or an authentication guard beside it
    WebSocketa message under ThrottlerGuard alone, at the upgrade or beside it#[public] on the message, or an authentication guard at the upgrade
    MCPan operation of a gated /mcp under ThrottlerGuard alone#[public], a guard of its own declaring its phase, or an authentication guard at the request
    GraphQLnothing new: its posture is already mandatory—

    Write GuardPhase::Authentication or Authorization on a guard of your own that does gate.

  • A class gate no ability guard reaches stops the boot, on every edge, for #[authorize] and #[public(Action, Subject)] alike. It answered 500 on every call:

    Terminal window
    Error: PostsController::list declares a class gate (`#[authorize]` or `#[public(Action, Subject)]`), and no guard in its chain or at its request attaches the ability the gate reads, so every call would answer `500`: bind `AbilityGuard` over your `AbilityFactory` with `#[use_guards]`, `GlobalGuards<(...)>` or, on an in-band endpoint, `EndpointGuards<View, (...)>`

    Bind AuthzGuard where the message says. A guard of your own that delegated to AbilityGuard stops: list AuthzGuard in the chain beside it, the one guard the boot reads as attaching the ability.

  • A gated unit whose AuthzGuard sits at the unit alone — a resolver’s, a message’s, an MCP host’s — stops the boot, an opened MCP endpoint’s operations under the pool among them: an #[authorize] operation, message or tool, one stating no posture, and a #[field_resolver] of a resolver binding the guard. The guard builds an ability for a #[public] unit only; a gated one reads what its request attached, so every call answered 401:

    Terminal window
    Error: query posts declares `#[authorize]`, and `AbilityGuard<AuthzAbility>` at the unit reads the ability its request attached, building one on a `#[public]` unit alone: no guard ahead of it or at its request attaches it, so every call would answer `401` — …
    Error: ShelvesResolver.label is gated by its guards alone, and `AbilityGuard<AuthzAbility>` at the unit reads the ability its request attached, …

    Bind AuthzGuard at the request too: EndpointGuards<GraphqlView, (AuthnGuard, AuthzGuard)> or EndpointGuards<McpView, (…)>, GlobalGuards<(…)>, or the gateway’s #[use_guards] for a WebSocket message; or say #[public(Action, Subject)] where an #[authorize] unit serves a visitor. A field resolver reads what the /graphql request attached, never what its root field built. At an endpoint McpAccess::Public opens, whose request runs no guard, the refusal says so: declare the tool #[public], or #[public(Action, Subject)] to keep a gate, or stop opening the endpoint.

  • An in-band chain listing authentication after authorization stops the boot, on a GraphQL field, a WS message and an MCP operation, reading its request’s chain ahead of its own. List the authentication guard first, or declare the phase of a guard of your own that attaches no principal as what it is.

  • A router answered UNAUTHENTICATED on _service or _entities: an anonymous caller no longer reads them under an AuthnGuard. Present a token. _service runs the pool and now each guard of EndpointGuards<GraphqlView, _> that identifies or authorizes a caller; _entities under EndpointGuards alone is still each #[entity]’s posture.

  • A router answered INTERNAL on _service, with guard denied the federation field at error on nest_rs::layers, its error chain naming check_http: a guard your EndpointGuards<GraphqlView, _> lists declares GuardPhase::Authentication or Authorization and reads the request in check, which now runs there. Move the decision to check_http, and write Ok(()) in check (Federation).

  • A #[public] read answering nothing, 200 [] on HTTP and an empty value in band, with no ambient Ability outside a worker job — denying all rows at warn on nest_rs::orm: the unit names no read. Write #[public(Read, Entity)]:

    EdgeBeforeAfter
    HTTP#[public], _authz: Authorize<Read, E>#[public(Read, E)]
    GraphQL#[public]#[public(Read, E)], each column a grant withholds #[expose(nullable)] or an Option
    WebSocket#[public], #[use_guards(AuthzGuard)]#[public(Read, E)], the guard kept
    MCP#[public] on an opened /mcp#[public(Read, E)], each column a grant withholds #[expose(nullable)] or an Option
  • Authorize<…> is not a handler parameter, E0277 on a route keeping the parameter: the error names #[public(Action, Subject)].

  • A gateway or an MCP endpoint whose guards authenticate, still saying #[public] on a message or an operation, stops the boot, naming the guard:

    Terminal window
    Error: the `nest_rs::ws::gateways` wiring failed: `#[public]` on history of the gateway at /ws can open nothing: its upgrade runs `AuthnGuard`, so a caller with no credential never reaches a message — drop `#[public]`, the guards covering a message deciding it (`#[authorize(Action, Subject)]` adds a gate), or take that guard off the upgrade to open the gateway

    Drop the word; the guards cover the unit. Under the app’s pool the sentence says to move the guard from the pool onto the hosts it should cover, no gateway opening beneath it. #[public] on a gated /mcp with no guard at all stops it too, naming McpModule::for_root(McpAccess::Public).

  • A #[public] dropped from a message no guard covers, or from an operation of an endpoint McpAccess::Public opens, stops the boot, naming every such unit: keep the word where the gateway or the endpoint is open on purpose, or bind a guard.

  • A gateway with no guard at its upgrade whose messages each bind their own, or one declaring hooks alone, stops the boot: any caller connects and its hooks run. Bind a guard on the gateway or the pool, or say #[public] on the message open on purpose.

  • A guard declaring expected_principal beside an authentication guard of your own that declares no produced_principal stops the boot, naming both the guard and the type. Declare it on the guard attaching it, or or_visitor() where the guard does without.

  • A client branching on FORBIDDEN for a visitor’s call to a field whose guard reads the principal now reads UNAUTHENTICATED, the class a missing credential answers everywhere. On HTTP, a #[public] route with such a guard answers 401, not 500.

  • A GraphQL client reading a FORBIDDEN’s extensions.fields reads each as the schema spells it, workStatus where it read work_status. A scalar’s keys stay what it reads in the scalar.

  • A #[field_resolver] answering an #[expose]d wire type, whatever holds its rows, reads null in each column the caller’s .fields grant withholds, where 6.x served it, and a row judged for another caller, or built where no ability is attached, answers INTERNAL with one line per operation, as a root and a relation do. A body reading a row out of a loader reads None where the grant withholds a column: a loader answers judged rows. A #[field_resolver] whose parent answers no one — a row kept from another request, one the caller may not read — refuses before it runs, INTERNAL or FORBIDDEN, where it derived a scalar from the parent’s columns.

  • A subscription item that is a list keeps the rows that answer the subscriber, where it passed whole.

  • A WebSocket #[on_connect] or #[on_disconnect] going through Repo fails closed, a read and a by-id write alike, and current_ability() answers None there: no posture stands before a hook, so the ability the upgrade attached stays off its reads. The principal stays readable. Read what a client should see in a message whose posture names it; a hook’s system write is Repo::insert_unscoped, a visible line.

  • use_guards_global, use_pipes_global, use_interceptors_global or use_exception_filters_global left in main fails to compile (no method named use_guards_global found for struct AppBuilder): list the pool in the module main boots. Listed by a feature’s module instead, the boot refuses:

    Terminal window
    Error: the `GlobalGuards` wiring failed: `GlobalGuards<(TenantGuard,)>` is listed by `BillingHttpModule`, a module the app imports: the app-wide guard pool is declared by the module the app boots — list it in `ApiModule`'s providers
  • A transient guard, pipe, interceptor or exception filter in the app’s pool booted in 6.x, built once and shared by every request. Its declaration now fails the boot, as a transient layer on a job does:

    Terminal window
    Error: scope violation: `TenantGuard` is bound by `GlobalGuards<(TenantGuard,)>` (in module `ApiModule`), which resolves its layers once, at boot, and is request-scoped or transient — a request-scoped `TenantGuard` would never be built there, and a transient one would be built once and shared by every run. Make `TenantGuard` a singleton.

    Drop scope = transient from its #[injectable]: the pool holds one instance either way.

  • App::new::<M>() fails to compile: boot with App::builder().module::<M>().build().await.

  • An app’s suite pushing inside a unit no longer files the job on Redis: the harness armed the outbox, so the job waits in the test’s database until a relay the test spawns files it. A suite whose database lacks the outbox’s table now fails its boot naming nestrs g migration nestrs_outbox, as the binary does.

  • A variable kept under its 6.x name is read by nothing, and the boot says so once per variable, at warn, before a missing required value stops it. The demo’s assistant, started with a 6.x .env:

    Terminal window
    WARN nest_rs::config: variable read by nothing since 7.0 variable="NESTRS_OAUTH_RESOURCE__AUTHORIZATION_SERVERS" namespace="oauth__resource" read_as="NESTRS_OAUTH__RESOURCE__AUTHORIZATION_SERVERS"
    WARN nest_rs::config: variable read by nothing since 7.0 variable="NESTRS_OAUTH_RESOURCE__RESOURCE" namespace="oauth__resource" read_as="NESTRS_OAUTH__RESOURCE__RESOURCE"
    WARN nest_rs::config: variable read by nothing since 7.0 variable="NESTRS_OAUTH_RESOURCE__SCOPES_SUPPORTED" namespace="oauth__resource" read_as="NESTRS_OAUTH__RESOURCE__SCOPES_SUPPORTED"
    Error: authentication failed: NESTRS_OAUTH__RESOURCE__RESOURCE (or NESTRS_OAUTH__RESOURCE__RESOURCE_FILE) must name this deployment's canonical URI (for example https://api.example.com)

    Rename what the read_as names, every row of step 3 said the same way. The report, and what it leaves silent, is described under Variables nothing reads.

  • A module listing an edge’s host, in a binary not meant to serve that edge, now serves it, because the host brings what its edge runs on: a binary reaching a module that lists a controller listens on <PREFIX>_HTTP__PORT, and one reaching a #[process] host with no queue backend bound fails the boot naming RedisQueueModule. Keep a host in its adapter (users/http/), never in the port (users/), and import the adapter only in the binary serving that edge. An app run with no transport at all files app serves nothing: no transport is attached at warn and stops once its init hooks ran, for StopCause::NoTransport, where it said app ready transports="" then drained for TransportFailed.

  • An app importing GraphqlModule, HealthModule, OpenApiModule, McpModule, StaticFilesModule or OAuthResourceModule without HttpModule now serves HTTP: each imports it, so the binary listens on <PREFIX>_HTTP__PORT. A worker serving /health with no HTTP line of its own opens that port.

  • A .env key beside a config the app pins in code reaches nothing — the pin takes its whole namespace off the cascade — and the boot names it once, at warn, with the import that pinned it. An app still pinning its port:

    Terminal window
    WARN nest_rs::config: config variable from the .env cascade shadowed by a config pinned in code; export it into the real environment, or set it in the pin variable="NESTRS_HTTP__CORS_ORIGINS" namespace="http" pinned_by="`HttpModule::for_root(..)` at `imports[4]` of `ApiModule`"

    Pin nothing — drop the root’s HttpModule::for_root(..), a listed controller brings HttpModule bare — and write the port in the app’s own apps/<app>/.env, or move the key’s value into the pin.

  • The worker’s drain window kept under <PREFIX>_REDIS__WORKER__SHUTDOWN_TIMEOUT_SECS is said retired at warn, read_as naming <PREFIX>_QUEUE__SHUTDOWN_TIMEOUT_SECS, by a boot reading the queue’s config, and the drain runs on what for_root pins, or the default.

  • A redis requirement of yours that excludes 1.8 — =1.7 — fails to resolve beside the framework’s =1.8 pin, cargo naming both requirements.

  • A manifest naming a removed feature — worker, interceptors, filters, exception-filters — fails to resolve, naming the feature nest-rs does not have; an import of RedisQueueModule under redis alone fails to compile, its note naming the queue feature, which redis-queue turns on.

  • A process that declares no environment runs as production: its boot files no environment declared; running as production, and each development convenience it relied on is refused naming its variable (<PREFIX>_STORAGE__ALLOW_HTTP, a loopback http redirect or resource).

  • A config still naming the second base fails to compile: ..T::defaults() has no such function, #[config(defaults = …)] is an unknown #[config] argument, a fn defaults() in an impl Config is no member of the trait, and a surface written as a bool is a type mismatch against Surface. Production’s behaviour does not move, but a pin over ..Default::default() under development or test now keeps what the profile opens, so a suite asserting a surface closed there fails until it writes Surface::Closed.

  • A program reading a log format back compiles and takes the other branch: LogSettings::from_env()?.format and OpenTelemetryConfig::from_env()?.log_format are LogFormat::ByProfile when <PREFIX>_LOG_FORMAT is unset, so format == LogFormat::Json, or a match with its _ arm, takes the text branch in production, with no error. The question to ask is format.writes_json().

  • A run relying on the framework’s development Redis or store — the loopback, the dev container’s RustFS — fails its boot naming <PREFIX>_REDIS__URL, <PREFIX>_STORAGE__URL or <PREFIX>_STORAGE__ACCESS_KEY, in every profile: name them in .env.development and .env.test.

  • A .env.development still setting <PREFIX>_GRAPHQL__EMIT_SDL or <PREFIX>_OPENAPI__DOCUMENT_PATH is read by nothing, and the boot says each retired at warn, read_as naming its EMIT or EMIT_PATH; the development run writes schema.graphql and openapi.json beside the app’s Cargo.toml anyway. A path the old key gave relative to the workspace root, kept under the new name, now lands under the app crate: drop it, or make it relative to the app.

  • A process still setting <PREFIX>_GRAPHQL__DISABLE_INTROSPECTION fails its boot — … is read by nothing since 7.0 — set <PREFIX>_GRAPHQL__INTROSPECTION: … — inline or as a file: its successor is its opposite, so a rename by hand inverts it, and read by nothing, true would leave introspection answering under a development profile. In a .env file under a GraphqlModule::for_root(cfg), the pin holds the policy and the file reaches nothing, so it is said retired at warn instead. <PREFIX>_GRAPHQL__INTROSPECTION=true opens it, and a deployment’s boot says so at warn.

  • A configuration refusal opens on the variable it refuses — invalid value for <PREFIX>_HTTP__PORT: … — and a validation failure lists each field beside its variable, client_id (<PREFIX>_ISSUER__CLIENT_ID): length, never the value; code downcasting the boot’s error to FactoryFailedError to read a config failure finds the ConfigError itself. A log setting that does not parse — <PREFIX>_LOG_FORMAT=jsno, a RUST_LOG directive with a wrong level — stops the boot naming the variable, where 6.x took the default in silence.

  • A log filter or a dashboard keyed on a unit’s boot line — mounted route, mounted operation, mounted message, mounted mcp host, registered queue processor, scheduled job (…) — or on its controller, handler, resolver, gateway or processor field, the schedule’s provider, or MCP’s kind and tools, reads nothing: every edge says a unit it serves as one mounted line with host and method and its address (verb and path, field, event, tool, prompt or resource, queue, trigger), and the module line at register reads module registered. On HTTP’s mount line method is now the Rust method and the HTTP method is verb, so a filter on method="GET" there reads nothing.

  • A log filter or a dashboard on an operation line’s protocol fields reads nothing under its old word; method is the Rust method wherever a line says it. http.request’s method and route are verb and path. mcp.operation’s method is mcp_method, and its operation is tool, beside a new prompt and resource. graphql.field’s role and operation are kind and field, with host and method beside them; role="entity" and role="federation" read kind="query", their host and method saying which. graphql.operation’s operation_type is kind. subscription item withheld says host, method, kind and field where operation held subscription ticks. OpenAPI’s duplicate warnings say verb and conflicting_verb, and three lines naming a site say site where they said route. OpenAPI’s lines omitting a route say host and method where they said controller and handler, HTTP’s warning on a route at the fallback’s path host where it said controller, and GraphQL’s unreachable resolver host where it said resolver. Spans keep their conventions’ names.

  • A log filter or a dashboard keyed on a line naming a unit reads nothing under its old field: a guard’s denial says method and the unit’s coordinates (verb and path, kind and field, path and event, or path and the tool, prompt or resource) where it said address, and ws.message and mcp.operation say path beside them, as ws.connect, ws.disconnect, graphql.subscription and every line naming a message or a socket do — under a global prefix the path a client calls, prefix included — and its guard is the short name (AuthnGuard<JwtStrategy<Claims>>); a scheduled job’s or a lifecycle hook’s lines say host where they said provider; a job’s and a listener’s say host and method where processor and listener held Type::method; wired event listener is mounted, at info.

  • A log filter or an alert on a withheld chain’s line finds the unit’s fields beside error: request failed and request unavailable say verb and path, as the http.request line does; graphql operation failed and unavailable say kind and the root field the failure was met under, as the graphql.field line does, whatever alias the document wrote; websocket message failed from .opaque() says path and event as the gateway’s own always did, and mcp operation failed and unavailable say path and the tool, prompt or resource. Each is filed once the answer goes out, not at the .opaque() call — nor at problem_error’s on GraphQL: a failure an exception filter answers as the caller’s 4xx files none, and a chain kept in an error a handler then discards is lost with it.

  • A log filter on what the boot says reads nothing under its old word: nestrs starting is app starting, whose version is your app’s beside framework; attached module-contributed transport is transport attached; a transport reads http, queue, schedule or outbox, on every line and in a refusal’s sentence, where it read its type, so a BootStep’s transport and TransportContribution::name hold that word; cause reads sigint, sigterm, transport_failed, no_transport, boot_failed or closed; log_format reads text or json; max_connections is a number; sampler is a sampler’s name, what chose it in sampler_source. A transport of yours keeps its short type name until it declares a word, fn name().

  • A log filter on a surface no guard runs at — a gated endpoint runs no guard at its request; it denies every request, no guard runs at the /graphql request — graphql operations run unguarded — reads no guard at the request on nest_rs::layers, with surface, path, then and hint; GraphQL’s sat on nest_rs::graphql, and graphql operations gated is gone. mounted endpoint says surface where it said kind, adds host, and is filed once per template a surface registers, so a filter expecting one line per surface or a surface’s bare path reads the template instead.

  • A log filter or an alert on a line’s value reads the operator’s word where it read a Debug or a type path. phase="on_module_destroy" for OnModuleDestroy, action="read" for Read, a probe’s kind="liveness" for Liveness, scope="request" for Some(Request), shape="bare" for Bare; timeout_ms=1000 for timeout=1s, and every other duration in _ms where it read _secs (max_connection_ms, fresh_ms, request_timeout_ms, shutdown_timeout_ms, body_read_timeout_ms, operation_timeout_ms, idle_timeout_ms), and a guard’s denial retry_after_ms where retry_after read seconds. id reads the key’s bare value, and allowed_hosts, columns and scopes a joined string. entity is the table name on every line, entity="posts" where no ambient Ability … denying all rows said my_app::posts::Entity. subject is the table or a #[subject]’s ident, event the type’s last segment (PostPublishedEvent), related the table, and provider, context_type, strategy, store, a bound service, a stop’s type_name and an unresolved layer a short name.

  • A log filter on response masking failed matches nothing: a wire row refusing where it is written says a reply's row is withheld from its caller at warn, or a wire row answered a caller it was not judged for at error, with entity, reason, host, method and the unit’s coordinates on every edge, and authorization denied does on a field grant’s refusal, so a filter on tool or method finds them.

  • A log filter on a versioned route’s mounted line under header or media_type versioning reads where the route mounts: path="/v2/users" where it read /users, as a denial and the request’s line do. version is on the line under the URI strategy too.

  • A bounded duration outside its range — a zero lease, a drain window above an hour, a body-read gap at 0, a request or message timeout past 3600 — fails the boot naming the variable and why the bound is there, whether the value came from the environment or was pinned in code (then naming the field too). A timeout past the shutdown window boots, and says so once at warn.

  • Two declarations of one thing fail the boot naming both: two #[config] structs on one namespace (ConfigError::SharedNamespace), two imports binding one port or pinning one config, two modules attaching one transport type, two MCP imports declaring a server or opening the posture:

    Terminal window
    contested declaration: `X` is declared twice — by `A::for_root(..)` at `imports[0]` of `AppModule`, and by …
  • A composition with a hole fails the boot naming it: UnbuiltProviderError for a provider listed and never built, DuplicateProviderError for a type registered twice, AccessGraphError or ScopeViolationError for a dependency outside the imports or of a narrower scope, LateOptionalDependencyError, ProviderCycleError for a request-scoped or transient cycle, UnclaimedOverrideError and OverriddenDependencyError for an override nothing reads, ScopedLayerError for a transient layer on a job, a tick or a listener, UngatedDiscoveryError for a container built by hand that a transport discovers from, and a Scoped<T> or a bind = S service whose module the app does not import.

  • A wiring gap a declaration knows fails the boot naming the line to add, where 6.x booted and failed each request that reached it. A #[crud] controller or resolver, a route or a field under #[authorize(A, bind = S)], or the service a GraphQL-exposed entity names (#[expose(service = S, graphql)]) with no unit-of-work binding names SeaOrmDatabaseModule:

    Terminal window
    unmet dependency: `UsersController` (in module `UsersHttpModule`) depends on `dyn UnitOfWork`, which no module this app imports provides. Import exactly one unit-of-work binding: `nest_rs::seaorm::SeaOrmDatabaseModule` runs every edge's units of work over SeaORM's executor.

    A provider injecting Arc<Jobs> with no queue backend names RedisQueueModule, one injecting the pool or the default instance’s RedisConnection with no module opening it names SeaOrmModule or RedisModule, and a host or a root’s GlobalGuards binding ThrottlerGuard with nothing importing the port names ThrottlerModule — where 6.x told it to add a provider or seed one. A GraphQL schema serving an exposed relation whose target’s module the app does not import names the field, the entity declaring it and the module, where 6.x counted the loader at warn and erred on every query selecting the field; so does a #[field_resolver]’s &DataLoader<L> parameter, where 6.x panicked on each. A served #[field_resolver] whose resolver the app does not reach names the field, the resolver and the module: 6.x panicked on what the resolver injects, or, with nothing injected, ran it outside every module the app imports. Import the module it names.

  • A #[field_resolver]’s &DataLoader<L> over a Loader written by hand fails to compile (E0277, `L` is no loader `#[dataloader]` generated), where 6.x read what a GraphqlContextSeed seeded: only a generated loader says which module owns it, so only that one the boot can check. Step 12 has the two ways out.

  • Layers. The compile refuses every name step 10’s left column lists, a guard listed by both #[use_guards] and #[force_guards], a layer attribute an edge does not run — each with a sentence saying why — and a #[meta] value that is not Send + Sync. The boot refuses a layer a site declares that no imported module provides (UnresolvedLayerError), a global guard, pipe, interceptor or exception filter no module provides, a pool listing an authorization guard before the authentication one — in every app, workers included — and two #[meta] values of one type at one level (DuplicateMetaError). The app’s global interceptors and exception filters now run around every unit on every edge; a layer written for HTTP requests alone declares serves. #[authorize]’s class gate runs with the guards, before any interceptor or filter a route declares, so a filter that counted its refusals sees none. A global guard a bridge used to keep off /graphql or /mcp now refuses there what it refuses everywhere, and an /mcp endpoint with no guard denies every request. A filter that answered Ok for a failed unit changes what the client reads, never whether the unit rolls back.

  • A 6.x job left at the root never runs: 7.0 does not read it. Finish step 18.

  • An app binding SeaORM and a queue backend over a database without nestrs_outbox refuses to boot: the outbox table `nestrs_outbox` is missing: run `nestrs g migration nestrs_outbox`, then `nestrs run db up` .

  • A second unit-of-work binding refuses the boot naming nest_rs::database::BACKEND_REMEDY.

  • A listener running past its timeout — ten minutes unless #[on_event(timeout = "…")] declares one, where 6.x set none — is cut inside its unit, which rolls back, so nothing it wrote stands. The bus logs event listener failed — dispatch continues with the next listener at error on nest_rs::events, its error reading the listener did not end within its 600s timeout, and was cut — `#[on_event(timeout = …)]` sets it, and the next listener runs. Declare a longer timeout, at most "24h", or push a queue job.

  • A job firing once, renamed without key, is a new job: through the rolling deploy that ships the rename, the old build and the new one claim each occurrence under two identities, and both fire it. Pin the old identity with key = "…", copied from the key its boot line names.

  • A Redis URL ending in #insecure fails the boot — it asks to skip certificate verification (`#insecure`), which is refused — where 6.x never spoke TLS to Redis at all. Trust the authority that signed Redis’s certificate with <PREFIX>_REDIS__TLS_CA_CERT instead. TLS material no handshake could use fails the boot naming its variable.

  • A Valkey Cluster named with rediss://, the one scheme 6.x read, fails the boot: the Redis URL declares the … topology, but … serves the … one, naming the three schemes and the variable. Name the Cluster’s nodes with rediss-cluster://, and a Sentinel deployment’s sentinels with rediss-sentinel:// — see Valkey topologies.

  • A Postgres URL with an unverified sslmode, an OAuth provider endpoint over plain http, a non-loopback http redirect, or a loopback one outside a development or test profile, fails the boot naming its variable and the RFC.

  • A Postgres server only the system’s store vouches for, beside libpq’s PGSSLROOTCERT naming another authority, fails the boot TLS failed — name the authority that signed its certificate in libpq's `PGSSLROOTCERT`, which this process sets, …: the variable is the root of verification, as libpq reads it. Name the right authority there, or unset it. A certificate file sslrootcert, sslcert, sslkey or a libpq variable names that the process cannot read fails the boot at once naming where it is set, where it was retried until the connect budget ran out.

  • Storage: <PREFIX>_STORAGE__BUCKET fails the boot naming <PREFIX>_STORAGE__URL, a bucket that does not exist fails it at once, a key the store rejects fails it at once naming the credential variables, and half a credential pair fails it where 6.x paired it with a default. A client uploading through a presigned URL with another content type than the one signed, or none, is refused 403 by the store.

  • A CORS list with null, a path, a trailing /, a Unicode host or a forbidden method (CONNECT, TRACE, TRACK) fails the boot naming the list and the entry’s place, never the entry. A preflight for a method no route serves is refused 403, and each refused cross-origin request files one warn on nest_rs::http. A scheme the URL standard does not call special (tauri://, chrome-extension://) is compared byte for byte, its host’s case included: list it as the browser sends it.

  • <PREFIX>_HTTP__TRUSTED_PROXIES with a /0 (0.0.0.0/0, ::/0) or a range with address bits set past its prefix (10.0.0.1/8) fails the boot naming the entry’s place, and ranges holding between them every address of a family a caller connects from (0.0.0.0/1,128.0.0.0/1, or 0.0.0.0/1,128.0.0.0/2,192.0.0.0/3, short only of multicast and reserved space) fail it naming the variable, as a list pinned in code does. Name your proxies’ own range, written from its first address; in code, a trusted_proxy! literal the type refuses does not compile.

  • A listed proxy writing a forwarding header the parser cannot read — a hostname or an IPv6 zone (%eth0) as a hop, a quote it left open — has every caller behind it read as the proxy, one throttler bucket for all, and files forwarding header unreadable — no client is believed naming the header. Write each hop as RFC 7239 §6 spells a node (for="[2001:db8::1]:4711").

  • A listed proxy whose headers name two clients — X-Real-IP written from its peer beside an X-Forwarded-For a hop off the list wrote before it — has every caller behind it read as the proxy, and files forwarding headers disagree about the client — neither is believed. List that hop, or have the proxy append to X-Forwarded-For (nginx’s $proxy_add_x_forwarded_for).

  • A multipart client whose boundary RFC 2046 does not admit — longer than 70 characters, holding a character outside its set (!, #, %), ending in a space, empty — or whose type names boundary twice, reads 400 with the multipart body is malformed: … saying which, on a route reading Multipart and on /graphql, where the body was read. Browsers, curl and the common HTTP libraries write a boundary RFC 2046 admits.

  • A cap or a deadline of 0 — <PREFIX>_HTTP__MAX_CONCURRENT_CONNECTIONS, <PREFIX>_MCP__MAX_CONCURRENT_SESSIONS, an idle or send timeout — fails the boot naming the variable. A replica at its connection cap files connection cap reached; new connections wait in the listen backlog once. Intermittent 502s from a balancer are an idle deadline below its own: the transport listening line, at debug on nest_rs::http, names the value in idle_timeout_ms.

  • An MCP initialize past <PREFIX>_MCP__MAX_CONCURRENT_SESSIONS — 1 024 live sessions per endpoint, where 6.x opened every one it was asked for — is refused 503 with Retry-After: 5 and the UNAVAILABLE class, and nest_rs::mcp files mcp session refused: the mount holds its maximum at warn, naming the cap. A client opening a session per call fills it within <PREFIX>_MCP__SESSION_IDLE_TIMEOUT_SECS: reuse the session, or raise the cap.

  • An HMAC secret shorter than its hash fails JwtService::new: a JwtOptions choosing HS384 needs 48 bytes, HS512 64. A deployment that kept the old scaffold’s public secret and sets none of its own refuses to boot with no JWT key configured, naming the variable. An OTEL_METRIC_EXPORT_INTERVAL outside a second to an hour, or a pinned trace_sample_ratio outside [0, 1], fails OpenTelemetry::init where 6.x kept the default.

  • An app serving a resource under OAuthResourceModule refuses, 401 invalid_token, a token whose iss is not one of <PREFIX>_OAUTH__RESOURCE__AUTHORIZATION_SERVERS, compared exactly — trailing slash included — or that names none, where 6.x checked no issuer unless ISSUER was set; and a token whose aud is not its resource. An ISSUER none of them names fails the boot naming both variables, and so does ALLOW_ANY_AUDIENCE beside the module. An issuer of your own that minted every token with one shared audience has every client’s token refused by the resource servers that require their own: mint each with sign_for.

  • A token request for a resource the client is not registered for — or naming none from a client registered for several, or two at once — answers 400 invalid_target. One naming a scope the client is not registered for answers 400 invalid_scope whole, never a narrower token, and one naming a grant the endpoint does not serve — password, a URN, Client_Credentials — 400 unsupported_grant_type.

  • A client registry the boot refuses: <PREFIX>_OAUTH__SERVER__CLIENTS unset or empty, a client with no resource, a duplicate or empty id, an empty secret — configuration validation failed for `<PREFIX>_OAUTH__SERVER__*` , each client named by its id — which is what a deployment still setting <PREFIX>_OAUTH__CLIENTS alone meets, since nothing reads that name now.

  • The demo run under the production profile: no file production reads names a client, a sign-in resource or a key, from the workspace’s root or from an app’s own directory. Once nestrs run start <app> names its database and what else comes first, an app verifying tokens, every app but the worker, refuses no JWT key configured, and auth the client registry above and resources (<PREFIX>_SIGN_IN__RESOURCES): at_least_one_resource. Name your own on the process, or declare <PREFIX>_ENV=development against the dev container. An app of yours modelled on those files moves what authenticates anyone to its .env.development and .env.test the same way.

  • The demo chart with a social provider’s client id in auth’s existingSecret: since 0.6.0 the chart derives a provider’s redirect only from a client id it sees, in secrets, config or apps.auth.config (since 0.7.0 in auth’s extraEnv too, and as <KEY>_FILE), so auth refuses social provider `github` is linked but misconfigured, naming <PREFIX>_SOCIAL__GITHUB__REDIRECT_URL. Set SOCIAL__GITHUB__REDIRECT_URL in the chart’s config.

  • The demo chart’s existingSecret refuses the install since 0.7.0, naming defaults.existingSecret: every app has a Secret of its own, <release>-<app>, holding only what its reads names, where one Secret, <release>-env, handed every app all of secrets. defaults.existingSecret: <yours> keeps one Secret for every app; an apps.<app>.existingSecret per app keeps each to its own keys. A key of secrets no app reads, a required one an app is not handed, and one an app is handed both as <KEY> and as <KEY>_FILE now refuse the install, naming the key and the apps that read it: add a key your own module reads under that app’s reads. A tool reading <release>-env or <release>-issuer as a Secret reads <release>-<app>.

  • The demo chart without the hostname of api or live refuses the install since 0.8.0, naming AUTHN__AUDIENCE and the app: each app verifying a token requires its own audience, derived from its host, where the install went through and the app refused its boot. An app kept off the Ingress pins it in apps.<app>.config.

  • A development-only route kept in a deployment: an app listing DevelopmentOnlyGuard refuses its boot unless <PREFIX>_ENV declares development or test — DevelopmentOnlyGuard guards a route only development and test serve, and <PREFIX>_ENV declares production.

  • A module named oauth: nestrs new and nestrs g refuse it, naming the family whose paths the word starts; rename it for its domain (sign_in).

  • A social provider whose module the app does not import is closed: its /social/<provider>/… routes answer 404, said at debug only, since a provider left out on purpose is not a fault.

  • A relation-gated Ability::can answers false: a service guarding a write with it refuses until the check moves to Repo::can. A subscriber stops receiving the items a relation or a hidden column alone admitted, and nest_rs::authz logs an ability rule cannot be decided on a pushed value once per entity and action.

  • A Repo read that relied on seeing deleted rows compiles and returns fewer rows; read them through with_tombstones.

  • A SeaORM builder method on a Repo select answers E0599, no method named query found for struct RepoSelect: it hands out no statement. A trait import left beside it warns unused import, which -D warnings refuses.

  • Expr::cust under the scaffold’s clippy.toml fails nestrs run lint, use of a disallowed method, with what to write instead. A project with no such file compiles it: copy the file from a new scaffold to be told where it is written.

  • A query answers 500 with a condition or value handed to Repo refused at warn on nest_rs::orm, its reason field naming why: a raw fragment in its condition closes a parenthesis, a string or an identifier it did not open, leaves one open, or holds a comment, dollar quoting or a backslash in a plain '…' string. Close what it opens, write the string E'…', or better, bind the value (cust_with_values). A statement a log or a test reads now holds each condition in parentheses of its own.

  • AbilityBuilder::build fails, the ability guard answering 500, with malformed authorization rule: … writes text into its condition that would not stay where the scope puts it and its reason, filed at error on nest_rs::authz: a relation’s on_condition that a rule’s related(…) reads closes a parenthesis, a string or an identifier it did not open, leaves one open or holds a comment, or a when compares an enum value whose type name holds a ". Write the on_condition with sea-query’s typed calls and the enum as a DeriveActiveEnum. A scope’s subquery now holds the on_condition in parentheses of its own.

  • A derive expanding to a listed call fails the same way with this error originates in the derive macro, and an #[expect] on the struct adds this lint expectation is unfulfilled: it goes on the module holding the entity.

  • A downcast of nest_rs::database::current_executor() to the SeaORM executor compiles and answers None: the handle a unit installs is private to nest-rs-seaorm. Run the statement through Repo, which filters it, or a named escape whose bar it clears.

  • with_ability in a request no ability guard authorized installs nothing, so the body’s Repo reads match no row, and nest_rs::orm says no ambient Ability outside a worker job — denying all rows at warn. Inside a unit holding an ability it runs the body under what both allow, so a read the caller’s rules refuse stays refused. Put the rule in the AbilityFactory; a job acting for a principal keeps its with_ability.

  • A cannot no when narrows, beside a broader grant — CASL’s can(Manage, E) plus cannot(Create, E) — refuses its action at the class gate on every edge: 403, forbidden, with no insufficient_scope challenge, and nest_rs::authz files authorization denied at warn with reason=class_denied. A list that answered 200 [], a create that drew the database’s 409 or 500, and a hand-written handler body now answer that 403 before anything runs. A denial meant for some rows alone takes a .when.

  • A cannot whose when holds for every row by its shape — p.all([]), Predicate::Always, a disjunction holding one — refuses the same way, at the class gate, where its rows used to decide it. A denial meant for some rows alone reads a column in its .when.

  • A site gated on Manage — #[authorize(Manage, E)], #[public(Manage, E)], Ability::can_class(Action::Manage, ..) — means every action, and no longer reads Manage’s rules alone. A cannot no when narrows on any one action, beside can(Manage, E), now answers it 403, forbidden, with reason=class_denied, where the request ran; a cannot a when narrows takes its rows out of Repo::scoped(Action::Manage), Ability::can and a bind under it. Gate the body on the action it runs (#[authorize(Update, E)]), or drop the denial. Four separate grants now pass such a site, where they answered 403. What it answers shows Read’s columns and rows, not Manage’s: a .fields grant on Read beside can(Manage, E).fields(..) widens the reply, a cannot(Read, E) narrows it. missing_scopes names what each refused action lacks, so a scope challenge may appear where the answer was a plain 403.

  • A module listing ClientSecretBasicStrategy<P> or ClientAuthenticationGuard<ClientSecretBasicStrategy<P>> beside OAuthServerModule::<P> fails the boot: duplicate provider: ClientSecretBasicStrategy<P> is registered by … and again by …. Delete the line; the module provides it.

  • JwtService::expiry() no longer resolves (E0599), nor does a claims literal once its type loses exp (E0560): the signer stamps it.

  • sign_handshake with claims carrying no exp answers a SignError, naming expiry_in, where such a token used to fail at verify_handshake: a handshake never inherits the access-token lifetime.

  • sign or sign_for on claims naming no subject, their actor_id() None or blank and no sub of their own, answers a SignError, where it minted an access token with no sub no verifier could attribute. So does a sub that is no string (sub: u64, RFC 7519 §4.1.2), where it minted one a verifier reading a string refuses: hold the id as a string, or under another name with #[principal(actor)].

  • A JwtService naming no issuer or no audience — <PREFIX>_AUTHN__ISSUER or <PREFIX>_AUTHN__AUDIENCE unset or blank, or a JwtOptions built in code without them — fails the boot naming each it lacks, whether the app signs or only verifies, where 6.x minted tokens naming neither and verified a token naming neither (RFC 9068 §2.2, §4). Under OAuthResourceModule both are read off the resource, and a service there naming no ISSUER of its own boots but mints no access token: sign and sign_for answer a SignError naming the variable. ALLOW_ANY_AUDIENCE stands in for the audience, and sign then answers a SignError too: mint with sign_for.

  • sign or sign_for on claims naming no client_id — absent, null or blank — answers a SignError naming the claim, where it minted an access token naming no client, which RFC 9068 §2.2 requires.

  • sign, sign_for or sign_handshake on claims holding a registered claim of another JSON type — client_id: u64, iss: u64, an exp that is a string or negative, an aud of numbers, an amr that is no array of strings, a scope that is an array or breaks RFC 6749 §3.3’s grammar — answers a SignError naming the claim, where it minted a token a verifier reading that claim refuses. Hold a client id as a string; write scope with nest_rs::authn::scope::space_delimited. A registered claim serialized as null is now left out of the token, where it went out null.

  • A signing failure answers the opaque 500, where it answered 401 with a Bearer challenge: a client retrying with another credential now stops, and the chain is on nest_rs::http at error.

  • A token carrying cnf is refused, 401 invalid_token, reason sender_constrained, where it passed as a bearer with no proof of the key it is bound to. An external issuer minting bound tokens mints this audience plain ones.

  • <PREFIX>_OAUTH__SERVER__CLIENTS with a scope outside RFC 6749 §3.3’s grammar — a space, a ", an empty string — fails the boot on clients[<id>].scopes, where "a b" was granted whole when no scope was asked and refused when asked by name. List the two scopes.

  • <PREFIX>_OAUTH__CLIENT__SCOPES, <PREFIX>_SOCIAL__GITHUB__SCOPES or <PREFIX>_SOCIAL__GOOGLE__SCOPES holding an entry outside RFC 6749 §3.3’s grammar — "openid email", one entry with a space, or a " — fails the boot on scopes with not_a_scope_token, as does an OAuthClientConfig pinned with one, where it was sent as written. Separate the scopes with commas.

  • requires_scope("…") no longer compiles (E0308, expected Scope, found &str): declare the scope as a Scope constant.

  • A .fields on Update, Create or Manage now holds a write to its list. A write setting another column answers 403, FORBIDDEN, where it wrote the column: under errors by the input’s field on a #[crud] operation, in detail by the table’s name through ServiceError, and RepoError::Forbidden { columns } to a service reading Repo itself. nest_rs::orm files access denied — a column the caller's grants withhold at warn. A PUT carrying a column back as it stands passes where the caller may read it; one it may not read refuses whatever the value, so grant the read, take the column out of input(update), or give that caller a route of its own. A .fields on Manage holds every action’s writes, so an Update grant of its own beside it widens them. A row whose grants do not permit each column answers 404, as any row outside the scope.

  • .fields([Headline]) on a #[sea_orm(column_name = …)] column keeps headline in the reply, where 6.x stripped it: a client reading its absence reads the value.

  • Repo::update of an active model setting nothing answers RepoError::NotFound, a 404, for a row outside the caller’s Update scope or a tombstone, where it handed the row back, and for a key no row holds, where it said RecordNotFound. A service using it to read reads with Repo::find_by_id.

  • cannot(..).requires_scope(..) or cannot(..).fields(..) no longer compiles (E0599, no method named requires_scope found for struct RuleSpec<'_, E, Cannot>), nor does a RuleSpec<'_, E> written for what cannot returns (E0308, mismatched types, expected RuleSpec<'_, E>, found RuleSpec<'_, E, Cannot>).

  • nest_rs::database::with_request_executor or with_job_executor no longer resolves (E0425), nor does an Ability passed to with_ambient or cx.attach (the trait bound Ability: AmbientValue is not satisfied). Run a service test through app.unit(ability, || …) or app.system_unit(|| …), and attach the caller’s ability through AbilityGuard.

  • A job unit opened inside a request — run_unit with ExecutorScope::Job — or work a job captured and a request re-enters runs as the request: with no ability its Repo reads match no row, at the same warn. System work runs in a queue attempt or a tick of its own.

  • A stale or mangled page cursor — an after no page issued — is refused where 6.x served the first page: a #[crud] list answers 400, its problem query parameter `after`: not a cursor this endpoint issued under INVALID_ARGUMENT, and GraphQL a field error, Invalid value for argument "after", not a cursor this endpoint issued. Neither quotes the cursor; an empty after is still the first page. Follow the Link header’s next.

  • A health probe or dashboard keyed on db or db_ready reads nothing: the key is seaorm, beside redis[:<instance>] and storage. A readiness method named seaorm, redis or storage in an app that opens that resource fails the boot.

  • An import of SeaOrmHealthModule fails to compile, rustc naming the item nest_rs::seaorm no longer has, as does one of RedisHealthModule or StorageHealthModule. Delete the import: the module opening each resource attaches its check, and HealthModule runs it.

  • A replica out of rotation while its database, a Valkey or the store is down — where 6.x kept it serving, unless SeaOrmHealthModule checked the pool — is that resource’s check: an app importing HealthModule checks every resource it or its features open (step 11). The 503’s error names it: seaorm, redis[:<instance>] or storage.

  • A log query on a renamed line or field finds nothing: the 6.x line shutdown signal received is app draining, transport listening at info is app ready, running lifecycle hook is the lifecycle.hook line, a WebSocket deadline’s message_timeout_secs is timeout_ms, cause="framework" or cause="another_app" is cause="dependency", and an authentication line’s detail is error, the whole chain.

  • A tool that scrapes stderr for panicked at finds nothing under #[nest_rs::main]: read the error events on nest_rs::app, or the unit’s own line for a panic it contains.

  • A secret field given a String fails to compile, expected Secret<String>, found String, and one read as a string no method named … found for struct Secret: add .into(), or read it with .expose_secret(). An #[expose] left on a secret column fails with #[expose]: `password_hash` holds a `Secret`, which never crosses the wire.

  • A serde derive left on an #[expose]d entity fails to compile at the derive: #[expose]: `Model` derives `Serialize`, which writes every column, hidden ones included, onto a wire — a reply answers `User` (`Json(User::from(&model))`): drop the derive, and the same for Deserialize, naming the entity’s inputs. Once it goes, a handler answering the row — Json(model), WsReply::reply(&model), a Vec<Model> in a DTO — fails with E0277, a row crosses no wire: `fn(Model) -> User` builds what a reply answers, and a write takes the input `#[expose(input(..))]` declares: answer Json(User::from(&model)) (step 9).

  • A serde impl written by hand on an #[expose]d row, or a derive above the decorator, fails with E0119, conflicting implementations of trait Serialize for type Model, its note naming AModelCrossesNoWire: the same goes for Deserialize, JsonSchema, #[output], #[input], and with the graphql feature for async-graphql’s SimpleObject, InputObject and #[Object], which write or read every column. Delete it and answer the exposed type (step 9). A blanket of your own over one of those traits reports the same beside a specific impl on the row: the row’s impl goes (step 9).

  • A grant on Read withholding a column no null answers fails when the ability builds, so every request of that principal answers 500 with the ability guard’s rules_misconfigured line: malformed authorization rule: the grant for `Read` on `users::Entity` withholds `email` in `.fields`, which a reply cannot answer null — declare the column `#[expose(nullable)]` on `email`, or name it in `.fields` . A unit test building each role’s ability sees it first.

  • A wire row kept and answered elsewhere — a cache, a row carried into another request, a publisher’s push — answers 500 on HTTP, INTERNAL on GraphQL, a dropped item on a subscription, and files a wire row answered a caller it was not judged for at error on nest_rs::authz. Build the row where it answers.

At boot, the refusals not named above, each a sentence ending on its remedy:

  • Two factories waiting on each other fail the boot with FactoryCycleError: factory cycle: … — each waits on a factory output that a member of this set … would provide. Drop one _after declaration.
  • A module imported in a collect alone, the shape a hand-written impl Module takes, fails with UnregisteredModuleError: `…` was imported in a collect phase alone, so none of its providers registered. Import it through ContainerBuilder::import in its importer’s register too.
  • A factory queued in register, or a seed its module’s check refuses, answers ContainerError::LateFactory or ContainerError::SeedRefused from a container built by hand: queue it in collect, and seed a value that passes the check a read one passes.
  • A transport of your own stating a stop bound past a day fails with UnboundedTransportError: a transport's stop is bounded: declare its drain window.
  • App::init or App::run called again after an init that failed answers InitFailedError, the app's init failed earlier: it does not run again: build a new app.
  • A resource’s budget at or past the net of a port waiting on it fails with BudgetPastNetError: …'s budget (…) must be shorter than …'s net (…), naming the setting to lower.
  • One variable read by two configuration types fails with ConfigError::ContestedVariable: `…` is read by two configuration types. Give one its own key or namespace.
  • A named instance reading a namespace another declaration holds fails with ConfigError::SharedInstance: the instance `…` reads the namespace `…`, which … also claims. Rename the instance.
  • A ClientTls or other shared vocabulary under a field of another name fails with ConfigError::MisnamedField, name the field `…` : its refusals name its variables by that field’s key.
  • A duration read through a ConfigService reader fails with ConfigError::UnboundedDuration: … is a duration, and a duration is read through the `DurationBounds` its field names. Declare the field with #[config(bounds = …)].
  • A Redis URL asking for RESP3 (protocol=resp3) fails the boot naming the variable to remove it from: nestrs does not speak RESP3 to Redis.
  • A queue lease not above one and a half times the Redis budget fails the boot: the Redis queue lease (…) must be more than one and a half times the Redis budget (…), since a renewal sent a third into the lease may wait out the whole budget. Raise the lease or lower the budget.
  • replicas = "one" with no occurrence lock bound fails the boot naming the job: import RedisScheduleModule. A job attached by hand as a CronJobMeta fails it too for a key without replicas = "one", or a one-shot declaring it, the two mistakes a decorator refuses at compile time.
  • Two scheduled jobs sharing one name fail the boot (scheduled jobs share one name: …): rename one host, or fold the two methods. Two jobs firing once under one identity fail it too (scheduled jobs firing once claim under one identity: …): give each its own key.
  • A #[process] declaration its backend cannot honour, a throttle window under a millisecond, or two methods draining one queue fail the boot, one error naming every offender at once.
  • memory:/// in a deployed or undeclared profile fails the boot: names memory, a store in this process that loses every object at a restart. Name an s3:// store. An S3 setting beside memory:/// fails it too (is set beside …, which names memory): unset it.
  • A GraphQL schema keying an entity without GraphqlConfig::federation fails the boot: `…` keys an entity … but this schema is not configured as a subgraph. Set <PREFIX>_GRAPHQL__FEDERATION=true and serve it behind the router it names, or drop the key.
  • An McpIdentity naming a server no #[mcp] host serves fails the boot, as do two hosts on one path declaring one prompt.
  • HttpTransport::from_config refuses values a transport built in code passed: a duration or a version_header outside what its variable accepts, naming the variable and the field; a body-read gap at or past the request timeout files one boot warn.
  • A protected resource’s URI carrying userinfo, or loopback http in production, fails the boot.
  • A refused credential or a missing database fails the boot, where the first request met it: the sentence names the resource and the variable.

At run time, what now answers differently:

  • An MCP session an earlier release stored is refused: the client opens a new one. A session stays its principal’s, and a principal naming no subject answers 403.
  • The app’s interceptors and exception filters now run around every job, tick, listener call, GraphQL root field, MCP operation and WebSocket message, and the class gate runs before a message’s pipes. One written for a request reads the edge from cx.edge().
  • A Result renamed on import or behind an alias fails as a Result does, on the line and to the client, where its error reached the client as data and its line filed ok.
  • /graphql/anything answers 404, and the graphql-ws handshake’s HEAD answers 400. Point a client at /graphql itself.
  • A Path<T> signature mistake answers 500, where it answered 400: a route template’s parameters and the handler’s type are a programmer’s, never a client’s.
  • A statement past 15 s is cancelled by Postgres, answering 503 with its wait. A long report raises <PREFIX>_SEAORM__STATEMENT_TIMEOUT_SECS, or runs as a job with its own timeout.
  • The OAuth client refuses a plain http endpoint, and an answer past 64 KiB fails as the provider’s.
  • requiredScopes, and a challenge’s scope, name the narrowest grant’s scopes alone: a client reading the whole list reads that one.
  • A fall-back day fires more under a zone that repeats the hour: read a daily job’s #[cron] beside the zone.
  • A suite logs what its console allows: with_test_telemetry kept it to warn, and a project scaffolded before sets RUST_LOG=warn in .env.test, as nestrs new now writes.

At build, what your own lines meet:

  • A Result a let _ = discarded in your own code is clippy::let_underscore_must_use’s, once the workspace denies it (step 1).
  • runtime-tokio-rustls on a sea-orm line of yours compiles ring again, beside the dependency policy’s ban: take runtime-tokio, with sqlx’s tls-rustls-aws-lc-rs, as nest-rs-seaorm does.

At compile time, each decorator’s own grammar. Every sentence below is pinned in crates/nest-rs-macro-hygiene/tests/integration/diagnostics/, one fixture per refusal, by folder; what a 6.1 project most often meets:

  • Any impl-half decorator (#[routes], #[operations], #[messages], #[tools], #[processor], #[scheduled], #[listeners], #[indicators], #[hooks]) written on a struct, on a trait impl, or with arguments; a method taking &mut self or self by value, or generic; a method declaring two roles or one role twice; two methods claiming one route, field, event, tool or prompt, whether spelled apart or under two true cfgs; #[use_guards] on the block rather than the struct beside #[controller], #[resolver], #[gateway] or #[mcp]. Each names the form it accepts.
  • A host with no caller (#[processor], #[scheduled], #[listeners], #[indicators], #[hooks]) on a request-scoped or transient provider, or one stating no singleton: runs on a provider built once for the app. Its layers: #[use_guards], #[force_guards] or a version there has no caller, and is refused naming why. #[meta] twice with one type refuses every site.
  • #[controller], #[gateway], #[mcp], #[resolver]: a missing path, a path that is no mount path, a 6.x :param, a version that is no path segment or listed twice, or a version on an edge with none to select (#[resolver], #[mcp], #[gateway] takes one).
  • A route: a path that is no template (route_path_is_not_a_template), a parameter named two ways, a catch-all not last, a pattern on a parameter, two verbs on one method, one route spelled two ways or twice across a shared version, a version the controller does not declare, #[http_code] with no status, a shaper’s parameter left unread, or a handler parameter that is no extractor, whose sentence says what reads one.
  • #[api]: a key it does not take, a deprecated that is no RFC 3339 full-date, an error status outside 4xx and 5xx, a response_content_type that is no media type, a multipart beside a Json body, and any response decorator on an #[sse] route.
  • #[crud]: a key, op or paginate it does not take, an empty ops, an api for an op it does not generate, a service the host does not inject or spelled as its field, an op the service does not offer ( `NotesService` offers no create), or a parameterised prefix.
  • A posture (#[authorize], #[public]): twice, both at once, of the wrong shape, an unknown key, or bind naming another entity, no resource service, no Authorized<A, E> parameter or more than one route parameter; id_arg off GraphQL; unmasked on any edge; a type that is no #[subject]; an #[sse] route naming an entity.
  • A guard bound where it declares no GuardFor for that edge’s view: `HttpOnlyGuard` does not declare that it checks `GraphqlView` units; one writing check_http alone is rustc’s E0046. #[use_pipes] on a GraphQL operation, a tool, a connection hook or a processor is refused naming where that edge takes its pipe.
  • #[entity] and #[subscription]: an entity with no key, a posture missing, arguments, or a #[graphql(...)] of its own; a subscription whose Result is spelled another way; #[graphql(entity)] beside a #[query]; a &Context that is not first; a foreign error through ?.
  • #[tool], #[prompt], #[resource]: no description, or a blank one; a tool with no result; a resource with no template or description, one with an RFC 6570 operator, a variable no parameter takes, a parameter no variable names, two templates; #[resources] twice or with an argument; a server identity on a host, which goes in McpIdentity. A host written by hand meets rmcp’s own: an empty #[tool_router], which takes #[tool_router(allow_empty)].
  • #[subscribe_message], #[on_connect]: an event that is no string literal, a hook repeated, a hook returning a value, a reply that does not serialize under #[authorize], and any layer or #[meta] on a connection hook.
  • #[queue], #[process]: #[queue] on anything but a unit struct, no name or job, a name outside the rule; #[process] with no queue, a queue that is no marker, a job that is not the queue’s, keys outside a list, concurrency or throttle below one, a timeout past "24h", transactional without a bool, a Checkpoint on a transactional method (a Checkpoint<_> parameter needs transactional = false), a return that is no Result.
  • #[every], #[cron], #[after]: a duration with no unit, or signed; a cron step shortcut (5/5) or no cron at all; a tz the IANA database lacks; retries, since a tick’s retry is the next occurrence; a key that is no job key or without replicas = "one"; two triggers on one method.
  • #[on_event]: a job’s key (retries), a timeout of zero, a return other than () or Result<(), E>.
  • #[config]: no namespace, a tuple struct, a field holding __ or naming a unit (window_secs), a Duration with no bounds, bounds no range of that type holds, a field read two ways, a struct’s key on a field and a field’s on the struct.
  • #[expose], #[sea_orm]: a tuple struct or an enum, no name or one that is no identifier, a Secret exposed, a hidden column with no placeholder, a hidden key, a default on a key or a stamped column, serde on the Model, soft_delete with no deleted_at, timestamps with no columns, a relation with no service, or from and via naming no column.
  • #[module]: a key other than imports and providers, generics, a provider listed twice or beside its dyn binding, or a dyn binding of a request-scoped or transient provider. #[injectable], #[inject], #[input], #[output], #[wire_enum], #[instance], #[subject], #[derive(PrincipalIdentity)], #[nest_rs::main]: an Arc field with no #[inject]; an instance with fields, generics, a reserved word or the name Unnamed; a subject with fields, generics or arguments, or a rule that denies or narrows it (has no rows to deny or narrow); a claims type with no actor, or two; main on a sync function.
  • crates/nest-rs-config/src/unclaimed.rs — the boot’s report of a variable nothing reads, and tests/integration/unclaimed.rs beside it.
  • demo/crates/features/src/audio/service.rs and demo/crates/features/src/chat/ws/gateway.rs — the 7.0 lines of steps 5 and 13, as the demo writes them.
  • crates/nest-rs-queue/src/jobs.rs — push, push_with, push_many, push_many_with and the receipt; crates/nest-rs-macro-hygiene/tests/integration/diagnostics/queue/ — each #[queue] and #[process] refusal, pinned.
  • crates/nest-rs-redis/src/error.rs — the boot’s refusals: an #insecure URL, TLS that cannot work.
  • crates/nest-rs-macro-hygiene/tests/integration/diagnostics/ — every decorator’s refusal, worded as the compiler prints it.