Skip to main content

Module validate

Module validate 

Source
Expand description

Workspace-wide lint checks for the .yah/services/ tree (R470-T3).

Currently implements one check: alias collision — alias names declared in any service component’s [aliases] block must be workspace-globally unique. Two services declaring the same alias is a consumer-site ambiguity (yah-app.toml says alias = "whisper-default-ggml" — which catalog wins?).

Invoked by yah cloud validate and as a preflight in yah cloud apply.

Structs§

AliasCollision
A duplicate alias declaration found across two components.
AliasSource
Where an alias is declared — points the operator at the source row.
PortCollision
Two local-tier mirror slots that bind the same host port. Because local mirrors share the operator’s localhost, both binding the same port collide when brought up together — and the local-static adopt probe (a bare TCP connect) may then silently adopt the wrong service (R602-B4: scrabcake dev and yah-marketing pond both on 4322).
PortSource
Where a host port is declared — points the operator at the (service, env, slot) that binds it.

Functions§

check_alias_collisions
Walk every service’s static-asset components and collect all (alias → source) mappings. Returns a list of collisions (empty when clean).
check_port_collisions
Walk every service mirror and flag host-port reuse across local-tier provider slots (R602-B4). Only slots that bind a port on the operator’s localhost are considered (local-static, miniflare-container, minio-container) — cloud/CF slots don’t contend for localhost.