Skip to content

fix: let local chats publish their task checkout - #184531

Merged
roboclaw-bot merged 1 commit into
mainfrom
fix/publication-owner-authority
Oct 26, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
fix/publication-owner-authority

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes agents getting blocked when publishing an authorized task from a local checkout not yet bound to the conversation.

User Impact

The agent can publish and resume the same conversation without an administrator repair or another human prompt. Original files, history and session preferences remain intact.

Why This Change Was Made

Reuse the existing publication, workspace and handoff owners. Clear the stale inherited workspace override during binding so execution, file access and publication use the same checkout. No added model-facing prompt paragraphs, separate guard layer, configuration or persisted-data format change.

Requested by @VACInc.

Work sessions

Evidence

  • Focused tests passed for publication, continuation/cancellation, access boundaries and workspace adoption. Core types, the exact CI gateway-methods test-type graph, the worker-server type graph, scoped lint/format, protocol checks and independent P0–P2 review passed.
  • Real-Git registered-RPC proof publishes an existing custom-directory session and preserves its source HEAD/index/files, saved preferences, skill-library selections and historical root. Repeated publication creates no duplicate effects.
  • Red/green regressions cover the inherited-root defect on 3e7490c478df and omitted saved skill selections on c6f147c5ace4. Minimal fixes in the existing owners make both pass. A failed-publication regression also proves the resumed agent receives the complete recovery receipt; all seven continuation cases pass.
  • Actual requester revocation after allocation prevents binding; revocation after index settlement prevents push; revocation after push prevents PR creation. Existing authority checks enforce all three—no new gates.
  • Local GitHub transport is synthetic. No production deployment or installed-binary upgrade run is claimed; compatibility proof uses an existing persisted session with inherited-root fields and preferences, with no schema migration.
  • After the generated-only conflict refresh, publication, continuation, tool-runtime and protocol suites passed in 124.61 seconds; core types and compiled-validator consistency also passed. Current-head hosted CI and ClawSweeper are tracked here.

Simplification follow-up

Removed the extra full-write gate: the existing session-publication owner now decides access, including session-scoped writers, while existing path containment and live revocation checks remain. Queued follow-ups no longer block workspace adoption; the existing handoff barrier holds them until preparation finishes. Shared preparation arguments replace duplicated payload construction.

Against main 91fa755ffd6d: +88 production lines, +243 test/support lines, +2 documentation lines; +333 total, down from the previous PR total of +390. This simplification itself removes 53 net lines after the main conflict refresh. Remaining growth supplies local-checkout publication and its regression coverage; the PR is not net negative.

Validation: 55 focused tests passed across publication, workspace adoption, handoff, runtime and prefix stability (140.34 seconds including compiler preparation). Core, gateway-methods and gateway-root types, scoped lint/format and independent P0–P2 review passed. The old code failed both the session-only publication and queued-follow-up regressions. Exact-head CI and ClawSweeper follow below; earlier-head results remain historical.

Rebase verification: production patch unchanged on main cef62a5daf5b; 42 publication, adoption, handoff and cancellation tests pass on 3e3e81128064. Exact-head CI remains the landing gate.

@clawsweeper

clawsweeper Bot commented Oct 26, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 26, 2026 10:48
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: S labels Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: 3e3e811280640508f16868772861f5b32129e176

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

@roboclaw-bot
roboclaw-bot marked this pull request as draft October 26, 2026 10:49
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets an authorized local conversation adopt a committed task checkout, publish it, and resume with the publication result.

Example: An unbound local conversation publishes committed work from /workspace/task using github_publish with workspacePath.

  • Before: The publication path requires an already supported session workspace.
  • After: OpenClaw prepares a session-owned checkout, preserves the original files, and resumes the conversation with the result.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has meaningful boundary regressions; verification confidence remains at the in-process harness level.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is outside the ordinary media gate; its reported production-path harness runs cover real Git/SQLite adoption, continuation, allowed publication, and requester revocation before binding and subsequent GitHub effects.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: A local conversation cannot use brokered publication for committed task work that is not yet bound to its session.
Reason: The maintainer-authored direction extends brokered publication to a useful local workflow while preserving original files and established authorization boundaries.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds useful local-checkout publication support, and no actionable defect was found in the pinned diff.

Priority: P2
Reviewed head: 3e3e811280640508f16868772861f5b32129e176

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied verification uses registered-RPC and continuation harnesses with synthetic GitHub I/O rather than an installed Gateway with a live agent.
Agent review details

How this fits together

The agent tool hands publication to the Gateway, which authorizes the requester, prepares session workspace ownership, and invokes the existing GitHub publication coordinator.

flowchart TD
  A[Local conversation] --> B[GitHub publish tool]
  B --> C[Session handoff]
  C --> D[Gateway requester authorization]
  D --> E[Workspace adoption]
  E --> F[Publication coordinator]
  F --> G[GitHub effects]
  F --> H[Conversation continuation]
Loading

Technical review

Best possible solution:

Land the existing-owner adoption and publication path once CI for the reviewed head passes.

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

Current-main source lacks the workspacePath parameter and local adoption branch; the reported limitation is source-verifiable, although no target code was executed during this review.

Is this the best way to solve the issue?

Extending the existing adoption, requester, and handoff owners is a focused solution that avoids a competing workspace or publication implementation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Workspace adoption and queued follow-ups changes intended behavior with a stated reason (c1658c0: Yield the active turn before changing workspace ownership and preserve earlier files; queued input originally caused refusal.)
  • Prepared workspace commit keeps the original intent (3e5f7d4: Consolidate prepared workspace binding and recovery in the existing session lifecycle owner.)
  • Stable publication tool schemas keeps the original intent (77d0f72: Derive tool listings from stable host and workspace capabilities while authorizing execution against current requester authority.)
  • Publication requester authority keeps the original intent (65e49fa: Retain the original requester across queued publication and reject further effects after revocation.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the introduced hunks against the verified merge base, including production code, tests, documentation, schema, generated validator, and baseline removal; endpoint drift was excluded from PR ownership. (3e3e81128064)
  • Current main still lacks this capability: Current main sends publication directly to the coordinator without the new local-checkout adoption branch. (src/gateway/server-methods/sessions-github.ts, abce5b50c487)
  • Requester authority reaches adoption: The new branch requires the matching session handoff, reuses path-containment admission, and composes live requester checks with workspace reservation ownership before binding. (src/gateway/server-methods/sessions-github.ts:328, 3e3e81128064)
  • Allowed and revoked requester coverage: The inspected registered-RPC cases use real Git and persisted session owners; they cover successful publication and revocation before binding, push, and PR creation, asserting which effects occurred. GitHub transport is synthetic, and the PR body reports these cases passing. (src/gateway/github-publication-session-access.test.ts:164, 3e3e81128064)
  • Final transport authority: The existing executor supplies its live action assertion immediately before push and PR creation, including after asynchronous effect recording. (src/gateway/github-publication-executor.ts:640, 3e3e81128064)
  • Existing-state compatibility: No persisted format or schema is added. The existing-session fixture includes inherited workspace fields, saved preferences, and selected skill libraries; adoption preserves source bytes and history routing while clearing the obsolete execution override. (src/gateway/github-publication-session-access.test.ts:70, 3e3e81128064)

PR surface

Source +88, Tests +244, Docs +2, Other -1. Total +333 across 16 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 185 97 +88
Tests 7 313 69 +244
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 16 500 167 +333

Review metrics

Metric Value Why it matters
Protocol additions 1 optional parameter: workspacePath The additive parameter selects local-checkout adoption; requests omitting it retain the existing publication path.

Labels

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P2: This improves an authorized agent publication workflow with limited scope and no established urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 (7 earlier review cycles)
  • reviewed 2026-10-26T11:05:33.553Z sha 9276171 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-26T11:14:14.518Z sha 3e7490c :: needs real behavior proof before merge. :: [P2] Replace the inherited workspace override when binding the checkout
  • reviewed 2026-10-26T11:28:26.040Z sha c6f147c :: needs changes before merge. :: [P2] Include the saved skills snapshot before adopting the checkout
  • reviewed 2026-10-26T11:42:49.196Z sha dfbbefa :: needs changes before merge. :: [P2] Preserve publication recovery details in the handoff result
  • reviewed 2026-10-26T11:58:31.184Z sha 0a1b134 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-26T12:12:13.593Z sha 413484f :: needs maintainer review before merge. :: none
  • reviewed 2026-10-26T16:14:03.300Z sha a9f8612 :: needs maintainer review before merge. :: none

Reviewed October 26, 2026, 3:59 PM ET / 19:59 UTC (Revision 8).

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Oct 26, 2026
@roboclaw-bot roboclaw-bot changed the title fix: stop misleading PR publication and owner-authority errors fix: let local chats publish their task checkout Oct 26, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 26, 2026 11:08
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 26, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@roboclaw-bot

roboclaw-bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

CI note for 413484f1d59f: UI E2E shard 1, attempt 1 failed one of 113 tests. post-deploy-session-entry.e2e.test.ts timed out on its first page.goto(...), waiting until "load" after 30 seconds; the other three cases in that file passed. The browser remained connected, but renderer diagnostics could not be read. This test and its navigation helper are unchanged by this PR.

Attempt 2 reran only that failed shard on the same commit and passed. No source, assertions, or timeouts changed. The initial timeout's root cause remains unestablished; the passing replay is not a claimed fix.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
Prepare a session-owned checkout from an authorized local task folder, publish through the existing requester, and resume the same conversation. Preserve the original source, saved session settings, and complete publication result.

Remove redundant full-write and queued-follow-up refusals. Rebase the reviewed patch onto main without changing its production behavior.

Co-authored-by: VACInc <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L 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.

2 participants