Skip to content

docs(reusable-workflows): make pitfall #6 fire when editing a consumer workflow#125

Merged
CybotTM merged 2 commits into
mainfrom
docs/retro-consumer-workflow-policy
Jul 20, 2026
Merged

docs(reusable-workflows): make pitfall #6 fire when editing a consumer workflow#125
CybotTM merged 2 commits into
mainfrom
docs/retro-consumer-workflow-policy

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 20, 2026

Copy link
Copy Markdown
Member

Came from

/retro on a session working two TYPO3 extension PRs (netresearch/t3x-nr-image-optimize#115 / #116).

This is a C4 finding — the guidance existed and did not hold. Pitfall #6, added by an earlier /retro in #82, already says a CI gap belongs upstream in the shared workflow rather than in the consumer. I nonetheless added a local acceptance job with its own actions/checkout and shivammathur/setup-php to both consumer repos, and the maintainer had to correct it — then had to correct it a second time when I asked whether to SHA-pin a third-party action seconds after being told we don't use them.

Why it didn't fire

The skill was never loaded. The description said "authoring reusable workflows", which reads as authoring the shared workflow — not as editing a consumer's .github/workflows. That is the case I was in, and no trigger word covered it.

The pitfall stated a principle without a test for it. "Ask whether the shared repo owns that concern" needs judgement at exactly the moment you have already decided to write the job. A mechanical tell is easier to obey.

Change

  • SKILL.mddescription covers consuming reusable workflows and editing a repo's own .github/workflows; a When to Use entry points at pitfall feat: add Go project CI checklist and related skills section #6. The file is at the 500-word limit, so this is paid for by folding the duplicated branch-protection note (it appeared both as a list item and as a standalone blockquote) into its list entry. 497 words after the change, verified with wc -w.
  • references/reusable-workflow-pitfalls.md — pitfall feat: add Go project CI checklist and related skills section #6 gains:
    • the consumer-side tell — every job in a consumer is a uses: of a shared workflow, so a job with its own steps:, or any non-org action, is the smell; with a grep that checks it. Notes that SHA-pinning such an action does not make it compliant.
    • the upstream mechanics — additive input defaulting to false, purely-additive diff check, pins copied verbatim from a neighbouring job, graceful skip for consumers without the underlying script, then a one-line flip in the consumer.
    • a warning against unit-test-command-style override inputs, which replace the job's instrumented default and silently drop what it did (in that session, the Codecov upload).

The upstream path described here is the one that ended up being taken: netresearch/typo3-ci-workflows#136 added a run-acceptance-tests input defaulting to false (113 insertions, 0 deletions), and both consumers then enabled it with one line.

Test plan

  • pre-commit hooks incl. markdownlint-cli2, skill-structure validation and version parity — passed
  • wc -w skills/github-project/SKILL.md → 497 (cap 500)

…r workflow

Pitfall #6 already states that a CI gap belongs upstream in the shared
workflow rather than in the consumer. It did not fire in a session that added
a local acceptance-test job -- with its own checkout and PHP setup -- to two
consumer repos, and the maintainer had to correct it twice.

Two reasons, both addressed here.

The skill was never loaded: the description said "authoring reusable
workflows", which reads as authoring the shared workflow, not as editing a
consumer's .github/workflows. The description and the When to Use list now
name that case, kept within the 500-word cap by folding the duplicated
branch-protection note into its list entry.

And the pitfall stated the principle without a test for it. It now gives the
consumer-side tell -- every job in a consumer is a `uses:` of a shared
workflow, so a job with its own `steps:` or any non-org action is the smell,
with a grep to check it -- plus the mechanics of the upstream alternative:
an additive input defaulting to off, pins copied from a neighbouring job, a
graceful skip for consumers that are not ready, and a warning against
smuggling an extra suite through a command-override input, which silently
drops the instrumented default such as the coverage upload.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Copilot AI review requested due to automatic review settings July 20, 2026 12:26
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Jul 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the GitHub project skill documentation, clarifying when to use the skill and adding detailed guidance on avoiding reusable workflow pitfalls, specifically regarding consumer-side workflow smells and how to safely extend shared workflows. The review feedback suggests keeping the push requirement before running the branch protection script to avoid failures on empty repositories, using case-insensitive matching when filtering organization names in workflow paths, and comparing against the base branch in the git diff command to ensure all changes are properly verified.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread skills/github-project/SKILL.md Outdated
Comment thread skills/github-project/references/reusable-workflow-pitfalls.md Outdated
Comment thread skills/github-project/references/reusable-workflow-pitfalls.md Outdated
Restores "+ push" to the bootstrap entry: init-branch-protection.sh exits 4
on an empty repo ("default branch ref does not yet exist"), so the push is a
precondition, not narrative. Compressing that line to stay under the word cap
had dropped it. SKILL.md is at 499 words.

Makes the consumer-side grep case-insensitive, since an org can appear with
different casing in a uses: path, and compares against the base branch rather
than the working tree when checking that the upstream change is additive --
git diff -U0 alone reports nothing once the change is staged or committed,
which would read as a pass.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@sonarqubecloud

Copy link
Copy Markdown

@CybotTM
CybotTM merged commit 8e8eec1 into main Jul 20, 2026
18 checks passed
@CybotTM
CybotTM deleted the docs/retro-consumer-workflow-policy branch July 20, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants