Feat v0.3.5 settings icd clone #19
Reference in New Issue
Block a user
Delete Branch "feat/v0.3.5-settings-icd-clone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root causes: - PG store CreateInstance/CreateAssignment set defaults in local vars but didn't write them back to the struct, so callers saw empty Status fields (violating CHECK constraints on subsequent updates) - PG JSONB normalizes whitespace ({"key": "val"} vs {"key":"val"}) but tests compared exact strings - ListSignoffs test used "nonexistent" as instance_id but PG validates UUID format Fixes: - Write defaults directly to inst.Status / a.Status in PG store (aligns with SQLite store which already did this) - Add jsonEq() helper using json.Compact for whitespace-agnostic JSON comparison across all stage_data/review_data assertions - Use valid zero-UUID for non-existent instance in signoff test All 35 tests pass on SQLite (28 store + 7 engine). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>PG JSONB normalizes key order (alphabetical), so json.Compact alone wasn't sufficient — {"approved":true,"notes":"LGTM"} stored as {"notes":"LGTM","approved":true}. Unmarshal+remarshal normalizes both sides before comparison. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>