Skip to content

fix(sync-bots): fail the run when no fleet App token was minted - #301

Merged
Gerrrt merged 1 commit into
mainfrom
fix/sync-bots-fail-without-app-token
Nov 23, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
fix/sync-bots-fail-without-app-token

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

What and why

nvim-sync, starship-sync and theme-sync already warn when the fleet App mint is skipped or fails (#269), but the run still finishes green. Nobody reads a green scheduled run, so the PR that bot then opens with GITHUB_TOKEN gets no CI and sits BLOCKED. That's #265, and dotgibson/dotfiles-nvim#16 failed the same way, behind a green run.

Each bot now ends with a step that fails the run when no token was minted. The error says whether the org secret or variable isn't shared with this repo, or the App isn't installed on it. The warning step stays as it is.

#269 made that step a warning for two reasons. This change keeps both:

  • A real drift should still land behind a manual nudge. The new step runs after the PR step, so the PR is already open.
  • A fork must not go red. The job-level if: github.repository_owner == 'dotgibson' already covers this.

The same step was added to dotfiles-core's freshness.yml (dotgibson/dotfiles-core#1290) and dotfiles-nvim's (dotgibson/dotfiles-nvim#18).

Verification

  • pwsh -NoProfile -File tests/Invoke-Tests.ps1: 1354 passed, 0 failed, coverage 90.2%, gate passed. The pre-commit validation also passed (PowerShell syntax, JSON, editorconfig, no analyzer errors).
  • All three workflows parse, and each sync job ends with the new step after its PR step.
  • Unverified on a live run: the failure path itself only fires when the key or install is missing, which it currently isn't on this repo.

Checklist

  • No hand-edits to nvim/ or starship/starship.toml
  • bootstrap.ps1 unchanged
  • No machine-specific paths, identities, or secrets

🤖 Generated with Claude Code

nvim-sync, starship-sync and theme-sync warn when the mint is skipped
or fails (#269), but the run still concludes green, and a green
scheduled run reaches nobody: the PR it opens with GITHUB_TOKEN gets no
CI and sits BLOCKED, as #265 did and as dotgibson/dotfiles-nvim#16 did
behind the same kind of green run.

Each bot now ends with a step that fails when no token was minted. It
runs after the PR step, so #269's reason for a warning, letting a real
drift land behind a manual nudge, still holds; its other reason, not
reddening a fork, is already covered by the job-level owner guard. The
error names whether the org secret/variable is not shared with this
repo or the App is not installed on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

🟢 Approval recommended

No active review issues were identified for the changes that surface missing App tokens as failed sync runs.

No open issues 🎉

What changed in this PR

Makes missing fleet App tokens visible as failed sync-bot runs, rather than green runs that can leave bot-created PRs blocked without CI.

Changes:

  • Adds a final token check to all three sync workflows after PR creation, preserving the manual recovery path.
  • Reports missing credential visibility or a failed App mint while retaining existing warnings and fork guards.
  • Documents the behavior in the changelog.
File Description
CHANGELOG.md Documents the new failure behavior and recovery path.
.github/​workflows/​theme-sync.yml Fails theme-sync when no App token was minted.
.github/​workflows/​starship-sync.yml Fails starship-sync when no App token was minted.
.github/​workflows/​nvim-sync.yml Fails nvim-sync when no App token was minted.

Review effort: Balanced

@Gerrrt
Gerrrt merged commit 85bfe39 into main Nov 23, 2026
14 checks passed
@Gerrrt
Gerrrt deleted the fix/sync-bots-fail-without-app-token branch November 23, 2026 20:45
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.

2 participants