Repository navigation
chore: openspec 纳入版本控制 + pr-automation 支持被忽略白名单路径 - #24
Merged
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.
变更概述
chore: openspec 纳入版本控制 + pr-automation 支持被忽略白名单路径
落实 issue #23 的三项决策(源自 PR #22 收尾时用户拍板):openspec 纳入版本控制、修复
git add/pr-automation 工具链缺口、归档存量 change。关联 Issue
Closes #23
变更内容
.gitignoreopenspec/一行 → openspec 树纳入版本控制(仅此一行,.omo/、.gstack/、.codegraph、memoryos_data/、.pi-glla/等保持忽略不变)scripts/pr-automation.shgit add "${FILES[@]}"→ 先git add --,失败后回退git add -f --(白名单路径被.gitignore匹配时不再中止流水线);同步更新头部注释openspec/**(59 files)config.yaml+specs/**(12 个能力域)+changes/archive/**openspec/changes/docx-export-quality/**→openspec/changes/archive/2026-09-15-docx-export-quality/**(R100 纯重命名,git 历史完整保留).omo/notepads/docx-export-quality/learnings.md为什么回退用
-f是安全的git add -f只解除 ignore 约束,不扩大路径范围:FILES完全由--files逐项显式构造(无 glob、无目录递归),--分隔符防路径被误当选项;resume 模式下validate_whitelist()仍强制「工作区所有改动必须在白名单内」。最坏情况 =git add -f同样失败 →set -e中止(fail-safe,不会错误提交)。影响范围
git add直接成功 → fallback 不触发。.gitignore匹配的路径」,当前唯一实例是.omo/notepads/**(本仓已强制跟踪 notepad)。openspec/入库后,变更 delta 与主 spec 进入版本控制,PR 可审查规格改动。packages/mdpkg/**改动。验证方式
cd packages/mdpkg && npm test→ 323/323 passbash -n scripts/pr-automation.sh→ syntax OKopenspec validate --all→ 12 passed, 0 failedgit add失败后 fallback 成功暂存ignored/f.txtR100(git show --name-status 332c204),旧路径已不在git ls-files,历史保留.md/.yaml,无密钥、无二进制、无机器特定路径、无node_modules/.DS_Storecode-review双轴(Standards + Spec):APPROVE / APPROVEreview(pre-landing 结构审查):APPROVE,白名单保证未被削弱,建议 risk-low风险评估
风险等级: low
来源: ai-generated
git revert 332c204可回滚(注意:回滚会让 openspec 变为 untracked 并在.gitignore恢复openspec/,需手动清理??噪音)。回滚方案
git revert 332c204 即可回滚