Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
368 changes: 357 additions & 11 deletions tests/checks/85-conflict-guards.sh

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions tests/fixtures/recursive-conflicts/items/0002-grand/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
feature: 0002-grand
phase: spec
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Fixture — top-level `0002-grand` decoy

A committed test fixture, not a real work item. It is a top-level item whose name
collides with a bare `MMMM-slug` token used below the root, so the guard can prove
sibling-first resolution prefers the depth-2 parent's row over this top-level
decoy.
12 changes: 12 additions & 0 deletions tests/fixtures/recursive-conflicts/items/0009-solo/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
feature: 0009-solo
phase: spec
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Fixture — top-level `0009-solo` root fallback

A committed test fixture, not a real work item. It is the root-fallback target for
a bare `MMMM-slug` below the root that matches no sibling row.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
feature: 9201-root-a/0001-nested/0002-grand
phase: design
status: final
created: 2026-10-14
updated: 2026-10-14
conflicts-with: "docs/workflow.md"
---

# Design — Fixture drift/union child

A committed test fixture. Its own `conflicts-with` value is `docs/workflow.md`
while its parent row declares `docs/customization.md`; both are present and
unequal, so the declared set is their union and the guard reports a declaration
discrepancy.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
feature: 9201-root-a/0001-nested/0003-shipped
phase: ship
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Ship record — Fixture shipped child

A committed test fixture, not a real work item. Its presence is the shipped
signal: the guard proves a shipped entity still resolves as a target but is
excluded as a conflict counterpart.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
feature: 9201-root-a/0001-nested/0004-refs
phase: design
status: final
created: 2026-10-14
updated: 2026-10-14
conflicts-with: "9201-root-a/0001-nested/0001-leaf, tests/fixtures, 9201-root-a/0001-nested/0003-shipped"
---

# Design — Fixture recursive-reference child

A committed test fixture. Its targets pin the recursive reference grammar: a
three-segment canonical reference resolves to the fixture item at that path, a
non-reference token (`tests/fixtures`) resolves as a surface path, and a shipped
item's reference still resolves even though it is excluded as a counterpart.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
feature: 9201-root-a/0001-nested/0005-precedence
phase: design
status: final
created: 2026-10-14
updated: 2026-10-14
conflicts-with: "0002-grand, 0009-solo, 9203-shared"
---

# Design — Fixture sibling-first child

A committed test fixture. `0002-grand` names a sibling row of its immediate
parent and so resolves to that sibling, not the same-named top-level item;
`0009-solo` and `9203-shared` match no sibling row and fall to the root fallback.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
feature: 9201-root-a/0001-nested/0006-bad
phase: design
status: final
created: 2026-10-14
updated: 2026-10-14
conflicts-with: "../escape, /abs.md, docs/*.md, 9999-nope, docs/no-such-file.md, 9201-root-a/0001-nested/0006-bad, "
---

# Design — Fixture malformed and unresolved targets

A committed test fixture. Every target is unresolved and reported: `../escape`
traverses, `/abs.md` is absolute, `docs/*.md` is a glob, `9999-nope` resolves to
no sibling row and no item, `docs/no-such-file.md` resolves to no repository
path, the self-reference is malformed, and the trailing empty token is blank.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
feature: 9201-root-a/0001-nested
phase: manifest
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Manifest — Recursive fixture nested decomposing child

## Initiative

