ReviewOS

also looking at this

stacks/buddy

fix(gates): actually refresh the dashboard instead of reporting that it did

#1425
Merged glennmichael123 wants to merge fix/post-merge-gates into main
3 files +86 -3
9 days ago

The post-merge action read, in full:

if (config.refreshDashboard)
  performed.push('refresh-dashboard')

performed is what the command prints back as a green tick:

for (const action of outcome.performed)
  logger.success(`✅ ${action}`)

So gates.postMerge.refreshDashboard: true produced "✅ refresh-dashboard" on every merge and refreshed nothing.

Every other action in that function does real work and reports failures into skipped. This was the only branch that claimed success with nothing behind it — which is worse than not offering the action at all, because the tick is the only signal a maintainer gets.

The fix

Refreshing means a full scan, which is Buddy's job rather than this module's — runPostMerge only knows about a provider. So it takes a hook, the way attemptFix takes regenerateLockfile, and bin/cli.ts supplies one.

Two failure modes now report honestly:

  • No refresher supplied → skipped: 'no dashboard refresher was supplied'
  • Refresh threw → skipped: 'refresh failed'

The pull request has already merged, so a failed refresh must not read as a failed run — but it must not read as a success either.

Tests

2106 → 2110, including the case that would have caught this: performed must not contain refresh-dashboard when nothing can refresh.

Lint ✓ · typecheck ✓ · check:docs ✓ · 0 fail

🤖 Generated with Claude Code

https://claude.ai/code/session_01UWouahBJT3msK7V2VDYY6T

3 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.