adr: remove the legacy docs/adr/ layout, because its folder name lets a record skip every rule #639
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
sixfold-space/madtea#639
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
adr checkpicks its rules from the folder name. A repo withdocs/decisions/gets the MADR check: front matter, status, date, sections, the index, links, and decision issues. A repo withdocs/adr/gets three checks only: unique numbers, an index that matches the files, and links between records that resolve.So anyone can skip every MADR rule by writing records in
docs/adr/instead ofdocs/decisions/. A record there can hold any text and any status, andadr checkpasses it. With no tree at all, the error even offers that path: "runadr initto create docs/decisions/, or add a legacy docs/adr/ tree". In that layout,adr new --decision-issueswrites any text it gets.ADR 0034 kept the old layout for other repos. That keeps a way around the rules open in every repo that uses madtea.
Decision
The legacy
docs/adr/layout goes.adrrefuses adocs/adr/tree and says to move the records todocs/decisions/. A new decision record replaces the part of ADR 0034 that keeps the old layout, and the status of ADR 0034 points to it.Impact
The old layout shipped from v0.15.2 to v0.18.5. A repo that adopted
adrthen has adocs/adr/tree, andadrstops working there until the records move. The release notes must say so.Open question
Does madtea help a repo move its records (a migrate step), or does the refusal message only say to move them?
Acceptance criteria
adr check,adr new, andadr initrefuse adocs/adr/tree, with a message that says to move the records todocs/decisions/.docs/adr/.checkLegacy,newLegacy,renderTemplate, the legacy branch of the layout detection) and its tests are removed.docs/COMPARISON.mdno longer describe the legacy layout.Decided:
adrrefuses adocs/adr/tree and has no migrate command. The refusal names a help topic that lists the steps to move each record todocs/decisions/and rewrite it as MADR: the front matter, the required sections, and aDecision issues:list. An agent follows those steps, because each rewrite needs judgment that a fixed converter does not have.Decided and shipped in 0054-remove-the-legacy-docs-adr-layout. adr check, adr new, adr init, and adr rebuild now refuse a docs/adr tree and name the adr-legacy help topic for the steps to move each record into docs/decisions. No migrate command: the refusal lists the steps, because each rewrite needs judgment.