Skip to content

feat(fleet): add config_change scenario + generic fleet service-config mount#35

Merged
yusufozturk merged 3 commits into
mainfrom
feat/fleet-config-change-scenario
Jun 30, 2026
Merged

feat(fleet): add config_change scenario + generic fleet service-config mount#35
yusufozturk merged 3 commits into
mainfrom
feat/fleet-config-change-scenario

Conversation

@namles

@namles namles commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

Adds a config_change fleet automation scenario and makes the fleet service-config mount subject-agnostic (no vendor-specific literals in the renderer). Also fixes fleet subjects never bringing up their data pipeline.

What's new

  • config_change scenario (internal/runner/runner.go): verifies a live operational config change delivered out-of-band by the control plane is applied and reconciled on a running subject with no restart:

    1. deliver_config delivers config A — target points at a dead endpoint, so delivery is blocked.
    2. The scenario confirms delivery is blocked (attributability).
    3. Pushes the changed config from configs/update.vmf (target → working receiver) over the fleet link.
    4. Asserts delivery starts (receiver >= correctness.min_received).

    Reuses the existing deliver_config field and the configs/update.* file convention (mirrors config_update reading configs/update.yml) — no new case field.

  • Generic Subject.FleetServiceConfigPath (internal/config/subject.go): declares the in-container path where a fleet/managed subject reads its service/bootstrap config (operational config arrives out-of-band from the control plane). When a case sets fleet.deliver_config and the subject declares this path, the harness mounts the case config there and runs the subject without a config-path override.

Why

Previously the renderer hardcoded a subject name and an in-container path to achieve this. That path now lives only on the subject definition, alongside every other vendor's paths — keeping the renderer subject-agnostic and the public repo free of one vendor's internal layout.

Bug fix included

Fleet subjects never brought up their data pipeline: with a single -config-path file serving as both service and system config, the delivered operational config was never reloaded, so listeners never started. This silently affected all fleet cases that rely on the data path (e.g. live_data).

Testing

  • go build ./... clean.
  • Verified end-to-end against a fleet subject: delivery blocked under config A (received ~0), then starts after pushing update.vmf (received well above threshold). The companion bench case is fleet_vmf_config_change_correctness (separate repo).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added new fleet automation correctness scenarios, including configuration-change and pipeline verification/data checks.
    • Enabled fleet-mode service config mounting for the default vmetric subject via a dedicated service config path.
  • Bug Fixes

    • Updated fleet scenario validation to support config_change with required prior configuration context.
    • Improved fleet compose behavior so fleet-delivered service config correctly overrides in-container config-path settings.
    • Enhanced receiver correctness verdicts and /metrics to include RequiredSubstring results when configured.

…g mount

Add a `config_change` fleet automation scenario that verifies a live
operational config change, delivered out-of-band by the control plane,
is applied AND reconciled on a running subject with no restart:
deliver_config provides config A (target -> dead endpoint, delivery
blocked); the scenario confirms delivery is blocked, pushes the changed
config from configs/update.vmf (target -> working receiver) over the
fleet link, and asserts delivery starts. Reuses the existing
deliver_config field and the configs/update.* file convention, so no
new case field is introduced.

Make the fleet service-config mount subject-agnostic: add a generic
Subject.FleetServiceConfigPath field. When a case sets fleet.deliver_config
and the subject declares this path, the harness mounts the case config as
the service/bootstrap config there and runs the subject without a
config-path override, so the delivered operational config governs the
pipeline. This replaces a hardcoded subject name and in-container path in
the renderer; the path now lives only on the subject definition alongside
every other vendor's paths.

This also fixes fleet directors never bringing up their data pipeline:
with a single -config-path file serving as both service and system config,
the delivered operational config was never reloaded, so listeners never
started. Affected all fleet cases relying on the data path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a06d18cb-8071-443f-be4b-5390b4dbdc1c

📥 Commits

Reviewing files that changed from the base of the PR and between 93778de and e2e833d.

📒 Files selected for processing (3)
  • containers/receiver/main.go
  • internal/config/case.go
  • internal/runner/runner.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/config/case.go

Walkthrough

Adds fleet config-update support across validation, compose wiring, receiver correctness checks, and runner scenarios. It introduces a subject fleet service config path, enables config-change validation, and adds fleet runs that verify delivery and verifier behavior before and after updates.

Changes

Fleet config update flow

Layer / File(s) Summary
Subject config and fleet validation
internal/config/subject.go, internal/config/case.go
Adds FleetServiceConfigPath to Subject, sets it for vmetric, and requires fleet.deliver_config for config_change.
Compose wiring and receiver checks
internal/orchestrator/docker.go, containers/receiver/main.go
Redirects fleet config mounts, clears subject commands when fleet-delivered config is used, and extends receiver validation and metrics gating for RequiredSubstring.
Runner fleet scenarios
internal/runner/runner.go
Sets the verifier image for fleet correctness runs and adds config_change, pipeline_data, pipeline_verify, and pipeline_verify_change scenarios.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 I sniff the config in the breeze,
then hop through fleets and verifier trees.
A silent mount, a تازه update hum,
and metrics say the changes come.
My floppy ears cheer, small and bright —
config change flows just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: a new config_change fleet scenario and a generic fleet service-config mount.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fleet-config-change-scenario

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

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/config/case.go`:
- Around line 1230-1233: The scenario validator in the switch over
tc.Fleet.Scenario currently allows config_change without requiring a prior
delivered config, which lets tests validate an initial config instead of a live
A→B transition. Update the validation logic in the case handling for
config_change so it rejects empty tc.Fleet.DeliverConfig (while keeping other
scenarios unchanged), ensuring runFleetAutomationCorrectness only accepts
config_change when a prior config was already delivered.

In `@internal/runner/runner.go`:
- Around line 3956-3960: The correctness check in the runner currently compares
against an absolute received-line total, which can let pre-existing traffic
satisfy Phase 2 without proving any new delivery after the config push. Update
the logic around the receiver validation in runner.go to use rmB.LinesReceived
as the baseline and require the post-change count to exceed that baseline by the
expected amount, while keeping the existing minRecv/leak handling in the flow.
Make the fix in the code path that evaluates the receiver totals so the success
condition depends on additional lines received after the change, not the
absolute total.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2a44fb0b-9a93-42a6-ac2d-2e94467402b0

📥 Commits

Reviewing files that changed from the base of the PR and between 3c78e70 and f48e39e.

📒 Files selected for processing (4)
  • internal/config/case.go
  • internal/config/subject.go
  • internal/orchestrator/docker.go
  • internal/runner/runner.go

Comment thread internal/config/case.go
Comment thread internal/runner/runner.go
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deploying pipebench with  Cloudflare Pages  Cloudflare Pages

Latest commit: e2e833d
Status: ✅  Deploy successful!
Preview URL: https://e32c1494.pipebench.pages.dev
Branch Preview URL: https://feat-fleet-config-change-sce.pipebench.pages.dev

View logs

@namles namles added the wip label Jun 29, 2026
@namles namles removed the wip label Jun 29, 2026
@yusufozturk yusufozturk merged commit 837c79c into main Jun 30, 2026
5 checks passed
@yusufozturk yusufozturk deleted the feat/fleet-config-change-scenario branch June 30, 2026 10:08
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.

2 participants