Garry Tan and Claude Opus 4.7
f44abd9e17
feat(cycle): write last_full_cycle_at to sources.config on per-source cycle exit
...
Closes codex round-1 P0-5 (write site for last_full_cycle_at was
unspecified pre-PR). runCycle's exit hook persists
{ last_full_cycle_at: '<ISO>' } to sources.config JSONB when a
successful per-source cycle completes. Autopilot's v0.38 per-source
fan-out gate reads this field next tick to decide whether to skip a
source (60-min freshness floor).
Conditions for write (all required):
- opts.sourceId is set — legacy callers without sourceId skip the
write (autopilot will keep working today via fallback path)
- engine is non-null — no-DB path skips
- status is 'ok' / 'clean' / 'partial' — failed/skipped cycles do NOT
mark a source as fresh (next cycle will redo work)
- dryRun is false — writes are out of scope
Best-effort: write failure logs a warning but does NOT change the
CycleReport status. The cycle already succeeded by the time we get
here; the cost of missing a stale write is one redundant cycle next
tick, not data loss.
5 PGLite integration tests cover all four gate conditions plus the
"timestamp advances on each successful run" property.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-22 07:55:50 -07:00
..
2026-05-21 22:11:00 -07:00
2026-05-19 22:32:52 -07:00
2026-05-18 19:34:44 -07:00
2026-05-14 19:13:14 -07:00
2026-04-29 23:46:36 -07:00
2026-05-14 19:13:14 -07:00
2026-05-10 20:06:31 -07:00
2026-05-21 08:29:55 -07:00
2026-04-21 21:14:17 -07:00
2026-05-18 06:22:12 -07:00
2026-05-13 13:14:58 -04:00
2026-05-18 19:34:44 -07:00
2026-05-10 06:34:40 -07:00
2026-05-18 06:22:12 -07:00
2026-05-21 08:29:55 -07:00
2026-05-11 19:25:48 -07:00
2026-05-17 08:00:29 -07:00
2026-05-21 22:11:00 -07:00
2026-05-20 13:55:12 -07:00
2026-05-19 18:12:01 -07:00
2026-04-22 01:34:22 -07:00
2026-05-10 06:34:40 -07:00
2026-05-18 19:34:44 -07:00
2026-05-10 20:06:31 -07:00
2026-05-02 08:41:11 -07:00
2026-05-20 13:55:12 -07:00
2026-05-11 22:54:35 -07:00
2026-05-08 13:25:48 -07:00
2026-05-09 20:46:34 -07:00
2026-05-19 17:14:53 -07:00
2026-04-14 19:41:34 -10:00
2026-05-02 22:01:05 -07:00
2026-05-02 22:01:05 -07:00
2026-05-19 10:05:31 -07:00
2026-05-21 09:26:37 -07:00
2026-05-10 13:20:07 -07:00
2026-05-11 22:54:35 -07:00
2026-05-19 10:05:31 -07:00
2026-05-10 18:59:11 -07:00
2026-05-21 22:11:00 -07:00
2026-05-08 13:25:48 -07:00
2026-05-08 13:25:48 -07:00
2026-05-11 21:49:57 -07:00
2026-05-22 07:55:50 -07:00
2026-04-14 19:41:34 -10:00
2026-05-08 13:25:48 -07:00
2026-04-27 22:59:08 -07:00
2026-05-03 20:41:39 -07:00
2026-04-29 22:21:07 -07:00
2026-05-10 18:59:11 -07:00
2026-05-20 13:55:12 -07:00
2026-05-07 21:52:58 -07:00
2026-05-21 22:11:00 -07:00
2026-05-15 18:54:36 -07:00
2026-05-19 17:14:53 -07:00
2026-04-11 00:01:09 -10:00
2026-05-22 07:55:45 -07:00
2026-05-11 19:25:48 -07:00
2026-04-25 12:25:34 -07:00
2026-05-14 19:13:14 -07:00
2026-05-01 09:02:43 -07:00
2026-05-18 21:26:12 -07:00
2026-05-17 18:52:38 -07:00
2026-04-29 23:46:36 -07:00
2026-05-11 19:25:48 -07:00
2026-04-22 01:34:22 -07:00
2026-05-20 13:55:12 -07:00
2026-04-29 23:46:36 -07:00
2026-05-21 09:26:37 -07:00
2026-05-17 08:00:29 -07:00
2026-05-14 20:51:11 -07:00
2026-05-11 22:54:35 -07:00
2026-04-05 12:48:10 -07:00
2026-05-19 22:32:52 -07:00
2026-05-21 18:57:05 -07:00
2026-05-10 13:20:07 -07:00
2026-05-20 20:47:12 -07:00
2026-05-09 19:47:56 -07:00
2026-05-20 09:19:18 -07:00
2026-05-10 20:06:31 -07:00
2026-05-03 20:16:15 -07:00
2026-05-10 13:33:05 -07:00
2026-05-21 08:29:55 -07:00
2026-05-19 10:05:31 -07:00
2026-05-17 18:52:38 -07:00
2026-05-19 22:32:52 -07:00
2026-05-06 21:14:34 -07:00
2026-05-22 07:55:45 -07:00
2026-04-22 01:34:22 -07:00
2026-05-21 22:11:00 -07:00
2026-05-11 22:54:35 -07:00
2026-05-22 07:55:45 -07:00
2026-05-09 20:46:34 -07:00
2026-04-21 17:54:13 -07:00
2026-05-11 23:20:17 -07:00
2026-05-07 22:56:22 -07:00
2026-05-18 12:53:01 -07:00
2026-05-15 06:48:36 -07:00
2026-05-10 13:20:07 -07:00
2026-05-18 21:11:02 -07:00
2026-05-18 21:11:02 -07:00
2026-05-08 13:25:48 -07:00
2026-04-30 23:17:54 -07:00
2026-05-19 22:32:52 -07:00
2026-04-27 22:59:08 -07:00
2026-05-06 21:14:34 -07:00
2026-05-20 13:55:12 -07:00
2026-05-20 13:55:12 -07:00
2026-05-20 13:55:12 -07:00
2026-04-23 19:34:27 -07:00
2026-05-14 20:51:11 -07:00
2026-05-22 07:45:36 -07:00
2026-05-22 07:45:42 -07:00
2026-05-22 07:45:42 -07:00
2026-05-19 17:14:53 -07:00
2026-05-09 22:58:19 -07:00
2026-05-19 17:14:53 -07:00
2026-04-29 22:21:07 -07:00
2026-04-09 10:17:13 -07:00
2026-05-08 13:25:48 -07:00
2026-04-29 22:53:41 -07:00
2026-05-21 08:29:55 -07:00
2026-05-20 09:19:18 -07:00
2026-05-20 09:19:18 -07:00
2026-05-10 18:59:11 -07:00
2026-05-17 18:52:38 -07:00
2026-04-14 19:41:34 -10:00
2026-05-07 21:52:58 -07:00
2026-05-19 22:32:52 -07:00
2026-05-08 13:25:48 -07:00
2026-05-08 13:25:48 -07:00
2026-05-06 21:14:34 -07:00
2026-05-22 07:45:42 -07:00
2026-05-08 13:25:48 -07:00
2026-04-09 10:17:13 -07:00
2026-05-06 11:54:06 -07:00