Skip to content

fix(deps): pin clicky to v1.21.95 - #165

Merged
moshloop merged 2 commits into
mainfrom
feat/promptrun-host-metadata
Nov 16, 2026
Merged

moshloop merged 2 commits into
mainfrom
feat/promptrun-host-metadata

Conversation

@moshloop

@moshloop moshloop commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

What

  • Pin clicky to v1.21.95 in go.mod and go.sum

Why

  • Replaces a branch-only dependency reference with a tagged release

Summary by CodeRabbit

  • Bug Fixes
    • Approval requests are now reliably cleaned up when errors or cancellation occur, while the associated prompt run is released safely.
    • Cancellation during an approval wait no longer discards a decision that was already resolved; approved or denied states remain recorded. When cancellation occurs before resolution, the request is marked canceled and the prompt run remains running.

Claude-Session-Id: 754971f0-98ba-4fb1-bae2-399104179627
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The approval broker changes how it handles errors and caller cancellation. New tests cover cancellation before and during polling, and cancellation after a request is resolved. The Clicky requirement in go.mod changes to release v1.21.95.

Changes

Approval cancellation handling

Layer / File(s) Summary
Handle approval errors and cancellation
pkg/ai/approval/broker.go, pkg/ai/approval/broker_cancellation_ginkgo_test.go
OnApproval defers request abandonment on returned errors and releases the prompt run with a cancellation-free context. wait returns credential-validation and caller-context errors without abandoning the request. Tests check cancellation outcomes, stored request state, and prompt-run status.

Clicky dependency update

Layer / File(s) Summary
Update Clicky version
go.mod
The required version changes from v1.21.95-0.20261112060413-ae2c0bb79614 to v1.21.95.

Possibly related PRs

  • flanksource/captain#153: This PR also changes the Clicky module version in go.mod, though it selects a pre-release version.

Suggested reviewers: adityathebe

Change: Other

Merge Risk: Minimal · up to ff378

This change makes the approval broker clean up pending requests on errors and cancellation, adds tests for those cases, and pins Clicky to a tagged release. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(deps): pin clicky to v1.21.95" matches the main change in go.mod, which moves the clicky requirement from a pseudo-version to the tagged release v1.21.95. The title is concise and speci…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(deps): pin clicky to v1.21.95" matches the main change in go.mod, which moves the clicky requirement from a pseudo-version to the tagged release v1.21.95. The title is concise and specific. It does not mention the approval-broker changes in pkg/ai/approval/broker.go and its new tests, which the commit messages describe. The PR summary does not describe them, so the title is accurate for the stated objective.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84a960be-569f-4388-9e9f-93dcf90925f3
Commits

Reviewing files that changed from the base of the PR and between 3bbb9e2 and ff3783d.

Files selected for processing: 2

  • pkg/ai/approval/broker.go
  • pkg/ai/approval/broker_cancellation_ginkgo_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration

Totals: 0 passed · 0 failed · 0 skipped · -

