Repository navigation
feat(agent): report the configuration to the API (remote_config off/report) - #108
Merged
gusfcarvalho merged 2 commits intoOct 6, 2026
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This was referenced Oct 5, 2026
ccf-lisa
Bot
force-pushed
the
lisa/agent-config-08-config-reports
branch
from
October 6, 2026 10:27
a500b8c to
d2576ca
Compare
Contributor
Author
|
PR approved. Marking ready for e2e. |
…eport) With api.auth credentials the agent now tells the API what it runs: - remote_config (set locally only: file, host env, CLI; R30) selects the mode. With credentials and no mode it is `report`; without credentials it is always `off` (R29). CCF_REMOTE_CONFIG_MODE sets it without a block. - In report mode the reconciler sends a config report (hostname, agent version, base and effective config, digest, warnings, plugins with their agent library version) at startup and whenever it changes, resends it after a send error or after 24h, and honours the API's error table: 404/401/403 back off 10 minutes, 409 pauses reports for an hour, 413 resends it with the base dropped (R8, R36). - base and effective are the unresolved forms, redacted by the API's agentconfig rules plus the plugin values that came from CCF_PLUGINS_* variables; the effective digest uses the same masking, so it never changes when a secret rotates (R24, R25, R55). - The heartbeat carries the applied revision (0 for the file) and the effective digest unless the mode is off (R11, R45). - main passes the goreleaser version to the report. The apply modes are accepted and reported, but fetching and applying an overlay lands in the next PR; until then they run the file only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt remote_config The ghcr images were built with a plain go build and no .git in the context, so their configuration reports said agent_version "dev". The Dockerfiles take a VERSION build arg (default dev) and pass it through -X main.version; the publish workflow sets it from the docker metadata version. goreleaser keeps setting main.version through its default ldflags. Show the remote_config block with its defaults in the README Basic example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ccf-lisa
Bot
force-pushed
the
lisa/agent-config-08-config-reports
branch
from
October 6, 2026 15:59
d2576ca to
24d4a3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 8/11 of the split of #95 (agent remote configuration) into a stack. Review it as the diff against its base branch.
With api.auth credentials the agent now tells the API what it runs:
mode. With credentials and no mode it is
report; without credentials itis always
off(R29). CCF_REMOTE_CONFIG_MODE sets it without a block.version, base and effective config, digest, warnings, plugins with their
agent library version) at startup and whenever it changes, resends it
after a send error or after 24h, and honours the API's error table:
404/401/403 back off 10 minutes, 409 pauses reports for an hour, 413
resends it with the base dropped (R8, R36).
agentconfig rules plus the plugin values that came from CCF_PLUGINS_*
variables; the effective digest uses the same masking, so it never
changes when a secret rotates (R24, R25, R55).
effective digest unless the mode is off (R11, R45).
The apply modes are accepted and reported, but fetching and applying an
overlay lands in the next PR; until then they run the file only.
The report-resend and fetch/409 backoff tests need an overlay to change the report, so they land with #110.
Size: 954 lines changed (go.mod/go.sum excluded). Builds, vets, is gofmt-clean and passes
go test -race ./...on its own; the top of the stack is byte-identical to #95 merged withmain.Stack
🤖 Generated with Claude Code