The Drift Log · Software inventory you can trust
Detecting Stub Entries in Your Component Registry
7 November 2026 · 3 min read · 679 words · established

Static scrapers record type signatures and mark stubs as healthy. Dynamic contract execution separates working code from aspirational placeholders.
Your internal catalog reports 412 reusable components. Three teams depend on an authentication helper listed in the index, but when an engineer imports it, the function body contains a throw new Error("Not implemented") or returns a hardcoded mock object left behind from a prototype sprint. The component exists in the database, passes linting, satisfies the metadata schema, and fails the moment someone relies on it.
A raw count of rows is a claim, not an inventory. As outlined in the core principle that a component count is not an inventory, counting package manifests or exported names rewards teams for declaring intent rather than delivering capability. A registry stuffed with non-functional placeholders degrades developer trust and hides your real maintenance surface.
How Stubs Hide in Plain Sight
Stubs survive because traditional registry scrapers inspect metadata rather than behaviour. They verify that an entry has an owner, a semver tag, a description, and an exported TypeScript signature.
A stub satisfies every one of those checks:
export async function verifyWebhookSignature(
payload: string,
signature: string,
secret: string
): Promise<boolean> {
// TODO: Implement HMAC SHA-256 verification
return true;
}
Static indexers record the signature, mark the component as healthy, and increment the catalog size. This is how registry inflation occurs without malicious intent. An engineer reserves a namespace, scaffolds an interface, and intends to write the implementation later. When priorities shift, the scaffolding remains.
Without executable proof, your metadata-driven index is an aspirational backlog masquerading as an asset ledger.
Dynamic Execution Over Static Linting
Reliable stub detection requires moving from schema validation to dynamic execution. If an entry cannot be exercised by an automated test harness with concrete inputs, it cannot be warranted as a component.
A proper certification harness subjects each candidate to a battery of automated checks:
- Runtime instantiation: Does the component load in an isolated environment without relying on unstated environmental side effects or missing ambient modules?
- Contract execution: When passed boundary values matching its type signature, does it compute a valid result, or does it trigger an internal placeholder trap?
- Mock and constant leakage: Does the implementation rely on static return values regardless of inputs (for instance, always returning
trueor{ id: "mock-id" })?
When the harness executes the registry, each entry resolves to an explicit verdict:
- CERTIFIED: The implementation executes against its boundary contract and proves functional behaviour.
- PROVISIONAL: The code runs reproducibly in a clean environment, but the harness has not yet exercised the full boundary condition suite.
- INCONCLUSIVE: The harness could not construct valid inputs for the signature. This reflects a harness test generation limit rather than a verified component defect, keeping the row uncertified without penalising the code.
- FAILED: The component crashes on import, throws unimplemented errors, or exhibits trivial stub behaviour.
Filtering your catalog through execution sweeps away the illusion of volume. The output is a verified subset you can stand behind.
Restoring Inventory Hygiene
Detecting stubs is the technical foundation for evicting stub entries from your internal component registry. Once identified, stubs should not necessarily be deleted—scaffolded interfaces can remain in an unpromoted staging tier or discovery vault while engineers build them out.
However, inventory hygiene demands that unverified rows are never reported alongside certified components. You cannot sum them into a single vanity metric. A component either provides executable proof of its behaviour, or it remains an unpromoted work in progress.
What to Run on Monday
To conduct an initial registry audit without overhauling your entire continuous integration pipeline:
- Extract pure exports: Query your registry for all zero-dependency utility functions and self-contained helpers.
- Run differential input passes: Write a simple runner that feeds three distinct sets of valid inputs into each target function.
- Flag static returns and runtime errors: Any function that returns identical primitive literals across disparate inputs, or that throws an unhandled exception on standard arguments, is a stub candidate.
- Split your dashboard: Create two separate metrics in your developer portal: Certified Executable Components and Unverified Declarations.
Keep the two numbers strictly separated, and never sum them into a single total.
Keep reading
Next in the log
- Executable Registry Entries as True Inventory
Run every registry row through SHPBL’s repeatable harness to turn a static list into a verifiable, executable inventory.
- Executable Registry Entries as Live Component Tests
Pair each registry entry with a lightweight harness that runs the component and records a CERTIFIED, PROVISIONAL, INCONCLUSIVE, or FAILED verdict.
- Executable Registry Audits to Identify Load‑Bearing Components
Run SHPBL’s certification harness to prove which registry rows are truly load‑bearing and which are dead code.
The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.