Skip to content

fix(tests): point the mdm @e2e anchors at their canonical specs - #3573

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/e2e-anchors-to-canonical-mdm-specs
Sep 10, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
fix/e2e-anchors-to-canonical-mdm-specs

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Follow-up to #3569, which repaired fifteen citation targets and deliberately left these behind.

What changed

Twenty-eight @e2e anchors under tests/e2e/spec-coverage/ named a change directory instead of the capability's canonical spec. Each one keeps its fragment; the path prefix is the only thing rewritten.

Change directory named Anchors Now points at
openspec/changes/mdm-frontend/specs/mdm-frontend/ 13 openspec/specs/mdm-frontend/spec.md
openspec/changes/mdm-merge-ui/specs/mdm-merge-ui/ 9 openspec/specs/mdm-merge-ui/spec.md
openspec/changes/mdm-survivorship-override/specs/mdm-conflict-resolution-ui/ 5 openspec/specs/mdm-conflict-resolution-ui/spec.md
openspec/changes/mdm-survivorship-override/specs/mdm-survivorship/ 1 openspec/specs/mdm-survivorship/spec.md

All three changes were archived on 2026-07-03, so every one of these paths has already moved once. A spec path is stable; a change path moves on archive, and that move is what broke the fifteen anchors #3569 repaired.

Why they resolved anyway

Gate-46's capability index spans all three homes of a spec — in flight, archived, canonical — so these twenty-eight were never reported as dangling. The index rescues the reference without making it honest about where the requirement lives. Repointing is what removes the dependency on that rescue.

No anchor points at a whole file

Every rewritten line keeps its #scenario-... fragment, and each fragment was confirmed against a real heading in the canonical spec. An anchor naming a bare spec.md resolves and says nothing about which requirement the test covers, which is the shape this work exists to remove.

Three anchors deliberately left

Three anchors in mdm-frontend.spec.ts (lines 164, 192, 193) still name openspec/changes/mdm-views-route-scoping-e2e/. That change is live, not archived, and there is no openspec/specs/mdm-views-route-scoping/spec.md.

Repointing them there would still pass the gate — the capability index would resolve the canonical-looking path back to the live change directory — producing an anchor that names a file which does not exist and reads as though it does. They move when that change is archived and its spec is promoted.

Measurement

Run with the gate's own resolver, scripts/lib/check_spec_anchors.py from ConductionNL/.github@main (freshly cloned, not a vendored copy), over gate-46's full file scope:

files in scope: 3713
total findings: 0
@spec findings: 0
@e2e  findings: 0

Across 9,948 @spec and 163 @e2e openspec/ tags.

