Skip to content

docs(adr): implement Architecture Decision Records (#299)#338

Merged
nanotaboada merged 4 commits into
masterfrom
docs/299-architecture-decision-records
Jun 8, 2026
Merged

docs(adr): implement Architecture Decision Records (#299)#338
nanotaboada merged 4 commits into
masterfrom
docs/299-architecture-decision-records

Conversation

@nanotaboada

@nanotaboada nanotaboada commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Creates docs/adr/ with template.md and README.md index linking all 12 ADRs
  • Writes 12 ADR documents (ADR-0001 through ADR-0012) in Michael Nygard format, all with status Accepted
  • Updates README.md with a new ## Architecture Decisions section after ## Architecture
  • Updates .github/copilot-instructions.md with an ## Additional Resources section referencing ADRs
  • Updates CHANGELOG.md [Unreleased] with the Added entry

Note on statuses vs. issue spec: ADR-0009 and ADR-0012 are both Accepted (not Proposed) per CodeRabbit's analysis — UUID/squadNumber shipped in v2.0.0-barcelona and Flyway shipped in v2.0.1-chelsea. ADR-0012 is titled "Adopt Flyway for Database Migrations" to reflect the actual decision made.

Test plan

  • docs/adr/ directory exists with 14 files (template, README, 12 ADRs)
  • All 12 ADRs follow Michael Nygard format (Title, Date, Status, Context, Decision, Consequences)
  • All ADRs have status Accepted
  • README.md renders the ## Architecture Decisions section with table and link
  • .github/copilot-instructions.md includes ## Additional Resources section
  • CHANGELOG.md [Unreleased] ### Added entry present

Closes #299

🤖 Generated with Claude Code


This change is Reviewable

Summary by CodeRabbit

  • Documentation
    • Added 12 Architecture Decision Records capturing choices on frameworks, architecture, caching, persistence, deployment, API docs, versioning, testing, migrations, and related trade-offs.
    • Introduced an ADR index and template plus guidance for creating future ADRs.
    • Updated README, changelog, and contributor guidance with links to the ADRs and an “Additional Resources” section.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@nanotaboada, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 2 minutes and 4 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4d1f3dfe-eb81-4704-9f66-cf213dca726f

📥 Commits

Reviewing files that changed from the base of the PR and between b528b8b and daafc31.

📒 Files selected for processing (2)
  • docs/adr/0009-uuid-surrogate-squad-number-natural-key.md
  • docs/adr/template.md

Walkthrough

Adds 12 Architecture Decision Records (docs/adr/0001–0012), an ADR README and template, and integrates ADR references into README, CHANGELOG, and .github/copilot-instructions.md.

Changes

Architecture Decision Records (ADRs) Documentation

Layer / File(s) Summary
ADR infrastructure and index
docs/adr/README.md, docs/adr/template.md
Added ADR index README listing ADR-0001 through ADR-0012 and a reusable ADR template.
Framework and library architectural decisions
docs/adr/0001-adopt-spring-boot.md, docs/adr/0002-spring-data-jpa-sqlite.md, docs/adr/0003-spring-cache-memory.md, docs/adr/0004-layered-architecture.md, docs/adr/0005-lombok-boilerplate-reduction.md, docs/adr/0006-springdoc-openapi.md, docs/adr/0007-docker-single-container.md, docs/adr/0008-stadium-themed-versioning.md
Added ADRs documenting choices for REST framework, persistence, caching, layered architecture, Lombok, OpenAPI, Docker deployment, and release tagging convention.
Domain model and API implementation decisions
docs/adr/0009-uuid-surrogate-squad-number-natural-key.md, docs/adr/0010-full-replace-put-no-patch.md, docs/adr/0011-mixed-test-strategy.md, docs/adr/0012-adopt-flyway-migrations.md
Added ADRs for UUID vs. squadNumber keying, PUT-as-full-replace semantics, mixed testing strategy, and Flyway migrations details.
Project documentation integration
README.md, CHANGELOG.md, .github/copilot-instructions.md
Updated README with "Architecture Decisions" section and ADR table, added CHANGELOG entry for 12 ADRs, and extended Copilot instructions "Additional Resources" to reference ADRs and the template.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Create ADR directory with README.md and template.md [#299]
Add ADR files 0001–0008 and 0010–0011 as "Accepted" [#299]
Mark ADR-0009 and ADR-0012 as "Proposed" initially and update when issues #268 and #130 are implemented [#299] docs/adr/README.md lists all ADRs as "Accepted" instead of marking 0009 and 0012 "Proposed".
Update README, CHANGELOG, and copilot-instructions to reference ADRs [#299]

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
ADR-0009 and ADR-0012 marked as "Accepted" (docs/adr/README.md, lines 1-28) Objective #299 required ADR-0009 and ADR-0012 to be initially "Proposed" until issues #268 and #130 are implemented; current README shows them as "Accepted".

Possibly related issues

  • #130 — Flyway migration proposal related to ADR-0012; same migration directory and startup behavior described.
  • #268 — Player keying and endpoints related to ADR-0009 (UUID vs squadNumber) and referenced in ADR text.
  • #80 — Related to adopting SQLite/JPA (ADR-0002) and datasource/testing choices.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with 'docs:' prefix, is descriptive and specific about implementing Architecture Decision Records, and is 57 characters—well under the 80-character limit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #299

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/299-architecture-decision-records
  • 🛠️ sync documentation
  • 🛠️ enforce http error handling
  • 🛠️ idiomatic review
  • 🛠️ verify api contract

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2eeff98) to head (daafc31).

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #338   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        32        32           
===========================================
  Files              3         3           
  Lines             90        90           
  Branches           8         8           
===========================================
  Hits              90        90           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
docs/adr/template.md (1)

1-1: 💤 Low value

Consider documenting the file naming convention.

While the template is fully usable, it doesn't explicitly document the file naming convention (NNNN-kebab-case-title.md) shown in the index. Adding a comment at the top could help future contributors name their ADR files consistently.

📝 Optional addition
+<!-- File naming: NNNN-kebab-case-title.md (e.g., 0013-adopt-redis-caching.md) -->
 # ADR-NNNN: {Title}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/template.md` at line 1, Add a short explanatory comment to the ADR
template (file with header "# ADR-NNNN: {Title}") that documents the required
file naming convention (e.g., "NNNN-kebab-case-title.md") and any numbering
rules; update the top of template.md to include one or two sentences describing
the filename format and where to find the index so contributors consistently
name new ADR files.
docs/adr/0009-uuid-surrogate-squad-number-natural-key.md (1)

19-24: 💤 Low value

Clarify surrogate vs. natural key terminology.

The consequences section describes UUID as a "surrogate key" (line 20), but in JPA/database terms, the @Id field is the primary key, not a surrogate. The current implementation uses UUID as the primary key and squadNumber as a unique natural routing identifier. Consider aligning the terminology:

  • Primary key: The @Id field used by JPA/Hibernate for entity identity (UUID in actual code)
  • Surrogate key: A meaningless generated identifier (could describe UUID's role)
  • Natural key: A domain-meaningful identifier (squadNumber)
  • Routing key: The identifier exposed in REST URLs (squadNumber)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/0009-uuid-surrogate-squad-number-natural-key.md` around lines 19 -
24, Update the ADR language to consistently distinguish primary key, surrogate,
natural and routing identifiers: state that the UUID field annotated with `@Id` is
the entity primary key (and functions as a generated surrogate identifier), that
squadNumber is a domain-meaningful natural key annotated with `@Column`(unique =
true) and is used as the routing key in REST URLs (e.g. GET
/players/{squadNumber}), and clarify that GET /players/{id} refers to the UUID
primary key used for internal traceability and integrations; replace ambiguous
uses of "surrogate key" with the precise terms "primary key" (for the `@Id` UUID),
"surrogate" (describing the UUID's generated nature), "natural key"
(squadNumber), and "routing key" (squadNumber).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/adr/0008-stadium-themed-versioning.md`:
- Line 1: The ADR title "ADR-0008: Use Stadium-Themed Versioning" mismatches the
body which uses football club names (e.g., v2.0.0-barcelona, v2.0.1-chelsea);
update the ADR title to "ADR-0008: Club-Themed Versioning" or
"Football-Club-Themed Versioning" to match the content, or alternatively edit
the decision/consequences sections to clearly state stadium names will be used
and replace club examples with stadium examples (e.g., Camp Nou) so the document
consistently uses either club or stadium naming; ensure the header string
"ADR-0008: Use Stadium-Themed Versioning" and all example tags
(v2.0.0-barcelona, v2.0.1-chelsea) are updated accordingly.

In `@docs/adr/0009-uuid-surrogate-squad-number-natural-key.md`:
- Around line 11-15: The ADR text contradicts the current Player implementation:
update the ADR to match code or mark it as unimplemented; specifically either
(A) revise the decision/summary to state that in Player.java the field "UUID id"
remains annotated with `@Id` and is the database primary key while "Integer
squadNumber" is only `@Column`(unique=true) and used as the REST natural route
key, or (B) change ADR status to "Proposed" and remove the "Implemented in
v2.0.0-barcelona" claim so it reflects an intended but not applied change;
reference the symbols "UUID id", "squadNumber", and the `@Id/`@Column(unique=true)
annotations when editing the ADR text.

In `@docs/adr/0011-mixed-test-strategy.md`:
- Line 19: Update the sentence in ADR-0011 that says "Schema is applied via
`ddl.sql` and seed data via `dml.sql`" to reflect that the in-memory SQLite test
database uses Flyway migrations (as documented in ADR-0012) instead of manual
ddl/dml files; locate the text in the 0011-mixed-test-strategy.md content and
replace or rephrase it to mention running Flyway migrations for schema (and keep
note of seed data behavior if still applied separately).

---

Nitpick comments:
In `@docs/adr/0009-uuid-surrogate-squad-number-natural-key.md`:
- Around line 19-24: Update the ADR language to consistently distinguish primary
key, surrogate, natural and routing identifiers: state that the UUID field
annotated with `@Id` is the entity primary key (and functions as a generated
surrogate identifier), that squadNumber is a domain-meaningful natural key
annotated with `@Column`(unique = true) and is used as the routing key in REST
URLs (e.g. GET /players/{squadNumber}), and clarify that GET /players/{id}
refers to the UUID primary key used for internal traceability and integrations;
replace ambiguous uses of "surrogate key" with the precise terms "primary key"
(for the `@Id` UUID), "surrogate" (describing the UUID's generated nature),
"natural key" (squadNumber), and "routing key" (squadNumber).

In `@docs/adr/template.md`:
- Line 1: Add a short explanatory comment to the ADR template (file with header
"# ADR-NNNN: {Title}") that documents the required file naming convention (e.g.,
"NNNN-kebab-case-title.md") and any numbering rules; update the top of
template.md to include one or two sentences describing the filename format and
where to find the index so contributors consistently name new ADR files.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ef022c7d-26f4-4e03-b256-c30af74e198a

📥 Commits

Reviewing files that changed from the base of the PR and between 2eeff98 and 6c2878d.

📒 Files selected for processing (17)
  • .github/copilot-instructions.md
  • CHANGELOG.md
  • README.md
  • docs/adr/0001-adopt-spring-boot.md
  • docs/adr/0002-spring-data-jpa-sqlite.md
  • docs/adr/0003-spring-cache-memory.md
  • docs/adr/0004-layered-architecture.md
  • docs/adr/0005-lombok-boilerplate-reduction.md
  • docs/adr/0006-springdoc-openapi.md
  • docs/adr/0007-docker-single-container.md
  • docs/adr/0008-stadium-themed-versioning.md
  • docs/adr/0009-uuid-surrogate-squad-number-natural-key.md
  • docs/adr/0010-full-replace-put-no-patch.md
  • docs/adr/0011-mixed-test-strategy.md
  • docs/adr/0012-adopt-flyway-migrations.md
  • docs/adr/README.md
  • docs/adr/template.md

Comment thread docs/adr/0008-stadium-themed-versioning.md Outdated
Comment thread docs/adr/0009-uuid-surrogate-squad-number-natural-key.md Outdated
Comment thread docs/adr/0011-mixed-test-strategy.md
nanotaboada and others added 3 commits June 8, 2026 10:49
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@nanotaboada nanotaboada merged commit 6a6c841 into master Jun 8, 2026
12 checks passed
@nanotaboada nanotaboada deleted the docs/299-architecture-decision-records branch June 8, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Architecture Decision Records (ADRs)

1 participant