Conversation
- Update REPO_SNAPSHOT: add CHANGELOG.md to code structure, add current version - Add lesson: config validation strategy (silent correction + warnings) - Add lesson: release process must sync context docs - Update experience INDEX with new lesson entries
docs: AIEF context sync for v1.5.0
There was a problem hiding this comment.
Pull request overview
This PR syncs the repository “context” documentation after the v1.5.0 release, ensuring the repo snapshot and experience/lessons reflect current structure and decisions.
Changes:
- Updated
REPO_SNAPSHOT.mdto includeCHANGELOG.mdand record current version1.5.0with release date. - Added two new “lessons learned” entries documenting release context sync and config validation strategy decisions.
- Updated the experience index to include the new lessons.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| context/tech/REPO_SNAPSHOT.md | Updates repo structure snapshot and adds current version metadata for v1.5.0. |
| context/experience/lessons/2026-02-11-release-context-sync.md | New lesson documenting the need to sync context docs after releases. |
| context/experience/lessons/2026-02-11-config-validation-strategy.md | New lesson documenting the “silent correction + warnings” config validation strategy. |
| context/experience/INDEX.md | Adds the two new lessons to the experience index table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## 背景 | ||
|
|
||
| 为用户 JSON 配置文件添加校验逻辑。配置可能包含错误类型、负数、超范围值、甚至 Infinity/NaN。 |
There was a problem hiding this comment.
这里提到“用户 JSON 配置文件…甚至 Infinity/NaN”,但标准 JSON 无法表示 Infinity/NaN。如果配置确实来自 JSON.parse(代码里也是这么写的),建议改成更准确的表述(例如仅描述类型错误/负数/超范围),或说明该情况仅在非 JSON 输入路径中可能出现。
| 为用户 JSON 配置文件添加校验逻辑。配置可能包含错误类型、负数、超范围值、甚至 Infinity/NaN。 | |
| 为用户 JSON 配置文件添加校验逻辑。配置可能包含错误类型、负数或超范围值。 |
| ## 可复用结论 | ||
|
|
||
| - 对于**用户配置校验**,静默修正 + warnings 优于抛错拒绝 | ||
| - 验证函数应返回 `{ result, warnings }` 结构,不产生副作用 |
There was a problem hiding this comment.
文档里前文给出的函数返回结构是 { config, warnings },但这里写成了 { result, warnings },与当前实现(validateConfig 返回 ConfigValidationResult,字段名为 config)不一致。建议统一为 { config, warnings }。
| - 验证函数应返回 `{ result, warnings }` 结构,不产生副作用 | |
| - 验证函数应返回 `{ config, warnings }` 结构,不产生副作用 |
| 1. 与项目已有的错误处理策略一致(`conventions/typescript.md` 第 6 条:非关键路径静默降级) | ||
| 2. 配置错误不应阻止插件运行——用户可能只是拼写了一个字段,不应因此完全失去 token 追踪功能 |
There was a problem hiding this comment.
conventions/typescript.md 这个引用路径在仓库中不存在;约定文件实际在 context/tech/conventions/typescript.md。建议改为该完整路径,或使用从本文件出发的相对路径(例如 ../../tech/conventions/typescript.md)以避免读者找不到对应条目。
Summary
Merge dev into main: AIEF context documentation sync after v1.5.0 release (PR #44).