Skip to content

feat: add org setting to enable AI agent config collector#2878

Open
jiparis wants to merge 5 commits intochainloop-dev:mainfrom
jiparis:jiparis/org-ai-agent-setting
Open

feat: add org setting to enable AI agent config collector#2878
jiparis wants to merge 5 commits intochainloop-dev:mainfrom
jiparis:jiparis/org-ai-agent-setting

Conversation

@jiparis
Copy link
Member

@jiparis jiparis commented Mar 18, 2026

Summary

  • Add enable_ai_agent_collector org setting that auto-enables the AI agent config collector during attestation init
  • Expose the setting via chainloop org update --enable-ai-agent-collector CLI flag and the gRPC/HTTP API
  • Refactor OrganizationRepo.Update and OrganizationUseCase.Update to use an OrganizationUpdateOpts struct instead of 8 positional parameters
  • Regenerate CLI documentation

Closes #2879

Add a new organization-level boolean setting `enable_ai_agent_collector`
that automatically activates the AI agent config collector during
attestation init without requiring the `--collectors aiconfig` CLI flag.

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

@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.

1 issue found across 40 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/controlplane/pkg/biz/organization.go">

<violation number="1" location="app/controlplane/pkg/biz/organization.go:199">
P2: The update API is becoming an opaque positional-argument call with multiple optional pointer flags; adding another bool increases the risk of argument-order bugs. Prefer a single `UpdateOptions`/params struct.

(Based on your team's feedback about designing APIs to avoid opaque call patterns.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

jiparis added 2 commits March 18, 2026 17:30
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Copy link
Contributor

@matiasinsaurralde matiasinsaurralde left a comment

Choose a reason for hiding this comment

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

LGTM

Replace 8 positional parameters on OrganizationRepo.Update and
OrganizationUseCase.Update with an OrganizationUpdateOpts struct
for better readability and extensibility. Also regenerate CLI docs
and add CLI documentation instruction to CLAUDE.md.

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

@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.

1 issue found across 9 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/controlplane/pkg/biz/organization.go">

<violation number="1" location="app/controlplane/pkg/biz/organization.go:231">
P2: Guard against nil update options before calling the repository; otherwise `Update(..., nil)` can panic via nil-pointer dereference.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Signed-off-by: Jose I. Paris <jiparis@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.

feat: add org setting to enable AI agent config collector

2 participants