The resolver was mutation-checked before the zero was trusted: an invented capability (openspec/specs/totally-imaginary/spec.md#nope) and an invented fragment (openspec/specs/mdm-frontend/spec.md#REQ-999-invented) were both reported. A checker that watched nothing exits the same way as one that watched and found everything clean, so the zero is a measurement rather than an empty run.

Follow-up, not in this PR

HYDRA_GATE_SPEC_ANCHOR_E2E_BLOCKING=1 is the opt-in gate-46 invites once a repo's @e2e count reaches zero. It is filed separately because there is currently no way for a repo to set it: quality.yml has no input for it and the gate step's env: block is fixed, so the opt-in needs a shared-workflow change first. Keeping it out of this PR also keeps the repoints revertable on their own.

🤖 Generated with Claude Code

Twenty-eight `@e2e` anchors in tests/e2e/spec-coverage/ named a change
directory rather than the capability's canonical spec. All three changes
they named — mdm-frontend, mdm-merge-ui, mdm-survivorship-override — were
archived on 2026-07-03, so each path has already moved once.

An anchor belongs at `openspec/specs/<capability>/spec.md#<scenario>`. A
spec path is stable; a change path moves on archive, and that move is what
broke the fifteen anchors repaired earlier today. These twenty-eight still
resolve only because gate-46's capability index spans all three homes of a
spec — in flight, archived, canonical — which rescues the reference without
making it honest about where the requirement lives.

Every anchor keeps its fragment. The prefix is the only thing rewritten, so
each line still names the requirement or scenario the test exists for rather
than pointing at a whole file, which resolves while saying nothing.

Verified with the gate's own resolver, scripts/lib/check_spec_anchors.py at
.github@main, over gate-46's full scope of 3,713 files: 0 unresolved
findings across 9,948 @SPEC and 163 @e2e tags. The resolver was
mutation-checked first — an invented capability and an invented fragment
both reported — so the zero is a measurement, not an empty run.

Three anchors are deliberately left naming a change directory. They point
into `mdm-views-route-scoping-e2e`, which is still live and has no spec at
`openspec/specs/mdm-views-route-scoping/spec.md`. Repointing them there
would still pass the gate, because the capability index would resolve it
back to the live change — an anchor naming a file that does not exist and
reading as though it does. They move when that change is archived and its
spec is promoted.
@rubenvdlinde
rubenvdlinde merged commit 3988362 into development Sep 10, 2026
44 of 45 checks passed
rubenvdlinde added a commit that referenced this pull request Sep 10, 2026
* fix(tests): point the mdm @e2e anchors at their canonical specs

Twenty-eight `@e2e` anchors in tests/e2e/spec-coverage/ named a change
directory rather than the capability's canonical spec. All three changes
they named — mdm-frontend, mdm-merge-ui, mdm-survivorship-override — were
archived on 2026-07-03, so each path has already moved once.

An anchor belongs at `openspec/specs/<capability>/spec.md#<scenario>`. A
spec path is stable; a change path moves on archive, and that move is what
broke the fifteen anchors repaired earlier today. These twenty-eight still
resolve only because gate-46's capability index spans all three homes of a
spec — in flight, archived, canonical — which rescues the reference without
making it honest about where the requirement lives.

Every anchor keeps its fragment. The prefix is the only thing rewritten, so
each line still names the requirement or scenario the test exists for rather
than pointing at a whole file, which resolves while saying nothing.

Verified with the gate's own resolver, scripts/lib/check_spec_anchors.py at
.github@main, over gate-46's full scope of 3,713 files: 0 unresolved
findings across 9,948 @SPEC and 163 @e2e tags. The resolver was
mutation-checked first — an invented capability and an invented fragment
both reported — so the zero is a measurement, not an empty run.

Three anchors are deliberately left naming a change directory. They point
into `mdm-views-route-scoping-e2e`, which is still live and has no spec at
`openspec/specs/mdm-views-route-scoping/spec.md`. Repointing them there
would still pass the gate, because the capability index would resolve it
back to the live change — an anchor naming a file that does not exist and
reading as though it does. They move when that change is archived and its
spec is promoted.

* chore(ci): block on unresolved @e2e anchors in gate-46

Gate-46 resolves `@spec` and `@e2e` by identical rules but blocks only on
`@spec`; the `@e2e` half is report-only until a repo opts in. This is that
opt-in, and it is set only because the count reached zero first.

Measured with the gate's own resolver — scripts/lib/check_spec_anchors.py
from ConductionNL/.github@main, not a vendored copy and not a
reimplementation — over gate-46's full scope of 3,713 files, after #3573
repointed the last 28 change-directory anchors:

    total findings: 0
    @SPEC findings: 0
    @e2e  findings: 0

across 9,948 @SPEC and 163 @e2e openspec tags. The resolver was
mutation-checked before the zero was believed: an invented capability and an
invented fragment were both reported.

One line, its own commit, so it can be reverted without touching the
repoints it depends on.

REQUIRES ConductionNL/.github#741, which adds the input. Callers resolve
quality.yml@main and an input main does not declare is a workflow error, so
this cannot merge first.

---------

Co-authored-by: Conduction Release Bot <release-bot@conduction.nl>
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ ebb483b

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
test-l10n ✅
test-l10n-parity ✅
format ✅
check-schema-l10n ✅
check-l10n-js ✅
composer ✅ ✅ 174/174
npm ✅ ✅ 551/551
app:check-code ⏭️
info.xml ✅
REUSE ❌
PHPUnit ❌
Newman ✅
Playwright ✅
Hydra gates ✅

Quality workflow — 2026-09-10 10:48 UTC

Download the full PDF report from the workflow artifacts.

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.

1 participant