Repository navigation
fix(toolchain): 生成的工作区忽略文件忽略自身 - #179
Merged
xiaoyumuxi merged 1 commit intoNov 23, 2026
Merged
Conversation
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
保存工具链目录 pin 时,Core 为
.lithe/toolchains/local.json准备忽略规则,却没有忽略自动生成的.lithe/.gitignore自身,因此它仍会出现在 Git 的未跟踪文件列表中。改动 / Changes
.gitignore自身和toolchains/local.json,仅在规则未生效时按顺序追加/.gitignore、/toolchains/local.json。.lithe内的嵌套.gitignore;团队共享配置仍可提交,不加入*或退役的运行配置模式。toolchains.editPinSources的应用边界契约。不在本 PR 范围内 / Out of scope
桌面固定修订、原生文件写入与 Git 集成验证由配套宿主 PR 负责。没有改动文件权限、原子替换、冲突校验、API 字段、插件协议或 SDK。
类型专属:fix
复现与根因
/toolchains/local.json;已有该规则时没有补齐自忽略;满预算的来源也没有因自忽略追加而拒绝。prepare_ignore只检查并生成工具链本机文档的忽略规则。该逻辑始于9bd06ef3ea732ff1d7db6e6f37280c29dab6b25e(feat(toolchain): plan bounded native pin source edits),此后移动到当前独立 crate。检查项
rust/crates/toolchain/src/pin_sources.rs。toolchains.editPinSources的 dispatcher、toolchain crate、宿主 Go 桥接和SavePins消费者;没有其他现行.lithe/.gitignore维护入口。范围检查 / Scope checks
功能矩阵 / Feature matrix
N/A:本仓库维护 Core 规则。宿主
plugin-injected-toolchains.json的能力及验证说明随配套接入更新,macOS / Windows 的原生状态继续按实际证据填写。插件归属 / Plugin ownership
UI 验证 / UI evidence
N/A:没有界面布局、控件、文案或交互呈现变化。
统一日志系统 / Structured logging
N/A:纯规则继续返回原有结构化错误,未新增失败类别、日志事件或生命周期;日志目录生成检查通过。
界面文案 / i18n
N/A:没有新增用户可见文字。
逻辑归属 / Logic placement
lithe-toolchain,复用既有ignorecrate,不在宿主复制匹配规则。toolchains.editPinSources,共享 fixture 为rust/fixtures/toolchain-pin-storage.json。性能与内存 / Performance and memory
只在明确保存且 pin 有语义变化时,多检查一个有界来源路径。没有新增依赖、进程、线程、后台任务、缓存或空闲轮询;输入输出预算未改变。
设置 / Settings
插件契约 / Plugin contract
N/A:这是现有应用命令的忽略计划修复;没有新增或修改插件能力版本、宿主方法、通知、SDK 或协议字段。
发行包与资源 / Bundle and resources
N/A:Core 不执行文件 I/O;现有来源仍位于用户工作区,未新增下载、缓存、安装资源或写入路径。
无用代码与重构 / Dead code and refactoring
验证 / Verification
环境:Linux amd64,Rust 1.100.0;固定基线
dcb3d77f7a56e58f3d7c0aceea5b7df6986ed2e2。prepare_ignorerun-rust-tests-with-timing.mjs --package lithe-toolchaintests::toolchain_pins::计时及 28-case JSON dispatcher fixtureaffected-crates.mjs对应 52-crate workspace 门禁(lithe-remote/server,lithe-remote/motty)lithe-core899/899、lithe-toolchain29/29 全部通过;失败分类见下方cargo test入口下 container / WSL 两项通过;SSH 不再缺CARGO_PKG_NAME,随后命中 SSH authentication 的 EPERM;保留原 workspace 失败记录cargo clippy -p lithe-toolchain --all-targets --all-features -- -D warningsverify-rust-core-comments.sh toolchainverify-platform-tests.mjsgenerate-log-events.mjs --checkshared/plugins/scripts/verify-docs.mjscargo fmt --check、git diff --check、变更插件归属自查Workspace 结果与限制: 52-crate suite 编译 336.108 s、总耗时 830.369 s,在 600 s 编译 / 900 s 总期限内完成。原报告中的 52 项失败明确包含
Operation not permitted,来自当前执行环境受限的 Unix socket / AskPass / 远程服务路径;另外 3 项在计时器直接启动测试二进制时缺少 Cargo 注入的CARGO_PKG_NAME。随后分别以 60 s 上限、正常 Cargo 入口确认:container 和 WSL 两项通过(各约 20 ms),SSH 项通过环境前提后在准备认证处遭遇 EPERM。没有重复整个 suite、扩大时限或修改存量测试。失败 crate 没有依赖本次修改的lithe-toolchain,其源码也与基线相同;这不是一轮完整基线复跑,因此不将 workspace 宣称为全绿。原始失败和定向复核日志均保留。计时工件:
.artifacts/test-stability/issue-1670-before.*、issue-1670-toolchain.*、issue-1670-core-pins.*、issue-1670-workspace.*;每项包含 JSON、HTML 与 JUnit。定向复核为issue-1670-cargo-env.log/issue-1670-cargo-env-summary.json。工件不提交到源码分支。未能执行的检查和原因: 当前环境没有原生 macOS / Windows;不以 Linux 纯规则测试代替原生文件权限、系统 Git 或界面工作流验证。没有运行全 workspace Clippy 或 Windows target Clippy;本次 Clippy 针对唯一修改的 crate。宿主旧
verify-shared-contracts.sh已移除,未将不存在的门禁记为通过。提交前确认 / Final checks
main,目标为main。