Skip to content

feat: configure remote repository session branch prefixes - #188648

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/remote-repository-branch-prefix
Oct 30, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/remote-repository-branch-prefix

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Remote repository sessions always create openclaw/<workspace GUID> branches, so operators cannot select a prefix that fits their repository naming convention.

User Impact

The optional root setting repositoryBranchPrefix controls new remote repository branches, including forks. For example, "clawson" creates clawson/<workspace GUID>. The default stays openclaw; existing saved branches, replayed sessions, explicit branches, and local worktree names remain unchanged. No database migration is required.

Why This Change Was Made

Pass the selected prefix through the existing create/fork and repository-allocation owners. Config admission and new allocation share validation for one 1–64-character ASCII branch component. This is the independent branch-naming slice of the Sandbox provisioning work; it does not add reserve policy or retained-disk recovery.

The canonical config-doc generator records one intentional core setting (2581 → 2582); channel and plugin counts and hashes are unchanged. The scoped test allocation is 88 lines for config validation, durable allocation/replay, and the public Gateway fork flow.

Evidence

  • Tooling closure repair 9cbc5997fcae351d929ec0ef428835b19d525737: include the shared branch-prefix validator in the existing trusted-wrapper inventory. All 35 closure tests and 16 native provisioning tests pass; two filesystem-dependent provisioning cases skip on this Linux filesystem. The native suite took 274.24 s through the repository runner. No Gateway, allocation, or validation logic changed in this repair. Normal commit hooks and diff checks passed.

  • Secretless, network-disabled Linux/Node 24.22.1: 50 focused tests pass — 6 Gateway create/replay/fork tests (20.76 s wrapper), 11 state tests and 33 config tests (68.29 s combined wrapper including cold compiler preparation). Changed-suite Vitest durations: 18.20 s, 17.47 s and 6.21 s respectively. The persistence and Gateway suites exercise real database/session owners; no cloud allocation occurs.

  • Baseline-red: original config rejects the new setting; original allocation uses openclaw/ rather than the requested prefix. The corrected Gateway regression also fails against original production code with the expected branch mismatch (47.98 s including compilation), and passes on the candidate.

  • Targeted type-aware lint: 0 warnings/errors. Canonical tsgo with a focused configuration covering all changed TypeScript files and tests, formatting, regenerated config docs, normal commit hooks, and git diff --check pass.

  • Fresh independent local autoreview, Codex gpt-6.1-sol, P0–P3, complete source candidate relative to base 1bdc2908bce9c23766307aee629c006062b16af2: scoped-clean. The subsequent two generated baseline files contain only the inspected one-setting count/hash update. Published candidate: 01592a9b7ce84a530de9a489f054b284702eb2df.

  • Local ClawSweeper is unavailable; hosted review follows readiness. Broad CI and CI seconds are pending. No live GitHub repository checkout or Azure provider execution is claimed.

Source implementation: @galiniliev’s Sandbox provisioning commit, with the required branch-prefix type/import completion extracted from the surrounding series.

Work sessions

Apply the configured prefix only when allocating new remote repository branches, including forks, while preserving replayed and explicitly saved branches. Regenerate the config baseline for this one intentionally added core setting; channel and plugin counts are unchanged.

Co-authored-by: galiniliev <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 30, 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 gateway Gateway runtime size: S labels Oct 30, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 30, 2026 19:39
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds an optional repositoryBranchPrefix setting for newly created and forked remote repository sessions.

Example: Create a remote repository session with repositoryBranchPrefix set to "clawson" and workspace ID 5195398f-32af-4571-9bc4-bf5c08341479.

  • Before: The branch is openclaw/5195398f-32af-4571-9bc4-bf5c08341479.
  • After: The branch is clawson/5195398f-32af-4571-9bc4-bf5c08341479; previously saved branches remain unchanged.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is sound and the prior defect is repaired; available behavioral evidence remains limited to in-process coverage.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor media gate; supplied Linux evidence covers real Gateway handlers and database owners in process, and source comparison with v2026.10.9 verifies unchanged storage representation and replay precedence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Operators cannot match newly allocated remote-session branches to their repository naming convention.
Reason: Maintainer-authored direction authorizes the optional setting, and the narrow implementation preserves defaults and existing branches while crediting @galiniliev’s source implementation.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the earlier wrapper-inventory defect is fixed, and the focused naming feature has no remaining actionable code finding.

Priority: P2
Reviewed head: 9cbc5997fcae351d929ec0ef428835b19d525737

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supplied proof does not show a shipped Gateway creating and dispatching a repository session with the configured prefix through real remote checkout.
Agent review details

How this fits together

Gateway creation and fork handlers pass configuration into the existing repository-workspace owner, which persists the selected branch for worker checkout and GitHub publication.

flowchart LR
  Config[Root configuration] --> Gateway[Create and fork handlers]
  Gateway --> Owner[Repository workspace owner]
  Owner --> Database[Saved workspace branch]
  Database --> Worker[Worker checkout]
  Database --> Publication[GitHub publication]
Loading

Technical review

Best possible solution:

Retain prefix selection in the existing allocation owner while preserving saved branches and the current default.

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

Source inspection confirms the fixed prefix on current main; this is an added capability rather than a broken existing contract.

Is this the best way to solve the issue?

The change uses the existing create, fork, worker, and allocation owners, with one shared validation pattern and no competing state or allocation path.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Remote repository branch allocation changes intended behavior with a stated reason (140d9e7: Repository sessions introduced a durable workspace owner and generated branch identity; feat: start cloud sessions without a Gateway checkout #138900 documents that ownership.)
  • Worker-owned persistence and publication keeps the original intent (124ddc0: refactor(storage): run repository workspace SQL in workers #161124 moved repository SQL into workers while retaining source custody, commit receipts, and existing stored representation.)
  • Trusted wrapper dependency inventory keeps the original intent (unknown: The wrapper guide identifies the inventory as the extracted runtime import closure; the repair adds the newly imported validator to that existing mechanism.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +20, Tests +88, Docs +6, Generated 0, Other +3. Total +117 across 21 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 13 23 3 +20
Tests 3 89 1 +88
Docs 1 7 1 +6
Config 0 0 0 0
Generated 2 3 3 0
Other 2 3 0 +3
Total 21 125 8 +117

Review metrics

Metric Value Why it matters
New configuration surface 1 optional root setting repositoryBranchPrefix controls only new remote-session branch allocation; omission preserves existing behavior.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded, opt-in repository naming improvement with no demonstrated 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 (1 earlier review cycle)
  • reviewed 2026-10-30T19:57:49.912Z sha 01592a9 :: needs changes before merge. :: [P1] Include the new validator in the trusted wrapper inventory

Reviewed October 30, 2026, 4:28 PM ET / 20:28 UTC (Revision 2).

@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 30, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Added the shared branch-prefix validator to the trusted-wrapper inventory. All 35 closure tests and 16 native provisioning tests pass; two filesystem-dependent cases are skipped on the proof filesystem. The three CI-failing provisioning scenarios are now green. No Gateway/allocation behavior changed in this repair.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 30, 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. 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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 30, 2026
@roboclaw-bot
roboclaw-bot merged commit 87ff32d into main Oct 30, 2026
168 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/remote-repository-branch-prefix branch October 30, 2026 21:21
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

roboclaw-bot added a commit that referenced this pull request Oct 30, 2026
Merge fc3490a without rewriting history, retaining repositoryBranchPrefix from #188648. Regenerate the canonical config artifacts for both approved fields instead of accepting either independently generated baseline.

Adapt the repository dispatch consumer to the current codexGoalAdmission contract introduced by main. The first combined-source typecheck caught the retired workerGoalAdmission field.

Co-authored-by: galiniliev <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
…88648)

* feat: configure remote repository session branch prefixes

Apply the configured prefix only when allocating new remote repository branches, including forks, while preserving replayed and explicitly saved branches. Regenerate the config baseline for this one intentionally added core setting; channel and plugin counts are unchanged.

Co-authored-by: galiniliev <[email protected]>

* fix: include branch prefix validation in PR tooling

Co-authored-by: galiniliev <[email protected]>

---------

Co-authored-by: galiniliev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. scripts Repository scripts size: S 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