Skip to content

fix(trace): normalize skill first-use times - #3792

Merged
jiparis merged 2 commits into
chainloop-dev:mainfrom
jiparis:fix/trace-skill-use-time
Nov 7, 2026
Merged

jiparis merged 2 commits into
chainloop-dev:mainfrom
jiparis:fix/trace-skill-use-time

Conversation

@jiparis

@jiparis jiparis commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

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.

View guided diff

Store the first-use time of a skill as RFC3339 in UTC with whole seconds
in the shared SkillUse, so that every provider gives the same format and
the earliest time is found also across timezone offsets. A time that
cannot be read is ignored, and the use still counts.

Sort skills with no time after the ones with a known time, so that the
limit on skill entries keeps the skills used first, and warn at push
when a skill entry records the push time because its use time is
unknown.

Assisted-by: Claude Code
Signed-off-by: Jose Ignacio Paris Prieto <jiparis@chainloop.dev>

Chainloop-Trace-Sessions: a3209730-01fe-4c84-bf42-5253bd91b589
@chainloop-platform

chainloop-platform Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR validation — ✅ 3 passing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
✅ Passed pr-user-story-linked pr-info -

View attestation ↗

AI Session Checks — ⚠️ 1 session(s) missing

Missing AI Coding Sessions

We detected commits in this PR that were AI-assisted, but the matching Chainloop Trace session(s) could not be found in Chainloop.

Please make sure the AI coding session evidence has been sent by the Chainloop CLI, or add the skip-ai-session label to this PR to bypass this check.

Learn more about Chainloop Trace.

Security Checks — ✅ 5 passing

✅ Nothing this change touches re-opens a recorded security fix.

View in Chainloop ↗ · How this works ↗
✅ Nothing this change touches re-opens a recorded security fix.

View in Chainloop ↗ · How this works ↗

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed sast -
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -
Scans not applied (3)
Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗


Powered by Chainloop and Chainloop Trace

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread app/cli/pkg/action/trace_skills.go Resolved
Move the warning about a skill entry that records the push time from
readSessionSkills to attachSkills, after the entry is stored. A skill
that cannot be stored no longer gets a warning about a time that no
entry holds.

Assisted-by: Claude Code
Signed-off-by: Jose Ignacio Paris Prieto <jiparis@chainloop.dev>

Chainloop-Trace-Sessions: a3209730-01fe-4c84-bf42-5253bd91b589
@jiparis
jiparis merged commit bd1411a into chainloop-dev:main Nov 7, 2026
16 of 17 checks passed
@jiparis
jiparis deleted the fix/trace-skill-use-time branch November 7, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trace: skill first-use times are not normalized across providers

2 participants