Skip to content

fix(dagger): stop caching attestation functions across runs - #3468

Merged
javirln merged 1 commit into
mainfrom
javier/dagger-cache-session
Sep 24, 2026
Merged

javirln merged 1 commit into
mainfrom
javier/dagger-cache-session

Conversation

@javirln

@javirln javirln commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

The Dagger module relied on Dagger's default function caching, which keeps a function's result for up to seven days across runs. Attestation functions have side effects and depend on live state, so replaying a cached result causes problems: running init again with the same inputs returns the attestation ID created by an earlier run, and adding evidence to it fails with attestation not yet initialized once that attestation has been pushed. A run identical to a previous one can also be served entirely from the cache and never push an attestation.

This removes that cross-run caching from Init, AddRawEvidence, AddFileEvidence, Push, Status, MarkFailed, MarkCanceled, WorkflowCreate, Container and Debug. They are now cached only for the current session, so every run initializes and pushes its own attestation, while an attestation keeps a single ID for the whole session it was created in. Disabling the cache entirely is not an option, because it would re-initialize the attestation every time it is referenced.

AI assistance: written with Claude Code.

Review in cubic

Dagger caches module function results for up to seven days by default,
so running the same attestation again could return the attestation ID
created by an earlier run, failing with "attestation not yet
initialized" once that attestation had been pushed, or skip the push
entirely.

Cache the functions that create or change an attestation, or read its
live state, only for the current session.

Assisted-by: Claude Code
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@chainloop-platform

chainloop-platform Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

AI Session Checks — ⚠️ no AI session found

Missing AI Coding Sessions

This organization requires every PR to be backed by a Chainloop Trace AI coding session, and none was found for this one.

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.


PR validation — ⚠️ 1 failing

Status Policy Material Messages
✅ Passed pr-min-approvals pr-info -
✅ Passed pr-description-required pr-info -
⚠️ Failed pr-user-story-linked pr-info PR/MR #3468 does not reference a user story or issue in title, description, or branch 'fix(dagger): stop caching attestation functions across runs'. Expected patterns: ["(?i)[A-Z]+-[0-9]+", "#[0-9]+", "(?i)[A-Z]{2", "}-[0-9]+", "(?i)gh-[0-9]+", "(?i)\[[A-Z]+-[0-9]+\]"]

View attestation ↗


Powered by Chainloop and Chainloop Trace

@javirln
javirln requested a review from a team September 24, 2026 08:45
@javirln
javirln marked this pull request as ready for review September 24, 2026 08:45

@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.

No issues found across 1 file

Re-trigger cubic

@javirln
javirln merged commit f8af9c7 into main Sep 24, 2026
15 of 17 checks passed
@javirln
javirln deleted the javier/dagger-cache-session branch September 24, 2026 08:50
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.

2 participants