Skip to content

feat: prepare existing PR source in a managed workspace - #178233

Merged
shakkernerd merged 1 commit into
mainfrom
prepare-existing-pr
Oct 21, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
prepare-existing-pr

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #178055 (own-PR inspection, including copied GitHub /changes links), which has landed on main; this PR now targets main directly.

What Problem This Solves

A guest can identify their own existing GitHub PR, but that does not put its source in the conversation's managed sandbox. Starting from the selected project's current base can also give the guest different files from the PR they intend to continue.

This adds explicit github_publish preparation by PR URL on top of the own-PR inspection contract. It covers an existing managed project workspace or an explicitly empty managed workspace.

User Impact

prepare_pr verifies the current linked author, original PR source and publisher write eligibility, then installs the exact PR head into a clean workspace. It preserves the conversation's workspace directory, sandbox scope and guest Git history. Dirty, untracked, staged or unrelated unpublished initial work causes a clear refusal with that work intact.

An interrupted first import resumes its original accepted source. Repeating a completed same-head preparation leaves subsequent edits and indexes untouched. If the remote head has advanced after preparation, this action refuses rather than silently resetting or merging source; later-head updates are a separate contribution.

One accepted edge case: a push to the PR branch while the first import is still fetching is not observed by that import. The workspace receives, and the association records, the head that inspection and the write-eligibility check verified when preparation started, so a push during the import behaves exactly like a push a moment after it: the next preparation reports that the original head advanced. Re-reading GitHub inside the acceptance step would not close that window; it would only turn a completed import into an interrupted one whose retry resumes the same accepted head.

Preparation records the original PR association without publishing. Existing publication and PR actions refuse an imported association until their original-PR handling is implemented, so an earlier publication receipt cannot select a different target. Ordinary unbound-chat adoption is outside this PR. No configuration or database schema migration is required.

Write eligibility is what the shared publisher can actually do with the PR head: a same-repository head the publisher may push, or a user-owned fork head with maintainer edits allowed and base push access. Protected heads and organization forks are refused with that reason. Nothing here grants a guest merge, auto-merge or any broader scope; the association is a selection, not authority.

Why This Change Was Made

The current managed workspace reconciliation owner already coordinates the canonical checkout and sandbox projection, retains interrupted file effects and preserves the running workspace location. Preparation uses that owner with the verified PR head as its explicit initial source. It checks both workspace copies before initial synchronization and retains the original head through native Git recovery state. An accepted transfer is settled before any guest command on retry, because interruption can leave the registered runtime paused until that owner completes recovery.

The minimum original PR identity and accepted source are stored with the existing session worktree binding. They survive reuse of that same workspace, while newly allocated workspaces remain unbound. Permission observations are not stored as durable authority. Existing base refresh keeps its merge behavior; the imported PR's review comparison uses its common ancestor with the PR base, without merging a newer base into the imported files.

The responsibilities are split by owner: github-pr-workspace-preparation.ts runs the action (verification, preflight, installation, binding); github-publication-pr-preflight.ts holds the publisher write-eligibility rules; github-publication-workspace-review.ts computes the imported PR's review base; session-worktree-binding.ts reads and writes the association on the existing worktree binding; the tool text, protocol schema, method scope and docs expose the action.

Evidence

Candidate and history

This head is the same contribution as the previously reviewed head 7f2098a, rebuilt as one linear commit: first on #178055's rebased head (ba0875a), then replayed onto main once #178055 landed there as 01c2c60. The earlier merge-based history is replaced; the applied content is the same 26-file change (+2243/−211 before the test adaptations described below). Replaying onto main needed one more test resolution: src/gateway/server.worktree-preparation.test.ts was compacted by #179267, so this PR's reuse case (the githubPullRequest binding survives reuse of the same worktree) is reinserted in that compact shape. A file-by-file comparison of the patch before and after the replay shows no other change beyond context lines.

On the earlier head, two hosted checks were red. check-lint-core-2 ran its core lint stripes to completion with every stripe exiting 0 and only max-lines warnings on files this PR does not touch; the same job passes on #178055's rebased head, so that failure belonged to the old base state. checks-node-changed-16 failed in test/e2e/qa-lab/runtime/required-native-same-session.e2e.test.ts, an unchanged qa-lab runtime scenario asserting workspace naming through public RPC. Neither recurred after the rebuild.

