Feature 02 task 2: Store helpers: transactions, ULIDs and time conventions #11

4 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 5de7a0df15 Reject the zero instant in Timestamp.Scan
CI / ci (push) Successful in 48s
CI / ci (pull_request) Successful in 49s
Independent review Codex gpt-6-sol high: APPROVED (0 findings)
Scan accepted "0001-01-01T00:00:00.000Z" and produced a zero Timestamp
that Value then refused to write. Reject it on read, consistent with Value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:52:14 -04:00
dev_agentandClaude Opus 5.5 e99ddec433 Reject Timestamp years outside 0000-9999 in Value
CI / ci (push) Successful in 48s
CI / ci (pull_request) Successful in 49s
Independent review Codex gpt-6-sol high: CHANGES_REQUIRED (1 medium)
The four-digit stored form cannot represent them, so Value would emit
TEXT that Scan rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:45:47 -04:00
dev_agentandClaude Opus 5.5 5304887ce9 Reject non-canonical timestamps in Timestamp.Scan
CI / ci (push) Successful in 49s
CI / ci (pull_request) Successful in 48s
Independent review Codex gpt-6-sol high: CHANGES_REQUIRED (1 medium)
time.Parse accepts a comma before fractional seconds, so Scan took
"2026-10-03T12:37:05,123Z" and Value then wrote it back with a period.
Scan now requires the parsed instant to re-format byte-identically to
its input, and the rejection test covers the comma form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:42:15 -04:00
dev_agentandClaude Opus 5.5 59c3cf259d Add store helpers: transactions, ULIDs and time conventions
CI / ci (push) Successful in 50s
CI / ci (pull_request) Successful in 49s
Independent review Codex gpt-6-sol high: CHANGES_REQUIRED (1 medium)
- Store.WithTx runs fn on the writer, committing on nil and rolling back
  on error, panic or goroutine exit; panics propagate unchanged.
- NewID returns a monotonic ULID string (oklog/ulid/v2, crypto/rand),
  strictly increasing within the process.
- Timestamp stores UTC RFC 3339 TEXT at fixed millisecond precision.
- LocalDate stores YYYY-MM-DD TEXT and rejects invalid or non-canonical
  dates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 08:38:54 -04:00