Skip to content

fix(cleanup): clarify legacy file deletion warning - #2004

Merged
clay-good merged 1 commit into
mainfrom
codex/pr-1820-harden
Sep 28, 2026
Merged

clay-good merged 1 commit into
mainfrom
codex/pr-1820-harden

Conversation

@clay-good

@clay-good clay-good commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Status

LGTM for the scoped warning fix. Ready for review.

What was wrong

Legacy cleanup said “No user content to preserve,” although openspec/AGENTS.md is detected by existence alone and deleted entirely.

How it was fixed

Warn about whole-file deletion and ask users to back up custom content. Add warning coverage for command files and directories, put the migration guidance in docs-lab, and include a patch changeset that reflects current cleanup behavior.

Replication / proof

All 109 cleanup tests pass. Restoring the old warning fails 3 regression tests. Build, lint, TypeScript, changeset validation, and diff checks pass.

The full local suite passed 5,935 tests, with 4 existing failures reproduced on clean main at 79b6aa9c. GitHub's Linux, macOS, and Windows test jobs all pass, along with lint, type checking, release tracking, dependency review, audit, and CodeQL.

Credit

This carries forward the fix proposed by @philo-x in #1820. Thank you for identifying the misleading cleanup text, implementing the original correction, adding regression coverage, and following up with the changeset. The implementation commit retains co-author credit.

Notes

This version adapts #1820 to current main and moves the documentation change to docs-lab. Cleanup behavior and --force semantics are unchanged.

Closes #1819.
Supersedes #1820.

Adapt #1820 to current cleanup behavior and docs-lab; cover directory, file, and marker-only summaries.

Co-authored-by: 胥寅 <xuuyin@dingtalk.com>
@clay-good
clay-good requested a review from a team as a code owner September 28, 2026 21:22
@clay-good
clay-good requested review from TabishB and removed request for a team September 28, 2026 21:22
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: Fission-AI/OpenSpec/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a98ddb1e-3043-4403-84ac-757b1b28d40d

📥 Commits

Reviewing files that changed from the base of the PR and between 79b6aa9 and d27d8a4.

📒 Files selected for processing (4)
  • .changeset/legacy-cleanup-deletion-warning.md
  • docs-lab/help/legacy/migration.md
  • src/core/legacy-cleanup.ts
  • test/core/legacy-cleanup.test.ts
 ______________________________________________
< Winning the war on bugs, one line at a time. >
 ----------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@openspec-cloud

Copy link
Copy Markdown
Contributor

No PR-relevant drift confirmed.

AI-generated · A citation proves the line exists, not that it makes the case — verify before acting.
Checked the 8 requirements selected for this PR at d27d8a4 (255 total).
This is not a full-repository clean result; see the check for coverage and any broader findings.
View results · Click Refresh, then Scan again in the check. Or comment /openspec-cloud.

@alfred-openspec alfred-openspec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the current head. The cleanup warning now accurately distinguishes files that are deleted entirely from managed command files that preserve custom content, and tests cover the user-facing wording. Hosted CI is green. Approved. Final review of the docs-lab change still belongs to @TabishB.

@clay-good
clay-good added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit d4e1c77 Sep 28, 2026
30 of 31 checks passed
@clay-good
clay-good deleted the codex/pr-1820-harden branch September 28, 2026 21:55
SanHsien pushed a commit to SanHsien/OpenSpec that referenced this pull request Sep 29, 2026
Adapt Fission-AI#1820 to current cleanup behavior and docs-lab; cover directory, file, and marker-only summaries.

Co-authored-by: 胥寅 <xuuyin@dingtalk.com>
(cherry picked from commit d4e1c77)
SanHsien added a commit to SanHsien/OpenSpec that referenced this pull request Sep 29, 2026
…I#1997-Fission-AI#2005 and issues Fission-AI#2000/Fission-AI#2006

Also replace owner-specific wording with neutral terms.

Co-Authored-By: Claude Opus 5.5 <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.

Feedback: 1.12.0's cleanup says "No user content to preserve" about a customized openspec/AGENTS.md, and offers --force to delete it

2 participants