Repository navigation
fix(guard): stop suggesting meta git snapshot - #5
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This was referenced Oct 25, 2026
meta is removing `meta git snapshot`. The guard's denial messages now say to commit, stash or branch first and use git reflog to recover commits. Refs [[tasks/harmony-2754]]
The current toolchain's clippy rejects two sort_by calls on main. Refs [[tasks/harmony-2754]]
A backup branch keeps only commits, and `meta git commit` commits only staged changes, so the guidance now stages with `meta git add -A` or stashes first. The force-push hint backs up the remote tip. Refs [[tasks/harmony-2754]]
gold-silver-copper
force-pushed
the
fix/meta-git-safety
branch
from
October 25, 2026 23:14
4f79876 to
c543257
Compare
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.
meta is removing
meta git snapshot(owner's decision, 2026-10-25: nobody uses it; PR set linked below). The guard's built-in denial messages told agents to run it, which will fail.What changed
.claude/agent-guard.toml(the embedded defaults): every "meta git snapshot create/restore" hint is replaced.git reset --hardnow suggests committing orgit stash push -ufirst andgit reflogto go back to an earlier commit; force push suggestsgit fetchand a backup branch atorigin/<branch>(the remote tip it would destroy);git branch -Dsuggests a backup branch;git clean,git checkout .suggestgit stash; the two stash hints that claimed a snapshot "captures all stashes" are dropped. Byte-identical to the copy in the gitkb/meta root.reset --hardmessage mentions "snapshot" now assert it mentionsgit reflog; README table row updated.Not changed, needs a decision:
agent scorestill has a "snapshot safety" metric (25% of the overall score) that countsmeta git snapshot createbefore destructive commands, and recommends it. With the command gone, that metric can only score 0 when destructive commands are present. Dropping or replacing it (e.g. with "commit or stash before destructive commands") changes the scoring, so I left it for you.sort_bycalls (guard.rs,score.rs) becomesort_by_key(... Reverse ...), because the current toolchain's clippy (unnecessary_sort_by) fails CI onmain's code; behavior is unchanged.Verified:
cargo test(126 tests) andtests/guard.batspass.Linked PRs (same branch
fix/meta-git-safety)Companions that don't depend on the code above (can merge on their own):