zr-execute
Job
Complete implementation for one task routed as ExecuteTask (continue_owned_task or assign_open_task).
Steps
Load action and repo context from Probe (not hardcoded org):
probe action show <action-id> --json probe task get <task-id> probe project get <project-id>Use fields from the action JSON:
fork_path,fork_url,upstream_url,target_repo,branch_hintorg.github_org— Nexus membership only (not the fork owner)
Repo setup (first time on this repo, or if
fork_pathis missing):- Fork if needed:
gh repo fork <upstream_url> --clone=false(fork lands atfork_url) - Clone to
fork_pathif the directory does not exist git remote add upstream <upstream_url>(orgit remote set-url upstream …if it exists)
- Fork if needed:
Every wake (including return visits on the same repo):
cd <fork_path> git fetch --all --prune git status git branch -vv- If a PR artifact exists or
gh pr viewshows an open PR for this work → stay on that branch, push updates - Else if current branch matches
branch_hint→ continue on it - Else → checkout latest default from
upstream, thengit switch -c <branch_hint>(or a newtask/<id>-…branch)
- If a PR artifact exists or
Implement scoped acceptance criteria; run relevant checks.
Open or update a PR to
target_repo(upstream) from your fork branch.Register the PR artifact:
probe artifact register --action-id <action-id> --kind pull_request --url <github-pr-url> --summary "<short summary>"Notify the feed (optional):
probe message send general "Task <task-id> ready for review: <pr-url>" --context action:<action-id>
Output contract
- PR exists and is registered in Nexus.
- Action completes when the
pull_requestartifact row is registered.
Boundaries
- Do not use
probe task update --status reviewas the completion gate for dispatch actions. - Do not manually claim or reassign tasks during this job.