• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rustymotors / server / 25554677907
44%

Build:
DEFAULT BRANCH: dev
Ran 08 May 2026 12:09PM UTC
Jobs 1
Files 280
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 May 2026 12:07PM UTC coverage: 44.3% (+0.09%) from 44.206%
25554677907

push

github

web-flow
Port parts catalog + part-mgmt MCOTS handlers from Recons (#2832)

## Summary

Brings two pieces of legacy MCO functionality into the main server, both
of which were previously implemented only in Recons
(\`tools/mco-revival.mjs\`) and were missing from \`dev\`:

1. **Parts catalog HTTP endpoint** at \`GET /mco/local/58\` — the legacy
client fetches parts metadata from this URL during gameplay. Without it,
parts pickers are empty.
2. **Four MCOTS opcodes** the client sends for part management —
previously hitting \`UNSUPPORTED_MESSAGECODE\`:
   - 177 \`MC_REPAIR_SINGLE_PART\`
   - 178 \`MC_REPAIR_MULTIPLE_PARTS\`
   - 182 \`MC_REMOVE_PART\`
   - 214 \`MC_DESTROY_PART\`

### Designed for swap-in DB later

The catalog ships behind a \`PartsCatalog\` interface with a
\`TsvPartsCatalog\` implementation reading
\`packages/database/seed/parts-catalog.tsv\` (3236 rows, copied from
Recons). The factory selects an implementation via
\`MCO_PARTS_CATALOG_SOURCE=tsv|db\` env var (default \`tsv\`); the
\`db\` branch is a stub-throw with a \`TODO(parts-catalog-db)\` marker —
when ready, drop in a \`DbPartsCatalog\` class that reads from
\`BrandedPart\` / \`AbstractPartType\` / \`PartGrade\` and add one
\`case "db":\` line. Handlers and the HTTP route never need to change.

### Stub-only handlers

All four MCOTS handlers parse the partId from the \`GenericRequest\`
payload, log a structured event, and ack with \`MC_SUCCESS\`
(DESTROY_PART returns no reply, matching the legacy "who cares" comment
and Recons's behavior). Every deferred concern is tagged with
\`TODO(parts-mgmt)\` or \`TODO(parts-mgmt-economy)\` markers —
including:

- ownership validation
- subtree handling for remove/destroy (yanking a chassis takes its
suspension and brakes with it)
- per-persona DB-backed bank balance (Recons uses a single global
in-memory \`localBankBalance\`, which doesn't translate to multi-user)
- partial-success replies for repair-multiple
- chassis-root guard

The economy work... (continued)

691 of 1771 branches covered (39.02%)

Branch coverage included in aggregate %.

48 of 101 new or added lines in 7 files covered. (47.52%)

3 existing lines in 2 files now uncovered.

4221 of 9317 relevant lines covered (45.3%)

130.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
1.95
-0.51% packages/gateway/src/web.ts
10
7.14
packages/transactions/src/_removePart.ts
10
7.14
packages/transactions/src/_repairSinglePart.ts
9
9.09
packages/transactions/src/_repairMultipleParts.ts
4
2.33
-0.24% packages/transactions/src/handlers/registry.ts
3
14.29
packages/transactions/src/_destroyPart.ts

Coverage Regressions

Lines Coverage ∆ File
2
2.33
-0.24% packages/transactions/src/handlers/registry.ts
1
1.95
-0.51% packages/gateway/src/web.ts
Jobs
ID Job ID Ran Files Coverage
1 25554677907.1 08 May 2026 12:09PM UTC 280
44.3
GitHub Action Run
Source Files on build 25554677907
  • Tree
  • List 280
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25554677907
  • 3a13bd11 on github
  • Prev Build on dev (#25540049706)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc