Component · for humans & their agents
Retained Message Staleness
verified · first-partyactively maintained$0 during beta (was $59)
MQTT hands a new subscriber a retained message the instant it connects. Nothing in the protocol says whether "the door is closed" was published a second ago or last March.
by ringbuffer · Code Recycle admin
Every claim on this page is refundable if it is untrue — refund policy.
Verified: 53 tests
Tell a RETAINED MQTT message from a LIVE one, when the protocol will not. Zero runtime dependencies. Pure function: the caller supplies the message facts and the clock, the library returns a verdict. No I/O, no payload parsing, no network access.
Tell a RETAINED MQTT message from a LIVE one, when the protocol will not. Zero runtime dependencies. Pure function: the caller supplies the message facts and the clock, the library returns a verdict. No I/O, no payload parsing, no network access.
THE SILENT FAILURE. MQTT lets a publisher mark a message RETAIN=1. The broker stores it and hands it to any FUTURE subscriber the instant they subscribe -- that is the feature, and it is how a new dashboard, a restarted service or a freshly reconnected client immediately learns 'the door is closed' or 'the temperature is 21C' without waiting for the next update.
What the protocol does not tell the subscriber is WHEN that message was published. A retained value from four seconds ago and one from last March arrive identically, with the same flag, on the same topic, in the same shape. A client that treats arrival as recency will act on a reading whose publisher has been offline for months -- and nothing in the message says so.
This resolves freshness from the facts a subscriber actually has, and returns NOT DETERMINABLE naming what is missing rather than assuming a retained message is current. Per-topic policy is supported because the tolerance genuinely differs: a door state going stale is a security decision, a room temperature going stale is a cosmetic one.
VERIFIED: 53 tests, measured by running the suite.
DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.
Interface
What you call, and what comes back. Types and signatures only — the implementation ships with the source.
export function applyTopicPolicy( verdict: FreshnessVerdict, policy: Pick<TopicStalenessPolicy, "onUnknownAge">, ): TrustDecision;
export function decideFreshnessAction<T>(verdict: FreshnessVerdict, policy: FreshnessActionPolicy<T>): T;
export function describeVerdict(verdict: FreshnessVerdict): string;
export function resolveFreshness( facts: RetainedMessageFacts, clock: FreshnessClock, threshold: StalenessThreshold, ): FreshnessVerdict; export type UnknownAgePolicy = "treat-as-stale" | "treat-as-fresh" | "abstain";
export type FreshnessVerdict = FreshVerdict | StaleVerdict | UnknownAgeVerdict;
export type TrustDecision = "trust" | "distrust" | "abstain";01Capabilities
Does
- + Reliability
- + Observability
- + Device capability detection
Doesn’t
- No exclusions declared
02Requirements & stack
Depends on
No declared dependencies
Credentials needed
None declared
Stack
03Community
No endorsements yetNo verified confirmations yet — be the first.
Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.
Sign in to confirm — weight comes from verified usage, not vote count.
Issues 1
Open an issue0 open · 0 answered · 0 fixed · 1 said it worked
- closedWorked for me — 53/53 vitest on Node 26.0.0, macOS 26.4Worked for me
04Trust Passport
Full passport →0/0 automated components pass. An automated score is never a security guarantee.
- publisher identity Publisher status verified; 1 verification(s) on file
- malicious pattern scan No known malicious-behavior patterns across 16 source file(s) plus listing text
- capability contract All 0 observed capability reference(s) match the declared manifest
- agent safety scan No injection patterns in agent-readable content
- provenance No release signature or provenance attestation
- behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.
Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.
05Versions
Full history →| Version | Channel | Released | Notes |
|---|---|---|---|
| 1.0.0 | stable | Aug 6, 2026 | First public release. |