specverb.lock: store goMod as line array, symmetric with goSum #135

Closed
opened 2026-06-11 01:08:01 +00:00 by coilysiren · 0 comments
Owner

specverb.lock's goMod field stored the whole go.mod as one escaped newline-string, while the sibling goSum field was already a []string of lines. Same kind of data (a verbatim replay blob), two different shapes - and the blob form is unreviewable in a diff (one giant line).

Make goMod a []string too, symmetric with goSum, order preserved (go.mod block structure is significant). Replay joins with newlines. Schema bumps v1 -> v2, forcing a re-lock; ward is the only consumer.

Not parsing go.mod into structured require/replace JSON: nothing reads the structure (the driver only replays it and reads cliGuard separately), and re-serializing exact go.mod syntax would be fragile. Lines are the right altitude.

Raised by Kai.

`specverb.lock`'s `goMod` field stored the whole go.mod as one escaped newline-string, while the sibling `goSum` field was already a `[]string` of lines. Same kind of data (a verbatim replay blob), two different shapes - and the blob form is unreviewable in a diff (one giant line). Make `goMod` a `[]string` too, symmetric with `goSum`, order preserved (go.mod block structure is significant). Replay joins with newlines. Schema bumps v1 -> v2, forcing a re-lock; ward is the only consumer. Not parsing go.mod into structured require/replace JSON: nothing reads the structure (the driver only replays it and reads `cliGuard` separately), and re-serializing exact go.mod syntax would be fragile. Lines are the right altitude. Raised by Kai.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/cli-guard#135
No description provided.