Repository navigation
v6.0.0
What's Changed
Ports & Adapters — three module shapes, and a variable is a path too
The framework now states what it is: Ports & Adapters, as practised — the
port owns the semantics, the adapter owns only the transport, a multi-backend
library is wrapped rather than abstracted, and the composition root has
three module shapes and no fourth. architecture.md carries the section;
naming.rs and units.rs in nest-rs-conformance keep it true.
- Three shapes.
<Vendor>Module::for_root(cfg)opens a resource —
SeaOrmModule(the pool),RedisModule(the connection).<Port>Module::for_root(cfg)
carries a capability's policy —ThrottlerModule,HttpModule.
<Vendor><Port>Modulebinds one to the other, bare unless it owns settings —
SeaOrmDatabaseModule,SeaOrmHealthModule,RedisQueueModule,
RedisThrottlerModule,RedisWorkerModule::for_root. A composition root reads:
SeaOrmModule::for_root(None), SeaOrmDatabaseModule, RedisModule::for_root(None), RedisQueueModule, RedisWorkerModule::for_root(None), ThrottlerModule::for_root(None), RedisThrottlerModule. - A
#[config]'s namespace is its stem — crate subject, then binding folders,
joined by__— exactly as its type is named.SeaOrmConfig→
NESTRS_SEAORM__*(NESTRS_DATABASE__*is gone: the universal convention
named neither the crate nor the type that parsed it);RedisConfig→
NESTRS_REDIS__*(NESTRS_QUEUE__*is gone);RedisWorkerConfig→
NESTRS_REDIS__WORKER__SHUTDOWN_TIMEOUT_SECS;NESTRS_THROTTLER__*and
NESTRS_SOCIAL__GITHUB__*unchanged.namespace_is_the_stemcompares segment
by segment. From a variable a reader finds the type; from a module, the
variable. nest-rs-seaormis the adapter that wraps sea-orm.SeaOrmModule::for_root
resolvesSeaOrmConfigand opens the one pool;SeaOrmDatabaseModuleis a bare
binding that installs the ambient executor (DbContext,WorkerDbContext)
and fails the boot namingSeaOrmModuleif the pool is absent.
SeaOrmDatabaseConfigandSeaOrmDatabaseSetupare gone;connect_from_env
resolvesSeaOrmConfig.nest-rs-redisis one connection and three bindings.RedisModule::for_root
opensRedisConnection;RedisQueueModule(bare) bindsRedisQueueProducer
asArc<dyn JobProducer>;RedisWorkerModule::for_rootowns
RedisWorkerConfig;RedisThrottlerModule(bare) declares the store.
RedisQueueConnection,RedisQueueConfig,RedisQueueSetupand
RedisThrottlerSetupare gone; the connection's events file on a
nest_rs::redistarget.- The throttler's policy lives in the port, its counters in the store.
ThrottlerStoreishitalone —default_limitis gone, and so are the
defaultarguments ofInMemoryThrottler::newandRedisThrottler::new;
the guard carries the default (ThrottlerGuard::new(store, default),
Throttle: Default).ThrottlerModule::for_rootbinds the in-process store as
an ordinary factory, soRedisThrottlerModulesupersedes it wherever it sits
inimportsand the app removes no line; two vendor bindings still contest
(BACKEND_REMEDY).provide_guardandresolveare no longer public seams. - The queue port owns the attempt.
nest_rs_queue::consume::{discover, attempt, Attempt}— discovery, the envelope, the trace, thequeue.jobspan, the panic
catch, the outcome classes, the events and the operation line — written once in
the port;RedisWorkeris a fetch loop that translatesAttemptinto apalis's
Abort/Failed. A second adapter copies nothing, and
a_unit_is_opened_only_by_the_crate_that_declares_itrefuses one that tries. - A factory may declare the factory output it reads.
ContainerBuilder::provide_factory_after,provide_factory_dyn_afterand
provide_declared_factory_aftername the type; the boot drains in dependency
order with queue order as the tie-break, soimports = [..]order is a
readability choice. A cycle isFactoryCycleError, naming the set. - Demo features inject
Arc<dyn JobProducer>; the CLI scaffold and.env
templates write_SEAORM__URL/_REDIS__URL;nest-rs-throttler's in-band
caller-bucket helpers are gated on the edges that use them.
The one guard that answers every transport lives at the root
AbilityGuard implements four of Guard's entries — check_http,
check_graphql, check_ws_message, check_mcp — and carries the four matching
marker traits, but it sat in nest-rs-authz/src/http/. A folder named for one
edge held the type that answers all of them, and the cost was never only the
path:
nest_rs::authz::http::AbilityGuardis nownest_rs::authz::AbilityGuard,
besidegateandchain— the crate's other transport-agnostic decision
points. Eachcheck_*arm is gated on its own feature.- A transport no longer turns on
httpto reach its own guard.graphql,
wsandmcpeach pull the guard's dependencies directly; a GraphQL-only app
used to enable the HTTP surface for a type it bound on resolvers. check_ws_messagecompiles underws, nothttp. Thehttpfeature
forwardednest-rs-guards/wsandnest-rs-wsfor exactly one method of one
misfiled file; both forwardings are gone, andgate::transport::WSdrops the
#[cfg(any(feature = "http", feature = "ws"))]that documented the anomaly.- In the product and in what the CLI scaffolds,
authz/http/is gone.
AuthzGuardisauthz/guard.rsandAuthzModuleprovides it, so
AuthzGraphqlModule,AuthzWsModuleandAuthzMcpModuleimportAuthzModule
rather than the HTTP adapter they never served.AuthzHttpModuleheld that one
provider and nothing else; everyimports = [.., AuthzHttpModule]becomes
imports = [.., AuthzModule].
A declaration is refused at the token that wrote it
The second refusal wave: what a decorator silently accepted, deferred to a
dependency's error, or worded for itself alone is now one sentence per
offence, worded once in nest_rs_codegen, spanned at the offending token,
with a trybuild snapshot per site — eighteen new snapshot pairs across eight
crates.
- A mount path has a grammar, and every decorator that takes one enforces
it.#[controller],#[gateway]and#[mcp]refuse a path that is
empty, not absolute, longer than 256 characters, carrying an empty segment,
or spelling a character RFC 3986 §3.3 does not allow in a segment —
percent-encoding included, deliberately: a mount path is written, not
received, so%2Fasks to mount an address the router will never match.
#[mcp]used to refuse only the empty string; the other two checked
nothing, sopath = "users"compiled and mounted. #[use_guards]on the impl half names the struct half. One sentence
from the pair itself — the struct half declares the host's access posture,
this half declares its operations — where GraphQL and MCP each had a drifted
wording of their own and#[routes]/#[messages]had nothing: the
attribute reached rustc ascannot find attribute `use_guards`with no
transport, reason or remedy named.#[force_guards]is refused the same
way, and a#[crud]impl inherits both.- A missing mandatory key shows what to write.
#[queue] requires `name` — write `name = "emails"`— one shape at ten sites in six crates, where
three verbs and three shapes had grown. - A method declaring two roles is refused naming both, on
#[hooks]
lifecycle phases,#[indicators]probes,#[scheduled]triggers, and MCP
roles — where it closes a real defect: a method carrying both#[tool]and
#[prompt]compiled, and the surviving second attribute was handed to rmcp
as an operation nobody declared. #[input]names the shape it cannot take. A tuple or unit struct used
to die insidevalidator's derive —Unsupported shape `one unnamed field`against a#[derive]line the developer never wrote. The refusal
now names the shape, the derive whose limit it is, and the enum/newtype
remedies.#[cron(tz = …)]is checked against the IANA time zone database at
compile time. The key is always a string literal over a closed name set,
so a typo was the one half of the attribute still deferred to a deployment
failure while the expression beside it was refused at expansion.
A 405 names what the route serves
RFC 9110 §15.5.6 makes Allow on a 405 a MUST, and the framework computed
the verb set at the declaration and discarded it at the mount — so poem's
MethodNotAllowedError rendered a bare status. #[routes] now registers
through nest_rs_http::MethodTable, which records each verb in the same call
that mounts it, so what is served and what is advertised cannot drift —
#[version]-narrowed routes included, each version advertising its own set.
HEADis advertised wheneverGETis — poem answers an unregistered
HEADby re-dispatching to theGETendpoint, so it is served.OPTIONS
never is: serving it would put an unguarded method-listing endpoint at
every route, so it is an owner question rather than a default.- Only poem's own refusal is rewritten. A handler that deliberately
answers405is stating something about its own resource and keeps its
response; an unrouted path stays a bare404— inventing anAllowthere
would turn every probe into a confirmation that something is there. - Self-mounting crates are the reported gap.
nest-rs-graphqlroutes by
method through poem directly, soPUT /graphqlstill answers a bare405;
MethodTableis public as the drop-in for it.
A timeout is the origin's own 503, and every header the framework knows is emitted or argued
Breaking, wire and API. Four corrections on the HTTP edge, each aligning a
default with the standard that owns it:
- An overrun handler answers
503 Service UnavailablewithRetry-After,
not504. RFC 9110 §15.6.5 scopes504 Gateway Timeoutto a server
acting as a gateway or proxy; this transport is the origin, and a504
invites exactly the wrong retry — a load balancer reading it as "that
node's upstream is flaky, try another one" re-runs a handler that will
overrun again. The delay is whole seconds rounded up, minimum 1, because
Retry-After: 0reads as "retry immediately", the one instruction a server
shedding load must not give. HttpConfig::request_timeout_secs: Option<u64>becomes
request_timeout: Option<Duration>, read through the framework's shared
seconds grammar — soNESTRS_HTTP__REQUEST_TIMEOUT_SECS=0now means no
timeout, the family's sentinel, instead of zero seconds. And
max_body_bytes = 0fails the boot naming the field, instead of rejecting
every bodied request, the same floor its MCP and WS siblings already have.- The security-header family is closed: each member is emitted by default,
or configurable with its default argued. Three new defaults —
Referrer-Policy: strict-origin-when-cross-origin,
Cross-Origin-Opener-Policy: same-origin,
Cross-Origin-Resource-Policy: same-origin— and three settable but
deliberately off, each with its reason recorded:Content-Security-Policy
(an API framework cannot know a page's sources),
Cross-Origin-Embedder-Policy(breaks embeds to buy an isolation nothing
here uses),Permissions-Policy(a default would be a guess about pages
the framework does not serve). One table drives validation and emission,
so a member cannot arrive validated but unemitted.
SecurityHeadersConfig::headersnow returnsHeaderNames. - CORS refuses
*beside credentials on all four lists, not just
origins:*is a validtchar, so nothing else refuses it — the header
is emitted, every browser drops the response, and there is nothing
server-side to point at. The error names the config field and the response
header it would have poisoned.
The client behind a proxy is RFC 7239's answer, and disagreement is refused
The transport read only X-Forwarded-For and X-Real-IP, so behind an
RFC-conformant proxy speaking Forwarded every caller resolved to the
balancer: one rate-limit bucket for the entire internet, the balancer's
address on every access line and span, and — the peer being trusted —
traceparent continued for a client the transport could not identify. All
three headers are now read, in order Forwarded, X-Forwarded-For,
X-Real-IP, gated on the same trusted-peer check.
- §6.2
unknownand §6.3 obfuscated nodes are skipped: reading either as
a client would key a rate-limit bucket on a string a proxy chose to
withhold. - When
ForwardedandX-Forwarded-Forboth name a client and disagree,
neither is believed. The origin degrades to the trusted proxy itself and
awarncarries both values. The common way to reach that state is a
proxy that appendsX-Forwarded-Forand passes unknown client headers
straight through — nginx's default — where a caller sending
Forwarded: for=…would outrank the genuine hop the proxy itself
appended, and the trusted-proxy gate cannot catch it. A "prefer RFC 7239"
rule is exactly that hole. - Breaking:
ClientOrigin::resolvegains a leadingforwarded
parameter.
A health probe answers inside the kubelet's second
Breaking for slow indicators. Indicators ran serially, each under a
hardcoded five-second ceiling — four of them were a twenty-second worst case
against a kubelet whose timeoutSeconds defaults to 1. They now run
concurrently, so a probe costs the slowest check rather than the sum, under
two ceilings a new HealthConfig owns:
| Default | Meaning | |
|---|---|---|
NESTRS_HEALTH__INDICATOR_TIMEOUT_MS |
750 |
one check's ceiling — expiry reports it down |
NESTRS_HEALTH__PROBE_DEADLINE_MS |
900 |
the whole response's ceiling |
- Milliseconds, deviating from the framework's
*_SECSgrammar on
purpose: a grammar that cannot express a value inside one second cannot
express the only interval that matters here. And0is refused at boot
rather than meaning unlimited — here off is the defect, since a hung pool
would hang the probe and the kubelet reads that as a dead process. - An unanswered indicator reports
"probe deadline exceeded", the third
fixed reason beside"check failed"and"timed out"; the real error goes
to awarnonnest_rs::health, never to the caller. - Concurrency is
FuturesUnordered, deliberately notspawn: the
operation span and the trace context are task-locals, and a spawned check
would file itswarnunder no unit of work at all. The report body stays
name-ordered, not completion-ordered. - A prefixed app says where its probes went. Under
NESTRS_HTTP__GLOBAL_PREFIX=/api/v1the kubelet must call
/api/v1/health/live; a manifest written from the docs gets a404, the
kubelet reads that as a failed probe, and on a liveness probe that is
CrashLoopBackOffcaused by documentation. The boot now logs onewarn
naming the real paths. HealthModule::for_root(HealthConfig…)is the pinning seam, with the
composition test everyfor_rootowes.
A listener invocation is a unit of work
The last unused edge namespace is in use: every #[listeners] method files
one events.dispatch line, with its own span — a name nothing emits under is
the same defect as a span field nothing fills.
- The unit is one listener invocation, not one
emit. A listener is
developer code that logs, writes and can panic, while anemitis the
emitter's own line, already inside whatever unit the emitter is serving.
One emit is one cause: its listeners share one trace, and each gets its own
span_id— filing them all under the inherited correlation gave two
listeners on one event onespan_idbetween them. - A panicking listener still files, with
outcome = panic, and both the
line and the containmenterrorare emitted inside the continuation, so
neither arrives without ids. - Listeners with no bus are a boot report. A provider listed in
providers = […]withoutEventsModuleinimportsused to boot clean
and react to nothing; the boot now emits onewarnper reachable listener,
naming it. #[listeners]registers throughsubscribe_named, so the line names the
method; the anonymoussubscribefiles as<anonymous>.
Every dispatched GraphQL field files its own line
Every query and mutation in a deployment was the same line — POST /graphql 200 — and which field was slow, which one failed, and which one the caller
was refused at were all unanswerable from the console. #[operations] now
runs every #[query], #[mutation], #[entity] and #[field_resolver]
body through a graphql.operation unit: its own span under the request's,
one line with role, operation, outcome and duration_ms.
- A failing resolver files
outcome = error— a GraphQL error is
answered with a200, so the HTTP line alone reports a request that failed
as one that succeeded. #[subscription]is deliberately excluded: its unit is the connection,
filed asgraphql.subscriptionwhen the socket ends; wrapping it here
would file a second line naming the subscribe, which is not the work.operationis the wire field name, not the Rust ident — async-graphql
renameslist_userstolistUserson the wire, and a line naming the
ident cannot be joined against a capture of the request that produced it.- The span deviates from the OTel GraphQL conventions where they cannot
carry this, and says so:graphql.operation.rolecarries a superset of
the conventions'operation.typeenum (entity,field), and
graphql.documentis deliberately absent — it is the caller's query text,
which carries their literals. - The generated delegating method is now always
asyncfor the wrapped
roles.
The MCP line names the wire method and what it addressed
Breaking for log consumers. The operation line carried the rmcp Rust
ident — call_tool, initialize — which appears in no MCP document and
cannot be joined against a capture of the wire, and every tools/call was
byte-identical. The line now carries method, the JSON-RPC method
(tools/call), and operation, the tool, prompt, resource or task it
addressed — absent where nothing is addressed, so a query for one can never
match a method that has none.
- Method strings are read from rmcp's own
ConstStringmarkers, so a
protocol rename is a compile error instead of a stale literal; the one
request whose method is data (on_custom_request) reads it off the wire. - The span gains
mcp.method.name/mcp.operation.name— one seam over
every method, where the semantic conventions spell three per-kind keys.
A socket ends with the code that says why
Every server-side termination dropped the Sink, so the peer read 1006
Abnormal Closure — a deliberate close indistinguishable from a broken pipe,
against which a client retries identically and never learns what to do
differently. The gateway now writes a Close frame, after flushing every
reply already queued, with the RFC 6455 code the cause earns:
| Cause | Code |
|---|---|
| connection lifetime ceiling | 1001 Away, reason re-upgrade to continue — nothing the peer sent reaches this ceiling, a clock does, so not 1008 |
| outbox full | 1008 Policy |
| read failure | 1011 Error |
| peer's own Close | echoed, then flushed — a second Close would be refused, not merged |
- A Binary frame is refused in band instead of silently dropped: an
errorenvelope answers it and the socket survives,1003being the other
conformant answer and deliberately not this one. - The connect/disconnect lines gain
outcome = ok— the one field of the
family those two dropped, so a cross-edgeoutcome != okquery silently
skipped them.
nest_rs_testing drives a real upgrade
New ws feature: TestAppBuilder::build_ws() boots the app's own configured
transport on a reserved port and hands back a WsApp, whose
socket(path).bearer(token).connect() yields a WsSocket — send,
next_envelope, expect_silence, expect_close, close. expect_close
panics on a socket that ends without a Close frame: "the connection went
away" is never an acceptable pass. The client is tokio-tungstenite at the
exact version poem's own websocket feature already compiles, so nothing new
enters the build. The WS suites — the framework's own gateway tests included
— now assert close codes and reasons off the wire instead of accepting any
termination.
One throttler guard meters every edge, keyed per caller
Breaking for custom stores and for dashboards. ThrottlerGuard checked
HTTP only, and /graphql and /mcp are Exempt at the endpoint while a WS
message runs after the upgrade chain returned — so a guard bound anywhere
left the three in-band edges unmetered. It now implements check_graphql,
check_mcp and check_ws_message, each behind a crate feature the matching
umbrella edge feature forwards.
- The bucket key gains a transport segment and a caller segment. A
#[query], a#[tool]and a#[subscribe_message]may all be called
search; without the transport they would drain one budget between them.
And the in-band edges key onactor_id— keyed on the operation alone,
every caller shares one bucket and one client spending the window429s
everybody, which is the difference between a rate limiter and a
denial-of-service amplifier. An anonymous surface degrades to a shared
bucket and says so once. - The wait a denial carries now reaches every caller. It was computed by
the throttler, carried on theDenial, and read by exactly one of four
renderers — HTTP'sRetry-After. GraphQL, MCP and WS now carry
retryAfterSecondsin the structured refusal detail wherereasonand
requiredScopesalready ride, and a403never carries it. The value
rounds up with a floor of 1 on every edge: truncation handed every denial
in the final second of a windowRetry-After: 0, an instruction to
hot-retry against the limit the guard just enforced. - The shared-bucket dedup lock is gone from the hot path — it serialized
every anonymous in-band request, a ceiling on exactly the traffic a rate
limiter exists to survive. - Breaking:
ThrottlerStore::hitisasyncand the trait no longer
answerstrusted_proxies()— client identity is the transport's answer.
Therate limit exceededwarn drops the compositekeyfield for
transportplus per-edge fields andretry_after.
A token minted for another service is refused
Breaking, and security-relevant: previously-accepted tokens are now
rejected. A verifier with no configured audience switched jsonwebtoken's
aud validation off entirely, so a token the shared issuer minted for a
sibling service verified here — the confused deputy: every app sharing an
issuer was a credential for every other. RFC 7519 §4.1.3 obliges a verifier
to reject a token carrying an aud it is not named in, and that clause binds
a service naming no audience of its own too.
- The check is now always on. An unconfigured verifier still accepts a
token with noaudat all; what configuringaudienceadds is the other
direction — the claim becomes mandatory. - The opt-out is named:
allow_any_audience
(NESTRS_AUTHN__ALLOW_ANY_AUDIENCE), off by default, reporting itself at
warnonce per boot, and refused besideaudience— one field says
"only tokens for me", the other "tokens for anybody", and silently letting
either win is how a deployment ends up believing the stricter one. issdeliberately gains no twin: §4.1.1 states no clause obliging a
verifier to reject a token carrying an issuer it does not name, so there is
nothing to switch on and nothing to opt out of.JwtOptionsandJwtConfigeach gain the publicallow_any_audience
field.
Three authn gaps, each silent or fail-open, closed
- A machine principal reports its scopes.
AuthenticatedClientinherited
the trait'sscopes() → None, which means not scope-aware — so every
.requires_scope(…)rule applied in full and a client registered for
posts:readsatisfied rules requiring anything. It now answersSome,
always: this is the framework's own OAuth credential, so an empty registry
entry means delegated nothing, never scope does not apply here. - The third way to refuse an OAuth callback now logs. A forged, replayed
or expired transaction cookie produced nowarnanywhere while its two
siblings (provider mismatch, CSRF mismatch) both did. All three now file
oneOAuth callback rejectedevent with a constantreasoncode —
invalid_transaction,provider_mismatch,csrf_state_mismatch— so an
operator greps once and readsreasonto tell them apart. - The Argon2id work factor is pinned at the OWASP recommendation
(m = 19 MiB, t = 2, p = 1) instead of ridingArgon2::default(), which
happens to equal it today — a security-critical parameter sat on a value an
upstream release could lower without a line changing here. Verification
reads the parameters out of the stored hash, so existing credentials still
verify and the constants can move without invalidating a database.
A denial is one event with one vocabulary, on every edge
Breaking for saved queries. reason was two value spaces: gate exits
reported machine tokens (no_class_grant, insufficient_scope) while
masking exits reported whole English sentences, so a query grouping denials
by reason returned tokens from one half and prose from the other — and
HTTP re-typed the tokens as literals because the constant lived behind a
feature it does not build. Every fail-closed exit in nest-rs-authz now
files through one emitter, with reason a constant, the sentence moved to
detail, and the fix moved to remedy — an incident groups by the first
and reads the other two.
- A refusal is a record, not seven arguments (
Refusal): each site knows
a different three of them, and a field added to the record reaches every
site at once — which is the whole reason the emitter is shared. - Every mask failure names its transport, and the one silent branch
logs:masked_output_ambientsent an empty object out with nothing on
nest_rs::authzto say masking had degraded, so a wire type whose fields
are all optional deserialized clean and the operator had no event to find. - An MCP field-grant refusal is filed as the denial it is — same event,
samereasonGraphQL files when a stripped key was selected — and it now
names which keys the grant withheld, the one thing the serde error could
not say. It also tells a class denial from a field grant: a row the caller
may not read at all produces the very same failure, and filing it as
field_not_grantedcarried the nullable remedy — advice that, if taken,
would answer a denied row with an all-null object rather than a refusal.
The client-visible error becomesforbidden, no longer internal. AbilityGuardgains its fourth edge. It attested HTTP, GraphQL and WS
and not MCP, so#[use_guards(AuthzGuard)]on an#[mcp]host did not
compile — and had it been bindable, everycheck_*defaults toOk(()),
so it would have passed every operation in silence.check_mcprefuses an
operation with no ambient ability, and theMcpGuardmarker makes the
symmetric#[use_guards(AuthnGuard, AuthzGuard)]its three siblings carry
bindable here too.
The umbrella matrix pulls what its decorators emit
Breaking: the resource feature is gone. #[expose] expands to
::nest_rs_seaorm:: paths and #[crud] to ::nest_rs_resource:: paths, so
two separate features would each have to imply the other — a cycle Cargo
rejects. seaorm now activates nest-rs-resource directly; a manifest
saying features = ["resource"] drops the word.
seaormandgraphqlimplyauthzstrongly.#[crud]emits
::nest_rs_authz::…unconditionally and a GraphQL posture is mandatory, so
cargo add nest-rs --features http,seaormplus#[crud]wasE0433: cannot find authz in nest_rs— an error inside a macro expansion, blamed
on the attribute, whose natural remedy is exactly the second manifest line
the umbrella rule forbids.redis-throttleris a feature that finally exists.nest-rs-redis
gatedRedisThrottlerbehind its own feature and nothing in the umbrella
forwarded to it, sonest_rs::redis::RedisThrottlerModuleexisted in no
umbrella build —demo/enables every feature and still could not name the
type. Kept separate fromredisso a producer/consumer app that never
rate-limits does not compile the throttler.- The
nest-rs-macro-hygienewitness swapsresourceforseaorm, keeping
the one-dependency proof standing.
The scaffold refuses reserved names, and its prose moves where an agent reads it
nestrs g feature moduleno longer writesModuleModulein
module.rs. A feature named after the structural vocabulary —module,
service,http,apps— collided with the layout it was scaffolded
into, silently. The reserved set is scraped from the architecture rules
file the CLI already embeds, category by category, so the rules and the
refusal cannot drift; the refusal names the category's role and suggests
the domain word.- The teaching prose leaves the generated code. The
// SECURITY:blocks
in the WS, schedule and MCP skeletons, and the migration crate's header,
move into the scaffold'sAGENTS.md— which gains the access-posture
recipe (declare per operation, wire the guards, the two edges that differ)
and a migrations-and-seed section. Public scaffolded routes gain
#[api(summary = …)]so the published document starts described. cargo install --locked nest-rs-cli, in the README and in
nestrs update— an unlocked install resolves this tool's dependencies to
versions it was never built against.
A documented fact is derived once, and the gate fires where it broke
The docs linter derived its own facts: seven checks opened crates/**,
demo/** and the root manifest and re-derived in JavaScript, with regexes,
what nest-rs-conformance derives in Rust with syn and toml_edit. Two
implementations of one definition drift, and these did — the linter counted
umbrella capabilities as features carrying a dep: (27) where the join
counts dep: entries (28), while the linter's own comment claimed the two
derivations could not disagree. The word had never been defined: a feature a
developer types and a crate a feature activates are different sets that
numbered the same until seaorm grew a second dep:.
docs/canon.jsonanddocs/demo-sources.jsonare derived by thecanon
join and read by the linter, which now derives nothing. Verified by
instrumentingfs: zero reads outsidedocs/. Two artefacts rather than
one because the facts are twenty values a reviewer reads at a glance and
the quoted demo corpus is 380 KB that churns wheneverdemo/moves.- The workflow's
paths: docs/**filter became a true declaration, where
it named one input class of eight. A framework change that falsified a page
did not run the job; the failure surfaced later on an unrelated docs commit,
namingindex.mdx, which no commit in the window had touched. Regenerating
the canon now lands adocs/**diff on the commit that moved the fact, so
the gate fires there. TheCargo.tomlentry the filter carried for one
check is gone with the check that needed it. - The linter's thirty-two rules are a family joined against themselves.
Each owes a fixture that makes it fire, aSTYLE.md§ F entry, and no
violation naming anything outsideRULES— thirty bare literals at
thirty-two call sites became one frozen object. Nothing had proved a rule
still fired: neutralising any regex left the gate greener, which
.claude/rules/testing.mdcalls worse than an empty cell. Nothing was
importable either, so the seam was structural rather than a missing chore. - The baseline contract is enforced instead of promised. A line naming a
violation since fixed now fails, a corpus below its floor fails, and
--update-baselineis gone: it re-snapshotted every violation including the
code-truth ones, so the remedy the failure message printed turned a
proven-false public claim into a permanent exemption, offered to whoever
held the red build and could not see the cause from the message.--land <rule>replaces it — one named rule, written and then failed, which is
baseline.rs's shape for its reason. - Two rules the corpus never had.
linkresolves all 969 internal links
and their anchors — a probe page linking a route that does not exist built
clean and shipped the dead href, the only validated targets being the ~20
sidebar slugs. Anchor ids follow GitHub's algorithm, written out rather than
imported becausegithub-sluggerlast published 2023-09-15, outside the
twelve-month freshness bar, and verified against the built site: 933 of 933
agreeing in both directions.fence-driftasserts that a fence titled with
a realdemo/file is an excerpt of it; 102 pre-existing drifts are
baselined and the list only shrinks. - A
docsjoin puts the framework's families against the corpus, so a
family declared in Rust owes a docs cell by construction rather than by
anyone remembering. It found twelve holes and all twelve were closed rather
than recorded:graphql.operationandevents.dispatchappeared on zero
of 125 pages while the table publishing the canonical unit names listed eight
of ten, and ten config keys a deployment can set were documented nowhere —
among them the ceiling on a GraphQL subscription's stale-privilege window and
the bound on a federation_entitiesrequest. - What the pages were saying.
/packages/publishedcargo add nest-rs --features resourcefor a feature335b80e5had deleted, so the command
failed for anyone following the page the landing calls the feature map, while
redis-throttlerwas absent from it. Both authentication pages published a
#[module]inside a file titledmod.rs, which the architecture rules the
CLI generates into every scaffolded project forbid, and/configuration/ testing/published a#[tokio::test]inside one titledtests/e2e/main.rs,
which the locked test-layout norm forbids. One anchor pointed at a heading
renamed out from under it. - Four smaller corrections in the joins themselves.
sources::exported_decoratorsaccepted#[proc_macro]against the argument
its own doc comment makes — a bang macro is appliedname!(…), so it opens a
cell nothing can fill.umbrella.rsdefined a capability as a feature while
counting crates, and its README corpus borrowed the capability floor.
declared_strreads an associatedconstas well as a free one, so the
docsjoin derives the env prefix fromEnvPrefix::DEFAULTrather than
spelling it — whichenv_nameshad refused, correctly.
A driver carries its own subject, and a role file is named for its role
The naming law reaching the last few types that read correctly in isolation and
wrongly against their path. Breaking, and all of it is a rename.
nest_rs_storage::HeadMetadataisObjectMetadata, andStorage::head
returns it. The old name described the call that produced the value; the
value is metadata about an object, andheadis only one of the ways to
reach it. Same field,byte_size, now withDebug/Clone/PartialEqso a
test can assert on one.nest_rs_seaorm::DbHealthIndicatorisSeaOrmHealthIndicator.Dbnamed
no backend — it is the bare capability word worn by one driver, which is
exactly whatRedisThrottlerModuleexists not to be. Its module,
SeaOrmHealthModule, already said the right thing; the indicator beside it
did not.nest_rs_health::HealthControllerispub(crate). A mounted controller
is reached over HTTP, not by name: nothing in either workspace imported it,
and apubon it promised an API nobody had priced.exception.rsisexception_filter.rs, the role the naming tables give
the file. Internal —ExceptionFilteris exported from the crate root as
before.
A health probe's names are settled at boot, and a missing host is an outcome
Two failures a probe could not previously report, both closed where the fact is
known.
- Two reachable indicators claiming one name on one probe fail the boot,
naming both hosts. The name is the probe body's JSON key and
ProbeReport::from_indicatorsfolds by it, so a collision did not merely
shadow an entry: adownverdict could be overwritten by anupone and a
failing check would leave a readiness probe with nothing said anywhere. Which
of the two won wasinventorylink order, which nobody declared. The check is
per probe, not per registry —#[readiness] fn dbbeside#[startup] fn dbaddresses nothing twice, which is the pairnest-rs-seaormships. - An indicator whose host the container does not hold reports
down, it does
not panic. The thunk runs inside a probe request, where a panic takes the
response down; anErris the outcome the crate already renders, with the
real sentence onnest_rs::health. The sentence is the kernel's
INERT_HOST_HINT, so the five causes are named and no unverifiable edit is
prescribed.
A task boundary carries the unit of work, through one seam
nest_rs_core::TaskContext — capture the ambient span and request context at
the hand-off, re-install both around the spawned work. Both halves cross, and
neither substitutes for the other: the span is what puts trace_id on the
events the spawned work emits, the ambient context is what makes
current_trace_id() answer inside it. Carrying only the span leaves the events
looking correlated while every accessor below answers None — the more
expensive failure, because it reads as covered.
Two sites, both of them previously hand-rolling it or missing it:
- A cancelled multipart upload's abort is filed under the request that
opened it. Cancellation is precisely the case where the reader holds the
timed-out request'strace_idand needs the outcome line to carry it. The
context is captured at construction rather than atDrop, because a dropped
future is not guaranteed to be dropped on the task that owned it. - The GraphQL dataloader batch keeps the behaviour it had and stops spelling
it locally.
The test harness says which protocol it speaks, and stops hiding a dead socket
- Edge modules keep their namespace.
nest_rs_testing::graphql::and
::ws::are the paths; the root re-exports ofGraphqlSocket,
GraphqlSocketBuilder,WsApp,WsSocket,WsSocketBuilder,WsFrameand
CloseCodeare gone. Re-exporting both ways gave every type two paths,
and this crate was already spelling one of them two ways 200 lines apart. CloseCodeisnest_rs_ws::CloseCode— RFC 6455 §7.4.1's codes,
published by the crate that chooses them (a gateway closes withAway,
ErrorandPolicy), so a caller writing a gateway and a caller testing one
name one path.nest-rs-ws's own suite used to reach intonest-rs-testing
for it.- Silence and a dead connection are different answers.
WsSocket::read_within
returnsWsRead::{Frame, Silent, Aborted}and the GraphQL driver's
GraphqlEvent/GraphqlRefusalcarry the same split. Folded into oneNone,
a socket that died mid-test satisfiedexpect_silence: the assertion "nothing
was sent" passed because nothing could be sent.close()now loops for the
peer's answer too — §5.5.1 obliges it to reply "as soon as practical", which
does not oblige it to reply first. - The driver speaks
graphql-transport-ws, and says so.graphql-wsis the
legacy subprotocol identifier; the mount negotiates both and this driver
pins the modern one, whose refusal close codes (4400, 4401, 4403, 4408, 4409,
4429)try_connectnow reports instead of mapping every one of them toNone. mcp::PROTOCOL_VERSIONis pinned to the SDK's ownLATEST, by a test.
It sat on2024-11-05for four revisions and nothing said so: rmcp accepts the
oldest revision forever, so every MCP suite in both workspaces passed while
negotiating a handshake no current client performs. A shared constant was never
the guard against that.nest_rs_mcp::ProtocolVersionis re-exported so the
comparison has something to make.
A global ExceptionFilter covers the route table, not the edge
"Global" means a different thing for the two layer families, and only one of
them said so. A global Filter attaches a wrap at the transport edge, so it maps
errors raised where no route matched. A global ExceptionFilter is read
per route by the #[routes] composer — so a 404, a self-mounted surface such
as /graphql or /mcp, or a WS upgrade never reaches one, even when the error
raised there is exactly the type it claims to catch. Use a Filter for those.
Documented on the trait method, on /fundamentals/exception-filters/, and in the
dedup section, which also stops describing the two as nesting: both compose
through compose_chain into a single chain endpoint per route
(ExceptionFiltersEndpoint for the typed catches, FilterChain for the untyped
ones), so the dedup covers every pair of scopes including controller + method
with no global in play.
nest-rs-filters no longer claims to span transports. Its crates.io
description and README said "on HTTP, GraphQL, and WS"; a Filter is bound at
the HTTP edge and reject_http_only_layers is the compile error the other three
edges already raise. The claim was read by everyone as true of them.
Also
-
nest-rs-opentelemetryloses five dependencies and gains a voice.
nest-rs-http,nest-rs-interceptorsandpoemwere optional entries
withoutdep:, so Cargo synthesised a public implicit feature per entry
and--features poembuilt poem — the opposite of what the manifest's own
comment described;tokioandasync-traitwere simply unused. And an
unparseable<PREFIX>_LOG_FORMAT/_LOG_SOURCE_LOCATIONnow reports
itself instead of silently keeping the default —LOG_FORMAT=consolegave
a production deploy text output where it asked for JSON, with nothing
anywhere saying why. -
Two boot internals leave the kernel's surface.
nest_rs_core::access::reachable_provider_idsand
container::DuplicateProvidergopub(crate), having no caller outside
the crate in either workspace; the unit catalogue inoperation_lognow
names the edge crates that own each constant. -
The OpenAPI document lines file under
nest_rs::openapi, not
nest_rs::routes— a target's one job is to say where an event came from,
and the write happens innest-rs-openapi. -
nest_rs_core::unresolved_hostis the run-time half ofINERT_HOST_HINT.
Five decorators resolve their host withContainer::get::<Self>(), so the
sentence they report belongs beside the boot-time one rather than inside
whichever capability wrote it first. -
OpenTelemetryMetermoves tometer.rsandPipeErrortoerror.rs—
a file exists for its own content, and errors live inerror.rs.
nest_rs_opentelemetry::parse_boolis no longer re-exported; it is
nest_rs_core::parse_booland always was. -
nestrs doctorreads the namespaces that exist. It answered for
NESTRS_DATABASE__URLandNESTRS_QUEUE__URL, which no#[config]declares
any more — it now reportsNESTRS_SEAORM__URLandNESTRS_REDIS__URL. Its
Rust floor is parsed fromCARGO_PKG_RUST_VERSIONrather than retyped, so the
toolchain sweep no longer compares the anchor against a stale copy of itself. -
A dry run says so in every sentence it prints.
nestrs newclaimed
"Created …" and pinned an HTTP port directly above "Dry run — no files
written."; the tense is read off the report, which is the thing that knows. -
A scaffolded skeleton no longer restates the edge's own line. The queue
processor and the scheduled tick each filed aninfobeside the one
nest_rs::operationalready files per unit of work — the same work said twice,
on a target the documented toggle does not silence.tracingleaves those two
skeletons' generated manifests with it. -
nestrs g mcpnames the tool after the resource, not its singular.
Names::tool()readsingularwhere its six siblings readpascal. -
A generated
mod.rsexports the module and not the handler. A controller
reachable asfeatures::posts::*is a decision the generator was making for
every project at once. -
LogCapturecan assert on what it could not see.CapturedEventcarries
the event'sname:— its metadata identity, which an OTLP log bridge exports
asevent.name— so a line whosename:had drifted from its message no
longer passes every assertion in the repo;CapturedSpancarrieslevel, so
the Level per layer contract is assertable for spans and not just events, and
it is exported from the crate root. The buffers survive a poisoned lock rather
than panicking a second time on top of the first failure. -
EphemeralDatabasestops dropping the host of a path-less URL. RFC 3986
§3.2 terminates the authority at the first slash after the scheme, not the
last, sopostgres://host:5432yieldedpostgres://<db>— surfacing much
later as a connection error naming a URL the developer never wrote. The
ephemeral name's prefix is one constant now, read by the reaper instead of a
hand-counted_offset that a rename would have shifted silently. -
nest-rs-healthdropsnest-rs-interceptors, which it never named, and
OpenTelemetry::init_for_testsis#[doc(hidden)]— a harness entry point,
not a documented one.nestrs infostops printing aCLIrow that
nestrs versionalready owns.
The documented front door is compiled
use nest_rs::prelude::*now has a reader, and it had drifted where
nothing looked.#[resolver]and#[mcp]were re-exported without their
impl halves#[operations]and#[tools], so the documented import gave the
struct half of two decorator pairs and an unresolved attribute on the other —
whose natural remedy is exactly the second manifest line the umbrella rule
forbids. The witness lives innest-rs-macro-hygiene, which now applies
every prelude decorator rather than merely importing it, because a glob
import cannot fail on a name it does not find.#[input]leaves the prelude'shttpblock. It isnest-rs-core's and
every edge re-exports it, which is the statement that it belongs to none of
them; behindhttpit left a--features queueworker's job payload with no
#[input]and a remedy that pulls the whole HTTP stack into a headless
binary.nest-rs-guardsdocuments all its features on docs.rs. The three
per-edge marker traits are feature-gated and docs.rs builds default features
only, so the published page carried neither the traits nor the links naming
them.fullstates its one exception. It pulls every capability buttesting,
which is a--devinstall; folding it in would put a test harness in every
release binary of anyone who took the undecided default. Asymmetry argued in
the manifest, not silent.- Two capabilities gained their composition witness.
nest-rs-server-timing
andnest-rs-healtheach boot the documented wiring in their own crate and
read the result back — the header off a route, the probe off the controller —
instead of leaning ondemo/to prove it.
Every declaration grammar refuses the same four ways
A decorator that takes key = value arguments owes four refusals, each a
compile error naming the decorator, the offender and the alternatives, spanned
at the offending token:
| The offence | The sentence |
|---|---|
| an unknown key | unknown #[crud] argument `servcie`; expected `service`, … or `paginate` |
| a key written bare | #[queue] `name` needs a value — write `name = ...` |
| a key written twice | #[controller] takes at most one `path` |
| a value outside a closed vocabulary | unknown #[injectable] scope `reqest`; expected `singleton`, `request` or `transient` |
The four sentences are worded once, in nest_rs_codegen, and every decorator
now reads them from there. Seven had adopted all of them and four had adopted
none: #[expose], #[api], GraphQL's #[authorize] and #[inject] each took
a repeated key and kept whichever came last in source order — on #[api] that
is published prose choosing itself, on #[authorize] it is which service loads
the authorized subject. A bare key on several grammars died on syn's
expected `=` with no decorator named, and a wrong value was answered five
ways, three of which named neither the decorator nor the key.
- What was silently wrong is now a compile error. Code that spelled a key
twice compiled before and does not now; what it meant was already ambiguous. - Fifty-six new trybuild snapshots pin the sentences, one per refusal per
decorator, across eight crates. - A
grammarsjoin innest-rs-conformancederives the population — a
decorator is in it the moment a*-macroscrate names a key set — and fails
the site that hand-rolls or drops a refusal, so the next decorator cannot
ship half of this.
A concern lives in the crate that owns it
Breaking for Rust importers; nothing changes on the wire, in a decorator, or
in a filter directive. A cluster of kernel exports moved to the edge that owns
them, and the two strings every crate had re-typed moved into the kernel:
| Was | Is |
|---|---|
nest_rs_core::operation_log::unit::HTTP_REQUEST, … |
nest_rs_http::unit::REQUEST, nest_rs_ws::unit::{MESSAGE, CONNECT, DISCONNECT}, nest_rs_queue::unit::JOB, nest_rs_schedule::unit::TICK, nest_rs_mcp::unit::OPERATION, nest_rs_graphql::unit::SUBSCRIPTION |
nest_rs_core::{HandlerMetadata, MappedError, Public} |
nest_rs_http::{HandlerMetadata, MappedError, Public} |
nest_rs_core::current_body_limit, and the body-limit argument on with_request_scope / RequestContinuation |
nest_rs_http::current_body_limit; the HTTP edge carries its own limit around body polls |
AppBuilder::strict_resolver_membership() |
GraphqlConfig::strict_resolver_membership — a real config field, env-settable and pinnable through GraphqlModule::for_root |
UnreachableResolversError, in the kernel |
OrphanResolver, in nest-rs-graphql; the boot warn files on nest_rs::graphql |
- The unit names go where the span targets went last release. A unit name
says which edge did the work, and the kernel does not know the edges exist.
The<edge>.<unit>grammar staysnest_rs_core::operation_log's; the names
do not — the same split as targets, held by the same conformance join. HandlerMetadatareads apoem::Requestand marks apoem::Response—
two types the kernel cannot name — and the other edges resolve posture at
compile time, so the "transport-agnostic" contract had one implementor and no
second candidate for as long as it existed.- A capability's knob was sitting on the kernel's seam. The body limit is
HTTP's and the orphan-resolver policy is GraphQL's; each now lives with its
owner, and the GraphQL one becomes a config a deployment can set rather than
a builder method only code could call. - What moved in is what everyone had re-typed.
nest_rs_core::parse_bool
is the one truthy/falsy vocabulary for every framework boolean variable — it
sat behind theloggingCargo feature, so the crate reading every
<PREFIX>_<NS>__<KEY>boolean had respelled it. And
nest_rs_core::UUID_V7_REQUIREDis the one sentence the three id gates word
(#[crud]'s, HTTPBind's, GraphQLbind's) — two of the three had already
drifted apart. - The kernel's access exports now match the family.
ScopeViolationError
joins its six siblings — it was the one boot error a caller could not name as
nest_rs_core::…— and the three graph validators wentpub(crate), having
no caller outside the crate in either workspace. - A contained panic is logged under one field name. The downcast ladder was
already shared innest_rs_core::panic; the field it lands in is now declared
beside it and held by anest-rs-conformancejoin across the three seams
that catch — the scheduler, the event bus, the queue consumer.
Two config types reading one variable is a boot error
ConfigService now records which type each resolved variable was read for, and
the second type to read the same name fails its resolve with
ConfigError::ContestedVariable — naming the variable, the owner and the
claimant. Several types sharing a domain stays deliberate (nest-rs-authn
ships three authn configs); two types sharing a variable meant a deployment
setting it configured whichever happened to read it, both silently — their key
sets disjoint by accident of the current fields, a fact about today rather than
a property anything held.
The recording sits on the reader rather than on the type: HttpConfig
delegates ten of its keys to sub-structs that are not Configs, and nothing
that inspects types can see those reads. The free env_var stays outside the
registry deliberately — it is the documented spelling for a cross-namespace
borrow, and what an unowned read should claim is an owner question, recorded in
the module doc rather than silently decided.
The operation-log target is nest_rs::operation
Breaking for operators; nothing to change in Rust. The one line every edge
files per unit of work moved from nest_rs::access to nest_rs::operation:
INFO nest_rs::operation: tick ran provider="AudioTasks" method="warmup_on_boot" outcome="ok" duration_ms=0.302 trace_id=01a015a91d527cb1b9d15a8ba7fe8846 span_id=bd824ae7eb1f9e7a
| Old | nest_rs::access |
| New | nest_rs::operation |
| Change | NESTRS_LOG / RUST_LOG directives, log-router rules, dashboard and alert queries |
The Rust surface is unaffected — the target has always been read from
nest_rs_core::operation_log::TARGET, so any code importing it follows with no
edit. What breaks is every place the string was typed by hand: a filter
directive, a runbook, a saved search, a dashboard panel. A stale
nest_rs::access directive now matches nothing and fails silently, so grep for
it rather than waiting for a quiet console to be noticed.
- The old name was HTTP's word for HTTP's line. It survived the
generalisation to six edges in 5.1, where it stopped being true of five of
them: a scheduled tick has no caller, so nothing accesses anything. Every
other framework target names a subsystem and is rooted at the crate that emits
it; this one names a category of line that crosses all of them — exactly one
per unit of work, carrying anoutcomeand aduration_ms— and a
subsystem-shaped word hid that.operationis the word the operation span,
the MCP edge'soperation servedand the owningoperation_logmodule
already used. nest_rs::accesswas also silencing a target nobody meant to silence, and
the rename fixes it.EnvFiltercompares a directive's target to an event's
withstarts_withon the raw string rather than by::segment, so
nest_rs::accessmatchednest_rs::access_graphtoo — the bootwarnnaming
resolvers unreachable from the GraphQL schema. The documented toggle,
NESTRS_LOG=info,nest_rs::access=off, therefore took that startup diagnostic
away as well, with nothing on the console to say it had. Anyone who ran that
directive was missing those warnings;nest_rs::operation=offsilences the
operation log and nothing else.- The property is now executed, not just intended. A join in
nest-rs-conformancederives everytracingtarget both workspaces emit and
fails when one is a prefix of another, andnest-rs-coreasserts the
EnvFilterbehaviour the join rests on. NESTRS_HTTP__ACCESS_LOGis unchanged and stays correct. It toggles one
edge's per-request line — which is what an access log is — rather than the
family, and it is an app's pinned config rather than a deployment's filter.
nest-rs-http'saccess_log.rskeeps its name for the same reason.
One canonical name per unit of work
Breaking for operators. The message on an operation line is now the unit's
canonical name — the same string its span carries — instead of a sentence
written per edge:
| Edge | Was | Is |
|---|---|---|
| HTTP request | request served |
http.request |
| WS message | message served |
ws.message |
| WS socket open/close | socket lifecycle + lifecycle="connect" |
ws.connect / ws.disconnect |
| Scheduled tick | tick ran |
schedule.tick |
| Queue job | job ran |
queue.job |
| MCP operation | operation served |
mcp.operation |
| GraphQL subscription | subscription served |
graphql.subscription |
INFO nest_rs::operation: schedule.tick provider="AudioTasks" method="warmup_on_boot" outcome="ok" duration_ms=0.302 trace_id=01a015a91d527cb1b9d15a8ba7fe8846 span_id=bd824ae7eb1f9e7a
INFO nest_rs::operation: queue.job queue="audio" processor="AudioProcessor::transcode" attempt=1 outcome="ok" duration_ms=33.733 trace_id=01a015a9252076e399f736a97ae90784 span_id=7bbcfc44c1f0c676
Reading which kind of work a line reports no longer means inferring it from
which fields happen to be present.
- There were two vocabularies for the same eight things. Four edges already
named their spanhttp.request,ws.message,mcp.operation,
graphql.subscription; the other two had drifted to prose ("scheduled job",
"process job"), and every line invented a third wording.nest-rs-wshad
already hit the wall and left the workaround in a comment — "lifecycle
rather than the span's name becausetracingoffers no way to read one back".
Now there is one name,<edge>.<unit>, declared in
nest_rs_core::operation_log::unit. - It is also the log record's event name. Each line sets
name:, which
opentelemetry-appender-tracingmaps to the exportedevent.name. That field
used to carryevent crates/nest-rs-mcp/src/propagate.rs:183— a source path,
one value per call site. Nothing here depends on the exporter: the constants
are&'static strin the kernel and an app that exports nothing pays nothing. - The namespace comes from the closed edge vocabulary, so a new transport
cannot invent a seventh word without opening the edge deliberately. lifecycleis gone from the WS lifecycle line —ws.connectand
ws.disconnectsay it.- A join in
nest-rs-conformancederives every naming site and refuses a
literal at any of them, and it reads doctests as well as items. It did
not, and the one example teaching the grammar —operation_span!'s own — was
therefore the one site spelling all three slots as literals, with nothing
failing.synlowers///to#[doc = "…"], so an example is a string
literal to a macro visitor; it is now parsed back into code and walked, since
an example is what a developer copies.
Every span target and span kind is a constant
230 call sites that spelled target: "nest_rs::orm" now name a constant, so a
typo is a compile error instead of a target carrying one event that no filter
selects. operation_log::kind does the same for the five otel.kind values.
- The crate that owns the concern declares it —
nest_rs_events::TARGET,
nest_rs_seaorm::TARGET,nest_rs_ws::TARGET— and everything emitting on it
reads that constant, a sibling crate and a*-macrosexpansion included.
Owning is not emitting:nest_rs::routesis filed from six crates and
nest_rs::queuefrom a macro expansion rather than fromnest-rs-queue
itself. A target's one job is to name where an event came from, so a central
table in the kernel would have meantnest-rs-corecarrying a name for a
concern it does not know exists. - A crate owning several concerns gets a
targetmodule, and there are
exactly two:nest_rs_core::target(six) andnest_rs_http::target(the
transport and its route table). report_inert_host!now takes an expression rather than a literal target.- Nothing an application writes is affected: an app's own
tracing::info!on
its own target is untouched, and only the framework's own family is policed.
Full Changelog: https://github.com/YV17labs/NestRS/commits/v6.0.0