Repository navigation
55 lines (50 loc) · 2.43 KB
/
Copy pathtask-driver-gate.yml
File metadata and controls
55 lines (50 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Task Driver Gate
# Three gates over the task/experiment corpus:
# 1. no coder-eval task YAML pins `sandbox.driver: tempdir`
# 2. every Windows-reachable `pre_run`/`post_run` command is a single line
# 3. no task stages a `skills/<name>` directory via `sandbox.template_sources`
# 4. no `command_pattern` backtracks catastrophically on a failing search
#
# Gate 1:
# The sandbox driver is chosen by the run environment, never by the task:
# - Linux nightly slice -> `driver: docker` (skills-image bakes the uip CLI
# + every tool plugin), set in tests/experiments/nightly.yaml.
# - Windows slice -> selected by the `windows` tag and forced onto
# `--driver tempdir` on the CLI (wins over YAML).
# A task that pins `driver: tempdir` runs on the toolless host and breaks any
# tool-backed command (e.g. `uip maestro flow validate`). See
# scripts/check-task-driver.py for the full rationale.
#
# Gate 2: cmd.exe on the Windows split parses only the first line of a hook, so
# a `|-` block scalar ERRORs every task (skills #2756 -> #3116). Scope is every
# experiment hook plus the hooks of `windows`-tagged tasks.
#
# No `paths:` filter so this can be wired as a required check — it is a
# few-second full scan that always reports a definitive pass/fail. The job
# `name:` below is a required status check in the `main` ruleset; do not rename
# it without updating the ruleset first.
on:
pull_request:
workflow_dispatch:
concurrency:
group: task-driver-gate-${{ github.head_ref || github.ref }}
# Only `synchronize` moves the head SHA; `opened` and `reopened` can fire on a
# commit a run is already in flight for, and a cancelled run reports the
# required context as `cancelled`. See docs/REQUIRED-CHECKS.md Rule 3a.
cancel-in-progress: ${{ github.event.action == 'synchronize' }}
permissions:
contents: read
jobs:
gate:
runs-on: uipath-ubuntu-latest
name: No task pins sandbox.driver tempdir
timeout-minutes: 5
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with: { python-version: '3.13' }
- name: Install PyYAML
run: pip install --quiet pyyaml
# One step, so the required-check job name above stays byte-identical.
- name: Check task drivers and experiment hook portability
run: python3 scripts/check-task-driver.py tests/tasks tests/experiments