Component · for humans & their agents
Search Degradation Signal
verified · first-partyactively maintained$0 during beta (was $49)
A fallback that still returns 200, still returns results, and still looks fine is the one nobody notices. Degradation tracking for a search path that has a smart mode and a dumb one — so "we are serving, badly" is a state your health check can actually report.
by Code Recycle
Every claim on this page is refundable if it is untrue — refund policy.
Building it yourself: ~1.3h of agent time across about 3 attempts. Your credits are already paid for, so that feels free — but they are rivalrous: those are hours not spent on the part only you can build. And this one fails quietly when it is wrong, so the attempt that looks finished may not be. $49.
13 tests. Pure functions, zero runtime dependencies, ESM. No provider SDK, no environment
The incident this exists for
A production model key hit its usage cap. Query understanding fell back to the deterministic regex path and stayed there.
Nothing broke in a way anyone could see. Results still came back. HTTP status was still 200. The only tell was a mode: "lexical_fallback" field on a response nobody reads.
92.7% of the previous two days' searches had already degraded before anyone noticed.
That is the failure mode of every graceful fallback: it is designed to be invisible, and it succeeds. The service is up, the users are served, the quality quietly halved, and the monitoring was built to answer "is it up?"
Rule 1 — ok stays true while status says degraded
healthPayload reports ok: true and status: "degraded" at the same time, because both are true — the service is serving and it is serving badly.
Collapsing that into one boolean is what produced the incident. ok: false would page someone for a service that is working; ok: true alone says nothing is wrong. There is a test named for this — "if status cannot differ from ok, this whole module is theatre" — which is what the original { ok: true } payload was.
Rule 2 — observed and predicted are separate fields
degraded is what broke while running. misconfigured is what was never going to work on this instance at all.
They are never merged, because they are different pages for whoever gets woken up. One means "something changed"; the other means "this deployment was born broken."
Rule 3 — the boot check, because serverless hides the truth
A misconfigured instance is knowable before any traffic proves it. That matters more than it sounds: serverless runs many short-lived instances, so a monitor polling /health keeps hitting instances that have served no search yet and keeps being told everything is fine — on a deployment where every search is guaranteed to degrade.
Rule 4 — degradation clears, so a blip is not permanent
recordHealthy clears the record. Without it, one transient failure marks the service degraded forever and the signal becomes noise you learn to ignore.
The predicate is injected
healthPayload(base, smartPathAvailable) takes "is the smart path available?" as an argument. This package reads no environment variables and carries no provider SDK.
Pass the same predicate your search path actually branches on — not a second reading of the environment. Two copies of "is a model available", in two places, is precisely the shape that lets a keyless instance pass a green test run while degrading every real request.
> Changed from the original. Upstream this read ANTHROPIC_API_KEY and AMOS_AI_MODE > directly. Those are one provider's names, and a package that reads them is not reusable — so > the predicate moved to the caller and the two env cases collapsed into one boolean, since both > produce identical behaviour. The inherited tests were updated to pass the predicate explicitly > rather than manipulate the environment.
What this does NOT do
No searching, no ranking, no alerting, no metrics export. It is an in-process record plus a health payload. It does not persist across restarts — deliberately, since a restarted instance has not yet observed anything.
No paging or notification. Wire status into whatever you already run.
Verified
13 tests: ok-with-degraded, naming what and why, separate observed and predicted fields, the boot check with no traffic, recovery clearing the record, and preservation of caller-supplied fields.
Not covered: nothing tests behaviour across instances or restarts, because there is none — the record is per-process by design.
01Capabilities
Does
- + Error monitoring & alerts
- + Observability
- + Search relevance ranking
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 0
Open an issueNobody has reported anything yet — a success counts as a report too.
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 7 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 |
|---|---|---|---|
| 0.1.0 | stable | Aug 11, 2026 | Initial extraction. |