Skip to content

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

Merged
jiparis merged 5 commits into
chainloop-dev:mainfrom
jiparis:jiparis/org-ai-agent-setting
Mar 19, 2026
Merged

feat: add org setting to enable AI agent config collector#2878
jiparis merged 5 commits into
chainloop-dev:mainfrom
jiparis:jiparis/org-ai-agent-setting

Conversation

@jiparis

@jiparis jiparis commented Mar 18, 2026

Copy link
Copy Markdown
Member

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>

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

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.

Comment thread app/controlplane/pkg/biz/organization.go Outdated
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>

@matiasinsaurralde matiasinsaurralde left a comment

Copy link
Copy Markdown
Contributor

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>

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

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.

Comment thread app/controlplane/pkg/biz/organization.go
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis merged commit 9c66450 into chainloop-dev:main Mar 19, 2026
15 checks passed
@jiparis jiparis deleted the jiparis/org-ai-agent-setting branch March 19, 2026 08:42
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

3 participants