Skip to content

docs: AIEF context sync for v1.5.0#45

Merged
tongsh6 merged 2 commits intomainfrom
dev
Feb 11, 2026
Merged

docs: AIEF context sync for v1.5.0#45
tongsh6 merged 2 commits intomainfrom
dev

Conversation

@tongsh6
Copy link
Owner

@tongsh6 tongsh6 commented Feb 11, 2026

Summary

Merge dev into main: AIEF context documentation sync after v1.5.0 release (PR #44).

tongshuanglong and others added 2 commits February 11, 2026 13:49
- 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
Copilot AI review requested due to automatic review settings February 11, 2026 05:50
@tongsh6 tongsh6 merged commit 18946fd into main Feb 11, 2026
8 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to include CHANGELOG.md and record current version 1.5.0 with 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。
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里提到“用户 JSON 配置文件…甚至 Infinity/NaN”,但标准 JSON 无法表示 Infinity/NaN。如果配置确实来自 JSON.parse(代码里也是这么写的),建议改成更准确的表述(例如仅描述类型错误/负数/超范围),或说明该情况仅在非 JSON 输入路径中可能出现。

Suggested change
为用户 JSON 配置文件添加校验逻辑。配置可能包含错误类型、负数、超范围值、甚至 Infinity/NaN
为用户 JSON 配置文件添加校验逻辑。配置可能包含错误类型、负数或超范围值

Copilot uses AI. Check for mistakes.
## 可复用结论

- 对于**用户配置校验**,静默修正 + warnings 优于抛错拒绝
- 验证函数应返回 `{ result, warnings }` 结构,不产生副作用
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档里前文给出的函数返回结构是 { config, warnings },但这里写成了 { result, warnings },与当前实现(validateConfig 返回 ConfigValidationResult,字段名为 config)不一致。建议统一为 { config, warnings }

Suggested change
- 验证函数应返回 `{ result, warnings }` 结构,不产生副作用
- 验证函数应返回 `{ config, warnings }` 结构,不产生副作用

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +21
1. 与项目已有的错误处理策略一致(`conventions/typescript.md` 第 6 条:非关键路径静默降级)
2. 配置错误不应阻止插件运行——用户可能只是拼写了一个字段,不应因此完全失去 token 追踪功能
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conventions/typescript.md 这个引用路径在仓库中不存在;约定文件实际在 context/tech/conventions/typescript.md。建议改为该完整路径,或使用从本文件出发的相对路径(例如 ../../tech/conventions/typescript.md)以避免读者找不到对应条目。

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants