-
Notifications
You must be signed in to change notification settings - Fork 977
Description
This bug was reproduced in version 0.17.2 of @fission-ai/openspec.
Description:
The openspec archive command moves the change directory to openspec/changes/archive/<date>-<name>.
However, the project structure and other parts of the CLI (like item-discovery.js) expect archived changes to reside in openspec/archive/.
This causes the archived change to be "lost" or misplaced, and subsequent commands like openspec list or validation checks fail to find it correctly or clutter the changes/ directory.
Environment:
- Package:
@fission-ai/[email protected] - Node: >=20.19.0
- OS: Windows
Reproduction:
- Initialize a project with
openspec init. - Create a change with
openspec scaffold fix-something. - Run
openspec archive fix-something. - Observe that
openspec/changes/fix-somethingmoves toopenspec/changes/archive/...instead ofopenspec/archive/....
Proposed Fix:
The implementation in dist/core/archive.js incorrectly joins changesDir instead of targetPath (project root) when defining archiveDir.
In openspec/dist/core/archive.js:
// Current (Buggy)
const archiveDir = path.join(changesDir, 'archive');
// Fixed
const archiveDir = path.join(targetPath, 'openspec', 'archive');Also, item-discovery.js needs alignment if it isn't already looking in the root archive folder.