The first head replayed onto main failed one hosted shard twice: two cases of src/gateway/worker-environments/placement-dispatch-move-recovery.test.ts (a concurrent foreign abandonment that "did not fence its remote owner", and a claim-replacement assertion reading an older claim). This PR does not touch placement or dispatch code, and the file passed every remote run on both this branch and its main base, isolated, beside its shard neighbors, under the pinned Bun runtime and at the hosted worker budget. The cause was a stale cached placement read during forced abandonment on main itself, reproduced on clean main and repaired by #179448 after that head's base. The current head is replayed onto a main that includes the repair.

That last replay also restores the export of inspectOwnGitHubPullRequest in src/gateway/github-publication-inspect.ts. A sweep of orphaned exports on main removed it while this PR was its only importer; the preparation owner calls it to re-verify the PR author before any source transfer. That one line is the only change to the patch beyond the replay.

Remote validation on this head

Rebuilding on current main needed two test-only adaptations, both to main's rewritten github_publish tool test shape (#178968, #178991): the tool no longer takes a callGateway option, so the preparation-dispatch case in src/agents/tools/github-publish-tool.test.ts now drives the mocked in-process Gateway the way its siblings do, and the registered-action harness in src/gateway/github-pr-workspace-preparation.test.ts routes the tool through withPublicationToolTransport, the same transport github-publication-inspect.test.ts uses. Assertions are unchanged. Product code did not need adaptation.

Remote validation on this exact tree against main (Linux), in stage order:

  • Changed-file formatting and lint passed on the changed source files (oxlint core selection passed).
  • Type checks passed for every selected core test graph and the core, ui, extensions, extensions-test, scripts and test-root programs, with no graph left unrun.
  • 385 cases across 23 related test files passed: the seven test files in the change, the protocol schema test, and every test file that imports a changed module (preparation, inspection, base refresh, publication workflows and lifecycle, session access and reads, worker availability, worktree preparation and reset, operator continuation, tool dispatch, registration and policy inheritance). The native batch ran as eight groups; the largest group (15 files, 266 cases) took 239 s.

The same batch had already passed on the earlier candidate based on #178055's branch (383 cases; the two extra cases are #178055's own additions to the inspection test). Hosted CI, automated review and independent review run again on this head; the broader importer set for the changed session types is covered by the hosted changed-file selection.

Registered action coverage

The registered action tests exercise the real requester, session, Git and workspace reconciliation owners with synthetic GitHub reads and local fixture fetches. They cover same-repository and maintainer-edit fork sources, a newer clean project base, an immutable empty source, prior-work refusal, current permission refusals, same-head idempotency and interrupted initial import while the remote head advances.

The private-source cases include an authorized control, refusal of the wrong author before fetching, and real synthetic-profile role revocation and verified-email reassignment after a successful awaited head fetch. These calls go through the registered action and real Git/session owners. Each denial preserves both workspace copies' HEAD, index, status and binding, leaves the PR-only file absent, and performs no GitHub write. GitHub reads and the fetch transport are fixtures; the protected live guest identities were not changed.

The interruption scenarios observe the existing owner's recovery-required error after canonical acceptance, then prove that a retry completes the originally accepted PR head even after GitHub advances. It retains guest refs and excludes the newer head's files. The registered-runtime control reproduced the earlier failure where a retry probed Git while the runtime remained paused; with owner settlement ahead of the probe, that same test passes using the production sandbox binding, filesystem bridge, runtime registry and reconciliation owner (external container I/O simulated). A separate control retains the database close/reopen path. The existing base-refresh action and same-workspace lifecycle controls also pass.

Tool policy coverage keeps preparation in both the callable and static action definitions, including preparation-only inherited policies, and keeps it discoverable before managed workspace allocation; refresh and evidence keep their separate sandbox capability checks.

Prior-head records

The earlier head 2d12aaa had a clean independent review, a Platinum automated review and passing hosted CI; head 7f2098a was rated Platinum as well. Those are prior-head records. Independent review, automated review and hosted CI run again on this head.

Actual managed-workspace verification (retained from an earlier candidate)

A restricted guest used natural UI requests through the admitted tool on the combined runtime 617f152e8112ae21211e84f3461d74efdff218b4 (tree 61d29b1f65c1f03bc510a1248e20e699feef75cf). The preparation, source-transfer and binding contribution is unchanged since then; supporting runtime-quiescence and retained-session-read updates from the prerequisite were rechecked in the integrated registered-action batch. Broader caller and UI integration code differs, so the captures establish the listed ordinary-container scenarios rather than a deployment of the entire current PR checkout.

  • A public own-fork PR and an authorized private same-repository PR were prepared with exact source-file sets and blob hashes. Original PR identity, author, refs and state, the conversation binding, directory and running sandbox were preserved.
  • Repeating preparation after staged, unstaged and untracked edits returned no changed paths. Independent before/after comparisons found identical files, logical indexes, status, HEAD and branch in both workspace copies.
  • First preparation with existing untracked work refused before applying source or recording an association; the original work, indexes and runtime stayed intact.
  • A controlled write failure left canonical source accepted, the original association incomplete and the actual container paused. After restoring only the workspace's original directory permissions, a second native preparation call in the same run completed through the existing owner and resumed that same container. There was one user send, with no manual unpause, restart, rebind or handler invocation. Native pending journal/database rows were not directly inspected; the correlated tool results, Git state, binding and container state establish the observed recovery.

Both explicit empty workspaces and worktrees from a selected registered project were exercised. In the selected-project case, one later natural PR-link message imported all eleven exact PR files; the original project's main commit, index, clean status and ten file hashes were unchanged, while the guest kept its original HEAD, branch and history. Role/link revocation, cold-load compatibility and newer-head refusal retain separately identified source-level checks; they are not claimed as live variants here. Ordinary unbound-chat adoption, later remote-head imports and publication remain separate contributions.

Persisted-data compatibility

The changed contract is an optional field inside the existing worktree JSON value. The v2026.10.5 canonical session projector has a byte-identical projection function to the candidate and preserves the nested worktree value. This PR changes no stored-entry format, schema version, migration or update driver. Registered action tests begin with the existing association-absent worktree shape, preserve prior work on refusal, and retain the new association after actual database close/reopen and reuse of the same worktree. This is compatibility proof for that persisted contract; a full deployed v2026.10.5 upgrade was not run.

Visual evidence

Open preview

View Before After
Managed workspace before and after preparation Empty managed workspace before preparation, with directory and branch visible Preparation completed with exact PR files in the same workspace and branch; original PR card is a separate feature
Selected project before and after preparation Clean selected-project worktree before receiving the PR link Original PR source prepared with guest branch and history preserved

Selected-project continuation through preparation, 34.76 seconds

selected-project-continuation-continuous.mp4

Visual verification

These captures are retained from the earlier candidate named below; the preparation behavior they show is unchanged on this head.

  • Baseline: 617f152e8112ae21211e84f3461d74efdff218b4 before the preparation action; not a historical pre-feature build
  • Exact head: 617f152e8112ae21211e84f3461d74efdff218b4
  • Scenario: Prepare an original own PR from either an explicitly empty managed workspace or a new worktree of an existing registered project. Keep the conversation, guest history and original project intact.
  • Runtime/build: OpenClaw 2026.10.4, served producer 617f152e8112, tree 61d29b1f65c1f03bc510a1248e20e699feef75cf. The preparation and recovery source corresponds to PR head 4d7b786; this is a qualified combined runtime, not the entire individual PR checkout.
  • Empty workspace: Exact public own-fork source prepared; original guest history preserved
  • Selected project: All eleven PR files exact in host/guest; original main, index and ten project file hashes unchanged
  • Runtime identity: Same session/worktree/container and guest Git history within each case
  • Recording: Selected-project continuation: 34.76 seconds, 25 fps, 869 consecutive frames
  • Actual admitted guest actions and native file/Git/session/container observations corroborate both completed preparations.
  • Each pair uses matching 1170 x 640 framing and theme. Private labels, URLs and commits are masked without replacing the observed response.
  • Full recordings were independently inspected and frame coverage/hash identities verified; existing empty-case uploads are reused unchanged.
  • Selected-project creation is a separate earlier capture. Its continuation clip begins before the one later PR-link send, with no internal cuts.
  • No ordinary unbound adoption, PR publication or later remote-head import is claimed.

Empty managed workspace recording

The earlier 43-second continuous preparation recording remains available:

guest-initial-preparation-continuous.mp4

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 20, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds prepare_pr to import an existing own pull request into a clean managed workspace while preserving guest Git history.

Example: Continue shakkernerd/openclaw-guest-pr-demo pull request 1 in an empty /workspace.

  • Before: The conversation can inspect the PR but cannot load its source.
  • After: README.md and parcel-label.js are imported from head 3f61ee4 while the workspace directory and guest branch remain unchanged.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent implementation with applicable user-visible proof and focused authority, persistence and recovery coverage.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected Control UI captures exercise admitted preparation in empty and selected-project workspaces; supplied registered-action results cover private-source authorization and recovery, and the relevant production modules match the retained runtime candidate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A guest can identify their existing PR but cannot continue from its exact files inside the current managed sandbox.
Reason: The maintainer-authored direction supplies a useful initial preparation stage with clearly documented boundaries and separately owned follow-ups.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it adds useful, maintainer-approved preparation behavior absent from main, with no blocking correctness finding.

Priority: P2
Reviewed head: b5bc8c415a1249a12c897b003f5edb32e8b774e8

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway brokers GitHub access for sandboxed conversations, verifies the requester and PR source, and passes accepted source through the existing managed-workspace reconciliation owner.

flowchart LR
  A[Conversation request] --> B[GitHub publication tool]
  B --> C[Gateway preparation action]
  C --> D[Requester and PR verification]
  D --> E[Workspace reconciliation owner]
  E --> F[Canonical and sandbox files]
  E --> G[Session worktree association]
Loading

Technical review

Best possible solution:

Land the focused preparation stage through the existing reconciliation owner, retaining explicit refusals for capabilities owned by follow-up PRs.

Do we have a high-confidence way to reproduce the issue?

This is a new capability; current-main source confirms that own-PR inspection does not install its source.

Is this the best way to solve the issue?

The change extends the existing source integration and recovery owners, preserves ordinary base-refresh behavior, and avoids introducing a competing workspace lifecycle.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3241b4220e8c.

Provenance checked

  • Managed source integration and review-base transfer keeps the original intent (23173ed: Integrate selected repository bases without importing guest Git history or exposing Gateway credentials.)
  • Retained source-object reuse keeps the original intent (24e58b3: Avoid repeated full snapshot transfers while restricting donor identities to host-selected source objects.)
  • Immutable empty-workspace source keeps the original intent (1f6f0d4: Start isolated repository-free sessions through the existing managed-worktree durability lifecycle.)
  • Session worktree binding keeps the original intent (54a5358: Bind prepared workspaces through the session preparation owner while preserving admitted-run lifecycle checks.)
  • Receipt-bound publication and PR actions keeps the original intent (bf90074: Select the recorded session publication and require current authority for privileged PR actions.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit 23173ed adds src/gateway/github-publication-base-refresh.ts:39 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 23173ed1f61b; files: src/gateway/github-publication-base-refresh.ts)

PR surface

Source +942, Tests +1062, Docs +33. Total +2037 across 26 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 17 1144 202 +942
Tests 8 1071 9 +1062
Docs 1 33 0 +33
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 26 2248 211 +2037

Review metrics

Metric Value Why it matters
New tool action 1: prepare_pr Exposes explicit source preparation without adding configuration options or performing GitHub writes.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Useful managed-workspace capability with a bounded preparation scope and no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (6 earlier review cycles)
  • reviewed 2026-10-20T07:58:35.519Z sha 34682a0 :: needs real behavior proof before merge. :: [P2] Settle interrupted imports before probing the sandbox | [P2] Keep the Gateway worker test registry sorted
  • reviewed 2026-10-20T11:09:37.054Z sha 4d7b786 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-20T16:01:32.613Z sha 2e7a79e :: needs changes before merge. :: none
  • reviewed 2026-10-20T19:13:31.901Z sha 2d12aaa :: needs maintainer review before merge. :: none
  • reviewed 2026-10-21T00:11:26.129Z sha 7f2098a :: needs changes before merge. :: none
  • reviewed 2026-10-21T10:01:06.829Z sha 816f726 :: needs changes before merge. :: none

Reviewed October 21, 2026, 7:23 AM ET / 11:23 UTC (Revision 7).

@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 20, 2026
@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Add the github_publish action prepare_pr. For a PR authored by the
requester's currently verified linked GitHub account, it re-verifies the
author, checks that the shared publisher may update the PR head (same
repository push, or a user-owned fork with maintainer edits and base
push), and installs that exact head into a clean managed workspace
through the existing reconciliation owner, recording the original PR
association on the session worktree binding without publishing.

Dirty, untracked, staged or unpublished initial work refuses with that
work intact; a newer remote head, a protected head and a non-writable
fork refuse with the reason. An interrupted first import resumes its
accepted head on retry, and a repeated same-head preparation leaves
later edits untouched. Existing publication and PR actions refuse an
imported association until their original-PR handling lands.

Refs #178055
@shakkernerd

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@shakkernerd
shakkernerd merged commit 9218dca into main Oct 21, 2026
161 checks passed
@shakkernerd
shakkernerd deleted the prepare-existing-pr branch October 21, 2026 12:55
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Added: github_publish prepare_pr installs a verified own PR's exact head into the conversation's managed workspace and records the original PR association, refusing dirty workspaces, newer remote heads, protected heads and non-writable forks with the reason.

shakkernerd added a commit that referenced this pull request Oct 21, 2026
After prepare_pr binds a conversation's workspace to the guest's own
original PR, the existing github_publish actions edit, ready,
request_review and upload_evidence act on that bound PR before any
new push and without a publication receipt: the action handler selects
the workspace binding before consulting shared publication receipts,
returns a pullRequest descriptor with the observed remote head instead
of a fabricated publication, and requires expectedHeadCommit without a
requestId. Receipt-backed actions keep their requestId precondition.

Every guest action re-verifies the linked author and private
repository access through own-PR inspection; writes also recheck the
publisher's write eligibility at the effect and preserve a human
title/body change observed there. merge, close and inspect on the bound
PR still require full operator write access, so an administrator can
land it from the same conversation while a guest's later turns stay
restricted. The target check compares the bound PR's immutable
repository IDs, number, branch and author so a changed target refuses.

Refs #178233
wingwkyuen pushed a commit to tcgoidc/openclaw that referenced this pull request Oct 21, 2026
After prepare_pr binds a conversation's workspace to the guest's own original PR, the github_publish actions edit, ready, request_review and upload_evidence act on that bound PR before any new push and without a publication receipt: the action handler selects the binding before publication receipts, returns a pullRequest descriptor with the observed remote head, and requires expectedHeadCommit without a requestId, while receipt-backed actions keep their requestId precondition. Every guest action re-verifies the linked author and private repository access, writes recheck publisher write eligibility at the effect and preserve a human title/body change observed there, and merge, close and inspect on the bound PR still require full operator write access, so an administrator can land it from the same conversation while a guest's later turns stay restricted.

Refs openclaw#178233.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
)

Adds the github_publish action prepare_pr: for a PR authored by the requester's verified linked GitHub account whose head the shared publisher may update, it installs that exact head into the conversation's clean managed workspace and records the original PR association without publishing. Dirty or unpublished work, a newer remote head, a protected head and a non-writable fork are refused with the reason and the existing work preserved; an interrupted first import resumes its accepted head on retry.

Refs openclaw#178055.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
After prepare_pr binds a conversation's workspace to the guest's own original PR, the github_publish actions edit, ready, request_review and upload_evidence act on that bound PR before any new push and without a publication receipt: the action handler selects the binding before publication receipts, returns a pullRequest descriptor with the observed remote head, and requires expectedHeadCommit without a requestId, while receipt-backed actions keep their requestId precondition. Every guest action re-verifies the linked author and private repository access, writes recheck publisher write eligibility at the effect and preserve a human title/body change observed there, and merge, close and inspect on the bound PR still require full operator write access, so an administrator can land it from the same conversation while a guest's later turns stay restricted.

Refs openclaw#178233.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant