You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[#1052 A] CI guard: forwarded caller inputs ⊆ declared inputs at the pinned @ref (+ #1034 regression) #1253
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.
Additive/opt-in; new actions SHA-pinned; no behaviour change to reviews.
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).
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
scripts/validate-caller-inputs.sh — pure parse/validate helpers + git-resolution + main (+ --pair mode for deterministic testing)
.github/workflows/lint.yml — new validate-caller-inputs job
AGENTS.md — documented the guard so template syncs don't drop it
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.
Two pre-existing unit failures elsewhere (test_engine_mcp MCP-handshake, one test_fix_reviews ordering flake) are environmental and unrelated to these additive changes (they touch none of the modified files; the fix-reviews test passes in isolation).
Activity
don-petry commentedon Jul 15, 2026
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 workflowuses: <owner>/<repo>/.github/workflows/<wf>.yml@<ref>with awith:block, resolves the reusable at that ref and asserts (a) every forwardedwith:key is a declaredworkflow_callinput there, and (b) everyrequired: trueinput is forwarded. Same-repo channel tags (dev-lead/*,pr-review/*, …) are resolved bygit 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 inlint.yml, with a#1034regression fixture.Implementation Checklist
scripts/validate-caller-inputs.sh— pure parse/validate helpers + git-resolution +main(+--pairmode for deterministic testing).github/workflows/lint.yml— newvalidate-caller-inputsjobtests/dev-lead/fixtures/caller-inputs/— reusable + caller fixtures (good / 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-regression / missing-required)AGENTS.md— document the new guard (so template syncs don't drop it)Tests to Write
tests/dev-lead/unit/test_validate_caller_inputs.bats:vci_parse_uses,vci_with_keys_for_job,vci_declared_inputs,vci_validateTest Command
bats tests/dev-lead/unit/test_validate_caller_inputs.batsandshellcheck --severity=warning -x scripts/validate-caller-inputs.shdon-petry commentedon Jul 15, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/validate-caller-inputs.sh— pure parse/validate helpers + git resolution +main(+--pairmode).github/workflows/lint.yml— newvalidate-caller-inputsjob (PR-triggered; no new cron)tests/dev-lead/fixtures/caller-inputs/— reusable + good / 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-regression / missing-required callerstests/dev-lead/unit/test_validate_caller_inputs.bats— 16 tests (unit + e2e + 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 regression)AGENTS.md— documented the guard so template syncs don't drop itTest Results
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 currentmain.Files Changed
scripts/validate-caller-inputs.sh(new): for eachuses: .../<wf>.yml@<ref>with awith:block, resolves the reusable at<ref>and asserts (a) forwarded keys ⊆ declaredworkflow_callinputs and (b) required inputs are forwarded. Same-repo channel tags resolved viagit fetch; unresolvable refs soft-pass with a logged::warning::(never silent). Includes--pairmode for deterministic testing..github/workflows/lint.yml: newvalidate-caller-inputsjob.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
main; shellcheck clean; additive/opt-in; new checkout action SHA-pinned; no behaviour change to reviews.petry-projects/.github—feature-ideation,add-to-project,agent-shield) soft-pass with a visible::warning::by default; opt in withVCI_RESOLVE_CROSS_REPO=1. Full cross-repo resolution is left to the later fix(ci): prevent channel-skew workflow breakage — guard forwarded inputs vs pinned refs + codify the pinning rules (post-#1034) #1052 parts, keeping this part green and low-risk as specified.test_engine_mcpMCP-handshake, onetest_fix_reviewsordering flake) are environmental and unrelated to these additive changes (they touch none of the modified files; the fix-reviews test passes in isolation).feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1256 — [#1052 D] Baseline hygiene: actionlint …
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…
feat: implement issue #1253 — [#1052 A] CI guard: forwarded caller in…
feat: implement issue #1255 — [#1052 B] Stub-freeze drift guard for r…