Skip to content

feat: add --latest-version flag to attestation init#3035

Merged
jiparis merged 5 commits intochainloop-dev:mainfrom
jiparis:jiparis/operation-authz-fwd
Apr 14, 2026
Merged

feat: add --latest-version flag to attestation init#3035
jiparis merged 5 commits intochainloop-dev:mainfrom
jiparis:jiparis/operation-authz-fwd

Conversation

@jiparis
Copy link
Copy Markdown
Member

@jiparis jiparis commented Apr 14, 2026

Summary

  • Add --latest-version boolean flag to attestation init, mutually exclusive with --version
  • Add use_latest_version field to the AttestationServiceInitRequest proto
  • When set, the control plane resolves to the project version with latest=true in the database
  • Returns a validation error if no project version exists for the project
  • Skip loading version from .chainloop.yml when --latest-version is used

Closes #3034

Allow clients to pass "latest" as the projectVersion during attestation
init. The control plane resolves it to the project version with
latest=true in the database, returning a validation error if no version
exists.

Also blocks "latest" as a literal version name to prevent ambiguity.

Closes chainloop-dev#3034

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

No issues found across 5 files

@jiparis jiparis requested a review from a team April 14, 2026 20:30
@jiparis jiparis changed the title feat: resolve "latest" magic constant for project versions feat: resolve "latest" version for project versions Apr 14, 2026
Comment thread app/controlplane/pkg/biz/biz.go Outdated
jiparis added 3 commits April 14, 2026 23:02
…"latest"

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Replace the "latest" magic string approach with a dedicated boolean
use_latest_version field in the API and a --latest-version CLI flag.
This avoids any collision with existing version names and is cleaner.

The flag is mutually exclusive with --version. When set, the control
plane resolves to the project version with latest=true in the database.

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
…s set

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis changed the title feat: resolve "latest" version for project versions feat: add --latest-version flag to attestation init Apr 14, 2026
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis merged commit 62db3b7 into chainloop-dev:main Apr 14, 2026
15 checks passed
@jiparis jiparis deleted the jiparis/operation-authz-fwd branch April 14, 2026 22:24
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.

AI_SESSION attestations should always target latest project version

2 participants