Repository navigation
feat(core): integrate upstream and freeze session compute profiles - #56
Conversation
The post-merge Docs review doubled the review's runner time and model tokens without gating anything. Return the workflow to the single review that reads the PR's checks and sends the Feishu card itself, and delete the scripts that only the split reviews used. Native checks also archived the distribution on every run although only manual packaging and releases upload it; archive only when uploading.
* Resume the launcher download across reruns * Use a verified cached launcher download without asking again A complete cached binary from an earlier run went back to the server, which answers 416 and makes curl print an error on a terminal. Verify it first, and remove the whole cache after a successful run.
…#742) * Drop the offline node payload bind on a published upgrade * Escape the payload path in the override test
* Lead the README with install and a first API call * Drop the llms.txt row from the README documentation table
* Separate the node wire protocol from node storage * Show the node as the sender of retention requests
…-AI#746) * Name the model provider boundary and tidy the API references * Match the landing harness test to the Claude Code column * Keep the checkpoint qualification and match the Session diagram to the status table
* Redraw the architecture page as two small diagrams * Keep small diagrams at their natural width and tighten two state diagrams
…#751) * Split Core internals out of the Sandbox Provider protocol * Keep released out of the compute phase diagram
* Give operators one page per task * Fix review findings on the operator pages
* Keep contributor docs to the human workflow * Fix link phrasing and the release flow after review
* Point each reader path at the right pages * Fix openings and link phrasing after review * Refresh translation hashes
* Organize the docs into Docs, API and Extend tabs * List Console server under Operate
* Rebuild the landing hero around the interactive example * Drop the second window bar and keep landing figures readable on phones
* Declare each Harness in one file One harnessconfig.Declaration per Harness is read by Core admission and the Runtime. The generator derives registrations from internal/harnessconfig/*/declaration.go; catalog.json and services/core/internal/engine are deleted. Runtime discovery only narrows the declaration. * Drop the no-op onboarding step and name the declaration file in AGENTS.md * Point docs at the declaration files * Reject widened discovery and drop engine-profile wording * Test heartbeat narrowing and keep onboarding docs exact
* Pass official execution options through to each Harness Core carries the official web search, programmatic tool calling, reasoning, service tier, verbosity and output format values to the Runtime. Each Harness declaration lists the values it supports and Core admission validates against them. Reasoning effort now has one home, reasoning.effort, and migration 000102 moves the Harness-native keys there. * Keep each Harness declaration in one file * Exercise Harness configuration through Claude Code in Web tests * Admit declared execution options in every acceptance test Codex now admits live and cached search, programmatic tool calling and every official reasoning and service-tier value, so the tests that expected the old gates assert admission instead. The Codex declaration accepts the native fast tier and rejects code_mode with Subagent observation. Settings of disabled search configure nothing and stay admitted on every Harness, a declaration must include medium text verbosity, and the protocol version moves to 0.17.0.
* Run Claude Code with its native tools and prompt * Hide unselected MCP tools from Claude * Keep Claude's unattended overrides minimal and documented * Keep Claude's unattended overrides above project settings * Trust the workspace's native Claude settings with the provider key * Remove Claude's Monitor tool and verify declared Skills at init
* Run MiniMax Code with its native tools * Keep native Skill selection on MiniMax Code workspaces * Fix MiniMax Code review findings
Add browser and media tools for creative Runtime workloads
The workspace's .minimax, .claude and .agents Skills load as they do in a local run. User roots resolve inside the Session's private HOME.
AGENTS.md states that Core assembles and passes configuration through, that one declaration file joins a Harness, and which native defaults an adapter may override. The Harness protocol, capability page and README link or summarize it.
* Let Codex return structured output Declare structured output for Codex and send the frozen schema as the native outputSchema on every root turn/start. The native strict handling, provider errors and final message text pass through unchanged. * Update tests that used Codex structured output as unsupported
A failed sandbox node operation logged only its wire error code, so a node whose service account could not open the workspace storage root logged error_code=unconfirmed for every create and nothing else. The node now keeps the local error in its journal, as generation readiness failures already do; only the code crosses the transport.
…AI#803) The offline archive carried the macOS and Windows native installers too (555 MiB of 1.46 GiB). Core already redirects a platform without a local archive to its release asset, so carry only Linux amd64. A catalog without a release base has no URL to redirect to and keeps every archive.
…AI#804) * Download only the selected Harness for self-hosted machines A self-hosted machine downloaded one 300 MB archive per platform holding Node and every Harness, again for every Session. The release now splits each platform into a small base archive (oac-daemon, bundle.json) and one archive per component. The bootstrap fetches the base and starts oac-daemon install, which downloads Node and the selected Harnesses after onboarding, resumes after resets, and keeps verified archives in native-download keyed by version for later Sessions. Core serves the archives as a generic catalog and knows nothing of Harnesses. * Download before claiming and bound stalled native requests
* Reuse finished Environment preparation across Sessions Core computes a key from the Project, initial files and setup operations and calls RestorePreparation/SavePreparation on the Provider. On a hit only finalize runs. The microsandbox helper owns storage, a 24 hour TTL and an 8 GiB bound. The daemon rebinds an identical restored capability installation. * Keep Runtime state out of the preparation archive * Drop a preparation entry that fails to extract and bound its save * Accept preparation fields in strict node frames
…I#809) * Wake placement as soon as capacity or preparation is ready * Hint only existing node lanes on capacity-blocked placement * Hint node lanes only for full nodes and skip direct lanes Placement now hints the lanes only when it failed for capacity, so a generation rollout or reset does not double every lane's scans. A direct lane frees no node slot, and the freed-slot wake is a plain channel send.
* Keep a free slot on full nodes * Give the free-slot inactivity its own limits row * Keep a free slot only where a Session can use it The freed active slot admits no Session when the node's retained slots are full, so the free-slot rule now also needs a free retained slot. SetCompute loads the suspension demand once for both checks.
…iniMax-AI#811) A placement counts as active before its sandbox exists, so a node looked full right after a Session was placed on it. The node lane then ran a free-slot suspension and created the placed Session's sandbox only after it.
…x-AI#812) The Runtime daemon ran its Harness preflights one after another before it connected, and Core found the connected Runtime only on its next 250 ms initialization scan. Both sit on every hosted cold start. The daemon now runs the preflights concurrently and replays their output in declaration order. The gateway signals the first agent-kind declaration of a connection, and the initialization loop scans on that signal; the poll stays as recovery.
…MiniMax-AI#813) A node runs one operation at a time, so a free-slot suspension started while a just-created Session initializes delays its preparation operations behind the suspend. The free-slot rule now also waits while any Session placed on the node has no sandbox or has not finished its Environment initialization.
PostgreSQL jsonb rejects \u0000, so any Harness output with a NUL byte, such as `grep -a` or `/proc/*/cmdline` command output, failed the whole journal batch and the Turn with event_persistence_failed. The journal now stores U+FFFD in place of U+0000 in every string of an observation and of the execution outcome, as decoding already does for invalid UTF-8, and a failed journal write is logged with its Session, Turn and first ordinal.
A request whose client disconnected fails its storage call with the ended request context. The API reported it as a 500 internal_error and logged a persistence failure. The unmapped-error writer now returns nothing once the request context has ended; the request log already records the request as aborted. The Agents and Files mappers reuse the shared writer.
A Turn admitted while its compute was suspended waited for the scheduler's 250 ms tick and 1 s Environment scan throttle after the compute reached running: 0.01–1.24 s, mean 0.66 s over nine resumes on mx2. Saving the running phase now wakes the scheduler the way a freed slot wakes placement.
* Stream Harness reasoning as reasoning Items When the Agent sets reasoning.summary, each Harness reports its native reasoning as `reasoning` Items: the native summary when the Harness produces one, otherwise its native reasoning text. The Runtime sends one `reasoning` frame per native reasoning item (id, status, delta), and Core projects it into a `reasoning` Item with a single summary_text part and the official event sequence (item.added, reasoning_summary_part.added, reasoning_summary_text.delta, reasoning_summary_text.done, reasoning_summary_part.done, item.done). An unfinished Item ends incomplete with the Turn. With reasoning.summary null, the default, no reasoning Items or events appear for root or child Turns. Codex maps null to model_reasoning_summary "none", Claude Code declares only the auto summary, and MiniMax Code no longer emits thinking frames. * Keep native reasoning parts and the part status Each native reasoning part becomes its own summary_text part, reasoning_summary_part.done always carries its nullable status, native reasoning without text is not reported, MiniMax Code child Turns report none, and one validator defines a reasoning frame.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f1d1b8da0
ℹ️ 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".
| Resources sandbox.Resources `json:"resources"` | ||
| Configuration json.RawMessage `json:"configuration" swaggertype:"object"` |
There was a problem hiding this comment.
Mark compute profile members required
Add binding:"required" to both fields. The generated OpenAPI has no required list for SandboxComputeProfileInput, so the TypeScript client advertises both resources and configuration as optional even though profile normalization rejects missing resources and the provider codec rejects missing configuration. Consequently, a client can construct a schema-valid { "compute_profiles": { "memory-8g": {} } } request that Core always rejects with HTTP 400. This boundary is required to keep outcomes typed and generate its cross-language projection from the authored Go protocol.
AGENTS.md reference: AGENTS.md:L21-L24
Useful? React with 👍 / 👎.
chore: sync MiniMax upstream through c02a275
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e781aa7510
ℹ️ 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".
| Generation uint64 `json:"generation"` | ||
| Specification sandbox.DeploymentSpec `json:"specification"` | ||
| Configuration json.RawMessage `json:"configuration" swaggertype:"object"` | ||
| Metadata json.RawMessage `json:"metadata" swaggertype:"object"` |
There was a problem hiding this comment.
Mark compute-profile response fields required
When an administrator reads a configured deployment, every compute-profile record is populated with its generation, specification, configuration, and metadata, but these fields lack binding:"required"; consequently, the generated OpenAPI schema has no required list and the TypeScript projection emits computeProfileRecordRequired = []. Generated consumers therefore treat {} as a valid profile even though the documented GET response always promises the complete immutable record. Mark all four members required so the authored Go response and its cross-language projection agree.
AGENTS.md reference: AGENTS.md:L22-L24
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac4cb14dee
ℹ️ 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".
| hash := sha256.New() | ||
| encoder := json.NewEncoder(hash) | ||
| _ = encoder.Encode(owner.TenantID) |
There was a problem hiding this comment.
Include deployment resources in the preparation-cache key
When a microsandbox deployment changes resources without changing its Runtime image—for example, from 2 to 4 CPUs—same-tenant Sessions with identical files and setup operations receive the same cache key because the allocation's deployment generation/specification is omitted here. The provider further scopes this key only by image digest (services/core/tools/microsandbox-provider/preparation.go:43-47), so a setup such as nproc > /environment/workspace/cpus can be skipped and the archive produced under the old resource limits restored, silently corrupting the new Session's prepared output. Include the immutable generation or resource specification in the cache identity.
Useful? React with 👍 / 👎.
Hosted sessions can select an administrator-approved compute profile through
x_agents_core.environment.compute_profile. Omission keeps the existing default. Core freezes an immutable deployment generation before allocation, preserving the selection across retries, configuration changes, garbage collection and resume; unknown or unavailable profiles fail without fallback.This integrates the fork main sync of MiniMax upstream
c02a275f9133b68be424b910204d24f0966015b2into beta together with the compute-profile feature. The merge retains model headers, credential isolation, diagnostics, input receipts, retry defaults, event flow control, execution observations and E2B native pause while adopting the upstream Harness and preparation protocols. The E2B builder supports default 2c2g and explicit 2c8g/4c8g builds, validating immutable build resources before publication.The existing deployment API owns named profile configuration. Migration 4 adds profile references and frozen session bindings on the upstream baseline. Generated API/SQL/client contracts and English/Chinese protocol documents are updated.
Deployment boundary: upstream consolidated its schema and changed its migration ledger. This source must NOT be deployed directly against the currently deployed old-ledger database. A separately reviewed installation/data-preservation plan is required. This PR authorizes source integration only; no production deployment, database reset or migration is part of this change.
Validation includes independent Core and Runtime reviews, generated Harness/OpenAPI/SQL freshness checks, real PostgreSQL baseline 3-to-4 migration/session/execution/server tests, Runtime/shared contract suites, E2B template/init 17 tests and helper 371 tests, and Linux node-installer 72 tests (one skip). Local deployment host-history tests have a documented macOS/Docker clock-skew limitation; Linux CI is the final full-suite gate. Real model execution, E2B 8GiB allocation/resume and cross-service Agents/Lab acceptance remain unverified. Lab and Agents consumer PRs remain draft until backend/template readiness and live acceptance.