Files
Jordan Ritter e508508aff fix(showcase): validate every Railway mutation result + harden fleet snapshot
Close the recurring "mutation result not validated" defect class in the
starter-fleet provisioner and make the existing-services snapshot fail loud
instead of silently feeding erroneous create decisions.

- Add a uniform assertMutationOk guard and route EVERY mutation through it:
  serviceCreate (assert .id), serviceInstanceUpdate (was DISCARDED — a false
  Boolean! return meant sleep/healthcheck/image/creds were never applied while
  the script reported success; now asserted and "configured" is logged only
  after verification), serviceDomainCreate (assert .domain on the create path),
  and serviceInstanceRedeploy (routed through the same guard for consistency).
- Absorb a serviceCreate "already exists" rejection: on a snapshot-miss the
  create path now re-fetches the service id by name and falls through to UPDATE
  instead of aborting the whole fleet. Predicate renamed ALREADY_EXISTS_RE and
  reused by the domain-create path.
- fetchExistingServices fails loud on page-drain truncation (hasNextPage still
  true at the defensive bound) rather than returning a partial byName map.
- fetchExistingServices coalesces null serviceInstances/.edges (transitional
  service nodes) so an unguarded .find can't TypeError and abort the fetch;
  interface fields marked optional/nullable.
- TRANSIENT_ERROR_RE made single-line ([^\n]*? not [\s\S]*?) so a newline-joined
  multi-error blob can't bridge "Service" and "not found" across lines.
- withRetry wraps the schedule-exhaustion rethrow with context and { cause }.
2026-06-04 16:43:31 -07:00
..
…