Add workspace PR rebase abilities#411
Conversation
Homeboy Results —
|
The ensure_exists() success array is typed as
{success: bool, path: string, created?: bool} — no message key
exists, so the null-coalescing read was statically unreachable.
PHPStan rule phpstan.nullCoalesce.offset surfaced this.
No consumer (CLI workspace path command, smoke tests) reads
the message key off the getPath() ability response, so removing
it is safe.
Summary
rebaseandresetabilities, plusworkspace_git_pushsupport for guarded--force-with-leasepushes.workspace_pr_rebaseas the high-level bring-this-PR-home workflow, including drop-path conflict resolution, optional squash, and force-with-lease push.workspace_pr_statusplus chat/pipeline tool registration and CLI mappings for the new operations.Closes #410.
Validation
php tests/smoke-workspace-policy-tools.phppassed.php tests/smoke-workspace-pr-rebase.phppassed.homeboy lint data-machine-code --changed-since origin/main --summarypassed with zero findings.homeboy test data-machine-codedid not run tests: the Playground bootstrap failed while loading thedata-machinedependency becauseWP_Agent_Principal_Access_Storewas unavailable before DMC tests started.Design notes
drop_pathsusesgit checkout --oursduring a rebase to keep the base branch version. That matches the issue's behavior contract to drop the PR version in favor of base; the literal--theirsspelling in the issue would keep the replayed PR-side change during a rebase.workspace_git_rebasereturnsstate=conflictingwith structured conflict files instead of raising a WP_Error when git reports merge conflicts, so agents can resolve and continue.workspace_git_pushrefuses force-with-lease pushes to common base branches and any configuredfixed_branch; it never emits a bare force push.AI assistance