Skip to content

Fix #1264: bug skipping sync#1268

Closed
zhangsan582 wants to merge 3 commits into
Fission-AI:mainfrom
zhangsan582:0626_1
Closed

Fix #1264: bug skipping sync#1268
zhangsan582 wants to merge 3 commits into
Fission-AI:mainfrom
zhangsan582:0626_1

Conversation

@zhangsan582

Copy link
Copy Markdown
Contributor

Source issue: #1264

This changes the archive workflow prompt to explicitly handle missing main specs: ADDED creates a new main spec during sync, MODIFIED / RENAMED stops with a warning,
and REMOVED warns that there is no target.

Changes

  • Updated archive skill and /opsx:archive command template in src/core/templates/workflows/archive-change.ts.
  • Added regression coverage and updated intentional template hashes in test/core/templates/skill-templates-parity.test.ts.

Verification

  • pnpm exec vitest run test/core/templates/skill-templates-parity.test.ts
  • pnpm run build

Bug Fixes

  • Prevents generated archive instructions from treating a missing main spec as “already synced” or “no sync needed.”

Tests

  • Added template assertions covering both generated archive surfaces.

Suggested commit message:

Fix archive prompt handling for missing main specs

@zhangsan582 zhangsan582 requested a review from TabishB as a code owner June 26, 2026 15:30
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zhangsan582

Copy link
Copy Markdown
Contributor Author

close

@zhangsan582 zhangsan582 reopened this Jun 26, 2026
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":500,"request":{"method":"PATCH","url":"https://api.github.com/repos/Fission-AI/OpenSpec/issues/comments/4810992915","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- review_stack_entry_start -->\n\n[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Fission-AI/OpenSpec/pull/1268?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)\n\n<!-- review_stack_entry_end -->\n<!-- This is an auto-generated comment: review in progress by coderabbit.ai -->\n\n> [!NOTE]\n> Currently processing new changes in this PR. This may take a few minutes, please wait...\n> \n> <details>\n> <summary>⚙️ Run configuration</summary>\n> \n> **Configuration used**: Path: .coderabbit.yaml\n> \n> **Review profile**: CHILL\n> \n> **Plan**: Pro\n> \n> **Run ID**: `5618e879-b7b4-466e-a648-a92e59e3cf14`\n> \n> </details>\n> \n> <details>\n> <summary>📥 Commits</summary>\n> \n> Reviewing files that changed from the base of the PR and between 737518b36fe4b6fdb09c83eeaf8d873a428c92e6 and fdbcb411b7ba0b8bdf468d5df1dfb84062d6b235.\n> \n> </details>\n> \n> <details>\n> <summary>📒 Files selected for processing (24)</summary>\n> \n> * `.changeset/fix-config-set-workflows-array.md`\n> * `.changeset/fix-yaml-carriage-return-escaping.md`\n> * `openspec/changes/fix-config-set-workflows-array/design.md`\n> * `openspec/changes/fix-config-set-workflows-array/proposal.md`\n> * `openspec/changes/fix-config-set-workflows-array/specs/cli-config/spec.md`\n> * `openspec/changes/fix-config-set-workflows-array/tasks.md`\n> * `openspec/changes/fix-yaml-carriage-return-escaping/design.md`\n> * `openspec/changes/fix-yaml-carriage-return-escaping/proposal.md`\n> * `openspec/changes/fix-yaml-carriage-return-escaping/specs/command-generation/spec.md`\n> * `openspec/changes/fix-yaml-carriage-return-escaping/tasks.md`\n> * `src/commands/config.ts`\n> * `src/core/command-generation/adapters/bob.ts`\n> * `src/core/command-generation/adapters/claude.ts`\n> * `src/core/command-generation/adapters/cursor.ts`\n> * `src/core/command-generation/adapters/pi.ts`\n> * `src/core/command-generation/adapters/windsurf.ts`\n> * `src/core/command-generation/utils/yaml.ts`\n> * `src/core/config-schema.ts`\n> * `src/core/templates/workflows/archive-change.ts`\n> * `test/commands/config.test.ts`\n> * `test/core/command-generation/adapters.test.ts`\n> * `test/core/command-generation/yaml-utils.test.ts`\n> * `test/core/config-schema.test.ts`\n> * `test/core/templates/skill-templates-parity.test.ts`\n> \n> </details>\n> \n> ```ascii\n>  ___________________________\n> < I refactor in bunny hops. >\n>  ---------------------------\n>   \\\n>    \\   (\\__/)\n>        (•ㅅ•)\n>        /   づ\n> ```\n\n<!-- end of auto-generated comment: review in progress by coderabbit.ai -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n\n</details>\n<details open>\n<summary>⚔️ Resolve merge conflicts</summary>\n\n- [ ] <!-- {\"checkboxId\": \"c3a5b2e1-4d7f-4a8c-b9d6-e1f2c3d4a5b6\"} --> Resolve merge conflict in branch `0626_1`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n<!-- tips_start -->\n\n---\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Fission-AI/OpenSpec&utm_content=1268)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n<details>\n<summary>❤️ Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands.</sub>\n\n<!-- tips_end -->"},"request":{"retryCount":3,"signal":{},"retries":3,"retryAfter":16}}}

@zhangsan582

Copy link
Copy Markdown
Contributor Author

close

@zhangsan582 zhangsan582 deleted the 0626_1 branch June 27, 2026 06:19
clay-good added a commit to clay-good/OpenSpec that referenced this pull request Jun 29, 2026
Address the spec-driven silent-spec-drop family at its root: one fault —
correctness-critical decisions live in agent prompts, not deterministic
CLI logic — expressed at four layers, fixed at the most deterministic
point for each.

- CLI gate (guarantee): archive validates like `validate` unless
  --skip-specs, schema-aware (only when the schema graph produces delta
  specs, per Fission-AI#997). Blocks total (CHANGE_NO_DELTAS), partial (new
  capability-coverage rule), and format/mode-G ("No delta sections").
- Loop fix: spec-driven apply.requires [specs, tasks] + propose/ff create
  every artifact transitively required by applyRequires (incorporates
  Fission-AI#1250; its reviewer deferred this archive guard).
- Keystone: archive skill calls `openspec archive` instead of agent-judged
  sync + raw mv (Fission-AI#656, Fission-AI#863); also removes the sync-specs skill dependency
  (Fission-AI#913).
- Recovery audit; delta-vs-full-spec clarity.

Verified against current main (rebuilt CLI): bug reproduces; archive --json
+ ArchiveBlockedError exist; Fission-AI#1250 not merged; Fission-AI#194/Fission-AI#1268 closed.

Closes Fission-AI#1212 Fission-AI#1260 Fission-AI#1222 Fission-AI#1264 Fission-AI#799 Fission-AI#656 Fission-AI#863 Fission-AI#913. Supersedes PRs Fission-AI#1250
Fission-AI#1271 Fission-AI#1241 Fission-AI#1233. Addresses Fission-AI#997 Fission-AI#164 Fission-AI#426 Fission-AI#911. Out of scope Fission-AI#1246 Fission-AI#1112
Fission-AI#1252 Fission-AI#1120 Fission-AI#827 Fission-AI#1265.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant