Skip to content

Add workspace PR rebase abilities#411

Merged
chubes4 merged 3 commits into
mainfrom
workspace-pr-rebase-abilities
May 16, 2026
Merged

Add workspace PR rebase abilities#411
chubes4 merged 3 commits into
mainfrom
workspace-pr-rebase-abilities

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 16, 2026

Summary

  • Adds low-level workspace git rebase and reset abilities, plus workspace_git_push support for guarded --force-with-lease pushes.
  • Adds workspace_pr_rebase as the high-level bring-this-PR-home workflow, including drop-path conflict resolution, optional squash, and force-with-lease push.
  • Adds workspace_pr_status plus chat/pipeline tool registration and CLI mappings for the new operations.

Closes #410.

Validation

  • php tests/smoke-workspace-policy-tools.php passed.
  • php tests/smoke-workspace-pr-rebase.php passed.
  • homeboy lint data-machine-code --changed-since origin/main --summary passed with zero findings.
  • homeboy test data-machine-code did not run tests: the Playground bootstrap failed while loading the data-machine dependency because WP_Agent_Principal_Access_Store was unavailable before DMC tests started.

Design notes

  • drop_paths uses git checkout --ours during 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 --theirs spelling in the issue would keep the replayed PR-side change during a rebase.
  • workspace_git_rebase returns state=conflicting with structured conflict files instead of raising a WP_Error when git reports merge conflicts, so agents can resolve and continue.
  • workspace_git_push refuses force-with-lease pushes to common base branches and any configured fixed_branch; it never emits a bare force push.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (gpt-5.5)
  • Used for: Implemented the workspace git/PR ability plumbing, smoke tests, validation, and PR description. Chris remains responsible for review and merge.

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented May 16, 2026

Homeboy Results — data-machine-code

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
ℹ️ Save lint baseline: homeboy lint data-machine-code --baseline
Deep dive: homeboy lint data-machine-code --changed-since 37c06d7

Test

test — failed

ℹ️ No tests ran — the runner failed before producing results. See raw_output.stderr_tail / raw_output.stdout_tail for the underlying error (bootstrap failure, missing deps, DB connection, etc.).
ℹ️ To run specific tests: homeboy test data-machine-code -- --filter=TestName
ℹ️ Auto-fix lint issues: homeboy refactor data-machine-code --from lint --write
ℹ️ Collect coverage: homeboy test data-machine-code --coverage
ℹ️ Analyze failures: homeboy test data-machine-code --analyze
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine-code --changed-since 37c06d7

Audit

audit — passed

  • intra-method-duplication — 12 finding(s)
  • dead_code — 11 finding(s)
  • test_coverage — 4 finding(s)
  • repeated_literal_shape — 3 finding(s)
  • structural — 3 finding(s)
  • dead_guard — 1 finding(s)
  • duplication — 1 finding(s)
  • requested_detectors — 1 finding(s)
  • Total: 36 finding(s)

Deep dive: homeboy audit data-machine-code --changed-since 37c06d7

Tooling versions
  • Homeboy CLI: homeboy 0.182.0+09cdec1
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 24ff43e
  • Action: unknown@unknown

chubes4 added 2 commits May 16, 2026 12:04
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.
@chubes4 chubes4 merged commit cc65df2 into main May 16, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace git: rebase, reset, force-push, and a composite "bring this PR up to date" ability

1 participant