id: runtime-version-pinned
name: Runtime version is pinned via a version file
description: >
  A runtime version pin file must exist in the repository root: .nvmrc for Node.js,
  .python-version for Python, .tool-versions for multi-runtime projects.
  Without a version pin, the runtime resolves from whatever the local system or CI
  image provides — different machines produce different outcomes. This is the most
  common source of works-on-my-machine failures. Gate passes when at least one of
  .nvmrc, .python-version, .tool-versions, or .ruby-version exists in the root.
property: Executable
tags: [any]
phase: development
trigger: commit
blocking: true
check:
  type: script
  command: >
    test -f .nvmrc || test -f .python-version || test -f .tool-versions || test -f .ruby-version ||
    { echo "FAIL: No runtime version pin file found (.nvmrc, .python-version, .tool-versions)"; exit 1; }
