…air newest pre-release version
PR chainloop-dev#3289 removed PR mode's incomplete suppression of latest-version
promotion. Restore that suppression in the CLI action (the PR chainloop-dev#3268
rule): when isPR is true, default --mark-latest to false unless the
user explicitly passed --mark-latest=true. This preserves the three
observable states — omitted becomes false in PR mode, explicit false
stays false, explicit true remains the user override.
Complete the behavior in the control plane: a later non-PR attestation
against an existing pre-release version now repairs latest when that
version is the newest active version by immutable created_at and is not
already latest. PR runs and explicit --mark-latest=false opt-outs are
not promoted. Released versions are never auto-promoted; only explicit
true attempts promotion and is rejected for released versions.
The nil/true/false contract is now described in the
AttestationServiceInitRequest.mark_as_latest proto comment and
regenerated artifacts.
Added integration coverage for the repair lifecycle (v1 latest → PR-sim
v2 not latest → non-PR v2 repaired to latest) and boundaries: older
version not promoted over newer, explicit false suppression wins over
automatic repair, and newest released version not auto-promoted.
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
What
PR mode for attestations no longer forces
mark-latest=false. It now only tags the attestation with thechainloop.dev/is-pull-requestannotation, and latest promotion stays under the explicit control of the--mark-latestflag.This removes the implicit skip-latest-promotion side-effect introduced in #3268 while keeping the PR-mode detection and annotation behavior intact.
cc @jiparis @javirln — reopening #3265 so we can review the approach for the skip-latest-promotion behavior separately.
This PR was produced with AI assistance (Claude Code).
Assisted-by: Claude Code
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri