rte-05 reproduction

Public source retained with the related article. Generated results, dependency directories, runtime storage, secrets, and oversized binary artifacts are intentionally excluded.

README

# RTE-05: compare indexed selection with a full scan

Run with Node.js:

```sh
node experiment.mjs
```

The public teaching model uses only the standard library. It needs no database,
framework, credentials, network, or installation step and writes no files.

The reference scan applies the predicate directly to every synthetic row. The
indexed path gathers wildcard, carrier, service, and combined memberships,
deduplicates row identities, then applies remaining conditions and ordering.
Prepared rows omit the carrier/service predicates that bucket selection has
already enforced. The full scan keeps those conditions. A deliberate
wrong-carrier example shows why the remaining predicate cannot repair a
mis-bucketed reference after those fields are removed.
Assertions compare ordered row IDs across 336 cases covering carrier identity,
service ID/code/canonical forms, repeated aliases, required options, zones,
and inclusive weight boundaries. An intentionally broken wildcard-free index
must disagree with the scan.

The printed counts describe this model's work, not measured latency or the
private engine's workload. Both paths share only the remaining predicate;
the comparison tests whether the index faithfully replaces carrier/service
filtering, not whether the model expresses every domain rule. It omits compact-row codecs, malformed
artifact recovery, full route/season/offer/goods matching, price computation,
component exclusivity, and concurrent publication. All rows and identifiers are
synthetic. Array-encoded combined keys avoid assuming a delimiter contract.

Retained files