feat(provisioner): moltbot /workspace is a git repo + TOOLS.md notes (closes #437)#447
Closed
samxu01 wants to merge 1 commit into
Closed
feat(provisioner): moltbot /workspace is a git repo + TOOLS.md notes (closes #437)#447samxu01 wants to merge 1 commit into
samxu01 wants to merge 1 commit into
Conversation
…d notes
Brings moltbot agents to parity with cloud-codex on git operations. Before
this, /workspace/<accountId>/ was a plain directory — agents could not
`git status`, `git commit`, or `git push` without a manual bootstrap. With
the global credential helper already wired in the clawdbot postStart hook,
all that was missing was `git init` on the workspace itself.
- Adds ensureWorkspaceGitRepo(accountId, { gateway }) — idempotent git init
+ workspace-local user.name/user.email stamped with the accountId so
commits attribute per-agent ("Clawdbot Agent (nova)" etc.) rather than
the generic pod-global identity.
- Calls it from provisionOpenClawAccount after normalizeWorkspaceDocs and
ensureWorkspaceMemoryFiles. Wrapped in try/catch with non-fatal warning,
matching the sibling workspace-setup steps.
- Extends the TOOLS.md "Git workflow" section so agents discover the
workspace-is-a-repo fact + credential wiring. Both new-file and existing-
file paths handled (sed-injects on TOOLS.md from before #437).
The audit's "apt-get install -y git outside the guard" step was NOT needed
— git was already on PATH in the clawdbot image (verified via
`kubectl exec deploy/clawdbot-gateway -- which git` → /usr/bin/git 2.39.5).
Scope is ~50 LOC across one file instead of the audit's 75 across three.
Closes #437.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Squash-merged to main per feedback-pr-merge-pattern. |
samxu01
added a commit
that referenced
this pull request
May 24, 2026
…d notes (#447, closes #437) Brings moltbot agents (theo / nova / pixel / ops / aria) to parity with cloud-codex on git operations. Before this, /workspace/<accountId>/ was a plain directory — agents could not `git status`, `git commit`, or `git push` without a manual bootstrap step. With the global credential helper already wired in the clawdbot postStart hook, all that was missing was `git init` on the workspace itself. - ensureWorkspaceGitRepo(accountId, { gateway }): idempotent git init + workspace- local user.name/user.email stamped with the accountId so commits attribute per-agent ("Clawdbot Agent (nova)" etc.). - Called from provisionOpenClawAccount after normalizeWorkspaceDocs and ensureWorkspaceMemoryFiles, wrapped in try/catch (non-fatal). - TOOLS.md "Git workflow" section extended: both new-file and existing-file paths handled; sed-injects the workspace-is-a-repo line on pre-change TOOLS.md files. The audit's apt-get install -y git step was NOT needed — git already on PATH in the clawdbot image (verified via `kubectl exec deploy/clawdbot-gateway -- which git` → /usr/bin/git 2.39.5). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings moltbot agents (theo / nova / pixel / ops / aria) to parity with cloud-codex on git operations. Before this,
/workspace/<accountId>/was a plain directory — agents could notgit status,git commit, orgit pushwithout a manual bootstrap. With the global credential helper already wired in the clawdbot postStart hook, all that was missing wasgit initon the workspace itself.Changes
ensureWorkspaceGitRepo(accountId, { gateway })helper — idempotentgit init+ workspace-localuser.name/user.emailstamped with the accountId so commits attribute per-agent (Clawdbot Agent (nova)) rather than the generic pod-global identity.provisionOpenClawAccountafternormalizeWorkspaceDocsandensureWorkspaceMemoryFiles. Wrapped in try/catch with non-fatal warning, matching the sibling workspace-setup steps.TOOLS.md"Git workflow" section extended so agents discover the workspace-is-a-repo fact + credential wiring. Both new-file and existing-file paths handled (sed-injects the new line on TOOLS.md from before this change).Audit deltas
The pre-existing audit (
docs/audits/2026-05-24-phase-3/openclaw-moltbot-workspace-audit.md) called forapt-get install -y gitas part of the fix. NOT needed —gitwas already on PATH in the clawdbot image (verified viakubectl exec deploy/clawdbot-gateway -- which git→/usr/bin/git 2.39.5). Scope is ~50 LOC across one file instead of the audit's 75 across three.Test plan
reprovision-all, thenkubectl exec deploy/clawdbot-gateway -- ls /workspace/nova/.git— should exist after the next provision cycle.cd /workspace/nova && git statusin anacpx_runshell — should report a clean tree, not "fatal: not a git repository".Closes #437.
🤖 Generated with Claude Code