Skip to content

Commit 1277a70

Browse files
authored
📝 docs(adr): ADR consistency cleanup — numbering, nav, format, cross-refs (#422)
## Summary This PR collects four commits of ADR consistency cleanup on `main`: 1. **Resolve the duplicate ADR-121** — two Accepted ADRs both claimed number 121. Native-sync keeps 121 (earlier file, referenced externally by CLAUDE.md); the IAM policy-rename ADR is renumbered `121 → 124` (next free number after `123-local-secondary-indexes`). Structural collision fix only — no decision content changed, consistent with the ADR immutability rule. 2. **Normalize ADR-121 (native-sync) status header** — it used a `## Status` heading with the value on a separate line; normalized to the `**Status:**` / `**Date:**` inline format mandated by ADR-000 (Date `2026-02-02`, from the file's creation commit). 3. **Add ADRs 114-124 to the mkdocs navigation** — the nav previously stopped at ADR-113, leaving 114-124 unreachable from the docs site. Added thematic groups covering 114-124 and reflecting the corrected numbering. 4. **Resolve cross-ADR consistency issues** surfaced by `/adr consistency`: - **ADR-107**: annotate its partial supersession by ADR-117. Two Accepted ADRs asserted opposite IAM defaults (roles-by-default vs policies-by-default); flag it in the status line and add a Decision note pointing to ADR-117 (current default) and ADR-124 (policy rename) so the reversed default is unambiguous. - **ADR-100**: this Proposed index still presented superseded sub-decisions (102→118, 103→122) as authoritative and used the pre-composite `#LIMIT#` schema. Mark the superseded rows and show the current composite `#CONFIG` keys. - **ADR-013**: accept it. It was Proposed yet already superseded ADR-012 — an invalid state. Its decision is complete and already operationalized as `.claude/rules/docs-parity.md`, so finalize the status. This is the **main-branch half of a coordinated cleanup**. The other halves renumber ADRs on open PRs so the whole sequence is collision-free: - **#304**: `121 → 125` - **#393**: `123-129 → 126-132` (plus the same inherited `121 → 124` fix) Together these yield a collision-free ADR sequence **121-132**. ## Test plan - [ ] `ls docs/adr/12*.md` shows no duplicate ADR numbers - [ ] `grep -rn "121-policy-rename" docs/` returns no stale references - [ ] ADR-124 header reads `# ADR-124: Rename IAM Policies for Clarity` - [ ] ADR-121 header uses the `**Status:**` / `**Date:**` inline format - [ ] `mkdocs build` reaches ADRs 114-124 from the nav - [ ] ADR-107 status line notes the partial supersession by ADR-117 - [ ] ADR-100 marks the 102→118 / 103→122 superseded rows and shows `#CONFIG` keys - [ ] ADR-013 status reads Accepted 🤖 Generated with [Claude Code](https://claude.ai/code)
2 parents 6878b6d + 3054287 commit 1277a70

6 files changed

Lines changed: 34 additions & 13 deletions

docs/adr/013-module-documentation-parity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR-013: Bidirectional Source-Documentation Parity
22

3-
**Status:** Proposed
3+
**Status:** Accepted
44
**Date:** 2026-01-19
55
**Supersedes:** ADR-012
66

docs/adr/100-centralized-config.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
**Issue:** [#129](https://github.com/zeroae/zae-limiter/issues/129)
66
**Milestone:** v0.5.0
77

8+
> **Note (post-v0.5.0):** This is the original index for the centralized-config design. Two sub-decisions have since been superseded — the hierarchy expanded from three to four levels ([ADR-118](118-four-level-config-hierarchy.md) supersedes [ADR-102](102-config-hierarchy.md)) and limit resolution/caching moved to the Repository protocol ([ADR-122](122-resolve-limits-on-repository.md) supersedes [ADR-103](103-config-caching.md)). The original per-limit `#LIMIT#` config keys were replaced by composite `#CONFIG` items ([ADR-114](114-composite-bucket-items.md), [ADR-115](115-add-based-writes-lazy-refill.md)). See the updated access patterns below.
9+
810
## Context
911

1012
zae-limiter is a distributed rate limiting library where multiple clients must behave consistently. Currently:
@@ -21,8 +23,8 @@ Implement centralized configuration with these architectural choices:
2123
| Decision | ADR | Summary |
2224
|----------|-----|---------|
2325
| Schema format | [ADR-101](101-flat-schema-config.md) | Flat schema (no nested `data.M`) for atomic counters |
24-
| Config hierarchy | [ADR-102](102-config-hierarchy.md) | Three levels: System > Resource > Entity |
25-
| Caching strategy | [ADR-103](103-config-caching.md) | 60s TTL with negative caching |
26+
| Config hierarchy | [ADR-102](102-config-hierarchy.md) *(superseded by [ADR-118](118-four-level-config-hierarchy.md))* | Three levels: System > Resource > Entity — later expanded to four |
27+
| Caching strategy | [ADR-103](103-config-caching.md) *(superseded by [ADR-122](122-resolve-limits-on-repository.md))* | 60s TTL with negative caching; resolution later moved to the Repository protocol |
2628
| API behavior | [ADR-104](104-stored-limits-default.md) | Stored limits as default |
2729
| Read consistency | [ADR-105](105-eventual-consistency.md) | Eventually consistent reads |
2830

@@ -41,11 +43,13 @@ Implement centralized configuration with these architectural choices:
4143

4244
## Access Patterns Added
4345

44-
| Pattern | Query | Index |
45-
|---------|-------|-------|
46-
| Get system config | `PK=SYSTEM#, SK begins_with #LIMIT#` | Primary |
47-
| Get resource config | `PK=RESOURCE#{resource}, SK begins_with #LIMIT#` | Primary |
48-
| Get entity config | `PK=ENTITY#{id}, SK begins_with #LIMIT#` | Primary |
46+
> The original per-limit sort keys (`SK begins_with #LIMIT#`) were replaced by composite config items ([ADR-114](114-composite-bucket-items.md), [ADR-118](118-four-level-config-hierarchy.md)): a single `#CONFIG` item per level, namespace-prefixed with `{ns}/`. Both are shown below.
47+
48+
| Pattern | Query (v0.5.0, original) | Current |
49+
|---------|--------------------------|---------|
50+
| Get system config | `PK=SYSTEM#, SK begins_with #LIMIT#` | `PK={ns}/SYSTEM#, SK=#CONFIG` |
51+
| Get resource config | `PK=RESOURCE#{resource}, SK begins_with #LIMIT#` | `PK={ns}/RESOURCE#{resource}, SK=#CONFIG` |
52+
| Get entity config | `PK=ENTITY#{id}, SK begins_with #LIMIT#` | `PK={ns}/ENTITY#{id}, SK=#CONFIG#{resource}` |
4953

5054
## Implementation
5155

docs/adr/107-iam-roles-for-application-access.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ADR-107: IAM Roles for Application Access
22

3-
**Status:** Accepted
3+
**Status:** Accepted (IAM defaults partially superseded by [ADR-117](117-managed-policies-by-default.md))
44
**Date:** 2026-01-19
55
**Issue:** [#132](https://github.com/zeroae/zae-limiter/issues/132)
66

@@ -14,6 +14,8 @@ The CloudFormation stack currently only creates the Lambda execution role for th
1414

1515
The CloudFormation stack creates three optional IAM roles (AppRole, AdminRole, ReadOnlyRole) with least-privilege DynamoDB permissions, enabled by default and controlled via `--no-iam-roles` flag or `StackOptions.create_iam_roles=False`.
1616

17+
> **Partially superseded by [ADR-117](117-managed-policies-by-default.md):** managed *policies* are now created by default and IAM *roles* are opt-in (`create_iam_roles=True` / `--create-iam-roles`). The "enabled by default / `--no-iam-roles`" default above no longer reflects current behavior. The three-tier app/admin/read-only access model is retained; [ADR-124](124-policy-rename-clarity.md) later renamed the policies to AcquireOnly/FullAccess/ReadOnly.
18+
1719
## Consequences
1820

1921
**Positive:**

docs/adr/121-native-sync-unasync.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# ADR-121: Native Sync Implementation via Unasync Pattern
22

3-
## Status
4-
5-
Accepted
3+
**Status:** Accepted
4+
**Date:** 2026-02-02
65

76
## Context
87

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ADR-121: Rename IAM Policies for Clarity
1+
# ADR-124: Rename IAM Policies for Clarity
22

33
**Status:** Accepted
44
**Date:** 2026-02-02

mkdocs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,19 @@ nav:
170170
- ADR-111 Flatten All Records: adr/111-flatten-all-records.md
171171
- ADR-112 Cascade Per Entity: adr/112-cascade-per-entity.md
172172
- ADR-113 Lambda Packaging: adr/113-lambda-packaging.md
173+
- Composite Items (v0.8.0):
174+
- ADR-114 Composite Bucket Items: adr/114-composite-bucket-items.md
175+
- ADR-115 ADD-Based Writes: adr/115-add-based-writes-lazy-refill.md
176+
- IAM Resources (v0.9.0):
177+
- ADR-116 IAM Role Naming: adr/116-iam-role-naming.md
178+
- ADR-117 Managed Policies by Default: adr/117-managed-policies-by-default.md
179+
- ADR-124 Rename IAM Policies: adr/124-policy-rename-clarity.md
180+
- Config Hierarchy & TTL (v0.8.0+):
181+
- ADR-118 Four-Level Config Hierarchy: adr/118-four-level-config-hierarchy.md
182+
- ADR-119 Bucket TTL Strategy: adr/119-bucket-ttl-strategy.md
183+
- ADR-120 Bucket Param Sync: adr/120-bucket-param-sync.md
184+
- Sync & Repository (v0.9.0+):
185+
- ADR-121 Native Sync (Unasync): adr/121-native-sync-unasync.md
186+
- ADR-122 Resolve Limits on Repository: adr/122-resolve-limits-on-repository.md
187+
- Pre-1.0 Hardening (v0.10.0+):
188+
- ADR-123 Local Secondary Indexes: adr/123-local-secondary-indexes.md

0 commit comments

Comments
 (0)