Repository navigation
fix(scripts): bound subprocesses and verify package immutability - #1
Merged
Merged
Conversation
Add command deadlines, interrupt cleanup, per-step timing reports, and process lifecycle regressions. Verify real packaging and Maven tests in an isolated copy while preserving existing plugin, ZIP, and host bundle inventories. Co-Authored-By: Claude Code <noreply@anthropic.com>
xiaoyumuxi
marked this pull request as ready for review
October 18, 2026 14:37
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.
问题与改动
package.mjs的 Maven/zip 和test.mjs的 Maven 调用原来使用没有 timeout 的execFileSync。命令挂起或后代持有输出管道时,脚本可能一直等待;只给同步 API 添加 timeout 也不能保证拒绝 SIGTERM 的进程及其后代结束。LITHE_MAVEN_TIMEOUT_MS可设 1–600000 毫秒),zip 期限 30 秒。LITHE_REPORT_DIR,将命令输出缺失/损坏等外围错误写入失败报告。verify-scripts.mjs与文件清单工具,在一次性源码副本中真实打包和测试,比较已有插件、ZIP、指定宿主 bundle 的完整前后清单,以及新插件测试前后的清单。清单包含路径、类型、权限、链接目标、大小及 SHA-256;保留新产物与诊断证据,清理临时目录。嵌套报告目录固定在临时副本内。.artifacts/,README 补充期限、报告与复验方法。本地验证
macOS arm64,Node 24.14.0、Maven 3.10.0、JDK 27,重新执行得到 31 条通过记录:8 项进程回归、3 项打包步骤、14 项真实 Maven 集成检查、6 项隔离验证。历史 ZIP 的实机验收没有作为这些结果的证明。
node scripts/test-process.mjs:全部通过;强制超时及进程清理回归约 1.63 秒。LITHE_REPORT_DIR=.artifacts/test-stability/custom-reports node scripts/verify-scripts.mjs --host-bundle /Applications/Lithe.app --host-bundle <existing-validation-app>:全部通过。扩展构建 3.35 秒、模型读取 2.37 秒、过滤测试 3.90 秒。dist/package、原已验收 ZIP、已安装宿主和已有验证实例 bundle 的前后清单完全相等;两个宿主 bundle 合计覆盖 2693 个文件。新插件在集成测试前后也完全相等。原 ZIP 的 SHA-256 保持d03b0823ff8c2d7b72f2b9209eca3f1b28980d76cf27eddb0d3459874ae28613。verify-test-stability.sh、verify-runtime-bundle-immutability.sh、Node 语法检查及git diff --check通过。宿主静态门禁分别只检查其支持的测试文件/宿主源码,不替代 Node 回归和实际哈希验证。尚未执行 Maven 3.6.3、Node 22/Java 17 的 CI matrix、Linux/Windows 或新的宿主 UI 验收;远端检查以本 PR 的 CI 结果为准。脚本执行器面向 macOS/Linux 的 POSIX 进程组。
插件声明继续使用 API 3、
requires.buildSystems = 1;版本、发布工作流及宿主原生 UI 方向不变。未执行发布、创建 tag/Release、提交 Store 条目或启用自动合并。🤖 Generated with Claude Code