A committed test fixture, not a real work item. This depth-2 directory itself
holds a manifest, so it is both an entity (from `9201-root-a`'s row) and the
source of further entities keyed by their full canonical reference. Its rows
exercise sibling-first resolution below the root, the recursive reference
grammar, the own ∪ parent-cell union and its drift, shipped-counterpart
exclusion, and malformed/unresolved reporting.

## Assumptions

- The fixture is read-only committed test data; it is never shipped and never
executed by `/status`.

## Children

| Local id | Title | Scope | Depends on | conflicts-with | Canonical reference |
| -------- | ----- | ----- | ---------- | -------------- | ------------------- |
| 0001-leaf | Silent leaf | fixture | — | — | 9201-root-a/0001-nested/0001-leaf |
| 0002-grand | Drift/union child | fixture | — | docs/customization.md | 9201-root-a/0001-nested/0002-grand |
| 0003-shipped | Shipped child | fixture | — | docs/workflow.md | 9201-root-a/0001-nested/0003-shipped |
| 0004-refs | Recursive-reference child | fixture | — | — | 9201-root-a/0001-nested/0004-refs |
| 0005-precedence | Sibling-first child | fixture | — | — | 9201-root-a/0001-nested/0005-precedence |
| 0006-bad | Malformed-target child | fixture | — | — | 9201-root-a/0001-nested/0006-bad |

## Sequencing

1. 0001-leaf
2. 0002-grand
3. 0003-shipped
4. 0004-refs
5. 0005-precedence
6. 0006-bad

## Open issues

- None. The fixture is deliberate, acyclic test data.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
feature: 9201-root-a/0003-legacy
phase: manifest
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Manifest — Recursive fixture legacy (5-column) nested child

## Initiative

A committed test fixture, not a real work item. It is a depth-2 decomposing child
that carries the legacy five-column `Children` header (no `conflicts-with`
column), so the guard can prove an absent column is treated as no declarations at
depth, not only at the top level, while the child itself remains an entity.

## Assumptions

- The fixture is read-only committed test data; it is never shipped and never
executed by `/status`.

## Children

| Local id | Title | Scope | Depends on | Canonical reference |
| -------- | ----- | ----- | ---------- | ------------------- |
| 0001-old | Legacy leaf | fixture | — | 9201-root-a/0003-legacy/0001-old |

## Sequencing

1. 0001-old

## Open issues

- None. The fixture is deliberate, acyclic test data.
43 changes: 43 additions & 0 deletions tests/fixtures/recursive-conflicts/items/9201-root-a/manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
feature: 9201-root-a
phase: manifest
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Manifest — Recursive declared-conflict fixture root A

## Initiative

A committed test fixture, not a real work item. Its tree is three levels deep
(`9201-root-a/0001-nested/...`) so the declared-conflict guard in
`tests/checks/85-conflict-guards.sh` (`AC23 recursive-*`) can pin the recursive
`conflicts-with` target grammar and reference-vs-path discriminator, the
sibling-first-then-root resolution precedence below the root, the own ∪
parent-cell union and its drift at depth, the pair predicate across levels, and
malformed/unresolved reporting. It lives under `tests/`, is read-only, and
allocates no real sequence number.

## Assumptions

- The fixture is read-only committed test data; it is never shipped and never
executed by `/status`.

## Children

| Local id | Title | Scope | Depends on | conflicts-with | Canonical reference |
| -------- | ----- | ----- | ---------- | -------------- | ------------------- |
| 0001-nested | Nested decomposing child | fixture | — | — | 9201-root-a/0001-nested |
| 0002-sibling | Silent sibling | fixture | — | — | 9201-root-a/0002-sibling |
| 0003-legacy | Legacy 5-column decomposing child | fixture | — | — | 9201-root-a/0003-legacy |

## Sequencing

1. 0001-nested
2. 0002-sibling
3. 0003-legacy

## Open issues

- None. The fixture is deliberate, acyclic test data.
Empty file.
Empty file.
37 changes: 37 additions & 0 deletions tests/fixtures/recursive-conflicts/items/9202-root-b/manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
feature: 9202-root-b
phase: manifest
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Manifest — Recursive declared-conflict fixture root B

## Initiative

A committed test fixture, not a real work item. It is the cross-parent control for
the recursive declared-conflict guard: its bare `0002-grand` token and the one in
`9201-root-a/0001-nested` share the same text but resolve to different items, so
they must not be reported as a shared target.

## Assumptions

- The fixture is read-only committed test data; it is never shipped and never
executed by `/status`.

## Children

| Local id | Title | Scope | Depends on | conflicts-with | Canonical reference |
| -------- | ----- | ----- | ---------- | -------------- | ------------------- |
| 0002-grand | Silent grand | fixture | — | — | 9202-root-b/0002-grand |
| 0001-namer | Namer of a silent grand | fixture | — | 0002-grand | 9202-root-b/0001-namer |

## Sequencing

1. 0002-grand
2. 0001-namer

## Open issues

- None. The fixture is deliberate, acyclic test data.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
feature: 9210-surface-shared
phase: design
status: final
created: 2026-10-14
updated: 2026-10-14
conflicts-with: "docs/workflow.md"
---

# Design — Fixture shared surface target partner

A committed test fixture declaring the same surface path as the depth-3
drift/union child.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
feature: 9210-surface-shared
phase: spec
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Fixture — shared surface target partner

A committed test fixture, not a real work item. It shares the surface path
`docs/workflow.md` with a depth-3 entity, so the guard reports a class (a)
declared conflict across levels.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
feature: 9211-names-shared
phase: design
status: final
created: 2026-10-14
updated: 2026-10-14
conflicts-with: "9203-shared"
---

# Design — Fixture shared item target partner

A committed test fixture declaring the same resolved item as the depth-3
sibling-first child.
13 changes: 13 additions & 0 deletions tests/fixtures/recursive-conflicts/items/9211-names-shared/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
feature: 9211-names-shared
phase: spec
status: final
created: 2026-10-14
updated: 2026-10-14
---

# Fixture — shared item target partner

A committed test fixture, not a real work item. It shares the resolved item target
`9203-shared` with a depth-3 entity, so the guard reports a class (b) declared
conflict across levels.
Loading
Loading