Skip to content

feat: manual PR fallback and branch-aligned create-pr flow#69

Merged
ColeMurray merged 5 commits intomainfrom
sync/prod-slack-manual-pr-flow
Feb 6, 2026
Merged

feat: manual PR fallback and branch-aligned create-pr flow#69
ColeMurray merged 5 commits intomainfrom
sync/prod-slack-manual-pr-flow

Conversation

@ColeMurray
Copy link
Owner

@ColeMurray ColeMurray commented Feb 6, 2026

Summary

This PR consolidates manual PR fallback and branch-alignment improvements for create-pr.

Key outcomes:

  • create-pr accepts optional headBranch and resolves branch deterministically
  • sandbox push uses provider-generated pushSpec so pushed branch and PR branch stay aligned
  • control-plane falls back to provider-built GitHub pull/new URL when user OAuth is unavailable
  • Slack completion shows a Create PR button from manual branch artifacts with stricter metadata handling

Validation

  • npm run build -w @open-inspect/shared
  • npm run typecheck
  • npm run test -w @open-inspect/control-plane
  • npm run test -w @open-inspect/slack-bot -- run

* Add Slack manual PR fallback with Create PR button

* Address PR review feedback for manual PR flow

* Harden manual PR fallback and artifact parsing
* refactor: isolate github provider factory and push-spec builders

* feat: align create-pr branch flow with pushed branch
* refactor: isolate github provider factory and push-spec builders

* feat: align create-pr branch flow with pushed branch

* fix: tighten slack manual-pr artifact detection
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Terraform Validation Results

Step Status
Format ⚠️
Init
Validate

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @ColeMurray, Action: pull_request

@greptile-apps
Copy link

greptile-apps bot commented Feb 6, 2026

Greptile Overview

Greptile Summary

  • Consolidates production changes for manual PR fallback and branch-aligned create-pr into the public codebase.
  • Introduces deterministic branch resolution via optional headBranch and provider-generated pushSpec so the pushed branch matches the PR head.
  • Adds control-plane fallback behavior to build manual GitHub pull/new URLs when user OAuth isn’t available.
  • Updates Slack completion flow to surface a “Create PR” button from manual branch artifacts with stricter metadata handling.
  • Expands/updates tests around branch resolution, GitHub provider behavior, and Slack completion extraction/rendering.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 6, 2026

Additional Comments (1)

packages/control-plane/src/session/durable-object.ts
Always force-pushing branches

handleCreatePR builds the pushSpec with force: true, which will overwrite the remote branch if it already exists. This can destroy work if someone reused the same headBranch (especially now that headBranch can come from the client’s current branch). Unless you require force pushes for this flow, this should be false (or conditional only for the generated session branch).

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/control-plane/src/session/durable-object.ts
Line: 2363:2373

Comment:
**Always force-pushing branches**

`handleCreatePR` builds the `pushSpec` with `force: true`, which will overwrite the remote branch if it already exists. This can destroy work if someone reused the same `headBranch` (especially now that `headBranch` can come from the client’s current branch). Unless you *require* force pushes for this flow, this should be `false` (or conditional only for the generated session branch).

How can I resolve this? If you propose a fix, please make it concise.

@ColeMurray ColeMurray changed the title feat: sync prod manual-PR flow and branch-aligned create-pr feat: manual PR fallback and branch-aligned create-pr flow Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Terraform Validation Results

Step Status
Format ⚠️
Init
Validate

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @ColeMurray, Action: pull_request

@ColeMurray ColeMurray merged commit 510f2c8 into main Feb 6, 2026
10 checks passed
@ColeMurray ColeMurray deleted the sync/prod-slack-manual-pr-flow branch February 6, 2026 07:52
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.

1 participant