hmi-qa HOS Segments
PSELD-4794 Blocked: hmi-qa not onboarded to HOS Segment Deploy change ready

Enable HOS segments for hmi-qa

The request is to turn on HOS segments for hmi-qa so it behaves like our INT and UAT environments. The Orion config change is small and ready. It will not take effect until COM (Compliance, which owns the HOS Segment service) onboards hmi-qa to the segment service.

Ticket
pltsci.atlassian.net/browse/PSELD-4794
Environment
hmi-qa · level dev · DEPLOYMENT_CODE PSI
Deploy branch
PSELD-4794-hmi-qa-hos-segments (commit 8d24f64, not yet pushed)
Prepared
2026-10-09 · Dustin Boulton
Status

The config PR alone will not make segments appear

hmi-qa is missing from the HOS Segment allowlist in pltsci-asclepius. That means it has no denormalizer, no SQS queue, no SSM queue parameter and no OpenSearch index. Orion would have nowhere to send events, and the API would have no index to read. Merge the deploy PR together with COM's onboarding change, not ahead of it.

What is wrong today

How segment data is kept separate

Each environment's segments live in their own index, named after ORION_ENV. Every read is also checked against the caller's deployment.

Orion hmi-qa

On a duty-status event, sends {guid, recordStatus} to the queue registered for ORION_ENV.

Queue + denormalizer

One per environment. Reads that tenant's MySQL read replica. Not created for hmi-qa.

OpenSearch index

hos_event_segment_hmi-qa. Created by the Migrator. Does not exist yet.

Segment API

Selects the index from the environment header and rejects a deployment_id that does not match the user's Auth0 org.

Because the index is selected by environment, sharing DEPLOYMENT_CODE PSI with demo does not mix their data. The /int or /qa path on hos-dev only selects API Gateway settings such as Auth0 config. It does not choose which data is returned.

Options considered

The aim is for hmi-qa to work like the INT and UAT environments without standing up a new environment.

OptionChangeLike INT?Risk
A
Chosen
Point hmi-qa at https://hos-dev.pltsci.com/int Yes. This is the INT stage on hos-dev, and demo already uses it. Low. Data stays on the dev event bus, AMQP and Kinesis, which matches hmi-qa's dev level.
B Point hmi-qa at https://hos-dev.pltsci.com/qa Equivalent, using the QA stage Low
C Point hmi-qa at https://hos.pltsci.com/int (the pre-prod service) Same URL as INT Medium to high. A dev-level environment would call a pre-prod service that never receives its data.
D Turn segments on in a pre-prod HMI environment instead (hmi-paccar-int or hmi-preseries) Exactly like INT Low, but it changes a different environment than the ticket names

Deploy change (option A)

File: charts/orion-config/environments/dev/hmi-qa.yaml. Rendering the chart with these values puts both keys in the global ConfigMap.

customer: "hmi-qa"

global:
  data:
    DEPLOYMENT_CODE: "PSI"
+   HOS_SEGMENT_API_URL: "https://hos-dev.pltsci.com/int"
+   HOS_SEGMENT_ENABLED: "true"

Steps to make it work

  1. COM · pltsci-asclepiusAdd hmi-qa to FS_DEV_ALLOWED_ENVIRONMENTS in packages/asclepius-hos-segment/deploymentAllowList.ts and deploy the stack.
  2. SRE / COM · AWS dev accountConfirm that SSM /hmi-qa/rds/orion/hos-segments-identifier and the /hmi-qa/rds/orion/hos-segment-readonly secret exist. If either is missing, the stack build silently leaves the tenant out.
  3. COMRun the Migrator for hmi-qa to create hos_event_segment_hmi-qa.
  4. SRE · pltsci-orion-deployMerge the deploy PR. Run make install_config for hmi-qa, then restart the pods so they pick up the new ConfigMap.
  5. COM · optionalRun the Hydrator to backfill older logs if historical segments should appear.

Open questions

Code references

RepoLocationShows
pltsci-orionorion-hos/src/app/Listeners/HosSegmentDispatchSqsListener.php:51Queue lookup by ORION_ENV
pltsci-orionorion-clientweb/src/app/Services/ClientWebAppEnvironmentService.php:23Sends the segment URL to client-web
pltsci-asclepiusasclepius-hos-segment/handleOrionEnvironment.ts:39Denormalizer runs with ENVIRONMENT set to the Orion env
pltsci-asclepiusasclepius-elasticsearch/Index/Index.ts:116Index name is hos_event_segment_<env>
pltsci-asclepiusasclepius-hos-segment/api/HosSegments/context.ts:54Index chosen from the environment header
pltsci-asclepiusasclepius-hos-segment/api/HosSegments/HosSegmentsResolver.ts:432Deployment ID check
pltsci-asclepiusasclepius-hos-segment/deploymentAllowList.tsFS dev allowlist (no hmi-qa)
sre-toolkitorion-architecture/components/hos-segment.mdSegment service architecture