Repository navigation
Keep the knowledge branch out of the public repo - #37
Merged
Merged
Conversation
The agent-memory branch is never published: its history predates this project's no-attribution rule and metno/pysent is public. A guard against pushing it lived in .git/hooks/pre-push - and installing the session system set core.hooksPath to .githooks, which made git ignore it. A guard that silently stopped guarding is worse than none, because nobody thinks to check. Versioned here it holds on every clone and every worktree, and tests the destination rather than the branch: a push to the private memory repo is a backup and is allowed, a push anywhere else is refused. The backup push also skips the commit-identity check. Those thirty-eight commits predate both that rule and the attribution one, and rewriting archival history to satisfy a rule written afterwards would destroy the thing being preserved. It never reaches the project, so the checks that guard the project's history do not apply to it. Verified in all three directions: agent-memory to the public remote exits 1, agent-memory to the memory remote exits 0, an ordinary branch to the public remote is untouched and still identity-checked.
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.
A guard that silently stopped guarding.
The
agent-memorybranch is never published — its history predates this project's no-attribution rule, andmetno/pysentis public. The guard against pushing it lived in.git/hooks/pre-push, and installing the session system setcore.hooksPathto.githooks, which made git ignore it. Nobody would have noticed: pushing that branch is still refused today, but by the commit-identity check rejecting its old authorship, not by anything protecting the branch. Clean those commits and it would publish.The fix
The guard moves into the versioned
.githooks/pre-push, so it holds on every clone and every worktree instead of only on the machine that happened to have it. It tests the destination, not the branch:agent-memory→metno/pysent(public)agent-memory→epifanio/pysent-memory(private backup)All three verified by feeding the hook the refs git would.
One deliberate exemption
The backup push also skips the commit-identity check. Those 38 commits predate both that rule and the attribution one, and rewriting archival history to satisfy a rule written afterwards would destroy the thing being preserved. The branch never reaches the project, so the checks that guard the project's history do not apply to it.
Found while answering "what do I run on a laptop that has never seen pysent?" — the answer includes
git config core.hooksPath .githooks, which is what exposed it.