Skip to content

fix(openspec): archive resolves the change in the cwd repository #7483

Not planned

Description

@dan-petty

Problem

devops openspec archive <change> looks for the change in the devops-cli checkout, not in the repository of the current working directory. Run from a worktree of another repository, it fails with "Change not found", also when that worktree holds openspec/changes/<change>/. The builder of dan-petty/github-workflows found this on 2026-11-27, when it archived the change of dan-petty/github-workflows#3.

Cause: the command takes its root from find_worktree_root() (src/devops_cli/core/repo.py). That function resolves a repository cloned under repos/ of the devops-cli workspace, and each worktree of it, to the workspace root. devops openspec check, regenerate and new use the same root.

Change

Resolve the OpenSpec root from the current working directory: the nearest parent directory that holds openspec/config.yaml, as the openspec program does.

Done when

  • devops openspec archive <change>, run in a checkout or worktree of another repository that holds openspec/changes/<change>/, archives that change and validates the specs of that repository.
  • Run in a devops-cli checkout or worktree, the command works as before.

Source

Source: dan-petty/github-workflows#3

Activity

  1. dan-petty commented on Nov 27, 2026

    @dan-petty
    OwnerAuthor
    • Scope: none. The title has the scope openspec, and .github/labels.yml declares no scope/openspec label. Add the label to the file to give the scope to this item.
    • Possible duplicate: fix(openspec): write the change of the checkout in use #7311, which may ask for the same change. The model names devops openspec archive resolves the OpenSpec root from the current working directory instead of find_worktree_root() as the change that both ask for. Both ask for archive to resolve the OpenSpec root from the working directory rather than the devops-cli workspace root, so delivering #7311 delivers this candidate. A person closes one of the two if that is so.
  2. added
    type/bug
    source/agent
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 27, 2026
  3. dan-petty commented on Nov 27, 2026

    @dan-petty
    OwnerAuthor

    Duplicate of #7311. That issue names the same cause (find_worktree_root() resolves a repository below repos/ of the workspace to the devops-cli root) for devops openspec archive and devops openspec new, and its acceptance criteria cover this report. The new evidence is now a comment on #7311.

  4. removed
    status/new
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions