From a1b380e211b462b4b902bab354234a1d3e6b513d Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 19 May 2026 11:46:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(iace):=20getProject=20scan=20missed=20&p.Cu?= =?UTF-8?q?stomerName=20=E2=80=94=20single-project=20GET=20500ed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migration 031 added customer_name to the SELECT statement in three places (GetProject, ListProjects, ListVariants), and the per-row Scan needed the matching destination. The replace_all caught ListProjects + ListVariants but missed GetProject because of an indentation difference (single tab vs row-scope indentation). Result: GET /projects/:id returned "get project: number of field descriptions must equal number of destinations, got 18 and 17" which the frontend interpreted as "project has no data" and surfaced an empty UI even though hazards/mitigations/components were intact (118/282/16 on Bremsscheibe). Single-line fix: add &p.CustomerName to the GetProject scan. Co-Authored-By: Claude Opus 4.7 (1M context) --- ai-compliance-sdk/internal/iace/store_projects.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai-compliance-sdk/internal/iace/store_projects.go b/ai-compliance-sdk/internal/iace/store_projects.go index 792c88f6..928deaf3 100644 --- a/ai-compliance-sdk/internal/iace/store_projects.go +++ b/ai-compliance-sdk/internal/iace/store_projects.go @@ -74,7 +74,7 @@ func (s *Store) GetProject(ctx context.Context, id uuid.UUID) (*Project, error) FROM iace_projects WHERE id = $1 `, id).Scan( &p.ID, &p.TenantID, &p.ParentProjectID, &p.MachineName, &p.MachineType, &p.Manufacturer, - &p.Description, &p.NarrativeText, &status, &p.CEMarkingTarget, + &p.CustomerName, &p.Description, &p.NarrativeText, &status, &p.CEMarkingTarget, &p.CompletenessScore, &riskSummary, &triggeredRegulations, &metadata, &p.CreatedAt, &p.UpdatedAt, &p.ArchivedAt, )