fix(tui): make Full Access truly full access for publish-like shell#4596
Conversation
Fixes #4595. Two defects made routine development prompt under the Full Access posture: 1. Every git push was classified publish-like. shell_tokens_are_publish_like treated the command-safety canonical class 'git push' as a publish regardless of target, so a feature-branch push tripped the durable-review floor. Classification is now ref-aware and fail-closed: force/delete/ tags/mirror/all/prune forms, +refspecs, wildcard refspecs, empty-src deletes, pushes to main/master/HEAD, release-lane refs, tag-like refs (v<digit>, refs/tags), unrecognised flags, and ambiguous upstream forms (bare 'git push', 'git push origin') all remain publish-like; only an explicit non-force push whose every refspec destination is a plain unprotected branch is routine shell. 2. The publish floor held in every posture, including Bypass. Full Access means the user granted publish authority, so the floor now applies only to the Ask/Auto-Review postures. The catastrophic-destroyer floor (device writes, system-path rm -rf) still applies in every posture — it guards against model error, not user intent. The yolo_mode publish engine test now locks the new contract end to end: no ApprovalRequired for a publish-like shell under Bypass, while the background-destructive test keeps proving destroyers still hold. Verified locally: 37 auto_review tests (including new feature-branch, protected/ambiguous, and Full Access floor matrices), 502 engine/approval/command_safety tests, strict all-target/all-feature locked clippy, fmt. Signed-off-by: Hunter B <hmbown@gmail.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @Hmbown's task in 4m 36s —— View job Claude finished reviewing @Hmbown's PR
SummarySolid, well-scoped fix. The Finding: unresolved shell expansion in a refspec destination defaults to "not protected"
The function is a denylist: it returns
A destination containing an unresolved shell variable or command substitution — e.g. Suggest treating a destination containing shell-expansion characters ( Fix this → — patches Other notes
|
Fixes #4595.
What changed
Two defects made routine development prompt under the Full Access posture:
Every
git pushwas classified publish-like. Classification is now ref-aware and fail-closed: force/delete/tags/mirror/all/prune forms,+refspecs, wildcard refspecs, empty-src deletes, pushes tomain/master/HEAD, release-lane refs, tag-like refs (v<digit>,refs/tags), unrecognised flags, and ambiguous upstream forms (baregit push,git push origin) all remain publish-like; only an explicit non-force push whose every refspec destination is a plain unprotected branch is routine shell.The publish floor held in every posture, including Bypass. Full Access means the user granted publish authority, so the floor now applies only to the Ask/Auto-Review postures. The catastrophic-destroyer floor (device writes, system-path
rm -rf) still applies in every posture — it guards against model error, not user intent.Evidence