You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AI config collector creates duplicate uploads on retry #2907
The AI config collector generates a non-deterministic digest for the config file. When a retry happens due to a remote state conflict, the file gets uploaded again with a different name, resulting in duplicate artifacts in the CAS.
The digest should be deterministic by incorporating the attestation created_at timestamp (or similar stable identifier) so that retries produce the same file and skip re-uploading.
Example
On retry, the same config gets uploaded multiple times with different filenames:
2026-03-21T12:50:30.713+0100 INFO {"component": "service", "msg": "artifact does not exist, uploading", "digest": "5b3bfaf2f3e8862b2a9aef668589546fa13c4f0465bd115547e0ae8da0bbd5c3", "name": "ai-agent-config-claude-169015807.json"}
2026-03-21T12:50:30.714+0100 INFO {"component": "service", "msg": "artifact received, uploading now to backend", "name": "ai-agent-config-claude-169015807.json", "digest": "5b3bfaf2f3e8862b2a9aef668589546fa13c4f0465bd115547e0ae8da0bbd5c3", "size": 50566}
2026-03-21T12:50:31.230+0100 INFO {"component": "service", "msg": "upload finished", "name": "ai-agent-config-claude-169015807.json", "digest": "5b3bfaf2f3e8862b2a9aef668589546fa13c4f0465bd115547e0ae8da0bbd5c3", "size": 50566}
Since the digest changes on each attempt, the CAS treats each retry as a new artifact.
Activity
migmartri commentedon Mar 21, 2026
it might make sense to use the attestation initialized_at
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
jiparis commentedon Mar 29, 2026
Fixed at #2917
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector
fix(crafter): use deterministic filename for AI config collector