Skip to content

feat(api): admin agent config preview, revision history and revert (14/15) - #482

Open
ccf-lisa[bot] wants to merge 3 commits into
lisa/agent-config/13-admin-config-savefrom
lisa/agent-config/14-admin-config-preview
Open

ccf-lisa[bot] wants to merge 3 commits into
lisa/agent-config/13-admin-config-savefrom
lisa/agent-config/14-admin-config-preview

Conversation

@ccf-lisa

@ccf-lisa ccf-lisa Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Part 14/15 of the agent remote-configuration stack

This stack splits #465 into reviewable layers of at most ~1000 changed lines each (counted without docs/, go.sum and Markdown). The last layer's tree is identical to #465, which already has its review history.

Stacked on #481 (lisa/agent-config/13-admin-config-save). Review and merge in order.

What's in this layer

Fourteenth layer of the agent remote-configuration stack (split from #465): POST /api/admin/agents/{id}/config/preview validates a candidate overlay and shows, per instance, the redacted effective config, its diff, classified changes and whether the agent would apply it (bounded to 50 instances / 16 MiB of reported config, validated first; omitted-instances counts the rest; needs agent:configure); GET …/config/revisions lists revisions (paginated, newest first); POST …/revisions/{rev}/revert saves an old overlay as a new revision.

Size: +654 -1 = 655 changed lines (without docs/go.sum).

Verification

Each layer builds on its own: go build, go vet (also with -tags integration), golangci-lint run and go test ./... pass, and make swag leaves the tree clean. Integration suites for the packages this layer touches pass locally on testcontainers Postgres.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 26118944-e611-40ec-b793-1847d5be7be5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

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

ccf-review: REQUEST_CHANGES

1 Must-fix.

Stack (gh stack 484): #469 → #470 → #471 → #472 → #473 → #474 → #475 → #476 → #477 → #478 → #479 → #480 → #481 → #482 → #483

Comment thread internal/api/handler/agent_config.go Outdated
ccf-lisa Bot and others added 3 commits October 5, 2026 16:34
Fourteenth layer of the agent remote-configuration stack (split from #465): POST /api/admin/agents/{id}/config/preview validates a candidate overlay and shows, per instance, the redacted effective config, its diff, classified changes and whether the agent would apply it (bounded to 50 instances / 16 MiB of reported config, validated first; omitted-instances counts the rest; needs agent:configure); GET …/config/revisions lists revisions (paginated, newest first); POST …/revisions/{rev}/revert saves an old overlay as a new revision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PreviewBases loaded and decoded every validated instance's base through
ValidationBases, and Preview validated the overlay against all of them
only to discard the per-instance results, so the 50-instance / 16 MiB
preview bound did not cover the validation set. Preview now validates
the overlay alone, and PreviewBases reads the validation set as
instance ids only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gusfcarvalho
gusfcarvalho force-pushed the lisa/agent-config/14-admin-config-preview branch from 7993a9e to 0c378d0 Compare October 5, 2026 19:35
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