bug(rgr): prevent RED test authoring before RGR cycle starts #226
Labels
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/auto_review#226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
During issue #218 work, the agent asked the RED test author to create a failing test before successfully starting an RGR ledger cycle. The RGR tool later refused
rgr_startbecause the worktree was no longer clean, leaving the session in a weird state where RED existed on disk but could not be recorded/approved through the intended ledger flow.The guardrails should prevent this ordering mistake before any test-writing handoff happens.
Expected
For behavior work, the orchestration flow should require a clean-worktree
rgr_startbefore delegating torgr-test-authoror otherwise writing RED tests. If the ledger is not active, test-writing or RED-recording should be blocked with a clear recovery path.Actual
A RED test was authored first. Then
rgr_startfailed due to the non-clean worktree, and subsequentrgr_record_red/rgr_approve_redcalls could not proceed.Impact
This creates confusing recovery states and risks production edits being attempted without an auditable RED ledger, even when the test itself is valid.
Suggested Fix
rgr-test-authordelegation for behavior work unless an RGR cycle is already active.rgr_startis attempted after test changes exist.Discovered While
Working on #218 (ADR-0018 just-based Forgejo CI jobs).