Skip to content

feat(dagger): expose mark-latest as a tri-state enum on attestation init#3182

Merged
javirln merged 2 commits into
chainloop-dev:mainfrom
javirln:mark-latest-init
Jun 10, 2026
Merged

feat(dagger): expose mark-latest as a tri-state enum on attestation init#3182
javirln merged 2 commits into
chainloop-dev:mainfrom
javirln:mark-latest-init

Conversation

@javirln

@javirln javirln commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Adds support for controlling "latest" promotion from the Dagger module's Init, exposed as a MarkLatest enum 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 *bool because the Dagger v0.19.11 SDK collapses *bool parameters to plain bool and 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-latest flag: TRUE--mark-latest=true, FALSE--mark-latest=false, ON_CREATE → flag omitted (server default).

AI disclosure

Assisted by Claude Code.

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
@chainloop-platform

chainloop-platform Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

AI Session Analysis

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟢 86% 1 ✅ 0 100% AI / 0% Human 2 +59 / -3 1h31m57s

🟢 86% — 100% AI — ✅ All policies passing

Jun 10, 2026 10:11 UTC · 1h31m57s · $13.63 · 81.2k in / 101.6k out · claude-code 2.1.169 (claude-opus-4-8)

View session details ↗

Change Summary

  • Adds a MarkLatest enum with ON_CREATE, TRUE, and FALSE to Dagger Init.
  • Maps the enum to CLI --mark-latest behavior and documents it in extras/dagger/README.md.
  • Regenerates the Dagger SDK and validates codegen, build, and lint locally.

AI Session Overall Score

🟢 86% — Clean implementation, but verification stopped at build/codegen checks without behavioral tests.

AI Session Analysis Breakdown

🟢 95% · scope-discipline

🟢 Implementation stayed within the requested Dagger module and README. · High Impact

🟢 94% · user-trust-signal

No notes.

🟢 92% · solution-quality

🟢 AI fixed the *bool transport bug with an enum instead of a workaround. · High Impact

🟢 90% · alignment

No notes.

🟢 88% · context-and-planning

No notes.

🟡 68% · verification

🟢 dagger develop, go build ./..., and golangci-lint run all succeeded in-session. · High Impact

🟠 No tests were added or run for the new enum behavior; verification stopped at build and codegen checks. · Medium Severity

💡 Before shipping behavior changes, run or add a focused test covering all three enum states.


File Attribution

████████████████████ 100% AI / 0% Human

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@javirln javirln self-assigned this Jun 10, 2026
@javirln javirln requested a review from a team June 10, 2026 11:35
migmartri
migmartri previously approved these changes Jun 10, 2026
Comment thread extras/dagger/README.md Outdated
Comment thread extras/dagger/README.md Outdated
…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
@javirln javirln enabled auto-merge (squash) June 10, 2026 11:55
@javirln javirln merged commit b51eb14 into chainloop-dev:main Jun 10, 2026
16 checks passed
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.

3 participants