View full results

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration
adapters 20 0 0 2.2s
agent 11 0 0 1ms
agentbrowser 38 0 0 24ms
agentcreds 11 0 0 1ms
agentsandbox 5 0 0 3ms
ai 130 0 0 57ms
aichat 147 0 2 39.0s
aiflags 38 0 0 16ms
anthropicmock 1 0 0 1ms
api 700 0 0 424ms
approval 85 0 0 10.2s
assistanttags 9 0 0 723.229µs
attachments 5 0 0 3ms
bash 9 0 0 239ms
cache 11 0 0 299ms
callertools 27 0 0 6.2s
captain 46 0 0 17.2s
captainconfig 4 0 0 675.108µs
claude 27 0 0 5ms
claudeagent 85 0 0 2.2s
claudeconfig 7 0 0 7ms
cli 723 0 0 2m22s
cmux 19 0 0 27ms
codexconfig 15 0 0 26ms
codexhome 10 0 0 57ms
collections 12 0 0 518.156µs
commit 7 0 0 660ms
compattest 1 0 0 2.1s
credentials 5 0 0 30ms
credsync 11 0 0 199ms
database 110 0 0 2m24s
deliver 15 0 0 2.0s
deploy 110 0 0 189ms
exectool 43 0 0 1.1s
genkit 58 0 0 631ms
gitagent 147 0 0 20.8s
github.com/flanksource/captain/migrations 11 0 0 3.5s
github.com/flanksource/captain/pkg/ai 255 0 0 890ms
github.com/flanksource/captain/pkg/ai/agent 27 0 0 450ms
github.com/flanksource/captain/pkg/ai/agent/commit 57 0 0 7.1s
github.com/flanksource/captain/pkg/ai/agent/setup 24 0 0 400ms
github.com/flanksource/captain/pkg/ai/agent/verify 36 0 0 380ms
github.com/flanksource/captain/pkg/ai/agent/worktree 6 0 0 -
github.com/flanksource/captain/pkg/ai/assistanttags 15 0 0 -
github.com/flanksource/captain/pkg/ai/fixture 43 0 0 260ms
github.com/flanksource/captain/pkg/ai/fixture/mcpproxy 6 0 0 -
github.com/flanksource/captain/pkg/ai/history 54 0 0 10ms
github.com/flanksource/captain/pkg/ai/internal/gen-model-registry 12 0 0 -
github.com/flanksource/captain/pkg/ai/middleware 34 0 0 80ms
github.com/flanksource/captain/pkg/ai/observation 3 0 0 -
github.com/flanksource/captain/pkg/ai/pricing 9 0 0 -
github.com/flanksource/captain/pkg/ai/prompt 29 0 0 40ms
github.com/flanksource/captain/pkg/ai/provider 183 0 1 10ms
github.com/flanksource/captain/pkg/ai/provider/claudeagent 61 0 0 1.4s
github.com/flanksource/captain/pkg/ai/provider/cmux 140 0 0 880ms
github.com/flanksource/captain/pkg/ai/provider/genkit 40 0 0 -
github.com/flanksource/captain/pkg/ai/provider/jsonrpc 6 0 0 50ms
github.com/flanksource/captain/pkg/ai/provider/openai 8 0 0 30ms
github.com/flanksource/captain/pkg/aichat 5 0 0 100ms
github.com/flanksource/captain/pkg/aiflags 9 0 0 -
github.com/flanksource/captain/pkg/aimock 50 0 7 230ms
github.com/flanksource/captain/pkg/aimock/anthropicmock 14 0 0 -
github.com/flanksource/captain/pkg/aimock/openaimock 18 0 0 70ms
github.com/flanksource/captain/pkg/api 152 0 0 3.1s
github.com/flanksource/captain/pkg/api/registry 134 0 0 -
github.com/flanksource/captain/pkg/bash 348 0 0 10ms
github.com/flanksource/captain/pkg/budgets 1 0 0 -
github.com/flanksource/captain/pkg/captainconfig 29 0 0 -
github.com/flanksource/captain/pkg/captaintoken 23 0 0 980ms
github.com/flanksource/captain/pkg/claude 139 0 0 -
github.com/flanksource/captain/pkg/claude/tools 18 0 0 -
github.com/flanksource/captain/pkg/cli 857 0 1 1m24s
github.com/flanksource/captain/pkg/cmux 1 0 0 -
github.com/flanksource/captain/pkg/codexconfig 10 0 0 20ms
github.com/flanksource/captain/pkg/container 72 0 1 -
github.com/flanksource/captain/pkg/credproxy 23 0 0 50ms
github.com/flanksource/captain/pkg/credproxy/kubeproxy 3 0 0 40ms
github.com/flanksource/captain/pkg/database 154 0 0 48.9s
github.com/flanksource/captain/pkg/gitagent 31 0 0 420ms
github.com/flanksource/captain/pkg/monitor 73 0 0 7.0s
github.com/flanksource/captain/pkg/promptrun/remoterun 18 0 0 -
github.com/flanksource/captain/pkg/sandbox 13 0 0 -
github.com/flanksource/captain/pkg/sandbox/adapter 41 0 0 -
github.com/flanksource/captain/pkg/sandbox/presets 13 0 0 -
github.com/flanksource/captain/pkg/sandbox/substraterun 43 0 0 6.0s
github.com/flanksource/captain/pkg/session 70 0 0 30ms
github.com/flanksource/captain/pkg/substrate 31 0 4 2.7s
history 91 0 0 215ms
hookaction 16 0 0 4ms
jev 12 0 0 27ms
jsonl 6 0 0 62ms
load 60 0 0 6ms
middleware 39 0 0 167ms
migrations 51 0 0 36.9s
monitor 42 0 0 12.2s
openai 3 0 0 15ms
openaimock 2 0 0 177.11µs
plans 35 0 0 18.5s
process 25 0 0 32ms
prompt 109 0 0 163ms
promptcontext 16 0 0 42ms
promptfile 14 0 0 214ms
promptrun 200 0 0 37.7s
provider 127 0 0 92ms
query 52 0 0 8.9s
registry 133 0 0 12ms
runtimeprofiles 80 0 0 4.3s
session 59 0 0 38ms
sessiontree 15 0 0 601ms
setup 10 0 0 1.1s
tokens 5 0 0 671.933µs
tools 73 0 0 12ms
transcript 6 0 0 11ms
verify 43 0 0 637ms

Totals: 7478 passed · 0 failed · 16 skipped · 11m22s

View full results

Abandoned approvals were previously marked in each early-return path, so cancellation and hook or notify failures could leave the durable row unresolved or skip releasing the run. The deferred handler now abandons the pending request once on any error and returns the raw error from each call site. Adds Ginkgo specs covering cancellation before and during a poll, and preservation of a decision resolved concurrently.

Gavel-Issue-Id: 1c9a18e7-cae4-45fb-a0dc-17aef6a0f477
Claude-Session-Id: 01a1e31b-5120-7001-b6f7-30a65b11e0a9
@moshloop
moshloop merged commit 1440e1c into main Nov 16, 2026
12 checks passed
@moshloop
moshloop deleted the feat/promptrun-host-metadata branch November 16, 2026 08:15
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.

1 participant