branch-sync-and-push-safety
БесплатноБез исполняемых скриптовНе проверенUse when changing local branch synchronization, custody recovery, post-review head binding, rebasing or rebase.strategy, private-mirror reconciliation, or…
от kunchenguid★ 9 314 звёзд на GitHubОб этом скилле
Guarded Local Branch Synchronization (internal/branchsync)
sync,axi sync, and the TUIuaction share one service whose only ordinary worktree mutation is a clean guarded move to an exact freshly verified pipeline push binding: strict fast-forward for behind branches, or an anchored reset to an equivalent diverged pipeline head when local unique work is already represented there. Under--recover, the worktree can only strict-fast-forward to the gate-preserved head, or adopt a diverged preserved head thatpreservedContainsLocalWorkproves carries every local change. Passive status never fetches, and blocked states never reset, stash, merge, rebase, force, switch, delete, or update an external remote.- Give each network remote operation its own bounded child context derived from the caller:
Refreshmust not share one deadline across sequentialgit.LsRemoteandgit.FetchRemoteBranchToPrivateRefcalls, andApplyuses the same per-operation budget for its final live check. The per-operation budget isService.RemoteTimeout, sourced only from the operator's globalbranch_sync_remote_timeoutsetting (defaultconfig.DefaultBranchSyncRemoteTimeout, 60s);RepoConfigdeliberately has no matching field.Recover's local-gate fetch is outside this network deadline contract. Regressions:TestRefreshSlowSuccessfulLsRemoteDoesNotStealFetchBudget,TestRefreshSlowButSuccessfulLsRemoteAloneExceedsItsOwnBudgetReportsOffline,TestRefreshRaisedRemoteTimeoutAcceptsTheSameLegitimateSlowLsRemote,TestRefreshParentCancellationStopsFetchAfterLsRemoteSucceeds,TestServiceRemoteTimeoutDefaultsToConfigDefault,TestLoadGlobal_InvalidBranchSyncRemoteTimeout,TestLoadRepo_BranchSyncRemoteTimeoutIsNotARepoSetting. - Successful pipeline pushes persist the exact SHA, credential-free target fingerprint/ref, and generation; legacy rows remain nullable and must never infer provenance from mutable
head_sha. Structured PR lifecycle retires merged/closed branches. The service rechecks the invoking worktree, target, live remote equality, ancestry or equivalent-divergence proof, generation, and all mutable assumptions immediately before apply. - A TERMINAL run with unpublished pipeline commits (moved head) is recoverable only from verified, non-conflicting evidence: inspection and
Recovershare one eligibility model. Equal/ahead local ancestry can create the local anchor without requiring gate access, but available gate evidence must agree; importing a locally missing preserved head requires exact or safely anchorable gate evidence, a clean worktree, and either ancestry or the content-preservation proof below. When ordinary recovery is eligible, inspection reportsblocked_pipeline_owned_recoverable+next_action recover_custodywith the exact submitted/current-head and relation facts (active runs keep the plain block). Non-commit, symbolic, or conflicting evidence fails closed. For dirty or genuinely divergent import cases, the ordinary-recovery refusals and keep-local alternatives are documented indocs/src/content/docs/reference/cli.md(Custody recovery). A verified head absent from both the worktree and an accessible gate instead offers the explicit--recover --keep-localdiscard path described below. Plainsync --recoveranchors the preserved head atrefs/no-mistakes/recover/<run>before stampingruns.custody_returned_at. Cancellation RELEASES a terminal run that never changed the submitted head (head_sha == submitted_head_sha, no push, no custody stamp): selection keeps it visible so it never misreports asblocked_wrong_branch, and it classifiesuser_owned- nonext_action, non-blocking exit, never represented as recoverable custody,--recoverthere is an idempotent no-op that mutates nothing, and a freshaxi runor separately authorized direct push is never blocked. Equal/ahead worktrees anchor locally without requiring gate access, but an available gate's existing recovery ref must agree with the recorded head; behind/diverged worktrees verify and fetch the preserved head from the run-specific recovery ref, fast-forwarding only a clean behind worktree. A cancelled validation routinely leaves a preserved head that is a REBASE of the local branch, which equality and ancestry read as plain divergence, so a clean diverged worktree is adopted whenpreservedContainsLocalWorkproves containment. That proof is an executablemerge-treethree-way merge whose result must equal the preserved head's tree, anchored on the merge-base - neverruns.base_sha, the previous gate head. It deliberately does NOT use patch identity: patch IDs discard hunk locations and whitespace, so they cannot tell a genuine replay from a same-shaped edit to another identical block, and a containment claim built on them is not a proof. Everything undecidable escalates, including a rebase whose fix rounds also rewrote operator lines, where nothing separates a deliberate fix from a dropped cha
Установить branch-sync-and-push-safety в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл branch-sync-and-push-safety?
Use when changing local branch synchronization, custody recovery, post-review head binding, rebasing or rebase.strategy, private-mirror reconciliation, or force-push safety.
Как установить скилл branch-sync-and-push-safety?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл branch-sync-and-push-safety запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic