Skip to content

fix(models): require explicit GitHub Copilot activation - #144749

Merged
obviyus merged 3 commits into
mainfrom
fix/copilot-explicit-activation
Sep 11, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/copilot-explicit-activation

Conversation

@obviyus

@obviyus obviyus commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #144726, #705, #106198, #129624.

What Problem This Solves

Fixes an issue where generic repository-service tokens activated an unconfigured model provider and caused catalog refresh warnings.

Why This Change Was Made

Require explicit provider configuration, a saved provider login or its dedicated token. Authentication, discovery, onboarding, usage and import stop treating generic tokens as provider credentials. One shared migration removes the retired discovery switch; secret auditing still recognizes generic tokens.

User Impact

Unrelated tokens no longer activate the provider. Existing explicit configuration and saved logins continue to work. Doctor shows sign-in guidance once per state directory. This reverses the earlier default; @steipete, for awareness.

Consumers: provider discovery/authentication and credential import now require provider-specific intent.

Evidence

Real Gateway checks reproduced the generic-token warning and confirmed its removal; explicit-token controls remained active. Doctor emitted guidance once and removed the retired setting. All 16 startup configurations passed, along with focused migration, secret and corpus tests.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations plugin: migrate-hermes plugin: migrate-claude extensions: github-copilot extensions: copilot size: L maintainer Maintainer-authored PR labels Sep 11, 2026
@obviyus
obviyus requested a review from a team as a code owner September 11, 2026 07:08
@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 144749
head: 1c65f7d
scope: owner-review

@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-admin-merge
pr: 144749
head: bc9922c
scope: owner-review

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 3:51 AM ET / 07:51 UTC.

ClawSweeper review

What this changes

The PR makes GitHub Copilot require explicit credentials, retires its discovery switch through a shared migration, and preserves generic GitHub token auditing with Doctor guidance.

Merge readiness

⛔ Blocked before merge - 4 items remain

This remains useful: current main and v2026.9.4 still accept generic GitHub tokens for Copilot. No blocking code defect was found, but listed security-owner involvement is not established by the available approval comments.

Priority: P2
Reviewed head: bc9922cd2a924ba40350233e68ec590fcb1090d0
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent provider cutover with relevant runtime observations and focused regression coverage; no blocking code defect was identified.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports real Gateway models.list before/after results for generic-only credentials, an explicit-token control, and real Doctor migration and one-time notice behavior, directly exercising the changed activation and upgrade paths.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports real Gateway models.list before/after results for generic-only credentials, an explicit-token control, and real Doctor migration and one-time notice behavior, directly exercising the changed activation and upgrade paths.
Evidence reviewed 8 items Current main still needs the change: The inspected current-main auth resolver still selects COPILOT_GITHUB_TOKEN, GH_TOKEN, then GITHUB_TOKEN. The same credential chain exists in v2026.9.4; this is not an already-implemented cleanup.
Consistent provider cutover: The pinned diff removes generic credentials from the resolver, manifest, onboarding, and Hermes imports. Dynamic catalog acquisition consumes that resolver; embeddings also call it. Explicit profile and SecretRef resolution remain intact.
Upgrade migration: One pure transform removes the retired discovery setting before validation and during Doctor normalization, preserving retained default-agent ownership. Config-corpus coverage includes included configs, malformed enabled values, idempotence, and legacy channel ownership.
Findings None None.
Security None None.

How this fits together

Copilot’s provider plugin resolves credentials and supplies model catalogs to the Gateway. Its manifest also feeds onboarding and credential discovery, while Doctor handles retired configuration and upgrade guidance.

flowchart TD
  A[Environment and saved credentials] --> B[Copilot credential selection]
  C[Provider and agent configuration] --> B
  B --> D{Explicit Copilot credentials?}
  D -->|Yes| E[Copilot catalog requests]
  D -->|No| F[No Copilot discovery]
  E --> G[Gateway model catalog]
  C --> H[Doctor migration and guidance]
Loading

Decision needed

Question Recommendation
Is there qualifying security-owner involvement covering the src/secrets changes at this head? Obtain security-owner acknowledgment: Have a listed security owner review the secret inventory preservation and acknowledge the current head.

Why: Repository policy requires listed-owner involvement, and the available admin-merge comments do not identify that coverage.

