feat(dagger): expose mark-latest as a tri-state enum on attestation init#3182
Conversation
Add a MarkLatest enum (ON_CREATE, TRUE, FALSE) to the Dagger module's Init so callers can control "latest" promotion. It is modelled as an enum rather than *bool because the Dagger v0.19.11 SDK collapses *bool parameters to bool and drops the false value before it reaches the wire, making the skip-promotion state unreachable. Assisted-by: Claude Code Signed-off-by: Javier Rodriguez <javier@chainloop.dev> Chainloop-Trace-Sessions: a7b993f3-ce9f-4dc0-a3a1-9ac34df533b8
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | extras/dagger/main.go |
+36 / -0 |
| modified | ai | extras/dagger/README.md |
+23 / -3 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-a7b993 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-a7b993 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-a7b993 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-a7b993 |
- |
Powered by Chainloop and Chainloop Trace
…sion mark-latest only controls promotion: FALSE prevents a newly created version from becoming latest but leaves an existing version's latest status untouched. Reword the README so the example is not read as demoting an already-latest version. Assisted-by: Claude Code Signed-off-by: Javier Rodriguez <javier@chainloop.dev> Chainloop-Trace-Sessions: a7b993f3-ce9f-4dc0-a3a1-9ac34df533b8
Summary
Adds support for controlling "latest" promotion from the Dagger module's
Init, exposed as aMarkLatestenum with three values:ON_CREATE(default): newly created versions become latest; existing/pre-release versions are left unchanged.TRUE: force-promote a pre-release version to latest.FALSE: skip latest promotion entirely, even for newly created versions.The flag is modelled as an enum rather than a
*boolbecause the Dagger v0.19.11 SDK collapses*boolparameters to plainbooland drops the false value before it reaches the wire, making the skip-promotion state unreachable through consuming modules. A non-empty string enum makes all three states reachable.The enum maps onto the existing CLI
--mark-latestflag:TRUE→--mark-latest=true,FALSE→--mark-latest=false,ON_CREATE→ flag omitted (server default).AI disclosure
Assisted by Claude Code.