Skip to content

fix: sync issues:opened trigger to all heartbeat template copies - #891

Closed
diberry wants to merge 2 commits into
devfrom
squad/815-remove-heartbeat-cron
Closed

diberry wants to merge 2 commits into
devfrom
squad/815-remove-heartbeat-cron

Conversation

@diberry

@diberry diberry commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

What

Addresses #815 — high Actions usage from Squad Heartbeat (Ralph).

Changes

  • Schedule trigger: Already removed in a previous CI hardening pass (no cron existed in current code)
  • *Added \issues: opened* to the event types so Ralph auto-triages new issues when created
  • All 5 synced copies updated: canonical source (.squad-templates/), 3 mirrors (\ emplates/, \packages/squad-cli/templates/, \packages/squad-sdk/templates/), and the active workflow (.github/workflows/)
  • Template sync test (146 tests) passes ✅

Trigger block (after)

\\yaml
on:
issues:
types: [opened, closed, labeled]
pull_request:
types: [closed]
workflow_dispatch:
\\

Closes #815

@github-actions

github-actions Bot commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #891

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 5
Files added 0
Files modified 5
Files deleted 0
Modules touched 5

🎯 Risk Factors

  • 5 files changed (≤5 → LOW)
  • 5 modules touched (5-8 → HIGH)

📦 Modules Affected

ci-workflows (1 file)
  • .github/workflows/squad-heartbeat.yml
root (1 file)
  • templates/workflows/squad-heartbeat.yml
squad-cli (1 file)
  • packages/squad-cli/templates/workflows/squad-heartbeat.yml
squad-sdk (1 file)
  • packages/squad-sdk/templates/workflows/squad-heartbeat.yml
templates (1 file)
  • .squad-templates/workflows/squad-heartbeat.yml

This report is generated automatically for every PR. See #733 for details.

@diberry
diberry force-pushed the squad/815-remove-heartbeat-cron branch from a34389d to f5bfb59 Compare April 8, 2026 14:22
@diberry

diberry commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

Squad - I don't see the cron job actually removed in this PR. Why isn't that fixed?

@diberry diberry added the skip-changelog Skip changelog enforcement for this PR label Apr 8, 2026
@diberry

diberry commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

🔍 Squad Review — Kaylee (Engineering)

# Check Status Notes
1 Changelog entry ✅ skip-changelog label present
2 Squashed to 1 commit ✅ 1 commit
3 CI green ✅ All checks pass (test, policy-gates, exports-map, samples-build, export-smoke-test, etc.)
4 Copilot comments resolved ✅ 0 review threads
5 No .squad/ files ✅ Clean — only .squad-templates/ (expected)
6 No unrelated files ✅ All 5 files are heartbeat workflow copies across sync locations
7 Tests for changes ✅ YAML-only change — no testable code
8 Not a duplicate/reversal ✅ Unique scope (closes #815)

⚠️ Note: PR is currently in draft state.

Verdict: ✅ Ready to merge (when moved out of draft)


Review by Squad AI team (Kaylee — Engineering) · requested by Dina Berry

@diberry

diberry commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

🧪 FIDO — Quality Review

Verdict: ⚠️ COMMENT

Test Coverage

Edge Cases / Risks

  • Title is misleading. PR says "remove heartbeat cron" but the diff does NOT remove any cron — it only adds opened to issues.types. The cron schedule still exists. Either the title should be corrected or the cron removal was missed.
  • Noise risk. Adding opened means the heartbeat fires on EVERY new issue. If the repo gets issue spam (bots, scrapers), this could trigger many unnecessary workflow runs. No rate-limiting or bot-actor guard is present.
  • Template sync is correct. All 5 copies (.github/, .squad-templates/, 3× packages/) are updated identically. ✓

CI Impact

  • Low risk. Additive trigger change. No build/test regression possible.

Recommendation

Fix the PR title (no cron is removed). Consider whether an actor guard (if: github.actor != 'dependabot[bot]') is needed to prevent bot-opened issues from triggering the heartbeat.

@diberry

diberry commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

🔒 RETRO — Security Review

Verdict: ✅ APPROVE

Security Findings

  • No security concerns identified. This is a minimal trigger-type addition (\opened\ added to \issues.types) across 5 template files.

Credential / PII Check

  • No secrets or PII introduced.

Workflow Permissions

  • No changes to permissions. The existing heartbeat workflow permissions are unchanged.

Recommendation

Clean merge. No security action needed.

@diberry

diberry commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

🏗️ Flight — Architecture Review

Verdict: ✅ APPROVE

Findings

  • Template sync correctly applied across all 5 locations (.github/workflows/, .squad-templates/, packages/squad-cli/templates/, packages/squad-sdk/templates/, emplates/). This is exactly the kind of discipline the template sync awareness check requires.
  • Minimal, surgical change — adding opened to the existing issues.types array. No new dependencies, no module boundary changes, no API surface impact.

Module Boundary Check

  • No boundary violations. Workflow-only change, no package imports affected.

Recommendation

Merge as-is. Clean, focused fix with proper template sync.

@diberry
diberry marked this pull request as ready for review April 8, 2026 22:44
Copilot AI review requested due to automatic review settings April 8, 2026 22:44

Copilot AI 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.

Pull request overview

Updates the Squad Heartbeat (Ralph) workflow triggers to be more event-driven by ensuring new issues are triaged immediately when they’re created, aligning with the goal of reducing unnecessary GitHub Actions usage from scheduled runs.

Changes:

  • Adds issues: types: [opened, closed, labeled] to trigger Ralph on newly created issues.
  • Applies the same trigger update across the canonical workflow template, its mirrored copies, and the active workflow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
templates/workflows/squad-heartbeat.yml Adds issues:opened to the workflow trigger types in the template.
packages/squad-sdk/templates/workflows/squad-heartbeat.yml Mirrors the issues:opened trigger change for the SDK template copy.
packages/squad-cli/templates/workflows/squad-heartbeat.yml Mirrors the issues:opened trigger change for the CLI template copy.
.squad-templates/workflows/squad-heartbeat.yml Updates the canonical template to include issues:opened.
.github/workflows/squad-heartbeat.yml Updates the active workflow to trigger on newly opened issues.

@diberry diberry changed the title fix: remove heartbeat cron, add issues:opened trigger fix: sync issues:opened trigger to all heartbeat template copies Apr 8, 2026
@diberry diberry closed this Apr 10, 2026
@bradygaster
bradygaster deleted the squad/815-remove-heartbeat-cron branch August 8, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip changelog enforcement for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(ci): High Actions usage from Squad Heartbeat (Ralph) – recommendation to remove scheduled trigger (or make config option on squad init)

2 participants