fix(plugin): don't record false success for manual plugin runs #4

Open
johno wants to merge 5 commits from dog/charlie-gastown-1769245500525 into main
Owner

Summary

gt plugin run was recording ResultSuccess even though it only prints instructions without actually executing them. This poisoned the cooldown gate, blocking actual plugin executions for 24h while no real work was done.

Root cause: When someone runs gt plugin run gitea-reconcile, it:

  1. Prints the plugin instructions to stdout
  2. Records a "success" bead even though nothing was executed
  3. The cooldown gate then blocks future runs for 24h

Fix:

  • Record manual runs as ResultSkipped instead of ResultSuccess
  • Add CountSuccessfulRunsSince() to only count successful runs for gate evaluation
  • Gate check now uses CountSuccessfulRunsSince() so skipped/failed runs don't block future executions

Fixes: hq-2dis4c

## Summary `gt plugin run` was recording `ResultSuccess` even though it only prints instructions without actually executing them. This poisoned the cooldown gate, blocking actual plugin executions for 24h while no real work was done. **Root cause**: When someone runs `gt plugin run gitea-reconcile`, it: 1. Prints the plugin instructions to stdout 2. Records a "success" bead even though nothing was executed 3. The cooldown gate then blocks future runs for 24h **Fix**: - Record manual runs as `ResultSkipped` instead of `ResultSuccess` - Add `CountSuccessfulRunsSince()` to only count successful runs for gate evaluation - Gate check now uses `CountSuccessfulRunsSince()` so skipped/failed runs don't block future executions Fixes: hq-2dis4c
johno added 1 commit 2026-01-24 01:21:46 -08:00
fix(plugin): don't record false success for manual plugin runs
Some checks failed
CI / Check for .beads changes (pull_request) Successful in 9s
CI / Check embedded formulas (pull_request) Successful in 32s
CI / Test (pull_request) Failing after 1m47s
CI / Lint (pull_request) Failing after 22s
CI / Integration Tests (pull_request) Successful in 1m35s
CI / Coverage Report (pull_request) Has been skipped
Windows CI / Windows Build and Unit Tests (pull_request) Has been cancelled
612c59629f
`gt plugin run` was recording ResultSuccess even though it only prints
instructions without executing them. This poisoned the cooldown gate,
blocking actual executions for 24h.

Changes:
- Record manual runs as ResultSkipped instead of ResultSuccess
- Add CountSuccessfulRunsSince() to only count successful runs for gate
- Gate check now uses CountSuccessfulRunsSince() so skipped/failed runs
  don't block future executions

Fixes: hq-2dis4c

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Some checks failed
CI / Check for .beads changes (pull_request) Successful in 9s
CI / Check embedded formulas (pull_request) Successful in 32s
CI / Test (pull_request) Failing after 1m47s
CI / Lint (pull_request) Failing after 22s
CI / Integration Tests (pull_request) Successful in 1m35s
CI / Coverage Report (pull_request) Has been skipped
Windows CI / Windows Build and Unit Tests (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • internal/cmd/plugin.go
  • internal/config/env.go
  • internal/config/env_test.go
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dog/charlie-gastown-1769245500525:dog/charlie-gastown-1769245500525
git checkout dog/charlie-gastown-1769245500525
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johno/gastown#4