```ts
/** Walks a courier relay directory station by station. */

export function traceRelay(links: Record<string, string>, start: string): string[] {
  if (typeof start !== 'string' || !(start in links)) {
    throw new Error("invalid starting station");
  }
  const path: string[] = [];
  let current = start;
  const seen = new Set<string>();
  while (true) {
    path.push(current);
    seen.add(current);
    const next = links[current];
    if (next === "" || typeof next !== 'string' || !(next in links)) {
      throw new Error("broken or circular relay detected");
    }
    if (seen.has(next)) {
      throw new Error("circular relay detected");
    }
    current = next;
  }
}
```