Skip to content

API Reference parrot.sdd.scripts.worktree_push_protection

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.sdd.scripts.worktree_push_protection

View source

Provision or remove sandbox push protection on one SDD linked worktree (host only).

Sandbox sync-base --cherry-pick requires extensions.worktreeConfig=true and exactly one effective remote.origin.pushurl=no_push on the target worktree. The worker launcher enables it before a sandboxed worker starts; /sdd-done disables it before the host pushes the branch. Only the target worktree's config.worktree is written; the common push URL and sibling worktrees are never touched.

Alias EXIT_OK

Re-exported from parrot.sdd.scripts.worktree_sync.EXIT_OK.

Alias EXIT_TARGET

Re-exported from parrot.sdd.scripts.worktree_sync.EXIT_TARGET.

Alias EXIT_TRANSPORT

Re-exported from parrot.sdd.scripts.worktree_sync.EXIT_TRANSPORT.

Attribute NO_PUSH

Class PushProtectionResult

Machine-readable push-protection outcome.

Fields:

Field Type Default Description
worktree str
action Literal['enable', 'disable', 'status']
protected bool
exit_code int
message str

Alias SyncError

Re-exported from parrot.sdd.scripts.worktree_sync.SyncError.

Function disable

Remove the worktree-local push URL so the host can push this worktree's branch again.

disable(wt: Path) -> str

Parameter Type Default Description
wt Path Linked worktree path.

Returns: str — Operator-facing summary.

Raises:

  • SyncError — In a sandbox (exit 5), when a common push URL would still block the push (exit 2, nothing written), or when Git refuses the removal (exit 2).

Function enable

Make remote.origin.pushurl=no_push the sole effective push URL of one linked worktree.

enable(wt: Path) -> str

Parameter Type Default Description
wt Path Linked worktree path.

Returns: str — Operator-facing summary.

Raises:

  • SyncError — In a sandbox (exit 5), or when the repository needs the manual procedure in docs/sdd/worktree-sync-base.md (exit 2). Nothing is written on refusal.

Alias in_sandbox

Re-exported from parrot.sdd.scripts.worktree_sync.in_sandbox.

Function main

Serve parrot sdd worktree push-protection {enable,disable,status} <target>.

main(argv: Sequence[str] | None = None) -> int

Parameter Type Default Description
argv Sequence[str] | None None

Returns: int

Alias push_protection_ok

Re-exported from parrot.sdd.scripts.worktree_sync.push_protection_ok.

Alias resolve_target

Re-exported from parrot.sdd.scripts.worktree_sync.resolve_target.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally