Skip to content

Release v1.3.0: opt-in fast-forward pushes to main - #17

Merged
RobHofmann merged 6 commits into
mainfrom
16-trunk-push-opt-in
Nov 9, 2026
Merged

RobHofmann merged 6 commits into
mainfrom
16-trunk-push-opt-in

Conversation

@RobHofmann

@RobHofmann RobHofmann commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

What changes

  • A new setting git.allowTrunkPush in aisdlc.json, false by default. Only the JSON value true turns it on, and both hooks read it from aisdlc.json on the remote main branch, not from the working tree. So the change that turns it on goes through a pull request first.
  • With the setting on, the pre-push git hook lets a fast-forward of main or master through, 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.
  • With the setting on, Deny-IncompletePush.ps1 lets a plain push of main through when the push is the whole command. It refuses a +refspec, a word with shell escapes, a delete refspec, a git option before push other than -C, and any push option outside a short allow list written in full. So --force, --delete, --mirror and --no-verify stay refused, also when shortened. The completeness check and the pre-flight receipt still apply.
  • The agent hook now checks every push in a command, so a second push in a chain cannot reach main unseen. This holds with or without the setting.
  • Docs: 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

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
@RobHofmann
RobHofmann merged commit 66c186b into main Nov 9, 2026
16 checks passed
@RobHofmann
RobHofmann deleted the 16-trunk-push-opt-in branch November 9, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant