Skip to content

fix(config): stop flagging the connections section as an unknown key - #17847

Merged
bolichen97 merged 1 commit into
mainfrom
fix/github-connector-setup-13874
Oct 8, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/github-connector-setup-13874

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A config.json that holds an OAuth app saved from Settings loads without a false "unrecognized top-level keys: connections" warning.

Saving a client id on the OAuth Apps card writes connections.oauth_clients.<slug>.client_id into config.json. On the next start the gateway logs Config: unrecognized top-level keys: connections. The product wrote that section itself, and core reads it back, so the warning is wrong.

Why it matters

Everyone who saves an OAuth app gets this warning on every start. It tells them their config has a mistake when it does not, and it points at the exact block a pre-registered provider needs, which invites them to delete it while they debug a connection.

Not a goal

What changed (motivation → approach → change)

The warning fires for every top-level key that has no schema entry and is not in an exempt set. connections has no schema entry, but core both writes it (the OAuth Apps form) and reads it (connections/oauth_clients.py for the client id, agent_materialization/mcp_aliases.py for connections.tool_aliases).

voice_reply had the same problem and is already in _CORE_OWNED_TOP_KEYS in validation.py (config package). This PR adds connections to that set. Like voice_reply, only the object shape the readers keep is exempt, so a hand-written scalar still warns. The config spec (docs/system-specs/modules/config.md) names the new member and its readers.

Backwards compatibility

Compatible: the section was already captured and round-tripped on save; only the warning goes away. A non-object connections value still warns.

Removes nothing: the change only stops one log line for a valid section.

Tests

test/test_config_core_owned_sections.py:

  • loading a config with connections.oauth_clients.github logs no unrecognized-key warning and keeps the client id through to_dict() (fails on main);
  • a scalar connections value still warns;
  • the member pin lists connections, with reader tests for _config_client_id and the tool_aliases gate (the pin fails on main).

Without the validation.py change, 2 of the 15 tests fail; with it, all 15 pass. The new tests use no clock, sleep, port or network.

Manual verification

N/A — unit coverage sufficient: validate_config_data on a config with connections.oauth_clients.github printed the warning on main and prints nothing on this branch, and the full-load test drives the same KiroCrewConfig.load() the gateway calls on start.

Screenshots / video

N/A — no frontend file changed.

Related Issues

Refs #13874

Left open in #13874: the DCR request (won't fix, GitHub does not support DCR) and the PAT / Copilot-notice product questions. The Connect-with-no-app and Cancel reports do not reproduce on current main.

Pattern harvest

Not generalizable: the exempt set already exists and documents how to add a member; this section was written by a newer feature that missed it.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested a review from a team as a code owner October 7, 2026 20:46
@bolichen97
bolichen97 requested a review from iamwhatever October 7, 2026 20:46
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of dac427dea3035abd70adb426529f3c35924b015a — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] dac427d

Description read

[DESCRIPTION-READ] cfef7ceb6286bb319ac946b28cae1eac44138555bdb8db35190b8a0bde99184b

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of dac427dea3035abd70adb426529f3c35924b015a — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: someone who saves an OAuth app from Settings wants the gateway to start without falsely warning that the connections block they saved is a config mistake. This is a FIX.

  1. Startup no longer warns "unrecognized top-level keys: connections" when the section is an object. — justified
  2. A hand-written non-object connections value still warns. — justified
  3. The config spec and the core-owned set's comment now list connections with its writer and two readers. — justified

[FIRST-PRINCIPLES-REVIEWED] dac427d

Description read

[DESCRIPTION-READ] 85539e6432016c840b639876ff397451daafdff9d7868566530122e8fde4fb2c

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of dac427dea3035abd70adb426529f3c35924b015a and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] dac427d

False positive or not applicable? A repository writer can comment:
/ai-review override gpt dac427dea3035abd70adb426529f3c35924b015a: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed dac427dea3035abd70adb426529f3c35924b015a — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] dac427d

Verdict parsed from the review's SHA-scoped output markers for commit dac427dea3035abd70adb426529f3c35924b015a.

False positive or not applicable? A repository writer can comment:
/ai-review override fable dac427dea3035abd70adb426529f3c35924b015a: <one-sentence reason>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 7, 2026
@bolichen97
bolichen97 force-pushed the fix/github-connector-setup-13874 branch from 552acdc to b049751 Compare October 7, 2026 21:39
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/system-specs/modules/config.md since this head went green (c65697e -> 7812942); CI re-running.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 7, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

Backend Tests (Windows) shards 2 and 6 fail on two tests this PR does not touch (test_session_control_doc, test_http_server_bind_ratchet). Both fail on clean main ebff332 too; tracked in #17900. This PR waits for that fix, then rebases.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 7, 2026
The Settings OAuth Apps form writes connections.oauth_clients.<slug>
into config.json, and core reads it back, plus the
connections.tool_aliases gate. The section has no schema entry, so
every load logged "Config: unrecognized top-level keys: connections"
about a block the product wrote itself.

Add connections to _CORE_OWNED_TOP_KEYS, beside voice_reply. Like
that key, only the object shape the readers keep is exempt; a scalar
still warns.
@bolichen97
bolichen97 force-pushed the fix/github-connector-setup-13874 branch from b049751 to dac427d Compare October 8, 2026 00:08
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased onto 1ad2d6d, which carries the main-red fix #17909 (test_session_control_doc and test_http_server_bind_ratchet). CI re-running.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision dac427dea3035abd70adb426529f3c35924b015a touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 8, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) October 8, 2026 01:15

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving (crew-pr-reviewer). connections is written by Settings and read by core, so warning that it is "unrecognized" was a false positive. It joins voice_reply in _CORE_OWNED_TOP_KEYS behind the same shape gate, so a real unknown key still warns. One line plus tests, and both lanes PASS. CI is green and the base is main.

@bolichen97
bolichen97 merged commit d12f92c into main Oct 8, 2026
148 of 149 checks passed
@bolichen97
bolichen97 deleted the fix/github-connector-setup-13874 branch October 8, 2026 01:23
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 8, 2026
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