finished_at (written by writeDeliveryStatus), archived_at (written by the archive writer) and the updated_at stamp that takeForRedispatch writes all came from a bare time.Now(). The SQLite driver stores a time as the text of time.Time.String(), and for a time read from time.Now() that text ends in the monotonic clock reading ( m=+365.03). All three now come from GORM's own clock, NowFunc() on the handle they are written through. That is the clock that stamps created_at (GORM's default, time.Now().Local()), so all of them are now stored in the same form.
Tests: the existing test for each of the three writes now reads the column back as text and requires the layout of time.Time.String() with nothing after it. The two tests on deliveries check created_at the same way, so the test also catches it if the form created_at is stored in changes.
The download is unchanged: it reads archived_at as a time and writes it in UTC as RFC 3339.
Package: all changes are in internal/delivery, which writes these rows.
Scope: the issue does not name the updated_at stamp in takeForRedispatch. It was the only other bare time.Now() the delivery package writes to the database, and the plan comment says to fix any such write the same way.
Not changed: the cutoff times passed as query parameters (pending sweep, archive prune, retention) still carry the reading. They are only compared against stored values, never stored.
Model: opus-5-5
closes https://git.eeqj.de/sneak/webhooker/issues/529
`finished_at` (written by `writeDeliveryStatus`), `archived_at` (written by the archive writer) and the `updated_at` stamp that `takeForRedispatch` writes all came from a bare `time.Now()`. The SQLite driver stores a time as the text of `time.Time.String()`, and for a time read from `time.Now()` that text ends in the monotonic clock reading (` m=+365.03`). All three now come from GORM's own clock, `NowFunc()` on the handle they are written through. That is the clock that stamps `created_at` (GORM's default, `time.Now().Local()`), so all of them are now stored in the same form.
Tests: the existing test for each of the three writes now reads the column back as text and requires the layout of `time.Time.String()` with nothing after it. The two tests on `deliveries` check `created_at` the same way, so the test also catches it if the form `created_at` is stored in changes.
The download is unchanged: it reads `archived_at` as a time and writes it in UTC as RFC 3339.
Package: all changes are in `internal/delivery`, which writes these rows.
- Scope: the issue does not name the `updated_at` stamp in `takeForRedispatch`. It was the only other bare `time.Now()` the delivery package writes to the database, and the plan comment says to fix any such write the same way.
- Not changed: the cutoff times passed as query parameters (pending sweep, archive prune, retention) still carry the reading. They are only compared against stored values, never stored.
Model: opus-5-5
finished_at, archived_at and the updated_at stamp a re-dispatch
writes came from a bare time.Now(). The SQLite driver stores a time
as time.Time.String(), which appends the monotonic clock reading
(" m=+…") to a time read from time.Now(). All three now come from
GORM's own clock, NowFunc(), which stamps created_at, so they are
stored in the same form. The tests for each write read the stored
text back.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
closes #529
finished_at(written bywriteDeliveryStatus),archived_at(written by the archive writer) and theupdated_atstamp thattakeForRedispatchwrites all came from a baretime.Now(). The SQLite driver stores a time as the text oftime.Time.String(), and for a time read fromtime.Now()that text ends in the monotonic clock reading (m=+365.03). All three now come from GORM's own clock,NowFunc()on the handle they are written through. That is the clock that stampscreated_at(GORM's default,time.Now().Local()), so all of them are now stored in the same form.Tests: the existing test for each of the three writes now reads the column back as text and requires the layout of
time.Time.String()with nothing after it. The two tests ondeliveriescheckcreated_atthe same way, so the test also catches it if the formcreated_atis stored in changes.The download is unchanged: it reads
archived_atas a time and writes it in UTC as RFC 3339.Package: all changes are in
internal/delivery, which writes these rows.updated_atstamp intakeForRedispatch. It was the only other baretime.Now()the delivery package writes to the database, and the plan comment says to fix any such write the same way.Model: opus-5-5
finished_at, archived_at and the updated_at stamp a re-dispatch writes came from a bare time.Now(). The SQLite driver stores a time as time.Time.String(), which appends the monotonic clock reading (" m=+…") to a time read from time.Now(). All three now come from GORM's own clock, NowFunc(), which stamps created_at, so they are stored in the same form. The tests for each write read the stored text back. Model: opus-5-5Review passed.
Model: opus-5-5