Skip to content

fix: the control plane owns a sidecar's listeners after the handshake - #177

Open
rogefm wants to merge 2 commits into
mainfrom
docs/control-plane-owns-listeners
Open

fix: the control plane owns a sidecar's listeners after the handshake#177
rogefm wants to merge 2 commits into
mainfrom
docs/control-plane-owns-listeners

Conversation

@rogefm

@rogefm rogefm commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What

control-plane/connect-sidecar.mdx, step 3, said:

Listeners still come from the local file. Everything the Control Plane manages — guardrails, masking, analyzer settings — arrives over the ping.

The first sentence is false, and the second one left listeners out of the list. It now reads:

The first handshake uploads this whole file. Everything the Control Plane manages — listeners, guardrails, masking, analyzer settings — arrives over the ping.

Plus one Troubleshooting row for the case this exposes: a Control Plane that already holds a configuration refuses the import and keeps its own.

Why it matters

This is the page a customer reads to connect a sidecar, and it described the ownership model backwards. It also misled us internally about who owns a listener.

The code it now matches

  • sidecar/daemon/controlplane.go:166-169 — "'assigned' imports the file's whole document, so a standalone sidecar connects by adding the URL and passing the token, nothing else. Once the plane holds a configuration it owns it, and listeners still in the file are ignored out loud (Run warns), never merged."
  • importLocalConfig (controlplane.go:355) PUTs the whole document, stripping only control_plane_url and license.
  • errPlaneAlreadyConfigured (controlplane.go:372) is the refusal the new Troubleshooting row describes. On the gateway it is the seed-once guard in AdoptSidecarConfiguration (gateway/models/sidecars.go:177-196), which answers 409.

Not in this PR

| It appears, but runs no managed guardrails | claims a sidecar that could not fetch falls back to its local file. It does not: a failed handshake at startup returns an error and the process refuses to start (controlplane.go:207), and a failed heartbeat keeps serving the last config the plane sent. Left alone here because it is a different claim from the one this PR fixes.

How to test

npm run dev   # http://localhost:3000/docs

Open /control-plane/connect-sidecar and read step 3 and the Troubleshooting table. Prose only, inside the existing <Step> and the existing table. No navigation change, no new page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WaDjmdUdiRoMXdZBcxwn2r

The page said listeners stay in the local file. The first handshake uploads
the whole document, listeners included, and the plane owns it from then on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaDjmdUdiRoMXdZBcxwn2r
@mintlify

mintlify Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hoopdev 🟢 Ready View Preview Sep 11, 2026, 8:50 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for decap-documentation ready!

Name Link
🔨 Latest commit d8d7d1c
🔍 Latest deploy log https://app.netlify.com/projects/decap-documentation/deploys/6aa4694c65ed3d0009f11ccb
😎 Deploy Preview https://deploy-preview-177--decap-documentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Clarify Control Plane ownership of sidecar listeners

🐞 Bug fix 📝 Documentation 🕐 Less than 5 minutes

Grey Divider

AI Description

• Correct handshake documentation to establish Control Plane ownership of uploaded listeners.
• Explain why existing Control Plane configurations reject local listener imports.
High-Level Assessment

The focused documentation correction is optimal because it aligns the connection guide with the existing seed-once ownership behavior. Broader protocol documentation changes were considered unnecessary for this narrowly scoped factual fix.

Files changed (1) +2 / -1

Other (1) +2 / -1
connect-sidecar.mdxCorrect sidecar listener ownership guidance +2/-1

Correct sidecar listener ownership guidance

• Clarifies that the initial handshake uploads the complete local configuration, including listeners, after which the Control Plane owns it. Adds troubleshooting guidance for sidecars whose listeners are not imported because the Control Plane already has a configuration.

control-plane/connect-sidecar.mdx

Only the first sentence was false. Replacing the second one too dropped the
only mention of how configuration arrives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaDjmdUdiRoMXdZBcxwn2r
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