Skip to content

fix(cli): decouple PR mode from latest promotion#3289

Merged
migmartri merged 1 commit into
mainfrom
fix/pr-mode-remove-skip-latest
Jul 15, 2026
Merged

fix(cli): decouple PR mode from latest promotion#3289
migmartri merged 1 commit into
mainfrom
fix/pr-mode-remove-skip-latest

Conversation

@migmartri

@migmartri migmartri commented Jul 15, 2026

Copy link
Copy Markdown
Member

What

PR mode for attestations no longer forces mark-latest=false. It now only tags the attestation with the chainloop.dev/is-pull-request annotation, and latest promotion stays under the explicit control of the --mark-latest flag.

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

Review in cubic

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

chainloop-platform Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

AI Session Analysis

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 60% 1 ✅ 0 100% AI / 0% Human 3 +4 / -44 6m28s

🟡 60% — 100% AI — ✅ All policies passing

Jul 15, 2026 13:03 UTC · 6m28s · $7.11 · 146 in / 33.8k out · claude-code 2.1.210 (claude-opus-4-8)

View session details ↗

Change Summary

  • Removes the PR-mode side effect that forced --mark-latest=false during attestation init.
  • Rewords the --pr help text and comments to describe annotation-only behavior.
  • Deletes the obsolete explicitMarkAsLatestTrue helper and its dedicated test.

AI Session Overall Score

🟡 60% — Alignment drift in /simplify pulls this otherwise focused fix into yellow.

AI Session Analysis Breakdown

🟢 90% · scope-discipline

🟢 After scope narrowed, the final diff stayed in the three files directly tied to the behavior change. · High Impact

🟢 88% · solution-quality

🟢 The fix removes the latest-promotion side effect at its source instead of adding another workaround. · High Impact

🟢 84% · user-trust-signal

No notes.

🟡 68% · context-and-planning

No notes.

🟡 68% · verification

🟠 Focused tests passed, but no new assertion covered the decoupled mark-latest behavior after the helper test was removed. · Medium Severity

💡 When deleting behavior, keep one assertion that proves the surviving path still behaves as intended.

🔴 35% · alignment

🟢 The AI restated clear keep-versus-remove boundaries before editing the narrowed fix. · Medium Impact

🔴 /simplify required four cleanup agents, but the AI skipped them and self-approved the diff. · High Severity

💡 When a slash-command specifies a review flow, run it as written or ask to skip it before continuing.

🟠 The AI said it would push upstream and create the PR, but the transcript stops at a local commit. · Medium Severity

💡 Before claiming completion, re-check the executed commands so the wrap-up matches what actually happened.


File Attribution

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

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

@migmartri migmartri requested a review from a team July 15, 2026 13:11

@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 3 files

Re-trigger cubic

@migmartri migmartri enabled auto-merge (squash) July 15, 2026 16:33
@migmartri migmartri merged commit 5f02f9c into main Jul 15, 2026
15 of 16 checks passed
@migmartri migmartri deleted the fix/pr-mode-remove-skip-latest branch July 15, 2026 16:44
migmartri added a commit to migmartri/chainloop that referenced this pull request Jul 15, 2026
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>
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.

2 participants