-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Impact
Manual runs of Internal: Upgrade Check and Internal: Workflow Patrol cannot provide a model override, because both workflows reference $\{\{ inputs.model }} without declaring a model input. This makes model selection impossible for users dispatching these workflows and silently falls back to default behavior.
Reproduction Steps
- Create this new minimal repro script:
import re
from pathlib import Path
import yaml
FILES = [
Path('.github/workflows/upgrade-check.lock.yml'),
Path('.github/workflows/workflow-patrol.lock.yml'),
]
INPUT_REF_RE = re.compile(r"\$\{\{\s*inputs\.([A-Za-z0-9_-]+)\s*\}\}")
def get_defined_inputs(doc):
on = doc.get('on', {}) or {}
wd_inputs = ((on.get('workflow_dispatch', {}) or {}).get('inputs', {}) or {}).keys()
wc_inputs = ((on.get('workflow_call', {}) or {}).get('inputs', {}) or {}).keys()
return set(wd_inputs) | set(wc_inputs)
def main():
failures = []
for path in FILES:
text = path.read_text(encoding='utf-8')
used = set(INPUT_REF_RE.findall(text))
doc = yaml.safe_load(text) or {}
defined = get_defined_inputs(doc)
undefined = sorted(used - defined)
if undefined:
failures.append((str(path), undefined))
if failures:
print('FAIL: workflow references undefined input(s)')
for path, names in failures:
print(f'- {path}: {names}')
raise SystemExit(1)
print('PASS: all referenced inputs are declared')
if __name__ == '__main__':
main()- Run:
python /tmp/gh-aw/agent/repro_undefined_model_input.pyExpected vs Actual
Expected: Any referenced workflow input (including model) is declared under on.workflow_dispatch.inputs and/or on.workflow_call.inputs.
Actual: The repro fails with undefined inputs:
FAIL: workflow references undefined input(s)
- .github/workflows/upgrade-check.lock.yml: ['model']
- .github/workflows/workflow-patrol.lock.yml: ['model']
Failing Test
(Full script shown above under Reproduction Steps.)
Evidence
.github/workflows/upgrade-check.lock.yml:54-60declares onlytitle-prefixforworkflow_dispatch.inputs, but referencesinputs.modelat lines 142, 443, and 462..github/workflows/workflow-patrol.lock.yml:54-60declares onlytitle-prefixforworkflow_dispatch.inputs, but referencesinputs.modelat lines 142, 433, and 452.- Repro script exits non-zero (
EXIT:1) and prints both undefined-input failures.
What is this? | From workflow: Trigger Bug Hunter
Give us feedback! React with π if perfect, π if helpful, π if not.
- expires on Mar 10, 2026, 11:26 AM UTC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels