Skip to content

fix(ci): sync issue templates directly in script-submission.yml - #69

Merged
pfeerick merged 1 commit into
mainfrom
fix/sync-in-script-submission
Aug 4, 2026
Merged

fix(ci): sync issue templates directly in script-submission.yml#69
pfeerick merged 1 commit into
mainfrom
fix/sync-in-script-submission

Conversation

@pfeerick

@pfeerick pfeerick commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

validate-issue-templates.yml's push-triggered sync job was designed to self-heal bot-created branches automatically, but that never actually happened: script-submission.yml creates its branches via git push origin "$BRANCH" using the default GITHUB_TOKEN, and GitHub Actions suppresses new workflow-triggering events (including push) for GITHUB_TOKEN-authored pushes. That's the same rule that (correctly) prevents sync's own corrective commits from re-triggering itself — I just didn't realize it also silently killed the trigger the whole mechanism depended on for the bot-created case.

Confirmed against two real submissions merged after #65 landed: PR #67 and #68 both introduced new tags and landed with a permanently-failing check and zero push-event workflow runs on their branch — no auto-fix ever ran.

Fix

Run uv run tools/sync_issue_template_options.py --write directly in script-submission.yml, right before the commit step, and include the resulting files (scripts.schema.json, both templates) in that same commit. The schema/templates are now correct from the very first commit of every bot-generated PR, so check passes immediately — no reliance on retriggering at all.

The push/sync job in validate-issue-templates.yml is unchanged and still useful as a backstop for genuine human-authored pushes (e.g. a maintainer hand-editing scripts.json directly), which aren't subject to this suppression.

Also fixes a stale line in the failure-comment text that still referenced the category-enum rejection removed in #65.

Test plan

  • Simulated the full flow locally: issue_to_scripts.py insert with a new tag → sync_issue_template_options.py --write → confirmed the new tag lands in both scripts.schema.json and the template in the same pass
  • uv run tools/test_sync_issue_template_options.py — 10 tests pass
  • uv run tools/sync_issue_template_options.py --check on main — in sync
  • YAML validity

🤖 Generated with Claude Code

The push job in validate-issue-templates.yml was supposed to self-heal
bot-created branches, but script-submission.yml's branch-creating push uses
the default GITHUB_TOKEN, and GitHub Actions suppresses new workflow-
triggering events (including push) for GITHUB_TOKEN-authored pushes — the
same rule that prevents the sync job's own corrective commits from causing
an infinite loop also silently prevented it from ever running in the first
place for these branches. Confirmed against two real submissions (#67, #68):
both landed with a permanently-failing check and no auto-fix.

Rather than fight the retrigger suppression, run the sync script directly
in script-submission.yml before committing, so the schema/templates are
already correct in the very first commit of every bot-generated PR. The
push job in validate-issue-templates.yml remains as a backstop for
genuine human-authored pushes (e.g. direct-edit PRs), which aren't subject
to this suppression.

Also fixes a stale error-comment string referencing the category enum
check that was removed in #65.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pfeerick
pfeerick merged commit 0f66402 into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant