fix(trace): normalize skill first-use times

Merged
JI
3d ago
+205-8

Fixes #3793.

Summary

  • The shared SkillUse now stores the first-use time of a skill as RFC3339 in UTC with whole seconds. Before, each provider had to convert the time itself, and a raw value (for example a Pi timestamp with milliseconds, or one with a timezone offset) went into the evidence as is and compared wrongly as a string.
  • A time that cannot be read is ignored. The use still counts.
  • Skills with no time of use sort after the skills with a known time, so the limit on skill entries keeps the skills that the session used first (R-009 of issue-3540-trace-skills-used).
  • The push warns when a skill entry records the push time because the time of its first use is unknown. The push-time fallback is not new, but it now gives a warning instead of a silent difference from R-001, which requires the capture time to be the time of the first use.

This came up in the review of #3759: with this change, the Pi provider gets the right time format without its own conversion.

AI disclosure: this change was made with the assistance of Claude Code.