Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[bug-hunter] Internal workflows reference undefined inputs.model, breaking model overrideΒ #555

@github-actions

Description

@github-actions

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

  1. 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()
  1. Run:
python /tmp/gh-aw/agent/repro_undefined_model_input.py

Expected 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-60 declares only title-prefix for workflow_dispatch.inputs, but references inputs.model at lines 142, 443, and 462.
  • .github/workflows/workflow-patrol.lock.yml:54-60 declares only title-prefix for workflow_dispatch.inputs, but references inputs.model at 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions