Repository navigation
feat: configure remote repository session branch prefixes - #188648
Conversation
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]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesAdds 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.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +20, Tests +88, Docs +6, Generated 0, Other +3. Total +117 across 21 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 30, 2026, 4:28 PM ET / 20:28 UTC (Revision 2). |
Co-authored-by: galiniliev <[email protected]>
|
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 |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
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]>
…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]>
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
repositoryBranchPrefixcontrols new remote repository branches, including forks. For example,"clawson"createsclawson/<workspace GUID>. The default staysopenclaw; 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
tsgowith a focused configuration covering all changed TypeScript files and tests, formatting, regenerated config docs, normal commit hooks, andgit diff --checkpass.Fresh independent local autoreview, Codex
gpt-6.1-sol, P0–P3, complete source candidate relative to base1bdc2908bce9c23766307aee629c006062b16af2: 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