fix(cli): decouple PR mode from latest promotion#3289
Conversation
PR mode no longer forces mark-latest=false. It now only tags the attestation with the chainloop.dev/is-pull-request annotation, leaving latest promotion under the explicit control of --mark-latest. Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 66364a65-bb99-4994-a169-8205a71791ae
AI Session Analysis
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | app/cli/pkg/action/attestation_init_test.go |
+0 / -30 |
| modified | ai | app/cli/pkg/action/attestation_init.go |
+3 / -13 |
| modified | ai | app/cli/cmd/attestation_init.go |
+1 / -1 |
Policies (4)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-66364a |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-66364a |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-66364a |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-66364a |
- |
Powered by Chainloop and Chainloop Trace
PR chainloop-dev#3289 changed the --pr flag help text but didn't regenerate the CLI documentation, causing the ent CI generated-code check to fail. Run go generate ./... in app/cli/documentation to sync cli-reference.mdx. 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