Skip to content

chore: sync upstream main (TUI fixes through #304) - #15

Merged
weekbin merged 7 commits into
mainfrom
chore/sync-upstream-main
Sep 22, 2026
Merged

weekbin merged 7 commits into
mainfrom
chore/sync-upstream-main

Conversation

@weekbin

@weekbin weekbin commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Change

Syncs this fork with MiniMax-AI/minimax-code main at 1c64165.

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:

Upstream commit Change
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)

Net result: 55 files (6 added, 49 modified), all upstream-authored. Root package.json, pnpm-lock.yaml, pnpm-workspace.yaml, docs/, and everything under packages/webui/ and docker/ 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's capability list is sorted; that ordering is kept and upstream's four new test files are inserted at their sorted positions.
  • release/public-source.json — regenerated with node 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's packages/webui → dist/webui copy step both remain.

tsconfig.standalone.json auto-merged and pnpm check:tsconfig passes.

release/extraction.json is deliberately unchanged: upstream's own copy of that file still pins the same sourceRevision and differs only by the fork's added packages/webui package root, so the internal baseline has not moved.

Interaction with the fork's Web UI

packages/webui reads the local_runtime_* SQLite tables directly. These upstream commits add no schema or migration file, and nothing under packages/webui/ imports a changed module, so the Web UI transcript paths are unaffected. The vendored third_party/pi-mono/packages/coding-agent/package.json gains export subpaths only; the lockfile is unchanged.

Validation

pnpm verify full profile, Node 24.19.0, Linux, clean tracked tree at the PR head with base main (255b928). Every gate passes except the pre-existing test:webui flake described below:

Gate Result
check:source PASS — 4464 files, workspace exports and native helper integrity verified
check:tsconfig PASS — paths match 126 package exports
export source preview PASS
test:release-tools PASS
typecheck PASS
build PASS
check:standalone PASS
test:artifact PASS
test:capabilities PASS
test:status-contract PASS
test:smoke PASS
test:byok PASS
test:webui FAIL in 4 of 4 full-profile runs, PASS 3 of 3 when the gate runs on its own — pre-existing flake, see below
test:policy Not reached (the runner stops at the first failure); it is not affected by this PR
  • Performance: perf:full label applied (this change touches history construction/serialization, session storage and token estimation). NOT RUN here — scripts/perf/run.mjs requires a macOS process-tree sampler and refuses other hosts, and this fork currently has no recorded Actions runs, so no performance job has produced a run to link. A CI performance run is still needed before merge.
  • NOT RUN: macOS and Windows platform runs, and live-service acceptance. Offline gates do not establish live-service or cross-platform acceptance.

test:webui flake (pre-existing, not introduced by this sync)

Across four local full-profile runs, test:webui failed only in packages/webui/test/integration/upload-limits.test.js, with three different timings of the same socket race:

  • oversized request → 413 mid-streamwrite EPIPE on the client before the response event.
  • oversized request → 413 mid-streamclient wrote 4341760 of 8388718 — server did not abort mid-stream (just over the 4 MiB assertion budget).
  • oversized single file → 413 UPLOAD_FILE_TOO_LARGEEADDRINUSE 127.0.0.1:19772.

This sync is not the cause: packages/webui/ is byte-identical before and after the merge, the test spawns only packages/webui/server.js (plain ESM that imports nothing outside the package and never reads dist/), 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.js picks ports 19700 + random(100) while event-chain.test.js picks 19700 + random(80). node --test runs test files concurrently, so the overlapping random ranges can collide.
  • stopServer() sends SIGKILL without 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

  • Permission to contribute under the existing licenses is unchanged; this PR only imports upstream-authored public commits and preserves all notices.
  • No credentials, account data, real user content, internal source history or private review material is included. The only scan-config change is upstream's .gitleaks.toml adjustment (two narrowed allowlist regexes plus two new allowlists scoped to specific dist/chunks paths and exact bundled strings).
  • Added/removed source files were reviewed before regenerating release/public-source.json; the four new tests are declared in test/vitest-suites.json.
  • No shared English/Chinese documentation or capability record changed in these upstream commits, so none needed updating. Offline results are not described as live-service acceptance.

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.

hetaoBackend and others added 7 commits September 21, 2026 20:39
…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.
@weekbin weekbin added the perf:full Run the full performance suite; required for performance-sensitive changes label Sep 22, 2026
@weekbin
weekbin merged commit fd9bd0c into main Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf:full Run the full performance suite; required for performance-sensitive changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants