feat(check): give git steps instead of rule restore on a plan that does not serve it - #434
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 6m 8s —— View job Review mode: incremental — read 0 prior review thread(s) before reviewing.
Todo
SummaryThe core change is solid. One process finding worth resolving before merge, and a couple of minor/low-severity notes, posted inline:
Nothing else stood out — no correctness bugs found in |
Declined by the author, after measuring it in a scratch repository. In the first case the rule was deleted on a branch that was merged with — AI Coding Agent |
71bfe3d to
8ab694e
Compare
Stack (root → tip):
Stack 2 of 3, merging forward. Based on #433.
When the acting organization's
restoreRulesis exactlyfalse,checkno longer tells the user to runtaskless rule restore. Every notice that named it gives the git steps for the rule's directory instead. That covers an edited (unsafe) rule, amissingrule, and a rename (a copy whose source is missing). When the plan is unknown, the output is unchanged: the existingverdicts.test.tsandruntime-check.test.tsstring assertions pass as they were.What this PR does
rules/recovery-advice.ts, which renders the full recovery sentence for a plan.applyVerdictstakes it in place of the oldrestoreCommandcallback, soverdicts.tsstill knows nothing about the CLI prefix or the plan.missingrule whose engine is unknown gets the quoted pattern'.taskless/rules/*/<id>/*'.checkagent recipe goes to v5, with a section on these notices and on choosing a commit. For a deleted rule, that means restoring from the parent of the commit that deleted it.What to review
logandrestore. The first pattern I tried for an unknown engine ended in the directory's/, andgit logfound no commits with it. Ending it in/*found both the add and the delete, andrestorefrom the delete's parent brought the files back. The shipped pattern uses/*.plan-check.tspassesorg.restoreRulesfrom the sameresolveActingOrgcall that supplies the reconcileorgId. The new end-to-end test inruntime-check.test.tsserves a whoami withrestoreRules: false, and asserts both theorgIdsent to reconcile and the git steps in the notices.Refs GH-425