Files
OpenSpec/test/commands
Clay GoodandClaude Opus 5.5 cf2859a520 fix(status): include the declaring repo in store-backed edit roots (#2014)
* fix(status): include the declaring repo in store-backed edit roots

For a store-selected root, actionContext.allowedEditRoots listed only the
store and claimed implementation edits were scoped to it, so the apply
skill reported a conflict and refused to implement tasks. The project whose
store: pointer names the store is now listed first; with no declaring
project, the constraint asks the agent to confirm the target repo instead.
Repo-local output is byte-identical.

Closes #2013

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(status): keep actionContext key order and scope the store wording

Adversarial review of the #2013 fix found:

- The editScope spread moved `constraints` ahead of
  `requiresAffectedAreaSelection`, changing repo-local JSON key order.
  toEqual could not see it; the byte-stable test now pins the serialized
  form, and the keys are written out in contract order.
- "Implementation edits belong to <repo>" claimed task routing OpenSpec
  does not do (a store change can span repos). It now names the current
  declaring project and asks before editing any other repository.
- The no-declaring-project text was false when a pointer exists but is
  ignored, and did not say the user's answer is where edits go.

New tests cover a subdirectory cwd, an ignored pointer on a real planning
root, and status --all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(status): pin the declaring repo's canonical path through an alias

test/AGENTS.md asks for an alias-path regression when touching path
identity logic (raised by CodeRabbit). The new case reaches the declaring
repo through a symlink (a junction on Windows) and asserts the canonical
path, both through the CLI and through a direct findDeclaringProjectRoot
call whose start path keeps the alias spelling on every platform.

The helper's own canonicalizeExistingPath call was redundant: the root
walk already returns canonical paths, and removing it changes no output.
The alias test fails only when that walk stops resolving aliases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:22:09 +00:00
..