ci: guard against duplicate ADR ids in docs/adr/

Open Beginner friendly
#85 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
bash

Research direction

Inspect the existing CI workflow and the ADR filenames under docs/adr/ first. Run the proposed duplicate-ID check against a clean tree, then verify that a temporary second file using an existing D-NNN or ADR-NNN id fails with the clear duplicate message. Done means clean trees pass and PRs introducing duplicate ids fail CI.

Written by the indexing model from the issue text.

Description

ci documentation enhancement verified

Context

ADR ids collided in practice: D-020 was used by both docs/adr/D-020-f5-design-system-token-discipline.md and (formerly) the SSH BNK-layer ADR — undetected until manual review during the #204 push prep. docs/adr/README.md states "Sequential, never reused" but nothing enforces it. Root cause: a sequential counter needs a central allocator, but branches are decentralized, so two branches independently grab the same next number.

Ask

Add a CI check (extend an existing workflow, or a tiny new job) that fails any PR introducing a duplicate ADR id under docs/adr/.

Minimal implementation:

dupes=$(ls docs/adr | grep -oE '^(D-[0-9]+|ADR-[0-9]+)' | sort | uniq -d)
[ -n "$dupes" ] && { echo "Duplicate ADR ids: $dupes"; exit 1; } || echo "ADR ids unique"

Acceptance

  • A PR adding a second ADR file with an already-used id fails CI with a clear message.
  • A clean tree passes.

Related

  • Epic #204 (SSH BNK-layer ADR renumbered D-020ADR-204).
  • Companion doc issue: adopt issue-number ADR ids + refresh docs/adr/README.md.

Migrated from sp-prod-field/bnk-forge #417 (opened 2026-07-17; original labels: enhancement, ready-for-agent). That repository is archived and read-only.
Bare #NNN references in the text above refer to issues and PRs in the original repository, not to numbering here.

Dominant language
Python
Stars
1
Forks
1
Avg merge
19h 7m
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from f5devcentral/bnk-forge

All issues in f5devcentral/bnk-forge

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.