chore: sync upstream main (TUI fixes through #304) - #15
Merged
Merged
Conversation
…Max-AI#290) Use writable non-append handles while preserving permission hardening before truncation. Tolerate optional preset synchronization failures only when the original config remains intact. Assisted-by: codex-cli reason:windows-config-write-compatibility
MiniMax-AI#287) * fix(storage): retry message write lock acquisition without replaying mutations * fix(storage): preserve aborted turn settlement when cancelling lock waits * fix(storage): preserve uncontended tool completion writes after cancellation
…x-AI#277) * perf: batch semantic hashing and stream history revisions * perf: reuse prepared queries for streaming turn lookups * perf: retain owned history across the durable store boundary
) * perf: reduce identity framing and repeated repository query work * perf: reuse validated immutable history rows by exact file content * fix: detach cached history text from whole file strings * perf: reuse verified file prefixes across history and index reads * perf: reuse validation and revisions of owned history snapshots * perf: compare history bytes before decoding appended records * perf: load pi runtime APIs through focused package exports * perf: share unchanged immutable messages between history snapshots * perf: compact bundled source to reduce module loading allocations * fix: keep precise release audit matches after whitespace minification
) * fix(bash): propagate native exit codes through Windows PowerShell 5.1 wrappers Windows PowerShell 5.1 exits 0 after '& ([ScriptBlock]::Create($src))' (FullLanguage stdin transport) and after 'Invoke-Expression $src' (ConstrainedLanguage transport), regardless of $LASTEXITCODE set by native commands inside the user command. Every failing native command was therefore reported as success by the bash tool on hosts without pwsh 7, in both the foreground result and the background task status. Reproduced with the exact stdin wrapper: 'node -e "...;process.exit(7)"' emits its stderr while powershell.exe exits 0. Append 'exit $LASTEXITCODE' to both wrappers, the same idiom the first-party versioned-prefix launchers already use. Verified on Windows 11 (PS 5.1): pure-PowerShell payloads exit 0, native exit 7 (with or without a trailing PowerShell tail) exits 7, terminating PowerShell errors still exit 1, and packages/local-runtime/test/unit/child-bash-lifecycle.test.ts 'failure' mode passes (failed before the fix: task status was 'succeeded'). * test(bash): cover Windows PowerShell exit codes Force PowerShell 5.1 for native failures, successful commands, terminating errors and explicit exits with and without the parent-death guard. Assisted-by: codex-cli reason:github-issue-297-regression-coverage --------- Co-authored-by: Ralle1976 <ralf.arnold@it-bfw.de> Co-authored-by: qinjiu <qinjiu@minimaxi.com>
Merge MiniMax-AI/minimax-code main (1c64165) into the fork. Upstream commits since the fork point (2b2f242, bump MiniMax Code to 0.5.1): - 432005c fix(config): support Windows config writes and safe preset sync (MiniMax-AI#290) - 4357fe4 fix(storage): retry contended message writes and preserve cancellation (MiniMax-AI#287) - c8babc7 perf: reduce hashing and query overhead in history processing (MiniMax-AI#277) - 35f73f7 perf: reuse immutable history and reduce runtime loading (MiniMax-AI#281) - ae65651 fix(tui): resolve Windows attachment paths in WSL (MiniMax-AI#296) - 1c64165 fix(bash): preserve Windows PowerShell native exit codes (MiniMax-AI#304) Conflict resolutions: - test/vitest-suites.json: kept the fork's sorted capability list and inserted upstream's four new test files at their sorted positions. - release/public-source.json: regenerated with `node scripts/source-inventory.mjs --write`; it adds exactly upstream's six new source files. - scripts/build.mjs: auto-merged, keeping both upstream's added entry and the fork's webui copy step. The webui reads local_runtime_* tables directly; these commits add no schema or migration changes, so its transcript reads are unaffected.
This was referenced Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Syncs this fork with
MiniMax-AI/minimax-codemainat1c64165.The fork point is
2b2f242("chore: bump MiniMax Code to 0.5.1 (MiniMax-AI#279)"). Upstream added six commits since then, and they are the only content in this PR:432005c4357fe4c8babc735f73f7ae656511c64165Net result: 55 files (6 added, 49 modified), all upstream-authored. Root
package.json,pnpm-lock.yaml,pnpm-workspace.yaml,docs/, and everything underpackages/webui/anddocker/are unchanged, so the fork's Web UI, Docker layout and documentation are untouched.Conflicts and generated files
Only three files were modified on both sides:
test/vitest-suites.json— the fork'scapabilitylist is sorted; that ordering is kept and upstream's four new test files are inserted at their sorted positions.release/public-source.json— regenerated withnode scripts/source-inventory.mjs --write. The delta is exactly upstream's six new source files; the fork's 233 webui/docker inventory entries are preserved.scripts/build.mjs— auto-merged; upstream's added bundle entry and the fork'spackages/webui → dist/webuicopy step both remain.tsconfig.standalone.jsonauto-merged andpnpm check:tsconfigpasses.release/extraction.jsonis deliberately unchanged: upstream's own copy of that file still pins the samesourceRevisionand differs only by the fork's addedpackages/webuipackage root, so the internal baseline has not moved.Interaction with the fork's Web UI
packages/webuireads thelocal_runtime_*SQLite tables directly. These upstream commits add no schema or migration file, and nothing underpackages/webui/imports a changed module, so the Web UI transcript paths are unaffected. The vendoredthird_party/pi-mono/packages/coding-agent/package.jsongains export subpaths only; the lockfile is unchanged.Validation
pnpm verifyfull profile, Node 24.19.0, Linux, clean tracked tree at the PR head with basemain(255b928). Every gate passes except the pre-existingtest:webuiflake described below:check:sourcecheck:tsconfigexport source previewtest:release-toolstypecheckbuildcheck:standalonetest:artifacttest:capabilitiestest:status-contracttest:smoketest:byoktest:webuitest:policyperf:fulllabel applied (this change touches history construction/serialization, session storage and token estimation). NOT RUN here —scripts/perf/run.mjsrequires a macOS process-tree sampler and refuses other hosts, and this fork currently has no recorded Actions runs, so noperformancejob has produced a run to link. A CIperformancerun is still needed before merge.test:webuiflake (pre-existing, not introduced by this sync)Across four local full-profile runs,
test:webuifailed only inpackages/webui/test/integration/upload-limits.test.js, with three different timings of the same socket race:oversized request → 413 mid-stream—write EPIPEon the client before the response event.oversized request → 413 mid-stream—client wrote 4341760 of 8388718 — server did not abort mid-stream(just over the 4 MiB assertion budget).oversized single file → 413 UPLOAD_FILE_TOO_LARGE—EADDRINUSE 127.0.0.1:19772.This sync is not the cause:
packages/webui/is byte-identical before and after the merge, the test spawns onlypackages/webui/server.js(plain ESM that imports nothing outside the package and never readsdist/), and the root lockfile and manifests are unchanged — so the test's inputs are identical at base and head.Two concrete defects in that test harness explain the variability:
upload-limits.test.jspicks ports19700 + random(100)whileevent-chain.test.jspicks19700 + random(80).node --testruns test files concurrently, so the overlapping random ranges can collide.stopServer()sendsSIGKILLwithout awaiting process exit, so a port can stay bound briefly after a test finishes.Both assertions are also inherently scheduling-dependent: whether the client reaches its 4 MiB write budget before the server's 413 arrives, and whether the response event is parsed before the socket error, depend on relative scheduling.
Publication and contribution checks
.gitleaks.tomladjustment (two narrowed allowlist regexes plus two new allowlists scoped to specificdist/chunkspaths and exact bundled strings).release/public-source.json; the four new tests are declared intest/vitest-suites.json.Maintainer handoff
Publication scope or license changes: none.
Shared-source port: not needed — this PR ports upstream public commits into the fork and does not change the internal baseline.