Before merge

  • Resolve merge risk (P1) - The available record does not establish security-owner involvement for the src/secrets changes.
  • Complete next step (P2) - Confirm qualifying security-owner involvement for the src/secrets changes at the current head.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source -8, Tests +56, Docs -8, Generated 0, Other 0. Total +40 across 36 files.

View PR surface stats
Area Files Added Removed Net
Source 11 124 132 -8
Tests 14 266 210 +56
Docs 8 58 66 -8
Config 0 0 0 0
Generated 2 3 3 0
Other 1 1 1 0
Total 36 452 412 +40

Review metrics

Metric Value Why it matters
Credential and configuration cutover 2 automatic credential aliases removed; 1 discovery setting retired These are intentional upgrade-visible changes even though the shared migration keeps legacy configuration loadable.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-auth.ts, migration/backfill/repair: src/commands/doctor/shared/legacy-config-core-migrate.ts, migration/backfill/repair: src/flows/doctor-health-contributions.ts, unknown-data-model-change: src/commands/doctor-auth.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Retain the documented cutover (recommended)
    Accept the recorded product decision and its explicit credential migration and discovery-switch retirement.

Technical review

Best possible solution:

Keep the documented explicit-activation cutover and shared upgrade migration, with security-owner confirmation that credential auditing and cleanup remain correct.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main accepts a generic GitHub token without Copilot-specific credentials and passes it into catalog acquisition; the PR also records a real Gateway reproduction. This review did not execute it.

Is this the best way to solve the issue?

Yes, for the recorded product decision: changing the provider’s credential owner and manifest avoids a competing activation mechanism, while one shared migration handles the retired setting.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 57b14335665b.

Labels

Label changes:

  • add P2: This addresses unwanted Copilot catalog warnings with a bounded provider activation change.
  • add merge-risk: 🚨 compatibility: Previously supported generic-token authentication and the discovery opt-out change behavior during upgrade.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports real Gateway models.list before/after results for generic-only credentials, an explicit-token control, and real Doctor migration and one-time notice behavior, directly exercising the changed activation and upgrade paths.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports real Gateway models.list before/after results for generic-only credentials, an explicit-token control, and real Doctor migration and one-time notice behavior, directly exercising the changed activation and upgrade paths.

Label justifications:

  • P2: This addresses unwanted Copilot catalog warnings with a bounded provider activation change.
  • merge-risk: 🚨 compatibility: Previously supported generic-token authentication and the discovery opt-out change behavior during upgrade.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports real Gateway models.list before/after results for generic-only credentials, an explicit-token control, and real Doctor migration and one-time notice behavior, directly exercising the changed activation and upgrade paths.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports real Gateway models.list before/after results for generic-only credentials, an explicit-token control, and real Doctor migration and one-time notice behavior, directly exercising the changed activation and upgrade paths.

Evidence

What I checked:

  • Current main still needs the change: The inspected current-main auth resolver still selects COPILOT_GITHUB_TOKEN, GH_TOKEN, then GITHUB_TOKEN. The same credential chain exists in v2026.9.4; this is not an already-implemented cleanup. (extensions/github-copilot/auth.ts:37, 57b14335665b)
  • Consistent provider cutover: The pinned diff removes generic credentials from the resolver, manifest, onboarding, and Hermes imports. Dynamic catalog acquisition consumes that resolver; embeddings also call it. Explicit profile and SecretRef resolution remain intact. (extensions/github-copilot/auth.ts:37, bc9922cd2a92)
  • Upgrade migration: One pure transform removes the retired discovery setting before validation and during Doctor normalization, preserving retained default-agent ownership. Config-corpus coverage includes included configs, malformed enabled values, idempotence, and legacy channel ownership. (src/config/legacy.github-copilot.ts:9, bc9922cd2a92)
  • Intentional compatibility change and reported runtime observations: The captured PR body records the September 11 product decision and real Gateway before/after observations: generic-only credentials stop producing a Copilot outcome, while an explicit-token control still attempts Copilot. It also reports real Doctor first/second-run behavior, config removal, and startup checks across 16 operator configurations. These are reported observations, not executions performed by this review. (bc9922cd2a92)
  • Secret auditing remains independent of activation: GH_TOKEN and GITHUB_TOKEN remain in the secret inventory consumed by audit and value-matching cleanup. Workspace dotenv explicitly blocks both names independently, so removing their provider-auth metadata does not remove that protection. (src/secrets/provider-env-vars.ts:390, bc9922cd2a92)
  • Restricted-path review coverage: CODEOWNERS assigns src/secrets to openclaw/openclaw-secops. Live reads returned no requested reviewers, requested teams, or submitted reviews. The supplied owner-review admin-merge comments do not independently establish listed-owner involvement. (.github/CODEOWNERS:30, bc9922cd2a92)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • openclaw/openclaw-secops: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 144749
head: bc9922c
run: 34575282486 attempt: 2
failed: checks-node-changed-extensions-config-49 job=103190957228 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit ab0ea18 into main Sep 11, 2026
315 of 320 checks passed
@obviyus
obviyus deleted the fix/copilot-explicit-activation branch September 11, 2026 08:21
@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Landed after exact-head review and real Gateway/CLI proof.

  • Bug: generic GitHub credentials activated Copilot and produced an unsolicited catalog refresh warning.
  • Fix: Copilot requires explicit credentials within the existing agent scope. Doctor removes the retired discovery setting leniently and prints upgrade guidance once. Generic GitHub secrets remain covered by audit and cleanup.
  • Proof: 65 tests pass across the complete config corpus, prior-release state corpus, and Gateway import-boundary file. Focused plugin and secret checks pass. All 16 sanitized configs start a real Gateway and serve models.list. Generic-token-only starts have no Copilot outcome and no refreshFailed; dedicated-token and saved-profile controls retain Copilot admission.
  • The previous corpus and import-boundary CI failures were caused by this PR and fixed. None was included in the unrelated-red exception.
Before After
Generic GitHub token causes Copilot auth rejection and catalog refresh warning No Copilot outcome and no refresh warning
Retired discovery switch controls implicit discovery Explicit activation and one lenient migration

The guarded CI exception covers only checks-node-changed-extensions-config-49: current run/job, with the same failure previously seen in run 34572987380/job 103179165532.

extensions/memory-core/src/memory/manager-temporal-ranking.test.ts:156 expects full-text search availability to be false but receives true. The complete six-case file fails identically, exit 1 with five other cases passing, on the candidate, PR base 7a2d832c6f88e50989205102eba367680dff34c9, and previous exact CI base e8e68e84e4559ed2bb0455335267c800e1fa5aca:

OPENCLAW_E2E_USE_PREBUILT_DIST=1 NODE_OPTIONS=--max-old-space-size=4096 pnpm exec vitest run extensions/memory-core/src/memory/manager-temporal-ranking.test.ts --maxWorkers 2

The fixture uses mocked embeddings and replaces the full-text search table with a view. Copilot activation and secret classification do not affect that availability contract. No memory source changed. The test and assertion originate in 8c0c270c0a9f2bc150f532ed7e2002705d78748b / #139112; this identifies test provenance, not a proven later failure-introducing change. Direct base reproduction supplies the evidence; no matching main CI run is claimed.

The user-posted owner-review approval resolved the procedural security-owner review hold for this exact head. Code, security, proof, and CI gates remained in force.

The completed-attempt CI approval names only the memory job. The Windows worker-transform timeout from attempt 1 passed on its single fresh-runner retry with the same source, assertions, and timeout. It is retained as a historical timeout and excluded from the exception.

The hosted review's procedural owner hold is covered by the head-pinned approval above and the clean required local review. Its upgrade checklist is covered by the complete prior-release state corpus and real Doctor/Gateway migration proof; no schema change was introduced.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
)

Require explicit Copilot configuration, a saved profile, or COPILOT_GITHUB_TOKEN within the existing agent scope. Generic GitHub credentials continue to serve other tools and remain covered by secret audit and cleanup.

Retire the discovery opt-out through the shared Doctor migration and add one-time upgrade guidance. Update provider documentation and generated configuration inventories.

Validated with focused plugin and secret tests, real Gateway starts across all 16 sanitized configs, and independent CLI checks for activation, Doctor notices, secret detection, and matching-value cleanup.

Related: openclaw#144726

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation extensions: copilot extensions: github-copilot gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: migrate-claude plugin: migrate-hermes proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant