fix(templates): use store-aware root for main specs in sync/archive#1360
fix(templates): use store-aware root for main specs in sync/archive#1360clay-good wants to merge 1 commit into
Conversation
The sync-specs and archive-change workflow instructions hardcoded `openspec/specs/<capability>/spec.md` for main specs, assuming they always live in the current repository. With `--store <id>` the change and its main specs belong to the selected store, so sync could write the repo's specs instead of the store's, and archive could report specs as already synced based on the wrong location. Derive the main-spec path from the store-aware `planningHome.root` the CLI already returns, and stop labeling CLI-returned delta paths "repo-local" since they may belong to a store. Repo-local behavior is unchanged. Fixes Fission-AI#1358 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughUpdated generated sync and archive workflow instructions to resolve main-spec paths through ChangesStore-aware workflow paths
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Status: Ready. Closes #1358.
What was wrong
OpenSpec 1.5.0 added
--store <id>to target a registered store, but two workflow instructions still assumed the main specs always live in the current repository:sync-specsread and createdopenspec/specs/<capability>/spec.mdarchive-changecompared delta specs against that same hardcoded path before offering to syncWith a store selected, the change and its main specs belong to the store, while the repo may also have its own
openspec/. So a sync could update the repo's specs instead of the store's, the store could stay out of date, and archive could report "already synced" based on the wrong location.How it was fixed
The CLI already returns a store-aware
planningHome.rootinopenspec status --json. The instructions now derive every main-spec path from it:sync-specs: both the main-spec read path and the new-main-spec creation path derive fromplanningHome.root(added a note in the "Resolve change context" step so the agent uses it).archive-change: the sync-assessment comparison uses that same derived path.Repo-local behavior (no store) is unchanged:
planningHome.rootis the repo root there.Proof it works
Generated-content and function-payload golden hashes in
test/core/templates/skill-templates-parity.test.tswere regenerated and pass, confirming the intended (and only the intended) instruction text changed. Full suite green except the 17 pre-existing environment-onlyzsh-installerfailures (oh-my-zsh), which are unrelated.Notes
Scope is the source workflow templates only. The committed
skills/distribution (PR #1357) isn't onmainyet; when it lands,npm run generate:skillswill pick up this text automatically.🤖 Generated with Claude Code
Summary by CodeRabbit