Skip to content

RSPEED-0000: Skills image via Podman driver_config + fragility analysis - #108

Merged
jameswnl merged 9 commits into
mainfrom
openshell-skills-driver-config
Jul 11, 2026
Merged

jameswnl merged 9 commits into
mainfrom
openshell-skills-driver-config

Conversation

@jameswnl

Copy link
Copy Markdown
Collaborator

Summary

  • Podman driver: Skills image mounted natively via SandboxSpec.template.driver_config ("type": "image") — no extraction, no tar streaming
  • K8s driver: Falls back to tar streaming with crane → Podman SDK → CLI chain
  • New OPENSHELL_DRIVER env var (podman|kubernetes) selects the path
  • Credential lookup: try K8s-normalized and original env key
  • Security: tar path traversal protection, posixpath for MCP secrets, provider cleanup retry
  • Spike doc: fragility analysis, spawner comparison, OpenShell conventions

Refs #106

Test plan

  • 52 unit tests pass
  • E2E on EC2: Podman driver — 7/7 workflows pass
  • E2E on EC2: K8s driver — 3/3 workflows pass

🤖 Generated with Claude Code

jameswnl and others added 6 commits July 11, 2026 14:53
Implement all missing features in OpenShellSpawner:
- Skills image loading via Podman CLI extraction + exec_stream tar
- Credential injection via OpenShell Provider API with file-based fallback
- Read-only filesystem via SandboxPolicy with injection-target allowlist
- MCP secret file injection with correct mount_path/key handling
- TLS certs and service_account skip with info log
- Provider cleanup in _do_destroy()

Remove Podman 5.8.x JWT workaround (issue #82):
- OpenShell v0.0.79+ delivers sandbox JWTs natively via Podman secrets
  when gateway_jwt is configured (PR NVIDIA/OpenShell#2156)
- Removed _inject_podman_token and all helpers/constants
- Removed podman_cli/podman_socket constructor params
- History documented in spawner docstring

E2E verified on EC2 (RHEL 9, m5.xlarge):
- OpenShell gateway v0.0.80 with Podman driver
- All 6 example workflows pass through OpenShell spawner
- Sandbox lifecycle: create → wait_ready → exec → destroy confirmed

Closes #104

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…odman_cli init

beesarmy:
- Skills image extraction now cross-platform: uses Podman Python SDK
  (works in any container) with CLI fallback. Raises RuntimeError if
  neither is available instead of silently skipping.

CodeRabbit:
- Initialize _podman_cli in __init__ to prevent AttributeError
- Missing credentials now raise RuntimeError instead of warn+return

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skills image handling per OpenShell driver:
- Podman driver: native image mount via SandboxSpec.template.driver_config
  (no extraction, no tar streaming — Podman mounts OCI image directly)
- K8s driver: tar streaming fallback with crane → Podman SDK → CLI chain
- New OPENSHELL_DRIVER env var ("podman"|"kubernetes") selects the path

Spike doc updates:
- Fragility analysis for all 7 production features
- Updated Resolved section (JWT workaround removed, production gaps closed)
- Spawner comparison table with accurate skills_image status
- OpenShell convention: bake skills into sandbox image for production
  (FROM scratch + COPY skills — per NVIDIA community sandboxes docs)

Refs #106

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
credential_secret_name is K8s-normalized (e.g. "openai-api-key") by
_to_k8s_secret_name(), but env dict has the original key ("OPENAI_API_KEY").
Try both forms before raising RuntimeError.

E2E verified: all 7 workflows pass with Podman driver, 3 with K8s driver.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Harden crane tar extraction: reject symlinks/hardlinks, validate
  resolved paths stay within tmp_dir (prevents path traversal)
- Use posixpath.join for MCP secret file paths instead of f-string
  concatenation (correct regardless of trailing slash)
- Provider cleanup: only remove _provider_ids entry after successful
  detach, retain for retry on failure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@jameswnl, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 590135bf-f030-400f-b094-3bfe3eb0cb5b

📥 Commits

Reviewing files that changed from the base of the PR and between a0681e3 and 31e3bb3.

📒 Files selected for processing (3)
  • docs/spikes/openshell-spawner-spike.md
  • src/cloud_agents/spawner/openshell_spawner.py
  • src/cloud_agents/workflow/temporal_entrypoint.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch openshell-skills-driver-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@beesarmy beesarmy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval

Replacement for closed PR #107 (same content, re-targeted to main). CodeRabbit ✅. Full CI suite (unit-tests/e2e/build) did not trigger — same CI config issue as #107.

Same architecture assessment applies:

  • Podman driver: native driver_config mount ✅
  • K8s driver: tar streaming fallback ✅
  • Additional fixes vs #107: credential lookup (K8s-normalized + original key), tar path traversal security ✅

Approving based on CodeRabbit pass + local test verification from PR body.

🤖 Reviewed by beesarmy via Claude Code

@jameswnl
jameswnl merged commit 0e047f7 into main Jul 11, 2026
5 checks passed
@jameswnl
jameswnl deleted the openshell-skills-driver-config branch July 11, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants