Merge pull request #116 from yunyingk/codex/ci-dist-freshness
Boot the freshly built MCP bundle in CI (byte-diff freshness gate rejected by measurement)
This commit is contained in:
2 files changed
+10
-2
No files matched your search
@@ -51,8 +51,13 @@ jobs:
|
|||||||
# Boot the freshly built bundle and complete an MCP handshake. A bundle that cannot start
|
# Boot the freshly built bundle and complete an MCP handshake. A bundle that cannot start
|
||||||
# is invisible to source-level tests — this has regressed before, when circular imports
|
# is invisible to source-level tests — this has regressed before, when circular imports
|
||||||
# scrambled zod's initialisation order and shipped an entry point that never answered.
|
# scrambled zod's initialisation order and shipped an entry point that never answered.
|
||||||
# Re-running the server tests here points them at the artifact just built instead of the
|
# Re-running the server tests here points them at the artifact just built, not the
|
||||||
# one committed to the tree.
|
# committed one.
|
||||||
|
#
|
||||||
|
# Deliberately no byte-for-byte check that the committed bundle matches a fresh build:
|
||||||
|
# the minifier allocates identifiers differently across platforms and Bun versions, so it
|
||||||
|
# is not reproducible across runners. Measured on this PR: an ubuntu rebuild of the
|
||||||
|
# macOS-built committed file differed only by renamed minified variables (N/S, A/I, q/p).
|
||||||
bun test src/server.test.ts
|
bun test src/server.test.ts
|
||||||
|
|
||||||
- name: Verify Binary Compilation
|
- name: Verify Binary Compilation
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- **CI Boots the Packaged MCP Bundle**: the MCP build step now starts the freshly built `dist/mcp/server.js` and completes a handshake, instead of only checking that it compiles. The artifact is the only thing that ships, so an unbootable bundle is now caught in CI rather than at runtime. Deliberately **not** a byte-for-byte freshness diff: the minifier allocates identifiers differently across platforms and Bun versions, so the bundle is not reproducible across runners — measured, an ubuntu rebuild of the macOS-built committed file differs only in renamed minified variables with identical code.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- **MCP Server Bundle Could Not Start At All**: the plugin shipped `dist/mcp/server.js` as its MCP entry point, but that bundle threw `TypeError: ... is not a constructor` while loading and never answered a single request. Because MCP defaults to off, it failed silently — enabling it produced no `seal_cli` tool and no visible error.
|
- **MCP Server Bundle Could Not Start At All**: the plugin shipped `dist/mcp/server.js` as its MCP entry point, but that bundle threw `TypeError: ... is not a constructor` while loading and never answered a single request. Because MCP defaults to off, it failed silently — enabling it produced no `seal_cli` tool and no visible error.
|
||||||
- Root cause: the MCP entry (`src/server.ts`) was circularly entangled with the CLI command graph (`server → cli/runner → cli/commands/mcp → server`, and `server → cli/runner → cli/commands/http → http/routes → server`). When `bun build --target=node` flattened that cycle together with zod's own `core ↔ classic` cycle, zod's class initialisers ended up ordered after the top-level `z.lazy()` call the SDK makes at import time, leaving `ZodLazy` undefined at call time.
|
- Root cause: the MCP entry (`src/server.ts`) was circularly entangled with the CLI command graph (`server → cli/runner → cli/commands/mcp → server`, and `server → cli/runner → cli/commands/http → http/routes → server`). When `bun build --target=node` flattened that cycle together with zod's own `core ↔ classic` cycle, zod's class initialisers ended up ordered after the top-level `z.lazy()` call the SDK makes at import time, leaving `ZodLazy` undefined at call time.
|
||||||
|
|||||||
Reference in new issue
Block a user