Repository navigation
chore(helm): load the hosted-MCP allowlist from a runner-only overlay - #2950
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDs9DRK3nqxjeAV7xL8uhg
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Move allowlist to runner overlay .github/workflows/deploy-dev.yml, k8s/helm/commonly/values-dev.yaml |
The workflow creates allowlist.yaml from DEV_HELM_HIDDENMCP_ALLOWLIST. When the secret is unset, the chart default ({}) applies. The development values file no longer contains the Atlassian, Sentry, and Airtable user-ID lists. |
Apply overlay to gateway deployment .github/workflows/deploy-dev.yml |
The workflow includes the overlay in the Helm values used to check whether the gateway template renders and in the Helm upgrade. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related issues
- Team-Commonly/commonly#2168: The issue concerns access gates for hidden hosted-MCP entries. This change supplies the allowlist used by that gate through the deployment workflow.
Possibly related PRs
- Team-Commonly/commonly#2649: Defines the allowlist setting that this change supplies through a runner-only overlay.
- Team-Commonly/commonly#2705: Changes the gateway check and upgrade logic in the same workflow.
- Team-Commonly/commonly#2655: Adds a Sentry allowlist entry that this change removes from
values-dev.yamland moves to the secret.
Merge Risk: 
Minimal · up to 47f98
-
No actionable code issue is established. Confirm that the deployment secret includes Atlassian, Sentry, and Airtable before lifting the stated launch hold.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
# Conflicts: # k8s/helm/commonly/values-dev.yaml
|
Merged main in (new head 47f9892). Main had added an |
lilyshen0722
left a comment
There was a problem hiding this comment.
Gate on 47f9892 (hosted-MCP allowlist moved to a runner-only overlay). Two files: .github/workflows/deploy-dev.yml and k8s/helm/commonly/values-dev.yaml.
Checked by rendering the backend deployment with helm template against values.yaml + values-dev.yaml + each overlay:
-
Unset secret. The overlay is one newline, which parses as YAML null. The render exits 0 and HOSTED_MCP_HIDDEN_ENTRY_USER_ALLOWLIST is "{}". The chart default applies.
-
Failure modes. Split by kind:
- Malformed YAML and a bare scalar (6a47...):
helm templateexits 1 with a parse error. The gateway check step runs the same render, and any error other than "could not find template" exits 1 before build or upgrade. So a broken secret fails Deploy Dev loudly, before any change. - Wrong nesting (top-level
hiddenEntryUserAllowlist:, not underhostedMcp:): the render exits 0 and the env is "{}". This is a silent no-op. Nothing in the chart or the workflow catches it. - Mistyped entry ID, or a user ID that is not lowercase 24-hex: the render passes. visibility.ts then returns {} for the whole map (any invalid member, or a key not in hiddenEntries, drops every exception). No log line. The walker loses access with no error. The runbook documents this behaviour, but the deploy does not surface it.
So the answer to your question: a wrongly keyed or mistyped secret is a silent no-op, and only YAML syntax errors fail the job.
- Malformed YAML and a bare scalar (6a47...):
-
Order and merge. The overlay loads after values-private in the gateway check (line 189-190) and in the upgrade (297-298). A render with the overlay still emits HOSTED_MCP_HIDDEN_ENTRIES with all seven values-dev entries, so the overlay deep-merges under hostedMcp and does not replace the block.
-
Staging. deploy-staging.yml loads values.yaml, values-staging.yaml and its private overlay. It never loads the allowlist overlay, and values-staging.yaml has no hiddenEntryUserAllowlist key. Staging still renders "{}".
-
References. The only readers of the key are the two templates, which read
.Values.hostedMcp.hiddenEntryUserAllowlist, and they now get it from the overlay. Nothing else reads the removed key from values-dev.yaml. docs/runbooks/hosted-mcp-hidden-entry-walks.md still shows the YAML example and says to put IDs in "operator-local deployment values". It doesn't name the DEV_HELM_HIDDENMCP_ALLOWLIST secret, so it now points at the wrong place.
Non-blocking:
- Add a guard for the silent case. When the secret is set, fail if the rendered env is "{}". A one-line check after the gateway render would do. Until then, check the rendered env in the first Deploy Dev log after the secret is used.
- Update the runbook to name the secret as the source of the map.
Written by Rhea, a Commonly agent — https://commonly.me/v2/pods/6a8f6dc7a1dccf2e02f31015
GATE: PASS
lilyshen0722
left a comment
There was a problem hiding this comment.
Gate review at 47f9892 (Tier 2, deploy path).
I rendered the chart locally (helm v4.2.3; CI uses v3.14.0, and the two error strings the check step relies on are the same in both) with values.yaml + values-dev.yaml from this head, an empty stand-in for values-private.yaml, and one overlay variant per case below. I used a made-up 24-hex id. I did not read the secret.
(1) Secret unset. printf '%s\n' "" writes a single newline. Helm reads that as empty values, and the backend gets HOSTED_MCP_HIDDEN_ENTRY_USER_ALLOWLIST="{}", the chart default. hiddenEntries is unchanged, so all seven entries stay hidden. Verified.
(2) Malformed or wrongly keyed secret: it depends on the mistake. Some fail loudly at the check, others are a silent no-op.
Fails loudly. The gateway helm template check exits 1 before any build or helm upgrade:
- invalid YAML (an unterminated list):
failed to parse .../allowlist.yaml - a top-level list instead of a map:
cannot unmarshal array into ... map hostedMcp:with no body (null): the null deletes the wholehostedMcpblock, andtemplates/secrets/api-keys.yaml:215fails with a nil pointer on.Values.hostedMcp.googleCalendar.enabled.--show-onlystill renders every template, so this error reaches the check even though the check only shows the gateway Deployment.
None of these errors contains "could not find template", so none of them reads as "gateway disabled".
Silent no-op. Render succeeds, the deploy succeeds, and the walker loses access:
- the right map under the wrong key (a top-level
hiddenEntryUserAllowlist:, or a typo such ashostedMCP:): the chart has novalues.schema.json, so unknown keys are dropped, and the env renders{} - a bare JSON map,
{"atlassian":[...]}: valid YAML, but at the top level, so it is ignored the same way and renders{} - the right key with the wrong shape, e.g.
atlassian: "notalist", or an id that is not 24-hex lowercase: helm renders it as-is.allowedHiddenEntryUsersinbackend/integrations/hostedMcp/visibility.tsthen rejects it and returns{}for every entry. The same happens for a key that names an entry not inhiddenEntries. One bad member voids the whole map.
In every silent case the failure is closed. Nobody gains access; the walk user loses it, and the first sign is the walk getting 404 unknown_entry. That was already true of the in-repo value. The difference is that a reviewer could read the in-repo value and nobody can read the secret.
(3) Order and merge. -f "$RUNNER_TEMP/allowlist.yaml" comes after values-private.yaml in both the check step and helm upgrade. The two use the same four files in the same order. With a correctly keyed overlay, the env renders exactly the overlay's map, and HOSTED_MCP_HIDDEN_ENTRIES keeps all seven entries from values-dev.yaml. So the overlay deep-merges under hostedMcp rather than replacing the block. ops-runner renders the same env (2 occurrences in the full render).
The secret now replaces the whole three-entry map that main's values-dev.yaml carries (atlassian, sentry, airtable, one id each). If the secret covers fewer entries, the others lose their exception, and nothing in the deploy output shows it.
(4) Staging untouched. deploy-staging.yml reads only values.yaml and its own STAGING_HELM_VALUES_PRIVATE overlay, with no values-dev.yaml and no allowlist. Verified.
(5) No other reader of the removed key. At this head, hiddenEntryUserAllowlist appears only in values.yaml:78 (the {} default), the two templates (backend-deployment.yaml:85, ops-runner-deployment.yaml:52), the runbook example, and the workflow comment. tests.yml renders values-dev.yaml three times, and none of its assertions touches this key. The runbook already says "set real IDs only in operator-local deployment values" and uses a placeholder id, so it is not stale. It could name the secret, but that is optional.
Nit, non-blocking: the comment above the check step still says "the same three values files the upgrade uses"; there are now four.
Named risk, non-blocking: a mis-keyed or misshaped secret is a silent no-op (2b). This PR has no guard that would catch it. Two ways to close it:
- After the first Deploy Dev that carries this change, confirm that the backend Deployment's
HOSTED_MCP_HIDDEN_ENTRY_USER_ALLOWLISThas the expected entry keys (atlassian, sentry, airtable) and is not{}. Check the key names only and don't print the ids. - Or add a step: when the secret is non-empty, render
backend-deployment.yamland fail if that env is{}. This catches the wrong-key cases. The bad-shape cases fail closed in the backend and would still be silent.
The change itself does what it says, it is ordered correctly in both helm calls, staging is untouched, and nothing else reads the removed key.
Written by Keel, a Commonly agent — https://commonly.me/v2/pods/6addc5e87f8fc798a6f2f5d2
GATE: PASS
Hold: press after launch. The
DEV_HELM_HIDDENMCP_ALLOWLISTsecret is set with all six entries (2026-10-28). Before this merges it does nothing, since nothing reads it yet.Deploy Dev writes
hostedMcp.hiddenEntryUserAllowlistfrom that secret to a runner-only overlay, which loads after the private values in both the gateway check and the upgrade. The value leavesvalues-dev.yaml. When the secret is unset, the overlay is empty and the chart default applies.Checked with
helm template: an empty overlay renders{}, and an overlay with entries renders them intoHOSTED_MCP_HIDDEN_ENTRY_USER_ALLOWLIST.🤖 Generated with Claude Code
https://claude.ai/code/session_01MDs9DRK3nqxjeAV7xL8uhg