Skip to content

[#1052 A] CI guard: forwarded caller inputs ⊆ declared inputs at the pinned @ref (+ #1034 regression) #1253

Closed

Description

@don-petry

Split 1 of 4 of #1052 (channel-skew prevention). This is Part A — the core CI guard (highest value; lands the lint.yml base that Parts B and D build on).

Deliverable — CI guard: forwarded inputs ⊆ inputs declared at the pinned @ref

  • New scripts/validate-caller-inputs.sh: for every workflow uses: <owner>/<repo>/.github/workflows/<wf>.yml@<ref> that has a with: block, resolve the reusable at <ref> and assert (a) every forwarded with: key is a declared workflow_call input there, and (b) every required: true input is forwarded. For same-repo channel tags (pr-review/*, dev-lead/*, auto-rebase/*, feature-ideation/*, …) resolve via git fetch of the tag + parse its pr-review.yml (etc.); fail loud on any forwarded key not declared at that ref. Only soft-pass (with a logged ::warning::) when a ref genuinely can't be resolved — never silently.
  • Wire it as a job in .github/workflows/lint.yml.
  • Pure-logic helpers + bats (tests/dev-lead/unit/test_validate_caller_inputs.bats), including a regression fixture reproducing feat: implement issue #1031 — fix(#844): plumb LSP_PILOT_ENABLED env + decouple capture from LSP wiring so the pilot A/B runs in CI #1034 (forwarded key absent at the pinned ref → FAIL). Fixtures under tests/dev-lead/fixtures/caller-inputs/.

Acceptance

Context: pull_request CI runs the base-branch stub, and GitHub validates reusable inputs only at startup against the pinned ref — so an input-forwarding change to a channel-pinned caller stub is exercised by nothing in PR CI and only breaks post-merge. This guard closes that gap. Parent: #1052 (full root-cause writeup there).

Activity

  1. don-petry commented on Jul 15, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #1253 — [#1052 A] CI guard: forwarded caller inputs ⊆ declared inputs at the pinned @ref (+ #1034 regression)

    Scope

    Add scripts/validate-caller-inputs.sh — a CI guard that, for every workflow uses: <owner>/<repo>/.github/workflows/<wf>.yml@<ref> with a with: block, resolves the reusable at that ref and asserts (a) every forwarded with: key is a declared workflow_call input there, and (b) every required: true input is forwarded. Same-repo channel tags (dev-lead/*, pr-review/*, …) are resolved by git fetch-ing the tag and parsing the reusable at that ref; a ref that genuinely can't be resolved soft-passes with a logged ::warning:: (never silently). Wired as a job in lint.yml, with a #1034 regression fixture.

    Implementation Checklist

    Tests to Write

    Test Command

    bats tests/dev-lead/unit/test_validate_caller_inputs.bats and shellcheck --severity=warning -x scripts/validate-caller-inputs.sh

  2. don-petry commented on Jul 15, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete

    Plan Execution

    Test Results

    === bats: tests/dev-lead/unit/test_validate_caller_inputs.bats ===
    1..16
    ok 1 vci_parse_uses parses a same-repo reusable ref with a channel tag
    ok 2 vci_parse_uses parses a cross-repo reusable ref and strips a trailing comment
    ok 3 vci_parse_uses emits nothing for a regular action uses (not a reusable workflow)
    ok 4 vci_parse_uses emits nothing for a line without uses:
    ok 5 vci_with_keys_for_job collects the direct with: keys
    ok 6 vci_with_keys_for_job returns nothing when the job has no with: block
    ok 7 vci_declared_inputs lists inputs with their required flag
    ok 8 vci_validate passes when forwarded ⊆ declared and required forwarded
    ok 9 vci_validate fails (a) on a forwarded key absent from declared inputs
    ok 10 vci_validate fails (b) on a required input that is not forwarded
    ok 11 clean caller tree passes
    ok 12 #1034 regression: forwarded key absent at the pinned ref FAILS
    ok 13 missing required input FAILS
    ok 14 --pair passes a good caller against its reusable
    ok 15 --pair fails the #1034 caller against its reusable
    ok 16 unresolvable ref soft-passes with a warning
    
    === shellcheck --severity=warning -x (all scripts/**/*.sh) ===  clean
    === dev-lead-lint.sh (shellcheck 87 files + agent frontmatter) === all checks passed
    
    === Live guard against current repo tree (bash scripts/validate-caller-inputs.sh) ===
    OK: dev-lead.yml → .../dev-lead-reusable.yml@dev-lead/v1-next — forwarded inputs ⊆ declared; required inputs forwarded
    OK: pr-review-trigger.yml → .../pr-review.yml@pr-review/next — forwarded inputs ⊆ declared; required inputs forwarded
    ::warning:: add-to-project / agent-shield / feature-ideation (cross-repo) — unresolved, soft-passed
    caller-inputs: checked=2 pinned ref(s); unresolved(warned)=3
    caller-inputs: OK   (exit 0)
    

    The two same-repo channel-pinned callers were resolved against their actual pinned tags
    (dev-lead/v1-next, pr-review/next) and passed — confirming the guard PASSES on current main.

    Files Changed

    • scripts/validate-caller-inputs.sh (new): for each uses: .../<wf>.yml@<ref> with a with: block, resolves the reusable at <ref> and asserts (a) forwarded keys ⊆ declared workflow_call inputs and (b) required inputs are forwarded. Same-repo channel tags resolved via git fetch; unresolvable refs soft-pass with a logged ::warning:: (never silent). Includes --pair mode for deterministic testing.
    • .github/workflows/lint.yml: new validate-caller-inputs job.
    • tests/dev-lead/unit/test_validate_caller_inputs.bats (new) + tests/dev-lead/fixtures/caller-inputs/** (new).
    • AGENTS.md: new "Reusable caller-input contract" section.

    Notes

  3. added a commit that references this issue on Jul 15, 2026
  4. added 2 commits that reference this issue on Jul 15, 2026
  5. added 18 commits that reference this issue on Aug 2, 2026
  6. added 2 commits that reference this issue on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickupenhancementFeature requests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions