← Back to Pull requests

[FR] - Trigger payloads through AGENT_TASK #57598

Open
Hitsuji-M opened this pull request with 1065 lines diff across 31 files
View on GitHub
Hitsuji-M Hitsuji-M commented on Oct 06, 2026 08:26 UTC
Author

What does this PR do?

Adds a new trigger_payloads AGENT_TASK. When the Agent receives it, it sends some payloads right away instead of waiting for their next scheduled round. Supported payloads are inventory-agent, inventory-host, inventory-checks and agent-health (health platform report). They're picked with a comma-separated args.payloads string (e.g. "inventory-agent,agent-health"); missing or empty means all of them. They're sent in parallel, and one failure doesn't block the others.

To support this:

  • The inventory components and the health platform egress each get a SendNow method. It goes through the same send code as their periodic cycle and only skips the scheduling checks.

  • The rcclient can now report a task as acknowledged but partially failed, with the error message attached.

  • The logic lives in a new comp/triggerpayloads component.
  • Motivation

    Get fresh inventory and agent-health data from an Agent on demand, instead of waiting for the next inventory or health platform interval.

    Additional Notes

    The dd-source AGENT_TASK schema (config-validator/schemas/AGENT_TASK/root.json) needs a follow-up adding trigger_payloads and the args.payloads string.

    🤖 Generated with Claude Code

    Diff: 1065 lines (+1038 / -27) across 31 files Reviewer: jinh-labs Review duration: 24732m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.95) × (1 − Review Confidence (0.81)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.95 · 1065 lines diff across 31 files
    0.95
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.72 · 5 substantive comment(s)
    0.72
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    81%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Sensitive Paths sensitive_paths
    0.095
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    12 items
    github-actions[bot] github-actions[bot] commented on code on Oct 06, 2026 08:29 UTC
    Code Review
    comp/triggerpayloads/impl/triggerpayloads_test.go:1
    @@ -0,0 +1,261 @@
    +// Unless explicitly stated otherwise all files in this repository are licensed
    +// under the Apache License Version 2.0.
    +// This product includes software developed at Datadog (https://www.datadoghq.com/).
    +// Copyright 2026-present Datadog, Inc.
    +
    +//go:build test
    +
    +package triggerpayloadsimpl
    +
    +import (
    +	"context"
    +	"errors"
    +	"sync"
    +	"sync/atomic"
    +	"testing"
    +	"time"
    +
    +	"github.com/stretchr/testify/assert"
    +	"github.com/stretchr/testify/require"
    +
    +	logmock "github.com/DataDog/datadog-agent/comp/core/log/mock"
    +	egressmock "github.com/DataDog/datadog-agent/comp/healthplatform/egress/mock"
    +	rcclienttypes "github.com/DataDog/datadog-agent/comp/remote-config/rcclient/types"
    +	triggerpayloads "github.com/DataDog/datadog-agent/comp/triggerpayloads/def"
    +	"github.com/DataDog/datadog-agent/pkg/remoteconfig/state"
    +)
    +
    +type fakePayload struct {
    +	calls atomic.Int32
    +	err   error
    +}
    +
    +func (f *fakePayload) send(context.Context) error {
    +	f.calls.Add(1)
    +	return f.err
    +}
    +
    +type fakeInventoryAgent struct {
    +	fakePayload
    +}
    +
    +func (f *fakeInventoryAgent) Set(string, interface{})     {}
    +func (f *fakeInventoryAgent) Get() map[string]interface{} { return nil }
    +func (f *fakeInventoryAgent) SendNow() error              { return f.send(context.Background()) }
    +
    +func newTestTriggerPayloads(t *testing.T, inventory, health *fakePayload) *triggerPayloads {
    +	return &triggerPayloads{
    +		log: logmock.New(t),
    +		payloads: map[string]sendFunc{
    +			triggerpayloads.PayloadInventoryMetadata: inventory.send,
    +			triggerpayloads.PayloadAgentHealth:       health.send,
    +		},
    +	}
    +}
    +
    +func parseTask(t *testing.T, raw string) rcclienttypes.AgentTaskConfig {
    +	task, err := rcclienttypes.ParseConfigAgentTask([]byte(raw), state.Metadata{})
    +	require.NoError(t, err)
    +	return task
    +}
    +
    +func TestNewComponent(t *testing.T) {
    +	inventory := &fakeInventoryAgent{}
    +	provides := NewComponent(Requires{
    +		Log:            logmock.New(t),
    +		InventoryAgent: inventory,
    +		HealthEgress:   egressmock.New(),
    +	})
    +
    +	require.NotNil(t, provides.Comp)
    +	require.NotNil(t, provides.RCListener.Listener)
    +
    +	processed, err := provides.RCListener.Listener(rcclienttypes.TaskTriggerPayloads, parseTask(t, `{"task_type":"trigger_payloads","uuid":"a"}`))
    +	assert.True(t, processed)
    +	assert.NoError(t, err)
    +	assert.Equal(t, int32(1), inventory.calls.Load())
    +}
    +
    +func TestHandleAgentTaskOtherType(t *testing.T) {
    +	inventory, health := &fakePayload{}, &fakePayload{}
    +	tp := newTestTriggerPayloads(t, inventory, health)
    +
    +	processed, err := tp.handleAgentTask(rcclienttypes.TaskFlare, parseTask(t, `{"task_type":"flare","uuid":"a"}`))
    +	assert.False(t, processed)
    +	assert.NoError(t, err)
    +	assert.Zero(t, inventory.calls.Load())
    +	assert.Zero(t, health.calls.Load())
    +}
    +
    +func TestHandleAgentTask(t *testing.T) {
    +	tests := []struct {
    +		name              string
    +		task              string
    +		expectedInventory int32
    +		expectedHealth    int32
    +	}{
    +		{
    +			name:              "no args",
    +			task:              `{"task_type":"trigger_payloads","uuid":"a"}`,
    +			expectedInventory: 1,
    +			expectedHealth:    1,
    +		},
    +		{
    +			name:              "null payloads",
    +			task:              `{"task_type":"trigger_payloads","uuid":"a","args":{"payloads":null}}`,
    +			expectedInventory: 1,
    +			expectedHealth:    1,
    +		},
    +		{
    +			name:              "empty payloads",
    +			task:              `{"task_type":"trigger_payloads","uuid":"a","args":{"payloads":[]}}`,
    +			expectedInventory: 1,
    +			expectedHealth:    1,
    +		},
    +		{
    +			name:              "subset",
    +			task:              `{"task_type":"trigger_payloads","uuid":"a","args":{"payloads":["agent-health"]}}`,
    +			expectedInventory: 0,
    +			expectedHealth:    1,
    +		},
    +		{
    +			name:              "duplicates",
    +			task:              `{"task_type":"trigger_payloads","uuid":"a","args":{"payloads":["inventory-metadata","inventory-metadata"]}}`,
    +			expectedInventory: 1,
    +			expectedHealth:    0,
    +		},
    +	}
    +
    +	for _, tt := range tests {
    +		t.Run(tt.name, func(t *testing.T) {
    +			inventory, health := &fakePayload{}, &fakePayload{}
    +			tp := newTestTriggerPayloads(t, inventory, health)
    +
    +			processed, err := tp.handleAgentTask(rcclienttypes.TaskTriggerPayloads, parseTask(t, tt.task))
    +			assert.True(t, processed)
    +			assert.NoError(t, err)
    +			assert.Equal(t, tt.expectedInventory, inventory.calls.Load())
    +			assert.Equal(t, tt.expectedHealth, health.calls.Load())
    +		})
    +	}
    +}
    +
    +func TestHandleAgentTaskInvalidPayloads(t *testing.T) {
    +	inventory, health := &fakePayload{}, &fakePayload{}
    +	tp := newTestTriggerPayloads(t, inventory, health)
    +
    +	processed, err := tp.handleAgentTask(rcclienttypes.TaskTriggerPayloads, parseTask(t, `{"task_type":"trigger_payloads","uuid":"a","args":{"payloads":"agent-health"}}`))
    +	assert.True(t, processed)
    +	assert.Error(t, err)
    +	assert.Zero(t, inventory.calls.Load())
    +	assert.Zero(t, health.calls.Load())
    +}
    +
    +func TestTriggerPartialFailure(t *testing.T) {
    +	inventory, health := &fakePayload{}, &fakePayload{err: errors.New("boom")}
    +	tp := newTestTriggerPayloads(t, inventory, health)
    +
    +	err := tp.Trigger(context.Background(), nil)
    +
    +	var partialErr *rcclienttypes.PartialFailureError
    +	require.ErrorAs(t, err, &partialErr)
    +	assert.ErrorContains(t, err, "agent-health: boom")
    +	assert.NotContains(t, err.Error(), "inventory-metadata")
    +	assert.Equal(t, int32(1), inventory.calls.Load())
    +	assert.Equal(t, int32(1), health.calls.Load())
    +}
    +
    +func TestTriggerUnknownPayload(t *testing.T) {
    +	inventory, health := &fakePayload{}, &fakePayload{}
    +	tp := newTestTriggerPayloads(t, inventory, health)
    +
    +	err := tp.Trigger(context.Background(), []string{"agent-health", "unknown"})
    +
    +	var partialErr *rcclienttypes.PartialFailureError
    +	require.ErrorAs(t, err, &partialErr)
    +	assert.ErrorContains(t, err, "unknown: unknown payload")
    +	assert.Equal(t, int32(1), health.calls.Load())
    +}
    +
    +func TestTriggerAllFailed(t *testing.T) {
    +	inventory, health := &fakePayload{err: errors.New("boom1")}, &fakePayload{err: errors.New("boom2")}
    +	tp := newTestTriggerPayloads(t, inventory, health)
    +
    +	err := tp.Trigger(context.Background(), nil)
    +
    +	var partialErr *rcclienttypes.PartialFailureError
    +	require.Error(t, err)
    +	assert.False(t, errors.As(err, &partialErr))
    +	assert.ErrorContains(t, err, "inventory-metadata: boom1")
    +	assert.ErrorContains(t, err, "agent-health: boom2")
    +}
    +
    +func TestTriggerDoesNotModifyInput(t *testing.T) {
    +	tp := newTestTriggerPayloads(t, &fakePayload{}, &fakePayload{})
    +	payloads := []string{"inventory-metadata", "agent-health"}
    +
    +	require.NoError(t, tp.Trigger(context.Background(), payloads))
    +	assert.Equal(t, []string{"inventory-metadata", "agent-health"}, payloads)
    +}
    +
    +func TestTriggerParallel(t *testing.T) {
    +	// Each payload waits for the other one to start, so this only completes if they run concurrently
    +	var barrier sync.WaitGroup
    +	barrier.Add(2)
    +	send := func(context.Context) error {
    +		barrier.Done()
    +		barrier.Wait()
    +		return nil
    +	}
    +	tp := &triggerPayloads{
    +		log: logmock.New(t),
    +		payloads: map[string]sendFunc{
    +			triggerpayloads.PayloadInventoryMetadata: send,
    +			triggerpayloads.PayloadAgentHealth:       send,
    +		},
    +	}
    +
    +	done := make(chan error)
    +	go func() { done <- tp.Trigger(context.Background(), nil) }()
    +
    +	select {
    +	case err := <-done:
    +		assert.NoError(t, err)
    +	case <-time.After(5 * time.Second):
    +		t.Fatal("payloads were not triggered in parallel")
    +	}
    +}
    +
    +func TestTriggerTimeout(t *testing.T) {
    +	block := make(chan struct{})
    +	defer close(block)
    +	health := &fakePayload{}
    +	tp := &triggerPayloads{
    +		log: logmock.New(t),
    +		payloads: map[string]sendFunc{
    +			// Ignores the context, like the inventory sender
    +			triggerpayloads.PayloadInventoryMetadata: func(context.Context) error {
    +				<-block
    +				return nil
    +			},
    +			triggerpayloads.PayloadAgentHealth: health.send,
    +		},
    +	}
    +
    +	ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)

    [P2] Make timeout coverage independent of scheduling speed

    The 50 ms deadline starts before Trigger and its health sender run, but the test requires the health send to succeed before expiration. On a busy CI worker, the context can expire before that goroutine publishes its result, causing Trigger to return a total failure and require.ErrorAs to fail. Synchronize with completion of the health send before canceling the context, or inject a mock clock and advance it deterministically.

    github-actions[bot] github-actions[bot] commented on Oct 06, 2026 08:29 UTC
    Reviewer

    AI review by Codex (OpenAI) - workflow run

    The patch is incorrect: the new timeout test depends on goroutine scheduling within 50 ms and can fail intermittently under CI load.

    dd-octo-sts[bot] dd-octo-sts[bot] commented on Oct 06, 2026 08:35 UTC
    Bot

    Go Package Import Differences

    Baseline: 739aeea22b6e17e1c2d56981952ee254a1bd962b
    Comparison: bb73d4b11748aa73db490533089fd147791c31b8

    <table><thead><tr><th>binary</th><th>os</th><th>arch</th><th>change</th></tr></thead><tbody>
    <tr><td>agent</td><td>linux</td><td>amd64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>agent</td><td>linux</td><td>arm64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>agent</td><td>windows</td><td>amd64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>agent</td><td>darwin</td><td>amd64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>agent</td><td>darwin</td><td>arm64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>agent</td><td>aix</td><td>ppc64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>iot-agent</td><td>linux</td><td>amd64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>iot-agent</td><td>linux</td><td>arm64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    <tr><td>heroku-agent</td><td>linux</td><td>amd64</td><td><details><summary>+3, -0</summary>
    <pre lang='diff'>
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/def
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/fx
    +github.com/DataDog/datadog-agent/comp/triggerpayloads/impl
    </pre></details></td></tr>
    </tbody></table>

    datadog-prod-us1-5[bot] datadog-prod-us1-5[bot] commented on Oct 06, 2026 08:42 UTC
    Bot

    🎯 Code Coverage (<a target='_blank' href='https://app.datadoghq.com/ci/code-coverage/github.com%2Fdatadog%2Fdatadog-agent/pull-requests/57598'>details</a>)<br>• <strong><span title="Percentage of modified executable lines covered by tests in this PR">Patch Coverage</span></strong>: 89.21%<br>• <strong><span title="Percentage of all executable lines covered by tests in the entire codebase">Overall Coverage</span></strong>: 62.56% <span title="Change in overall coverage compared to the base branch">(+3.39%)</span><br>

    <sub>
    This comment will be updated automatically if new data arrives. <br />
    🔗 Commit SHA: bb73d4b | <a href="https://docs.datadoghq.com/integrations/guide/source-code-integration/#pr-comments">Docs</a> | Give us <a href="https://dd.enterprise.slack.com/archives/C07E3U2QRMM">feedback</a>!
    </sub>

    dd-octo-sts[bot] dd-octo-sts[bot] commented on Oct 06, 2026 09:08 UTC
    Bot

    Static quality checks

    ✅ Please find below the results from static quality gates
    Comparison made with ancestor 739aeea22b6e17e1c2d56981952ee254a1bd962b
    📊 Static Quality Gates Dashboard
    🔗 SQG Job

    <details open>
    <summary>Successful checks</summary>

    Info

    ||Quality gate|Change|Size (prev → curr → max)|
    |--|--|--|--|
    |✅|agent_deb_amd64|+20.0 KiB (0.00% increase, -0.17% of buffer)|749.256 → 749.276 → 760.600|
    |✅|agent_deb_amd64_fips|+28.0 KiB (0.00% increase, -0.23% of buffer)|681.899 → 681.927 → 693.640|
    |✅|agent_heroku_amd64|+24.0 KiB (0.01% increase, -0.27% of buffer)|311.595 → 311.619 → 320.190|
    |✅|agent_msi|+26.0 KiB (0.00% increase, -0.61% of buffer)|651.055 → 651.080 → 655.230|
    |✅|agent_rpm_amd64|+20.0 KiB (0.00% increase, -0.17% of buffer)|749.240 → 749.260 → 760.580|
    |✅|agent_rpm_amd64_fips|+28.0 KiB (0.00% increase, -0.23% of buffer)|681.883 → 681.911 → 693.620|
    |✅|agent_rpm_arm64|+24.0 KiB (0.00% increase, -0.20% of buffer)|719.645 → 719.668 → 731.150|
    |✅|agent_rpm_arm64_fips|+24.0 KiB (0.00% increase, -0.20% of buffer)|657.891 → 657.915 → 669.800|
    |✅|agent_suse_amd64|+20.0 KiB (0.00% increase, -0.17% of buffer)|749.240 → 749.260 → 760.580|
    |✅|agent_suse_amd64_fips|+28.0 KiB (0.00% increase, -0.23% of buffer)|681.883 → 681.911 → 693.620|
    |✅|agent_suse_arm64|+24.0 KiB (0.00% increase, -0.20% of buffer)|719.645 → 719.668 → 731.150|
    |✅|agent_suse_arm64_fips|+24.0 KiB (0.00% increase, -0.20% of buffer)|657.891 → 657.915 → 669.800|
    |✅|docker_agent_amd64|+20.0 KiB (0.00% increase, -0.17% of buffer)|805.327 → 805.347 → 816.790|
    |✅|docker_agent_arm64|+24.0 KiB (0.00% increase, -0.20% of buffer)|800.386 → 800.409 → 812.020|
    |✅|docker_agent_jmx_amd64|+19.99 KiB (0.00% increase, -0.17% of buffer)|996.197 → 996.217 → 1007.660|
    |✅|docker_agent_jmx_arm64|+24.0 KiB (0.00% increase, -0.20% of buffer)|980.036 → 980.059 → 991.670|
    |✅|iot_agent_deb_amd64|+24.0 KiB (0.05% increase, -2.99% of buffer)|47.625 → 47.648 → 48.410|
    |✅|iot_agent_deb_arm64|+24.0 KiB (0.05% increase, -2.92% of buffer)|44.068 → 44.092 → 44.870|
    |✅|iot_agent_deb_armhf|+24.0 KiB (0.05% increase, -2.93% of buffer)|44.881 → 44.905 → 45.680|
    |✅|iot_agent_rpm_amd64|+24.0 KiB (0.05% increase, -2.95% of buffer)|47.625 → 47.649 → 48.420|
    |✅|iot_agent_suse_amd64|+24.0 KiB (0.05% increase, -2.98% of buffer)|47.624 → 47.648 → 48.410|

    </details>
    <details>
    <summary>12 successful checks with minimal change (&lt; 2 KiB)</summary>

    ||Quality gate|Current Size|
    |--|--|--|
    |✅|docker_cws_instrumentation_amd64|7.447 MiB|
    |✅|docker_cws_instrumentation_arm64|6.877 MiB|
    |✅|docker_dogstatsd_amd64|40.121 MiB|
    |✅|docker_dogstatsd_arm64|38.136 MiB|
    |✅|docker_host_profiler_amd64|309.031 MiB|
    |✅|docker_host_profiler_arm64|320.145 MiB|
    |✅|dogstatsd_deb_amd64|30.864 MiB|
    |✅|dogstatsd_deb_arm64|28.806 MiB|
    |✅|dogstatsd_rpm_amd64|30.864 MiB|
    |✅|dogstatsd_suse_amd64|30.864 MiB|
    |✅|docker_cluster_agent_amd64|211.844 MiB|
    |✅|docker_cluster_agent_arm64|224.797 MiB|

    </details>

    cit-pr-commenter-54b7da[bot] cit-pr-commenter-54b7da[bot] commented on Oct 06, 2026 09:21 UTC
    Bot

    Regression Detector

    Regression Detector Results

    Metrics dashboard
    Target profiles
    Job ID: d6596275-bf98-4f65-b95b-1e891fe7e20b

    Baseline: 739aeea22b6e17e1c2d56981952ee254a1bd962b
    Comparison: bb73d4b11748aa73db490533089fd147791c31b8
    [Diff](739aeea22b6e17e1c2d56981952ee254a1bd962b...bb73d4b11748aa73db490533089fd147791c31b8)

    Optimization Goals: ✅ No significant changes detected

    <details>
    <summary><h2>
    Fine details of change detection per experiment
    </h2></summary>

    | perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
    |------|---------------------------------------------|--------------------|----------|----------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | ➖ | dsd_uds_10mb_3k_timestamped_contexts_cpu | % cpu utilization | +1.05 | [+0.78, +1.33] | 1 | Logs |
    | ➖ | dsd_uds_10mb_3k_timestamped_contexts_memory | memory utilization | +0.69 | [+0.48, +0.91] | 1 | Logs |
    | ➖ | quality_gate_security_mean_fs_load | memory utilization | +0.69 | [+0.64, +0.75] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_metrics_logs | memory utilization | +0.64 | [+0.41, +0.88] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_private_action_runner | memory utilization | +0.14 | [+0.01, +0.27] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_security_idle | memory utilization | +0.07 | [+0.04, +0.11] | 1 | Logs bounds checks dashboard |
    | ➖ | python_openmetrics | % cpu utilization | -0.04 | [-0.72, +0.64] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_security_no_fs_load | memory utilization | -0.05 | [-0.11, +0.00] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_idle | memory utilization | -0.13 | [-0.17, -0.09] | 1 | Logs bounds checks dashboard |
    | ➖ | quality_gate_idle_all_features | memory utilization | -0.25 | [-0.33, -0.18] | 1 | Logs bounds checks dashboard |
    | ➖ | dsd_uds_client_drop_detector_cpu | % cpu utilization | -0.84 | [-1.38, -0.30] | 1 | Logs |
    | ➖ | quality_gate_logs | % cpu utilization | -1.33 | [-2.22, -0.44] | 1 | Logs bounds checks dashboard |
    </details>

    <details>
    <summary><h2>
    Bounds Checks: ✅ Passed
    </h2></summary>

    | perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
    |------|------------------------------------|-----------------------|-------------------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | ✅ | python_openmetrics | checks_execution_time | 10/10 | 75.68 ≤ 100 | bounds checks dashboard |
    | ✅ | python_openmetrics | cpu_usage | 10/10 | 1344.39 ≤ 1500 | bounds checks dashboard |
    | ✅ | python_openmetrics | memory_usage | 10/10 | 4.30GiB ≤ 4.75GiB | bounds checks dashboard |
    | ✅ | quality_gate_idle | intake_connections | 10/10 | 4 ≤ 5 | bounds checks dashboard |
    | ✅ | quality_gate_idle | memory_usage | 10/10 | 177.72MiB ≤ 181MiB | bounds checks dashboard |
    | ✅ | quality_gate_idle | total_bytes_received | 10/10 | 764.97KiB ≤ 819.20KiB | bounds checks dashboard |
    | ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | 2 ≤ 5 | bounds checks dashboard |
    | ✅ | quality_gate_idle_all_features | memory_usage | 10/10 | 474.87MiB ≤ 542MiB | bounds checks dashboard |
    | ✅ | quality_gate_idle_all_features | total_bytes_received | 10/10 | 1.14MiB ≤ 1.25MiB | bounds checks dashboard |
    | ✅ | quality_gate_logs | intake_connections | 10/10 | 17 ≤ 40 | bounds checks dashboard |
    | ✅ | quality_gate_logs | memory_usage | 10/10 | 218.31MiB ≤ 228MiB | bounds checks dashboard |
    | ✅ | quality_gate_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
    | ✅ | quality_gate_logs | total_bytes_received | 10/10 | 263.91MiB ≤ 292MiB | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | cpu_usage | 10/10 | 361.45 ≤ 2000 | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | intake_connections | 10/10 | 18 ≤ 40 | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | memory_usage | 10/10 | 424.38MiB ≤ 455MiB | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
    | ✅ | quality_gate_metrics_logs | total_bytes_received | 10/10 | 0.94GiB ≤ 1.04GiB | bounds checks dashboard |
    | ✅ | quality_gate_private_action_runner | memory_usage | 10/10 | 74.29MiB ≤ 77MiB | bounds checks dashboard |
    | ✅ | quality_gate_security_idle | cpu_usage | 10/10 | 29.39 ≤ 100 | bounds checks dashboard |
    | ✅ | quality_gate_security_idle | memory_usage | 10/10 | 329.57MiB ≤ 357MiB | bounds checks dashboard |
    | ✅ | quality_gate_security_mean_fs_load | cpu_usage | 10/10 | 41.43 ≤ 200 | bounds checks dashboard |
    | ✅ | quality_gate_security_mean_fs_load | memory_usage | 10/10 | 312.75MiB ≤ 337MiB | bounds checks dashboard |
    | ✅ | quality_gate_security_no_fs_load | cpu_usage | 10/10 | 24.43 ≤ 100 | bounds checks dashboard |
    | ✅ | quality_gate_security_no_fs_load | memory_usage | 10/10 | 322.22MiB ≤ 348MiB | bounds checks dashboard |
    </details>

    <details>
    <summary><h2>
    Explanation
    </h2></summary>

    Confidence level: 90.00%
    Effect size tolerance: |Δ mean %| ≥ 5.00%

    Performance changes are noted in the perf column of each table:

    ✅ = significantly better comparison variant performance
    ❌ = significantly worse comparison variant performance
    ➖ = no significant change in performance

    A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

    For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

    1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

    2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate*, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

    3. Its configuration does not mark it "erratic".
    </details>

    CI Pass/Fail Decision

    ✅ Passed. All Quality Gates passed.

  • quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_idle_all_features, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.

  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.

  • quality_gate_private_action_runner, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.

  • quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.

  • quality_gate_idle, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.

  • quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.

  • quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • github-actions[bot] github-actions[bot] commented on Oct 12, 2026 09:10 UTC
    Reviewer

    AI review by Codex (OpenAI) - workflow run

    The patch is correct. I found no actionable correctness regressions in the send paths, concurrency handling, or partial-failure reporting. Validation is limited to static review; the new task lacks fakeintake E2E coverage.

    jinh-labs jinh-labs approved these changes on Oct 12, 2026 09:27 UTC
    Approved Reviewer

    Approved these changes.

    mellon85 mellon85 commented on code on Oct 12, 2026 09:31 UTC
    Code Review
    comp/remote-config/rcclient/impl/rcclient.go:1
    @@ -483,21 +483,32 @@ func (rc *rcClient) agentTaskUpdateCallback(updates map[string]state.RawConfig,
     
     				var err error
     				var processed bool
    +				partialOnly := true
     				// Call all the listeners component
     				for _, l := range rc.taskListeners {
     					oneProcessed, oneErr := l(types.TaskType(task.Config.TaskType), task)
     					// Check if the task was processed at least once
     					processed = oneProcessed || processed
     					if oneErr != nil {
     						pkglog.Errorf("Error while processing agent task %s: %s", configPath, oneErr)
    +						var partialErr *types.PartialFailureError

    can we move the agent task code out of the rc client? so we don't have the files overlap teams?

    mellon85 mellon85 approved these changes on Oct 12, 2026 09:32 UTC
    Approved Reviewer

    Approved these changes.

    louis-cqrl louis-cqrl approved these changes on Oct 19, 2026 13:24 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    Hitsuji-M Hitsuji-M
    Labels
    risk: low confidence: 81.3% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 94.7% (HIGH) · Higher = larger blast radius
    94.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 81.3% · Lower = rushed or shallow review
    81.3%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%