Conversation
Section 4 required a default on every workflow_call input. Two shipped workflows contradict that for two independently correct reasons. zsh-lint.yml declares both its inputs required, and a default on a required input is unreachable because the caller always supplies the value. commit-lint.yml declares workflow_call alongside pull_request. GitHub scopes the inputs context to a reusable or manually triggered workflow, so on a pull_request run it is empty and the declared defaults never apply. #586 removed them for that reason and moved the operative value into the job step; #597 now asserts no such default exists. Split the bullet into three clauses so the rule matches both shapes. This is a mandatory surface, so as written an agent would have edited both workflows back into defects. Closes #598
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #598.
§4 required a
defaulton everyworkflow_callinput. Two shipped workflowscontradict that, for two different and independently correct reasons, and §4 is
a mandatory surface, so as written an agent would have edited both back into
defects.
Evidence
All 10 workflows here that declare
workflow_call:workflow_call, has inputstrunk.yml,release-prepare.yml,zsh-ci.ymlworkflow_call, has inputszsh-lint.ymllabels-sync-test.yml,labeler-config-audit-test.yml,repo-settings-audit-test.yml,lychee.ymlcommit-lint.ymlA required input cannot carry a default.
zsh-lint.ymldeclaresfilesand
zsh-lint-shaasrequired: true; the caller always supplies them, so adefault is unreachable. That is the org's flagship reusable workflow and the
subject of the #543 versioning pilot.
A dual-trigger workflow's input defaults are dead on the direct path.
GitHub's contexts documentation scopes the
inputscontext to "the inputs of areusable or manually triggered workflow". A
pull_requestrun is neither, sothe context is empty there and
workflow_calldefaults are never applied. #586removed them for that reason and moved the operative value into the job step;
#597 now asserts as a test that no such default exists. The failure this
prevents is not cosmetic: an empty pattern reaching
grep -Ematches everyline, flagging every commit and silently passing every branch.
The change
One bullet becomes three:
typeandrequiredalways;defaultonly foroptional inputs; and for a dual-trigger workflow, the operative fallback lives
in the job step. Nothing else in the file changes, and no workflow changes,
because the workflows were already right.
Instruction impact review
Required by
runbooks/instruction-update.md:guidance. It narrows how workflow authors declare inputs; it creates no new
mandatory org-wide rule.
.github/instructions/*, for.github/workflows/*.ymland*.yaml, whichis this file's existing
applyTo. Unchanged.GitHub Actions convention surface and already owns §4.
contradiction rather than adding one.
PATTERNS.mdgained aself-triggering-reusable-workflow entry in fix(ci): run commit lint directly so the policy gate executes #586 that describes the same
input-default trap from the pattern side; the two now agree, with
PATTERNS.mdcarrying the observed idiom and this file carrying the rule.
applyTo, and manifest entry are unchanged; only body text moved.or skill? Yes. It stays in the same routed file, delivered by path
matching, with no hook or skill involvement.
validate-agent-policy.py,test_validate_agent_policy.py,test_validate_zsh_standard_policy.py, andtrunk checkall pass. Netchange is two added lines.
Verification
All six steps
Validate Agent Instructionsruns pass locally, plusscripts/test-commit-lint-policy.sh(40 checks) andtrunk check.