Skip to content

[codex] run brain deployments embedded#16

Merged
Che-Zhu merged 4 commits into
mainfrom
codex/brain-deployment-embedded
May 20, 2026
Merged

[codex] run brain deployments embedded#16
Che-Zhu merged 4 commits into
mainfrom
codex/brain-deployment-embedded

Conversation

@Che-Zhu
Copy link
Copy Markdown
Collaborator

@Che-Zhu Che-Zhu commented May 20, 2026

Summary

  • Refactor Brain deployments to run as local embedded Codex tasks instead of creating Devbox or connecting to an inner gateway.
  • Make Brain deployment a polling-only API that installs the deployment skill, builds/pushes to GHCR, and returns the final machine-readable result.
  • Include full Sealos template YAML content in successful deployment status responses, and harden result parsing against stale assistant messages and template-path false positives.

Behavior

  • POST /api/brain/deployments starts a deployment task in the current gateway runtime.
  • GET /api/brain/deployments/:threadId returns running, succeeded, or failed.
  • Success requires a valid ghcr.io/... image and valid Sealos template content in template; running/failed responses return image: null and template: null.
  • The gateway no longer owns Devbox lifecycle for Brain deployment requests.

Validation

  • cargo fmt --check
  • cargo test
  • Two-pass subagent review; initial blockers fixed and second-pass review found no critical or important issues.

@Che-Zhu Che-Zhu marked this pull request as ready for review May 20, 2026 07:17
Copy link
Copy Markdown

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

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: 881c0a2c3b

ℹ️ 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".

Comment thread src/brain/deployments.rs
Comment on lines +224 to 227
r#"Mandatory first step:
- Install the deployment skill before doing anything else:
npx --yes skills add https://github.com/zjy365/seakills/tree/sandbox-skill-lite -y
- If the install command fails, stop and return a failed `DEPLOYMENT_RESULT` with the install failure reason.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep deployment runnable when skill is already preinstalled

The new prompt unconditionally requires npx --yes skills add ... as the first step and explicitly tells the agent to fail the deployment if that install command fails. Before this change, Devbox-backed sessions could skip installation when the skill was prebootstrapped. In environments where outbound npm/GitHub access is restricted but the skill is already present (a common hardened Devbox setup), deployments that previously succeeded will now deterministically fail at startup.

Useful? React with 👍 / 👎.

@Che-Zhu Che-Zhu merged commit 679bc98 into main May 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant