Repository navigation
Commit 9df097d
fix(decisions): PR #5 review — Vogen API + RFC citations + route prefix + partition shape
Addresses two review-agent passes on PR #5. Each finding was verified against
current code / upstream docs / corpus before fixing; the trivial-prose Minors
(steel-man overlap, in-place edits to Accepted ADRs' Drivers vs dated
Amendments) were left alone with explicit reasoning.
Blockers / Majors fixed:
- ADR-0023 Vogen API claims. Verified against
https://github.com/SteveDunn/Vogen/blob/main/src/Vogen.SharedTypes/Conversions.cs:
`Conversions.AspNetCoreRouteParameter` and `Conversions.SwaggerSchemaFilter`
are fabricated names. Real members used: `EfCoreValueConverter`,
`SystemTextJson`, `TypeConverter` (TypeConverter is what carries ASP.NET
Core route binding). OpenAPI schema mapping is wired separately via either
assembly-level `[VogenDefaults(openApiSchemaCustomizations: ...)]` or a
custom `IOpenApiSchemaTransformer` in `LearnStack.Api` (Packet 4 picks
one). EF registration is explicit, not convention-scanned —
`LearnStack.SharedKernel.Infrastructure.ModelConfigurationBuilder.RegisterVogenIds(Assembly[])`
helper reflects Domain assemblies and calls `.HaveConversion<...>()`.
Acknowledged `Vogen.SharedTypes.dll` runtime dependency (~10KB, MIT).
PrivateAssets="all" must be per-project: SharedKernel for cross-cutting VOs
+ each `LearnStack.Modules.<X>.Domain` for aggregate IDs; centralised via
`Directory.Build.props` under `backend/src/Modules/`.
- ADR-0024 route prefix `/v1/*` → `/api/v{N}/*` end-to-end. Verified against
`infra/apisix/apisix.yaml` (routes `/api/v*/**`) and
`docs/architecture/30-api-gateway.md` (uses `/api/v*/**`). Fixed Decision,
Lifecycle, Per-deployment-mode, OpenAPI examples, Punted-on, Drivers (the
"first endpoint already ships" claim was factually wrong — the scaffold
exposes `/healthz` unversioned, not `/v1/healthz`).
- ADR-0024 Deprecation header citation. Verified RFC 9745 (March 2025,
"The Deprecation HTTP Response Header Field") supersedes
`draft-ietf-httpapi-deprecation-header`. Replaced all three citation sites
(Drivers, Lifecycle, References). Format `@<unix-timestamp>` is correct
per RFC 9745 § 2 (sf-date per RFC 9651 § 3.3.7).
- ADR-0024 Sunset HTTP-date citation. RFC 9651 is Structured Field Values
(sf-date, used by Deprecation), NOT HTTP-date. Sunset uses HTTP-date per
RFC 9110 § 5.6.7 (was RFC 7231 § 7.1.1.1). Fixed example placeholder +
References block.
- ADR-0024 Problem Details example host. Was `learnstack.dev/problems/...`;
Standards 04 § Errors uses `errors.learnstack.dev/...`. Aligned to the
Standards 04 convention.
- ADR-0024 closed-set enum rule. Was only in prose below the matrix;
promoted to a matrix row (Breaking: "Adding a value to a closed-set enum
(default)"). Open-set rule stays on the non-breaking side with the
`x-extensible-enum: true` hint.
- ADR-0028 partition shape. Verified ADR-0016 + architecture/31 use
`PARTITION BY RANGE (timestamp)`. My LIST claim was inconsistent; fixed
to RANGE(timestamp) and noted this ADR owns *lifecycle*, not table layout
(which stays under ADR-0016). Column-name occurrences `occurred_at` →
`timestamp` to match the authoritative ADR. (Standards 18 still uses
`occurred_at` — a pre-existing corpus inconsistency, out of this PR's
scope.)
- ADR-0028 anchor "§ Background Jobs". Verified architecture/31 has no
such heading; the cited content lives under "§ 8 Retention" (lines
432-438). Fixed both occurrences (Drivers + References).
- ADR-0028 architecture-test name `Partition_Manager_Job_Is_Registered_At_Startup`
→ `Partition_Manager_Job_Is_Registered_AtStartup` to match the catalogue's
existing `IExceptionHandler_Registered_AtStartup` single-token convention.
- ADR-0016 retention-purge text contradicted ADR-0028 ("dropping partitions
older than the tenant's configured retention window"). Reworded to follow
ADR-0028's split: partition lifecycle = platform-max horizon via
`learnstack:audit:partition-management`; per-tenant retention = row-level
delete via `learnstack:audit:retention-purge` inside still-attached
partitions.
Cross-link / standards-hygiene fixes:
- Standards 02 `**Derives from:**` adds ADR-0023 alongside ADR-0002 / ADR-0006.
- Standards 04 `**Derives from:**` adds ADR-0024 alongside ADR-0002 / ADR-0003.
- Standards 04 § Versioning shrunk from a duplicate of ADR-0024 to a
one-paragraph summary + "for the full policy, see ADR-0024" pointer
(single-source-of-truth per Standards 13).
- Standards 04 URL examples (7 occurrences) updated from `/v1/...` to
`/api/v1/...` to match the canonical APISIX route shape. The
`/openapi/v1.json` spec download URL is intentionally left as-is (that's
a spec download surface, not an API endpoint).
Skipped with reasoning:
- "Why Hangfire over pg_partman + steel-man overlap" (ADR-0028 § Context) —
reviewer marked as defensible-as-is; the steel-man section earns its
keep for a 2027 reader who might wonder if we should have chosen
pg_partman.
- "In-place edits to Accepted ADRs 0002 / 0016 / 0031 push slightly past
typo grade" — reviewer marked as "Acceptable for this PR"; switching to
dated Amendments retroactively would itself be an Accepted-ADR edit.
The previous packet's commit body already noted the pattern.
- ADR-0023 inline code span (malformed extra backtick) — already
collateral-fixed in the Implementation Notes § Package reference rewrite
in this same commit; the malformed `<PackageVersion Include="Vogen" Version="..."` />
span is now a single clean inline span.
Validation:
- Broken-link sweep over 6 changed files: 0 broken.
- docs/analysis/ residual scan: 0 hits.
- Conversions enum members in ADR-0023 verified against upstream source.
- Standards 04 has no remaining bare `/v1/` API-surface examples.
- ADR-0028 has no remaining LIST / At_Startup / Background Jobs references.
- ADR-0024 cites RFC 9745 + RFC 8594 + RFC 9651 + RFC 9110 + RFC 7807 with
correct role per header.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent da1d37e commit 9df097d
6 files changed
Lines changed: 179 additions & 135 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
320 | 326 | | |
321 | 327 | | |
322 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
74 | 85 | | |
75 | | - | |
76 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
77 | 89 | | |
78 | 90 | | |
79 | 91 | | |
80 | | - | |
| 92 | + | |
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
| |||
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
187 | 200 | | |
188 | 201 | | |
189 | 202 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 203 | + | |
194 | 204 | | |
195 | 205 | | |
196 | 206 | | |
197 | 207 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
201 | 212 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
205 | 229 | | |
206 | 230 | | |
207 | 231 | | |
| |||
0 commit comments