Skip to content

Commit f775727

Browse files
nanotaboadaclaude
andcommitted
docs(adr): apply targeted fixes from PR #535 review
- ADR-0003: clarify UUID v5 values are pre-computed constants in seed scripts, not derived at runtime from squad number - ADR-0005: replace "all domain fields are required" with accurate breakdown — 4 required fields, 6 optional - ADR-0007: rephrase hardcoded file paths to generic structure description - template.md: add explicit Alternatives Considered section Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 180587c commit f775727

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

docs/adr/0003-uuid-surrogate-primary-key.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ across environments so that tests can reference them by ID.
2828
UUID v4 (random) cannot satisfy this: regenerating the seed would
2929
produce different IDs each time. UUID v5 (deterministic, derived from
3030
a namespace and a name) produces the same UUID for the same input,
31-
making seeded records reproducible.
31+
making seeded records reproducible. The project stores pre-computed
32+
UUID v5 constants directly in the seed scripts rather than deriving
33+
them at runtime from the squad number.
3234

3335
## Decision
3436

3537
We will use a UUID surrogate primary key stored as a hyphenated string
3638
(`HyphenatedUUID` custom SQLAlchemy type). API-created records receive
3739
a UUID v4 (random); migration-seeded records receive a UUID v5
38-
(deterministic, derived from the player's squad number).
40+
(deterministic, pre-computed and stored as constants in the seed
41+
scripts).
3942

4043
The v4/v5 split preserves the benefits of each approach in its context:
4144
randomness for API-created records (opaque, non-predictable), and

docs/adr/0005-full-replace-put-no-patch.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ design (all fields required vs optional), the service layer logic
2323
(overwrite all vs merge), and the client contract (must send all fields
2424
vs only changed fields).
2525

26-
The current implementation uses a single `PlayerRequestModel` where all
27-
domain fields are required. The service's
28-
`update_by_squad_number_async` overwrites every field on the existing
29-
record using the request body values.
26+
The current implementation uses a single `PlayerRequestModel` shared by
27+
both POST and PUT. Four fields are required (`first_name`, `last_name`,
28+
`squad_number`, `position`); the remaining six are optional (`middle_name`,
29+
`date_of_birth`, `abbr_position`, `team`, `league`, `starting11`). The
30+
service's `update_by_squad_number_async` overwrites every field on the
31+
existing record using the request body values.
3032

3133
## Decision
3234

docs/adr/0007-integration-only-test-strategy.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ synchronous integration tests that exercise the full stack — routing,
2828
dependency injection, service logic, ORM queries, and the database —
2929
without a running server process.
3030

31-
All tests live in `tests/test_main.py`, use stubs from
32-
`tests/player_stub.py` for consistent test data, and rely on a
33-
`function`-scoped `client` fixture from `conftest.py` for per-test
34-
isolation.
31+
All tests live in a single test module under `tests/`, use a stubs
32+
module for consistent test data, and rely on a `function`-scoped
33+
`client` fixture in `conftest.py` for per-test isolation.
3534

3635
## Decision
3736

docs/adr/template.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@ Date: YYYY-MM-DD
1010

1111
<!--
1212
State facts, not conclusions. Describe the problem or situation that
13-
required a decision. List the alternatives that were evaluated.
14-
Include language- or framework-specific constraints that shaped the
15-
decision. Do not argue for the chosen option here.
13+
required a decision. Include language- or framework-specific
14+
constraints that shaped the decision. Do not argue for the chosen
15+
option here.
16+
-->
17+
18+
## Alternatives Considered
19+
20+
<!--
21+
List each option that was evaluated. One or two sentences per option
22+
is enough — enough to show it was genuinely considered and why it was
23+
set aside.
1624
-->
1725

1826
## Decision

0 commit comments

Comments
 (0)