Skip to content

feat(sandbox): Add opt-in SafeMini adapter - #53

Merged
JustinJLeopard merged 1 commit into
demo-buildfrom
desktop-codex/feat/justai-safe-mini-consumer
Aug 10, 2026
Merged

feat(sandbox): Add opt-in SafeMini adapter#53
JustinJLeopard merged 1 commit into
demo-buildfrom
desktop-codex/feat/justai-safe-mini-consumer

Conversation

@JustinJLeopard

@JustinJLeopard JustinJLeopard commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • pin the merged SafeMini source commit as a Phase A dependency
  • add an explicit Task-to-SafeMini adapter using a fresh copied worktree
  • preserve JustAI Bubblewrap, catastrophic-command, and SafeMini safe-command guards
  • keep the existing local executor unchanged and avoid runtime activation

Verification

  • PATH=/usr/bin:/bin PYTHONPATH=/home/justai/projects/safe-mini-worktrees/justai-executor-factory PYTHONDONTWRITEBYTECODE=1 /usr/bin/python3 -B -m pytest -q -p no:cacheprovider tests/test_safe_mini_adapter.py (5 passed)
  • same environment: full JustAI suite (626 passed, 14 subtests passed)
  • git diff --check

The local verification imports the exact merged SafeMini source from its isolated worktree. No package installation, runtime routing, service restart, or productive run is included.

Route explicit consumers through SafeMini's fresh worktree runner while preserving JustAi Bubblewrap and command guards. Keep the existing local executor unchanged until an operator opts in.

Co-Authored-By: Codex <noreply@openai.com>
Copilot AI lite review requested due to automatic review settings August 10, 2026 13:29
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
justai-demo Ready Ready Preview Aug 10, 2026 1:29pm

Request Review

@JustinJLeopard
JustinJLeopard merged commit 3212fd6 into demo-build Aug 10, 2026
3 checks passed
@JustinJLeopard
JustinJLeopard deleted the desktop-codex/feat/justai-safe-mini-consumer branch August 10, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in integration layer that lets JustAI run tasks via the external SafeMini runner contract while preserving the existing Bubblewrap boundary and command-guard behavior, and pins SafeMini to a specific merged commit for Phase A consumption.

Changes:

  • Introduces justai.safe_mini_adapter with a SafeMini runner + Bubblewrap-backed executor and a JustAI-to-SafeMini action-model translation.
  • Adds a new test suite validating the adapter’s opt-in behavior, guardrails, and environment shaping.
  • Pins safe-mini as a VCS dependency at a specific commit SHA.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
justai/safe_mini_adapter.py New opt-in adapter module providing SafeMini runner wiring, action translation, and Bubblewrap-backed execution boundary.
tests/test_safe_mini_adapter.py New tests covering adapter execution behavior, catastrophic command blocking, action translation, and PYTHONPATH isolation.
pyproject.toml Adds safe-mini as a pinned git dependency to make the adapter/test suite available.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
Comment on lines 28 to 31
dependencies = [
"langfuse>=2.0",
# Future Phase A dependency once the substrate repo exists:
# "safe-mini @ git+https://github.com/JustinJLeopard/safe-mini.git@<sha>",
# Phase B should replace that git URL with a normal version pin.
"safe-mini @ git+https://github.com/JustinJLeopard/safe-mini.git@17c8514c1bf42d3064748400745099ca1723e782",
]
Comment on lines +48 to +50
def next(self, transcript: list[dict]) -> str:
prompt = str(transcript[-1].get("content", ""))
try:

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc965d5198

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

base_url=_execution_endpoint(),
)
except Exception as exc:
return json.dumps({"action": "unavailable", "detail": str(exc)[:160]})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve backend failures outside the action parser

When _llm_call raises because the execution endpoint is unavailable or times out, this fabricates an unsupported action and feeds it to SafeMini's bash-only action parser. The one-move run then records an action-protocol violation even though the model never returned a malformed action, corrupting failure classifications and experiment metrics; surface this as a backend/embodiment failure instead.

Useful? React with 👍 / 👎.

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