Skip to content

docs(#5521): add CI workflow conventions guide - #5523

Merged
rh-hemartin merged 2 commits into
mainfrom
agent/5521-ci-workflow-conventions
Jul 27, 2026
Merged

docs(#5521): add CI workflow conventions guide#5523
rh-hemartin merged 2 commits into
mainfrom
agent/5521-ci-workflow-conventions

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Add docs/contributing/ci-workflows.md to document CI workflow conventions that currently exist only as tribal knowledge. Register it in the AGENTS.md topic-specific guidance table so the review agent references these conventions when reviewing .github/workflows/ changes.

Related Issue

Closes #5521

Changes

  • Create docs/contributing/ci-workflows.md covering all 5 convention areas from the issue:
    • Concurrency group pattern (use ${{ github.workflow }}, avoid redundant hardcoded prefixes)
    • Timeout policy (every non-reusable job must set timeout-minutes)
    • Trigger completeness (merge_group: on path-filtered workflows with path-relevance guard)
    • Checkout SHA pinning (current pin documented, pinact for verification)
    • Reusable workflow contracts (document inputs, outputs, check callers on changes)
  • Add two bonus sections: Permissions (least-privilege per job) and Additional conventions (self-include in paths, pinned runner version, no hardcoded secrets)
  • Uses checklist format throughout for reliable agent consumption (per triage recommendation)
  • All examples derived from actual repo workflows (e2e.yml, functional-tests.yml, mint-cf-worker-test.yml)
  • Add AGENTS.md table row: CI Workflows | Adding or modifying GitHub Actions workflows under .github/workflows/

Testing

  • make lint-md-links passes — all links in new doc resolve
  • VitePress sidebar auto-discovers docs/contributing/ via getMarkdownFiles() — no manual config needed
  • gitlint passes on commit message

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

Closes #5521

Post-script verification

  • Branch is not main/master (agent/5521-ci-workflow-conventions)
  • Secret scan passed (gitleaks — 054111862bdd61201a722bc4c28f3fa0c382bdcf..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Create docs/contributing/ci-workflows.md covering concurrency
group patterns, timeout policy, trigger completeness
(merge_group), checkout SHA pinning, reusable workflow
contracts, permissions, and additional conventions. Uses
checklist format for reliable agent consumption during
review.

Add a row to the AGENTS.md topic-specific guidance table
linking the new doc for .github/workflows/ changes.

Conventions are derived from patterns already established
in the repo's existing workflows (e2e.yml,
functional-tests.yml, mint-cf-worker-test.yml) and from
review feedback on PR #5482 that caught a redundant
concurrency prefix, missing timeout-minutes, and missing
merge_group trigger.

Note: pre-commit could not run in sandbox (network
restriction on git fetch). The post-script runs
pre-commit authoritatively on the runner.

Closes #5521
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 23, 2026 10:13
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Jul 23, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 23, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:14 AM UTC · Completed 10:30 AM UTC
Commit: 1dbe7bd · View workflow run →

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Site preview

Preview: https://823c6d9f-site.fullsend-ai.workers.dev

Commit: 65e088f301de7847089cd8c9830250cddd3fb9f1

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [API behavior claim] docs/contributing/ci-workflows.md:7 — The concurrency groups section states “Use ${{ github.workflow }} as the workflow identifier — never duplicate the workflow name as a hardcoded string prefix” as a blanket rule. However, in reusable workflows (on: workflow_call), github.workflow resolves to the caller’s workflow name, not the reusable workflow’s own name. This means using github.workflow in a reusable workflow’s concurrency group would produce incorrect scoping — multiple different reusable workflows called from the same caller would share a concurrency group and cancel each other. The repo’s reusable workflows (reusable-code.yml, reusable-review.yml, reusable-triage.yml, reusable-retro.yml, reusable-prioritize.yml, reusable-fix.yml, reusable-dispatch.yml) all correctly use hardcoded role-specific prefixes such as fullsend-code-agent-. The document needs a carve-out or clarification that this rule applies only to non-reusable (top-level) workflows.
    Remediation: Add an exception note to the concurrency groups section, e.g.: “Exception: reusable workflows (on: workflow_call) must use a hardcoded role-specific prefix instead of ${{ github.workflow }}, because github.workflow resolves to the caller’s name in workflow_call context, not the reusable workflow’s own name.”

  • [protected-path] AGENTS.md — AGENTS.md is a protected governance file. The PR adds a table entry for the new CI Workflows doc. The change is authorized by issue Add CI workflow conventions doc to close review knowledge gap #5521 and the PR description explains the rationale. Human approval is required for all protected-path changes.

Low

  • [edge-case] docs/contributing/ci-workflows.md:17 — The pull_request_target concurrency example omits cancel-in-progress entirely, which defaults to false. The repo’s actual pull_request_target workflows (e2e.yml, functional-tests.yml) use a sophisticated cancel-in-progress expression that gates cancellation on event type and label. A reader following the documented example would not get cancellation behavior for superseded PR runs.

Labels: PR adds CI workflow conventions documentation under docs/contributing/ and registers it in AGENTS.md

@fullsend-ai-review fullsend-ai-review Bot 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.

See the review comment for full details.

Comment thread docs/contributing/ci-workflows.md Outdated
Comment thread AGENTS.md
Comment thread docs/contributing/ci-workflows.md
@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/docs User-facing documentation component/ci CI pipelines and checks labels Jul 23, 2026
@rh-hemartin

Copy link
Copy Markdown
Member

/fs-fix do not use a checklist format.

@rh-hemartin rh-hemartin self-assigned this Jul 27, 2026
@fullsend-ai-coder

fullsend-ai-coder Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 7:33 AM UTC · Completed 7:37 AM UTC
Commit: 1dbe7bd · View workflow run →

Convert all `- [ ]` checkbox items to regular `- ` bullet points in
ci-workflows.md and update the intro text from "checklist" to
"conventions" to match the style used by other contributing guides.

Addresses review feedback on #5523
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (human-triggered)

Replaced checklist format with plain bullet points per human instruction. All - [ ] items converted to - and intro text updated. Matches the formatting convention used by other docs/contributing/ guides.

Fixed (1):

  1. do not use a checklist format: Converted all 27 - [ ] checkbox items to plain - bullet points throughout docs/contributing/ci-workflows.md, and updated the intro text from 'Use this checklist when' to 'Follow these conventions when' to match the style used by other contributing guides in the repo

Tests: passed

Updated by fullsend fix agent

@rh-hemartin
rh-hemartin added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit c09adcb Jul 27, 2026
16 checks passed
@rh-hemartin
rh-hemartin deleted the agent/5521-ci-workflow-conventions branch July 27, 2026 07:47
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 27, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 7:50 AM UTC · Completed 8:01 AM UTC
Commit: 65e088f · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #5523 — CI workflow conventions guide

Workflow: Issue #5521 (filed by retro agent from PR #5482) → triagecode → PR #5523review → human fix request → fix → human approval → merged.

What went well:

  • End-to-end pipeline from retro-filed issue to merged PR worked smoothly. Triage, code, and review agents ran without failures.
  • The review agent correctly identified a factual inaccuracy: the doc's blanket rule to use ${{ github.workflow }} is wrong for reusable workflows where github.workflow resolves to the caller's name. This was verified against the repo's 7 reusable workflows, all of which use hardcoded prefixes.
  • The fix agent was efficient and precisely scoped ($1.10, single iteration, 2-minute agent runtime). It changed only what was asked.

What needed rework:

  • The triage agent recommended "structured checklists (not prose)" format. The code agent followed this literally, producing 27 - [ ] checkbox items. Every other doc in docs/contributing/ uses plain - bullets. The human caught this and triggered /fs-fix do not use a checklist format, adding one rework cycle (~6 min wall-clock).
  • The review agent missed the formatting inconsistency the human caught. It focused on semantic/technical accuracy but did not compare the new doc's style against peer files in the same directory.

Unresolved finding merged:

  • The review agent's medium finding about github.workflow in reusable workflows was not addressed before merge. The doc now contains an inaccuracy that could mislead contributors writing or modifying reusable workflows.

Existing issues with new evidence:

Proposals filed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ci CI pipelines and checks component/docs User-facing documentation ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI workflow conventions doc to close review knowledge gap

1 participant