Skip to content

ci: Fleet status runs only for a comment that can change a status - #128

Merged
askalf merged 2 commits into
mainfrom
ci/fleet-status-skips-unrelated-events
Oct 7, 2026
Merged

askalf merged 2 commits into
mainfrom
ci/fleet-status-skips-unrelated-events

Conversation

@askalf

@askalf askalf commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fleet status on comments. Every comment on a PR started a Fleet status run on the exec runner, though scripts/fleet-status.mjs reads only ## Verification at <sha> comments. Preview bots' comments started dozens a day (amnesia 33, plumbline 20 in 48 hours). issue_comment now runs the job only when the comment starts with ## Verification at, or did before an edit (github.event.changes.body.from). A deleted verification comment still runs it, because the event carries the deleted body.
  • fleet-status-self-test no longer runs for a PR that changes only .github/workflows/redline.yml or redline-fix.yml, which is every Redline pin bump (18 to 23 self-test runs per repo in 48 hours). It is not a required check here, and any other workflow change, the script or its test still runs it.

Tests

scripts/fleet-status.test.mjs: 180 pass, 0 fail. The if: evaluator learns startsWith, case-insensitive like GitHub's. The new checks cover:

  • a verification comment on a PR runs the job, and one on an issue does not;
  • a preview bot's comment, a person's comment and an empty one do not;
  • an edit away from a verification comment, and a deleted one, still run it.

Every PR comment started a Fleet status run, though the script reads
only "## Verification at <sha>" comments; preview bots' comments
started dozens a day. issue_comment now runs it only when the comment
starts with that heading, or did before an edit. The test's evaluator
learns startsWith and checks a verification comment, another comment,
an edit away from one and a deletion.

fleet-status-self-test no longer runs for a PR that touches only
redline.yml or redline-fix.yml, which is every Redline pin bump.
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code size/S 10-49 hand-written lines labels Oct 7, 2026

@sprayberry-redline sprayberry-redline left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: request changes. The comment filter preserves refreshes for verification comments, including edits away from the heading and deletions. The new workflow comment needs to describe the condition rather than narrate past run volume.

1. Blocking: .github/workflows/fleet-status.yml:44

# And only a verification comment changes a status, so no other comment starts a run (preview
# bots' comments started dozens a day); an edit away from one, or its deletion, still does.

The parenthetical records past preview-bot run volume in a code comment. That patch history does not explain the condition or its edge cases.

Suggested fix:

Remove the run-volume parenthetical. Keep a short explanation that verification comments, edits away from them, and deletions require a status refresh.

rule:reads-as-generated

@sprayberry-redline sprayberry-redline left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: approve. The comment filter preserves updates for verification comments, edits away from them, and deletions while skipping unrelated comments. The tests exercise the workflow condition directly, and the self-test path exclusions leave other workflow and script changes eligible.

@askalf
askalf merged commit 5fff1d7 into main Oct 7, 2026
14 checks passed
@askalf
askalf deleted the ci/fleet-status-skips-unrelated-events branch October 7, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size/S 10-49 hand-written lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants