fix: validation-gate the review's rework loop (don't autonomously push to an unvalidated repo) #242
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 2 minutes 30 seconds
Due date
igor
2 minutes 30 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#242
Loading…
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
The binding review (3b) exposed a gap: the harness REVIEWED and then
REWORKED + PUSHED to an UNVALIDATED repo (stonks#2), violating the core rule
"validation gates WORK (issue pickup, PR pushes)".
Chain (all confirmed in code):
do_review_tickruns on the ANALYSIS set -- every bot-accessible repo, NOTjust validated ones. That's by design (a verdict is information, useful
everywhere). Fine.
REQUEST_CHANGESit doesforgejo_assign "$target_repo" "$target_num" "$BOT_USER"with no validation check.forgejo_my_assigned_prs->/repos/issues/search?type=pulls&state=open&assigned=true) is notvalidation-filtered -- unlike Signal 1, which iterates
VALIDATED_REPOS_JSON.picks it up -> reworks -> pushes. stonks (no CI, never validated) got a pushed
commit it should never have received.
Fix -- validation-gate the WORK, not the review
The review still RUNS everywhere (info); it just must not drive autonomous WORK
(a rework pushes) on an unvalidated repo.
do_review_tick, theREQUEST_CHANGESbranch: only assign-the-bot (drivethe rework loop) when the target repo is VALIDATED. Use
maintenance_repo_validated "$target_repo"(it checksVALIDATED_REPOS_JSON,already built before the cascade). On an UNVALIDATED repo, treat RC like the
round-cap escalation -- request the human reviewer (with a note: repo isn't
validated, so the change can't be CI-verified / autonomously reworked) instead
of assigning the bot. Don't leave the PR stuck. New shape of the RC branch:
if validated AND rework_rounds < 3 -> assign bot (rework); else -> request human.forgejo_my_assigned_prsresults to repos present inVALIDATED_REPOS_JSONbefore selecting one to rework. A bot-assigned PR on an unvalidated repo (e.g.
a manual reassignment) must not be autonomously reworked+pushed -- same rule.
Signal 1 is already validated-only; make Signal 2 match.
Watch out for
assign-bot / rework-push is gated. Posting the verdict + requesting the human
are fine on any repo.
(no autonomous rework); the normal flow resumes once it validates.
unchanged).
maintenance_repo_validatedalready exists (lib in tick.sh ~L1195) -- reuse it,don't reimplement the membership check.
Definition of done
bot / rework / push.
verdict + human request, never a push.
bash -n bin/tick.shclean;bash bin/check-sync.shpasses.