refactor: replace OverallStatus with typed component fields in AccessibilityProfile - #113
Conversation
|
Claude encountered an error after 1m 21s —— View job Reviewing PR #113
|
53695eb to
4f72e02
Compare
|
Claude finished @koinsaari's task in 4m 11s —— View job Reviewing PR #113
Findings🔴 Important — This PR modifies an already-numbered, previously-merged migration ( Fix: revert 🟡 Nit — stale package/root READMEs still document removed behavior
🟡 Nit — unrelated
No issues found with SQL/GORM parameterization (all queries in I was not able to run Commit status: attempted to set |
…ibilityProfile Replaces the single OverallStatus enum with named, structured component fields (Entrance, Pathways, Restroom, Parking, Elevator). Each component carries typed properties, per-field audit flags computed on write, and read-time inheritance metadata (IsInherited, SourceID). SourceReports now stores raw external opinions verbatim without server-side judgment. Removes DetectConflicts and the 422 hard-conflict response — no OverallStatus means no self-contradictions to enforce. Updates OpenAPI schema, generated server code, OSM transformer, validation, engine, repository, and all integration tests. Fixes: AccessibilityProfile.UpdatedAt used omitempty (did not omit zero time.Time), leaking a readOnly field into request bodies and causing kin-openapi to reject valid writes with HTTP 400. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4f72e02 to
ed1360e
Compare
|
I'll analyze this and get back to you. |

Summary
OverallStatusenum with named, structured component fields (Entrance,Pathways,Restroom,Parking,Elevator) onAccessibilityProfileIsInherited,SourceID)SourceReportsstores raw external opinions verbatim — no server-side judgment; clients decide trust levelDetectConflictsand the 422 hard-conflict response — noOverallStatusmeans no self-contradictions to enforceAccessibilityProfile.UpdatedAtleaking"0001-01-01T00:00:00Z"into request bodies (wasomitempty, changed toomitzero) which caused kin-openapi to reject valid writes with HTTP 400Changed
pkg/models/accessibility.go— new typed component structs,SourceReports,omitzeroonUpdatedAtapi/openapi.yaml+internal/api/v1/server.gen.go— schema updated,DetectConflictsremovedinternal/a11y/engine.go—WithAuditFlagsdispatches per typed component;DetectConflictsremovedinternal/validation/validation.go— validation updated for new modelinternal/place/repository.go— write path updatedinternal/sources/osm/a11y.go— OSM transformer writesSourceReportsinstead ofOverallStatuscmd/ingestion/— batcher and main updatedTest plan
go test -tags integration ./...)go test ./...)🤖 Generated with Claude Code