Skip to content

feat(ontology): SAMN roadside assistance and vehicle logistics schemas - #1226

Open
s2515091 wants to merge 1 commit into
MetaState-Prototype-Project:mainfrom
s2515091:feat/samn-ontologies
Open

s2515091 wants to merge 1 commit into
MetaState-Prototype-Project:mainfrom
s2515091:feat/samn-ontologies

Conversation

@s2515091

Copy link
Copy Markdown

What this adds

21 schemas for SAMN (Shared Assistance Mobility Network), which handles roadside assistance and vehicle logistics. One breakdown or crash is handled by many independent parties: the driver, an alarm centre, roadside mechanics, recovery and transport companies, garages, mobility providers and the road authority. Each party runs its own W3DS platform, and the platforms work on the same case only through these types.

All 21 files are new: services/ontology/schemas/samn-*.json. No existing schema is changed. The domains used are mobility (17 schemas), legal (3) and work (1). Every property has a description, every schema uses a fresh UUIDv4 schemaId, and every schema sets additionalProperties: false.

The types, their owners and their writers

Type Held in the eVault of Written by
Vehicle the vehicle the driver app, the seeding workbench
Incident the vehicle, with an isReference pointer in every participant's vault the driver app, the alarm centre
RoadsideAttempt the vehicle the roadside app
ConditionReport the vehicle the recovery, transport, garage and mobility apps
HandoverReceipt the vehicle the recovery, transport, garage and mobility apps
EmergencyResponse the vehicle the road authority app
CaseEvent the vehicle (append-only case log) every app
RecoveryJob the issuing coordinator the recovery matching app
TransportJob the issuing coordinator the recovery matching app (transport planning)
RepairJob the garage the garage app
MobilityJob the driver the driver app
ProviderCapability the provider organisation the provider apps
ProviderAvailability the provider organisation the provider apps
ServiceVehicle the vehicle (the role record beside its Vehicle record) the provider apps
ServiceLocation the operating organisation the provider apps
RoadSection the road authority the road authority app
Agreement the publishing party every app (partnerships, invitations, recovery contracts)
InsurancePolicy the policyholder an insurer; seeded for now
AssistanceMembership the member a membership provider; read by the alarm centre at intake
StaffRole the company every app's team page
DriverRequest the vehicle the driver app

The apps are published as separate platforms on GitW3 and already exchange these records through eVaults and Awareness packets.

Could an existing schema carry this?

We checked the near misses:

  • Membership / OrganizationalUnitMembership vs StaffRole. StaffRole extends Membership and does not replace it. Membership keeps the question of who is an admin. StaffRole adds an operational role inside a company (planner, field, viewer). OrganizationalUnitMembership places a person in a unit and grants no permission in an app, so it cannot hold this role.
  • Role / Delegation vs StaffRole. Role and Delegation hand out signing authority for a company, are created by directors and are checked by verifiers. StaffRole does not let anyone sign for the company. It only says which screens of an operational app a member may use.
  • Membership vs AssistanceMembership. Membership means a person belongs to a group. AssistanceMembership is a consumer entitlement to a service: call-outs, cover abroad and similar.
  • Company / GroupManifest vs ProviderCapability. We reuse both for the organisation itself. ProviderCapability is a separate declaration of what the organisation can do, which matching reads (lift capacity, EV handling, repair types, tariffs).
  • File and Signature. We reuse both: photos are w3ds://file URIs, and receipts carry the signature from w3ds://sign. No parallel type is added.

Notes for review

  • costRecordEnvelopeId and authorisationEnvelopeId on the job types are plain string pointers. Their target types (a cost record and a payer's decision) are drafted but not included here, because no platform writes them yet. They will come in a separate PR when one does.
  • Several enums are shared byte for byte across schemas: drivetrain, job status, providerType, damage severity and towing method. Matching compares them across types.
  • I checked the branch against current main with the ontology service: 92 schemas load, all 21 new types are served, there are no title or id clashes, and /domains/mobility/schemas lists them.

🤖 Generated with Claude Code

Twenty-one schemas for SAMN (Shared Assistance Mobility Network): one
vehicle breakdown or crash handled across a driver, an alarm centre,
roadside mechanics, recovery and transport companies, garages, mobility
providers and the road authority, each running its own platform.

The case lives in the vehicle's eVault (Vehicle, Incident,
RoadsideAttempt, ConditionReport, HandoverReceipt, EmergencyResponse,
CaseEvent). Jobs live with the party that issues or performs them
(RecoveryJob, TransportJob, RepairJob, MobilityJob). Providers declare
what they can do and have free (ProviderCapability,
ProviderAvailability, ServiceVehicle, ServiceLocation). Entitlement and
contracts sit with their owner (InsurancePolicy, AssistanceMembership,
Agreement). RoadSection is published by the road authority; StaffRole
and DriverRequest cover who in a company may do what, and who may
drive a car.

Every property has a description, every schema sets
additionalProperties false, and the domains are mobility, legal and
work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 257a839f-6def-4923-804b-04912c68627e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@s2515091
s2515091 marked this pull request as ready for review November 24, 2026 15:13
@s2515091
s2515091 requested a review from coodos as a code owner November 24, 2026 15:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant