Repository navigation
fix(config): stop flagging the connections section as an unknown key - #17847
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (3 items) — 3 justifiedIntent: someone who saves an OAuth app from Settings wants the gateway to start without falsely warning that the
[FIRST-PRINCIPLES-REVIEWED] dac427d Description read[DESCRIPTION-READ] 85539e6432016c840b639876ff397451daafdff9d7868566530122e8fde4fb2c That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
552acdc to
b049751
Compare
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.
b049751 to
dac427d
Compare
UX Review (Opus 5.5) — ⏭️ skippedRevision |
iamwhatever
left a comment
There was a problem hiding this comment.
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.
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_idintoconfig.json. On the next start the gateway logsConfig: 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
client_not_configuredand the card shows the Configure state, and Cancel drops the wait locally without waiting on the backend. Existing tests cover both and pass, so this PR does not touch them.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.
connectionshas no schema entry, but core both writes it (the OAuth Apps form) and reads it (connections/oauth_clients.pyfor the client id,agent_materialization/mcp_aliases.pyforconnections.tool_aliases).voice_replyhad the same problem and is already in_CORE_OWNED_TOP_KEYSinvalidation.py(config package). This PR addsconnectionsto that set. Likevoice_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
connectionsvalue still warns.Removes nothing: the change only stops one log line for a valid section.
Tests
test/test_config_core_owned_sections.py:connections.oauth_clients.githublogs no unrecognized-key warning and keeps the client id throughto_dict()(fails on main);connectionsvalue still warns;connections, with reader tests for_config_client_idand thetool_aliasesgate (the pin fails on main).Without the
validation.pychange, 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_dataon a config withconnections.oauth_clients.githubprinted the warning on main and prints nothing on this branch, and the full-load test drives the sameKiroCrewConfig.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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)