rdev/history/v0.3.0.md
jordan 0960b17eb2 feat: Implement v0.2-v0.4 (workspaces, git, API)
v0.2 - Real Workspaces:
- Project-specific claudebox StatefulSets (pantheon, aeries)
- Init containers for git clone via SSH
- Deploy key secrets template
- Project ConfigMaps for CLAUDE.md

v0.3 - Git Integration:
- Dockerfile with rdev-bot git identity
- openssh-client for SSH operations
- Image version bump to v0.3.0

v0.4 - API Server:
- Go REST API with chi router
- Endpoints: /projects, /claude, /shell, /git, /events
- SSE streaming for real-time output
- OpenAPI docs via Scalar at /docs
- Kubernetes RBAC for pod exec
- Executor and project registry packages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 21:07:00 -07:00

4.6 KiB

rdev v0.3.0 - Git Integration

Date: 2026-01-24 Status: Ready for deployment

Summary

Full git integration - claudebox pods can now commit and push changes back to GitHub. The container image includes git config for the rdev-bot identity, and SSH keys are mounted for authenticated operations.

What Was Built

Updated Dockerfile

Added to the claudebox image:

  • openssh-client package for SSH operations
  • Git global config for rdev-bot identity
  • Pre-created /root/.ssh directory with correct permissions
  • push.autoSetupRemote for easier branch pushing
# Configure git for rdev-bot identity
RUN git config --global user.name "rdev-bot" \
    && git config --global user.email "rdev@orchard9.ai" \
    && git config --global init.defaultBranch main \
    && git config --global push.autoSetupRemote true

# Create SSH directory with correct permissions
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh

Image Version Bump

All StatefulSets updated to use v0.3.0:

  • claudebox.yaml
  • claudebox-pantheon.yaml
  • claudebox-aeries.yaml

Changes from v0.2

Component v0.2 v0.3
Image v0.1.0 v0.3.0
Git config None rdev-bot identity
SSH client Not installed Installed
Push capability Clone only Full read/write

Git Identity

All commits from rdev claudeboxes will be attributed to:

Example commit:

commit abc123...
Author: rdev-bot <rdev@orchard9.ai>
Date:   Fri Jan 24 2026

    Fix authentication bug in handler

    Co-Authored-By: Claude <noreply@anthropic.com>

Deployment Instructions

1. Build and Push New Image

cd /path/to/rdev

# Build and push v0.3.0
./scripts/build-push.sh v0.3.0

2. Complete v0.2 Setup (if not done)

Ensure deploy keys are configured:

# Generate keys
./scripts/generate-deploy-key.sh pantheon
./scripts/generate-deploy-key.sh aeries

# Add public keys to GitHub (with write access!)
# Update secrets.yaml with base64-encoded private keys

3. Deploy

export KUBECONFIG=~/.kube/orchard9-k3sf.yaml
kubectl apply -k deployments/k8s/base

# Restart pods to pick up new image
kubectl rollout restart statefulset -n rdev claudebox
kubectl rollout restart statefulset -n rdev claudebox-pantheon
kubectl rollout restart statefulset -n rdev claudebox-aeries

4. Verify Git Push

# Test push capability
kubectl exec -n rdev claudebox-pantheon-0 -- bash -c "
  cd /workspace
  git checkout -b rdev-test-push
  echo '# Test from rdev' >> README.md
  git add README.md
  git commit -m 'test: verify rdev push capability'
  git push origin rdev-test-push
"

# Clean up test branch
kubectl exec -n rdev claudebox-pantheon-0 -- bash -c "
  cd /workspace
  git checkout main
  git branch -D rdev-test-push
"
# Also delete the remote branch via GitHub UI or gh cli

Verification Checklist

# 1. Check git config in container
kubectl exec -n rdev claudebox-pantheon-0 -- git config --global --list
# Should show:
# user.name=rdev-bot
# user.email=rdev@orchard9.ai
# init.defaultbranch=main
# push.autosetupremote=true

# 2. Verify SSH access to GitHub
kubectl exec -n rdev claudebox-pantheon-0 -- ssh -T git@github.com
# Should show: Hi orchard9/pantheon! You've successfully authenticated...

# 3. Test fetch
kubectl exec -n rdev claudebox-pantheon-0 -- bash -c "cd /workspace && git fetch origin"

# 4. Test commit (local)
kubectl exec -n rdev claudebox-pantheon-0 -- bash -c "
  cd /workspace
  echo 'test' >> /tmp/test.txt
  git add /tmp/test.txt 2>/dev/null || echo 'File outside repo - expected'
"

# 5. Test push (creates branch, then clean up)
# See verification section above

What's Next (v0.4)

Go API server for controlling claudebox pods:

  • REST endpoints for claude, shell, git commands
  • SSE streaming for output
  • Kubernetes RBAC for pod exec
  • Project registry

Files Modified

Dockerfile                              # Added git config, openssh-client
deployments/k8s/base/claudebox.yaml     # Image v0.1.0 → v0.3.0
deployments/k8s/base/claudebox-pantheon.yaml  # Image v0.1.0 → v0.3.0
deployments/k8s/base/claudebox-aeries.yaml    # Image v0.1.0 → v0.3.0

Troubleshooting

Push fails with "Permission denied"

  • Ensure deploy key has "Allow write access" checked in GitHub
  • Verify SSH key is correctly mounted: ls -la /root/.ssh/
  • Test SSH: ssh -vT git@github.com

Commits show wrong author

  • Check git config: git config --global --list
  • Image might be old: verify v0.3.0 is running

"Host key verification failed"

  • Ensure known_hosts is mounted correctly
  • Check secret contains github.com host keys