fix(ci): post-migration CI repairs for the Bun switch - #5
Merged
Conversation
added 3 commits
August 24, 2026 23:47
…build - sherif's root-package-manager-field rule requires packageManager; set it to bun@1.4.0 - bun run --workspaces enumerates negative-glob-excluded members at runtime (install respects them, the script runner does not), which made CI attempt kimi-web's vite build without its dependencies; switch the root build to explicit positive filters
|
❌ Nix build failed Hash mismatch in
Please update |
added 26 commits
August 25, 2026 00:16
…shards - bun's internal cache dir is nondeterministic (gzip mtimes plus variable extracted-dir presence), so the FOD now materializes the project node_modules tree instead; the main derivation copies it in and runs the needed lifecycle scripts via 'bun pm trust' with node-gyp pointed at the pinned Node headers - ci.yml test shards build kimi-native-tools (Rust) before running: the shards have been failing on main since before the migration because CI never built the native addon (282 load errors per shard) - fill in the real bunDeps hash reported by the nix-build bot
The cd+relative traversal inside execSync resolved one level short in the Nix sandbox (/build/source/apps/node_modules); use the absolute vite entry with argv-form execFileSync and cwd=vis-web instead
The Nix build has been failing since before the migration at the SEA asset collector: it requires a built .node for kimi-native-tools, and nothing in the sandbox compiled it. Add cargo/rustc and run the napi build ahead of the SEA steps.
The main derivation has no network, so napi/cargo could not fetch crates from crates.io. cargo vendor now runs inside the bunDeps FOD alongside the npm install; the main derivation wires the vendored dir plus its config into packages/kimi-native-tools/.cargo and sets CARGO_NET_OFFLINE=true.
npx resolves package.json overrides as install specs and aborts with EINVALIDTAGNAME on parent>child keys; bunx runs the local lint-staged without touching the registry.
GET /api/v1/tools without session_id resolves the globally most recent session; concurrent test files create newer sessions on shared shards, so the projection could read another agent's registry.
…fileOps DI warns per unregistered dependency on every createInstance, which flooded the profileOps suite stderr with seven repeated warnings per case. The paths under test never call into them; register no-op stubs to silence the noise.
The SEA asset collector requires a built .node for both napi packages; vendor kimi-agent's crates alongside kimi-native-tools and compile it offline in the sandbox.
The branch ruleset requires code scanning results (CodeQL, medium+ security alerts) for merges into main; this workflow produces them on PRs, pushes to main, and a weekly schedule.
This was referenced Aug 24, 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.
Related Issue
Follow-up to #4(已合并)。合并后首轮 main CI 暴露了三个问题,本 PR 修复。
Problem
#4 合并后 CI(main @ d48a7f6)三处红:
bun run --workspaces的运行期枚举不尊重负向 glob,把!apps/kimi-web排除的 kimi-web 也拉进构建(它依赖未安装,vite config 加载失败)。本地能过是因为历史 node_modules 有残留包。root-package-manager-field规则要求 packageManager 字段,build: migrate the package manager from pnpm to Bun #4 把它删了。注:test 分片的失败(kimi-native-tools 加载错误 ×282)在 #4 之前的 pnpm 时代 main 上就存在——CI 从未有 Rust 构建步骤,属既有问题,不在本 PR 范围。
What changed
"packageManager": "bun@1.4.0"恢复(sherif 要求;同时准确声明工具链)lib.fetchers.proxyImpureEnvVars属性路径修正;回填 nix-build bot 报告的真实 bunDeps 哈希验证
bun run sherif无告警Checklist