A synthetic code base of the fictional company Acme for testing ProtoMap: 180 gRPC services with 1397 methods in 12 domains, and 5097 protobuf messages with 22163 fields, many nested several levels deep.
It was generated, with the eight other protomap-test-* repositories, from one catalog of Acme's APIs. The repositories
own disjoint domains and call each other's services, so each holds copies of the protobuf files it needs from the
others, byte for byte as their owners have them.
Acme Live sells and runs live events: venues, shows, tickets, seating, the box office, admissions, and more. The code is
plain CommonJS JavaScript for Node.js 22 or newer, with no build step: @grpc/proto-loader loads the protobuf files
under proto/ at startup, so there are no generated bindings, and messages are plain objects with the fields' own
snake_case names. src/domains/ holds each team's handlers and operations, written as handler modules over operation
modules, as service classes, or as handler factories; src/platform/ holds the clients, the promise and stream adapters
over grpc-js, request context, the PostgreSQL store, and an EventEmitter work bus. src/server/main.js registers every
service behind an identity interceptor and starts the workers; src/jobs/ and src/admin/ hold batch jobs and operator
commands. Use pnpm 12.14.0: pnpm install, pnpm check, and pnpm test. Set DATABASE_URL, run pnpm migrate, and
set GRPC_MESH, GRPC_LISTEN, and the service credential ACME_SERVICE_TOKEN before pnpm start. Only work-bus
handoffs are marked as known gaps in the oracle.
The domains are fanportal, venues, shows, ticketing, seating, boxoffice, performers, tours,
admissions, concessions, sponsorships, broadcasts. It calls services of accounting, analytics, anomalies,
assets, audit, authorization, benefits, billing, budgeting, campaigns, catalog, chat, collections,
configuration, content, contracts, corporateevents, customers, datasets, devices, documents, drivers,
employees, expenses, featureflags, featurestore, fleet, forecasting, forms, fuel, fulfillment,
giftcards, helpdesk, identity, invoicing, itsm, ledger, licensing, lineage, loyalty, maintenance,
metrics, notifications, onboarding, orders, patients, payroll, pipelines, prescriptions, procurement,
promotions, ratelimiting, recruiting, risk, routing, search, secrets, shipping, suppliers, surveys,
telematics, timekeeping, travel, treasury, warehousing, webhooks, yards too.
expected.json lists what scanning the repository must find: every handler, every call a handler or a program makes,
and every field-level flow from where a handler has data to where a call or its response takes it, each tagged with the
shape of the code that makes it. crates/graph/tests/fixture_coverage.rs in protomap-source checks a scan against it.
The code mixes in, on purpose, what makes static analysis of real code bases hard. Flows by pattern:
| Pattern | Flows |
|---|---|
async_storage |
597 |
bidi_call |
96 |
bound_method |
626 |
call_helper |
606 |
callback_promise |
617 |
client_stream_call |
77 |
deferred_task |
623 |
destructure |
635 |
dynamic_method |
648 |
echo |
2015 |
event_bus |
646 |
injected_client |
575 |
json_roundtrip |
636 |
object_assign |
617 |
object_spread |
646 |
oneof_switch |
510 |
program_batch |
24 |
promise_all_map |
208 |
promise_all_settled |
206 |
registry_lookup |
628 |
retry_wrapper |
631 |
sequential_loop |
204 |
server_stream_call |
424 |
structured_clone |
635 |
util_promisify |
600 |
Flows whose values pass through something on their way, by what:
| Transform | Flows |
|---|---|
array_spread |
90 |
destructure |
441 |
json_roundtrip |
447 |
map_spread |
301 |
object_assign |
424 |
object_spread |
452 |
oneof_switch |
119 |
response_merge |
4958 |
structured_clone |
437 |
Calls by pattern:
| Pattern | Calls |
|---|---|
async_storage |
129 |
bidi_call |
24 |
bound_method |
130 |
call_helper |
128 |
callback_promise |
130 |
client_stream_call |
24 |
deferred_task |
131 |
destructure |
134 |
dynamic_method |
132 |
event_bus |
131 |
injected_client |
128 |
json_roundtrip |
127 |
object_assign |
134 |
object_spread |
133 |
oneof_switch |
100 |
program_batch |
24 |
program_cli |
8 |
promise_all_map |
57 |
promise_all_settled |
57 |
registry_lookup |
134 |
retry_wrapper |
131 |
sequential_loop |
56 |
server_stream_call |
126 |
structured_clone |
130 |
util_promisify |
129 |