Skip to content

`adr-emitter` kebab-cases the verb segment; three existing ADRs renamed

Date: 2026-08-06 Status: closed Supersedes: none Superseded-by: none — current Resolves: docs/findings/20260804-1530-adr-emitter-writes-mr4-invalid-decision-filenames.md

petrova doctor --self-check + canary repo has been red on main for some time. cli/tests/validate.test.ts:68-71 asserts that petrova-codes’ own decision filenames satisfy MR-4; three did not.

The finding established the root cause: two halves of this CLI disagreed about whether _ is legal in a decision slug, and the half that writes files was the one out of step. adr-emitter.ts interpolated the raw verb name — verbs carry underscores by convention (petrova_act_registry_edit) — while DECISION_FILENAME_RE in validate.ts admits [a-z0-9-] only. Every petrova_act_* ADR the tool emitted was a file the same tool then graded as an error, and the count grew by one per act. The duplicated regexes in repo-walker.ts:5 and remote-walker.ts:35 skipped those ADRs silently — the quieter half of the same disagreement.

The finding deliberately took no position on which side should move, noting each option has a different blast radius. This doc records the choice.

Forward: adrPath kebab-cases the verb segment before interpolating. Filenames stay self-describing, no two acts on one slug can collide on a date, and both emitters now produce MR-4-legal names. decision-doc.ts (the open_decision builder) keeps its own shape — the two remain different in layout, but both are now legal, which is the property that matters.

Existing: the three offending files are renamed rather than grandfathered, so MR-4 holds with no permanent exception list. petrova-codes grading consumers on a rule it exempts itself from is the MR-9 shape the finding names.

Old pathNew path
docs/decisions/2026-07-29-petrova_act_register_consumer-arno-host.mddocs/decisions/2026-07-29-petrova-act-register-consumer-arno-host.md
docs/decisions/2026-08-03-petrova_act_registry_edit-mary-wiki.mddocs/decisions/2026-08-03-petrova-act-registry-edit-mary-wiki.md
docs/decisions/2026-08-04-petrova_act_registry_edit-mary-wiki.mddocs/decisions/2026-08-04-petrova-act-registry-edit-mary-wiki.md

Renames only. No file contents were editedMR-7 makes these docs append-only, and the rename is recorded here rather than applied silently.

Grepped across petrova-codes and every sibling *-hq working tree:

  • docs/decisions/2026-08-01-promote-arno-host-experimental.md:13 cites the old 2026-07-29-petrova_act_register_consumer-arno-host.md path. That doc is Status: ratified and therefore append-only. Left untouched — the mapping table above is how that reference resolves. Editing a ratified doc to chase a rename is exactly the silent edit MR-7 forbids.
  • docs/findings/20260804-1530-...md quotes the old paths inside captured CLI output. Left untouched — it is a verbatim record of what the tool printed on 2026-08-04, and rewriting quoted evidence would falsify the finding.
  • arno-host/docs/petrova/onboard-handoff.md matches on the verb name petrova_act_register_consumer, not on any filename. Unaffected: verb names keep their underscores everywhere except inside an ADR path.

registry.yaml records none of the three paths.

  • doctor --self-check goes green, so it can once again distinguish a new regression from the standing one. The finding notes this cost real time on #207, whose unrelated red check had to be bisected against main by hand.
  • cli/tests/adr-emitter.test.ts asserted the old, MR-4-invalid path as expected output — the test encoded the bug. Updated, and joined by a test that checks emitted basenames against the MR-4 pattern itself for every underscore-carrying verb, so the emitter and the grader cannot drift apart again without a red test.
  • The three duplicated regexes in validate.ts, repo-walker.ts and remote-walker.ts are left as-is. They now agree on every path the emitter produces, but they remain three copies of one rule — a consolidation worth doing separately, on its own evidence.
  • Anyone holding a link to an old path gets a 404 and resolves it via the table above. Judged acceptable: all three are internal ADRs, days old, with exactly one internal inbound reference between them.
  • Subagent: state-sweep rectification (this session)
  • Human: alex@devarno.com — 2026-08-06