Problem
derived_from_description is set as an AsciiDoc attribute by each artifact's
generated attributes fragment and is never unset. AsciiDoc attributes persist
for the rest of the document once defined, so every artifact rendered after
one that carries provenance inherits it.
Artifacts guard their provenance block with ifdef::derived_from_description[],
which is exactly the condition that stays true. The guard therefore fires for
artifacts that have no derived_from metadata at all, and prints someone
else's origin under their own Derived from heading.
Evidence
In the rendered build/architecture/index.html, under the Derived from
heading of two artifacts that declare no derived_from in their front matter:
| Artifact |
Renders |
QS-004-ai-suggestion-reviewability |
ADR-008's provenance text |
R-001-ai-suggestions-as-truth |
ADR-008's provenance text |
Both should render nothing. Neither has a derived_from key.
This is not new: on main the same two artifacts display ADR-007's provenance
instead, because ADR-007 was the last artifact with provenance rendered before
them. Adding an artifact with derived_from does not create the defect, it
changes which text leaks and where the leak starts.
Cause
scripts/validate-metamodel.rb writes :derived_from_description: into
generated/<anchor>-attributes.adoc for artifacts that have provenance, and
writes no counterpart for artifacts that do not. A fragment that does not set
the attribute also does not clear it.
Candidate fixes
- Have every artifact's attributes fragment unset the attribute when the
artifact has no provenance (:!derived_from_description:), so each fragment
leaves the document in a known state rather than depending on what ran before
it. This is the smallest change and makes the fragments self-contained.
- Or scope the provenance rendering so it cannot depend on document order at
all.
Prefer whichever keeps the fragments independent of their include position;
order-dependence is what made this invisible for so long.
Behaviour specification
features/documentation-generation.feature specifies that metadata is exposed
as attributes; it does not specify that a fragment clears what it does not set.
That is the gap. bdd-specification applies: add a scenario for an artifact
without provenance rendered after one with provenance, asserting that no
Derived from text appears, and bridge it into the existing tests.
Acceptance criteria
Origin
Found on 2026-09-04 by an independent Convergence Check on #88, and confirmed
in the rendered output for both branch and main.
Problem
derived_from_descriptionis set as an AsciiDoc attribute by each artifact'sgenerated attributes fragment and is never unset. AsciiDoc attributes persist
for the rest of the document once defined, so every artifact rendered after
one that carries provenance inherits it.
Artifacts guard their provenance block with
ifdef::derived_from_description[],which is exactly the condition that stays true. The guard therefore fires for
artifacts that have no
derived_frommetadata at all, and prints someoneelse's origin under their own
Derived fromheading.Evidence
In the rendered
build/architecture/index.html, under theDerived fromheading of two artifacts that declare no
derived_fromin their front matter:QS-004-ai-suggestion-reviewabilityR-001-ai-suggestions-as-truthBoth should render nothing. Neither has a
derived_fromkey.This is not new: on
mainthe same two artifacts display ADR-007's provenanceinstead, because ADR-007 was the last artifact with provenance rendered before
them. Adding an artifact with
derived_fromdoes not create the defect, itchanges which text leaks and where the leak starts.
Cause
scripts/validate-metamodel.rbwrites:derived_from_description:intogenerated/<anchor>-attributes.adocfor artifacts that have provenance, andwrites no counterpart for artifacts that do not. A fragment that does not set
the attribute also does not clear it.
Candidate fixes
artifact has no provenance (
:!derived_from_description:), so each fragmentleaves the document in a known state rather than depending on what ran before
it. This is the smallest change and makes the fragments self-contained.
all.
Prefer whichever keeps the fragments independent of their include position;
order-dependence is what made this invisible for so long.
Behaviour specification
features/documentation-generation.featurespecifies that metadata is exposedas attributes; it does not specify that a fragment clears what it does not set.
That is the gap.
bdd-specificationapplies: add a scenario for an artifactwithout provenance rendered after one with provenance, asserting that no
Derived fromtext appears, and bridge it into the existing tests.Acceptance criteria
derived_fromrenders no provenance, whateverprecedes it in the assembled document.
derived_fromstill renders its own.QS-004andR-001render noDerived fromtext in the built HTML.Origin
Found on 2026-09-04 by an independent Convergence Check on #88, and confirmed
in the rendered output for both branch and
main.