Repository navigation
Release v1.3.0: opt-in fast-forward pushes to main - #17
Merged
Merged
Conversation
A repository that sets git.allowTrunkPush to true in aisdlc.json may update main or master with a plain push. The pre-push git hook allows only a fast-forward and refuses a delete, a force push, and a push whose remote tip is not in the clone. Deny-IncompletePush.ps1 refuses a force option, a +refspec, a delete, --all, --mirror, --branches and --prune. The blocking gates and the other push checks still run. Only the JSON value true counts. Refs #16
…r git.allowTrunkPush The agent hook now judges each push in a command, so a second push in a chain cannot reach main unseen. With git.allowTrunkPush it refuses --no-verify, a git option before push other than -C, and a push to main chained with other commands. Plain words in the docs, the hooks skill back under its size limit, and the lock file at 1.3.0. Refs #16
…llowTrunkPush git accepts a shortened long option, such as --dele for --delete, so the agent hook now allows only -u, -q, -v and a few long options written in full, and refuses every other option. Refs #16
A word that is not an option must be a plain remote or refspec name. A backslash, a dollar sign or a brace could hide an option from the check, as \--force reaches git as --force. Refs #16
…tree Both push hooks now read the setting from aisdlc.json on the remote-tracking ref of the main branch they guard. An edit in the working tree cannot switch it on; the change that turns it on reaches main first. Refs #16
…e-push hook git learns the remote tip of the branch while it pushes and passes it on stdin. The hook now reads the setting from that commit, so a local remote-tracking ref cannot switch it on. The agent hook keeps its check on the local ref as a first check; the git hook is the backstop. Refs #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
git.allowTrunkPushinaisdlc.json,falseby default. Only the JSON valuetrueturns it on, and both hooks read it fromaisdlc.jsonon the remotemainbranch, not from the working tree. So the change that turns it on goes through a pull request first.mainormasterthrough, and prints one line that names the setting. It still refuses a delete, a force push, and a push whose remote tip is not in the clone. The blocking gates still run.Deny-IncompletePush.ps1lets a plain push ofmainthrough when the push is the whole command. It refuses a +refspec, a word with shell escapes, a delete refspec, a git option beforepushother than-C, and any push option outside a short allow list written in full. So--force,--delete,--mirrorand--no-verifystay refused, also when shortened. The completeness check and the pre-flight receipt still apply.mainunseen. This holds with or without the setting.layout.md,orchestration.md, the hooks skill and the github-pull-requests skill name the setting. All packages move to 1.3.0.Checks
The pre-flight passes: 2,162 tests, all blocking gates, the issue contract and the secret scan.
Refs #16