Skip to content

Phase 4.2: Consolidate issue-close governance workflows into issue-compliance.yml #1407

Description

@ashleyshaw

Is your code refactoring request related to a problem?

Three workflows share the issues: [closed] trigger and all deal with issue compliance, causing duplicate GitHub API calls on every issue close event:

  • template-enforcement.yml (388 lines) — validates issue template completeness on open/edit/reopen/close
  • checklist-finalisation.yml (222 lines) — marks checklist items, updates project fields on close
  • validate-issue-dod-before-close.yml (113 lines) — validates DoD checkboxes before allowing close

Each fires independently on issues: [closed], resulting in 3 separate workflow runs for the same event. There is no single authoritative location for issue closure governance.

Part of epic #1227 — Workflows Consolidation Initiative.

Describe the Refactoring / Review Task

Create .github/workflows/issue-compliance.yml consolidating all three with conditional job guards:

on:
  issues:
    types: [opened, edited, reopened, closed]
  pull_request_target:
    types: [closed]
  push:
    branches: [develop]

jobs:
  enforce-template:
    if: github.event.action != 'closed' || github.event_name == 'push'
  validate-dod-on-close:
    if: github.event.action == 'closed' && github.event_name == 'issues'
  finalise-checklists:
    if: github.event.action == 'closed'

No behaviour change — all existing logic preserved. Net: −2 workflows (3 files → 1).

Use Case

  • Single source of truth for issue compliance lifecycle events
  • Eliminates 3× duplicate workflow runs on every issue close
  • Easier to extend (one file, not three)
  • Reduces GitHub Actions minutes

Alternatives Considered

  • Extend template-enforcement.yml: Would exceed 700 lines — too large
  • Keep as-is: Continues duplicate API calls and fragmented governance

Additional Context

Blocker: Phase 3.3 must complete first (or can run in parallel — no code dependency on labeling work).

DoD/close-loop safety: issue-compliance.yml and issue-health-audit.yml do not create a close/reopen loop — health audit runs on a weekly schedule only.

See: .github/projects/active/workflows-consolidation-2026-q3/PHASE_4_PLANNING.md


Definition of Ready (DoR)

  • Refactoring goals and scope defined
  • Code area(s) and impact listed
  • Dependencies mapped
  • Phase 3.3 complete (blocker resolved)
  • Estimate added

Definition of Done (DoD)

  • issue-compliance.yml created with all three jobs properly conditioned
  • All original behaviours verified (open, edit, close integration tests)
  • template-enforcement.yml, checklist-finalisation.yml, validate-issue-dod-before-close.yml deleted
  • No regressions in issue labeling or project field updates
  • Code meets org coding standards
  • Changelog entry prepared (CHANGELOG.md)
  • PR uses correct branch prefix (refactor/)

Activity

  1. linear-code commented on Jul 29, 2026

    @linear-code
  2. github-actions commented on Jul 29, 2026

    @github-actions
    Contributor

    ⏱️ Aging and SLA annotation

    • Age: 8 day(s)
    • SLA state: SLA risk
    • Thresholds: warn at 7 days, breach at 14 days
    • Last updated: 2026-08-07T14:35:49.636Z

    Maintained by project-meta-sync workflow.

  3. added theissue type on Aug 7, 2026
  4. modified the milestones: v1.1, v1.0 on Aug 7, 2026
  5. self-assigned this
    on Aug 7, 2026
  6. ashleyshaw commented on Aug 7, 2026

    @ashleyshaw
    MemberAuthor

    ✅ Phase 4 planning complete: PR #1631 merged to develop

    All Phase 4 planning documents, specifications, and coordination timelines are now available in the merged PR. This issue is ready for execution per the CONSOLIDATED_ACTION_PLAN_2026_08_07.md timeline.

    See merged PR #1631 for:

    • OPENSPEC_WORKFLOW_CONSOLIDATION.md (formal specification)
    • CONSOLIDATED_ACTION_PLAN_2026_08_07.md (execution timeline & blockers)
    • GITHUB_ISSUES_PHASE_4_TEMPLATES.md (implementation steps)
    • Detailed risk mitigation and testing protocols

    Status: Ready for execution. Refer to coordination deadlines in action plan.

  7. modified the milestones: v1.0, v1.1 on Aug 29, 2026
  8. github-actions commented on Sep 4, 2026

    @github-actions
    Contributor

    Milestone Allocation

    
    
  9. github-actions commented on Sep 4, 2026

    @github-actions
    Contributor

    ✅ Issue checklists finalised after closure.

  10. github-actions commented on Sep 8, 2026

    @github-actions
    Contributor

    ⚠️ Bare Labels Detected

    This issue has labels that are not in the canonical taxonomy:

    • migrate:status:ready
    • migrate:type:refactor
    • priority:medium
    • status:ready-for-development

    Valid Canonical Labels

    Please use labels with a prefix from the canonical taxonomy:

    • Type: type:bug, type:feature, type:task, type:documentation, etc.
    • Status: status:needs-triage, status:in-progress, status:done, etc.
    • Priority: priority:critical, priority:high, priority:normal, priority:low
    • Area: area:ci, area:docs, area:labels, area:security, etc.
    • Meta: meta:needs-changelog, meta:duplicate, meta:blocked, etc.

    For the complete list, see .github/labels.yml.

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

Metadata

Metadata

Type

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions