Skip to content

Disable optional discovery in Copilot text sessions - #23112

Merged
tidy-dev merged 1 commit into
developmentfrom
tidy-dev-copilot-session-configuration
Nov 4, 2026
Merged

tidy-dev merged 1 commit into
developmentfrom
tidy-dev-copilot-session-configuration

Conversation

@tidy-dev

@tidy-dev tidy-dev commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

No linked public issue.

Description

  • Explicitly disable file hooks, configuration discovery, and skills in the shared Copilot session factory used for commit-message generation and conflict resolution, including retried sessions.
  • Preserve custom instructions, existing prompts, model/provider selection, and credential handling.
  • Add regression tests for both flows' session options.

Validation

Evidence covers commit b2b473895b5254e0f304c1691711668fb7f5ea10.

  • corepack yarn test app/test/unit/stores/copilot-store-credentials-test.ts — the two new configuration checks failed before the production change.
  • corepack yarn test app/test/unit/stores/copilot-store-credentials-test.ts app/test/unit/stores/copilot-store-test.ts — passed, 60 tests.
  • corepack yarn test — 2,284 passed, 6 Git-fixture failures, 2 skipped with inherited Git configuration.
  • node vendor/yarn-1.21.1.js test — passed, 2,290 tests / 2 skipped, with an empty temporary HOME and process-only GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.bareRepository GIT_CONFIG_VALUE_0=all. No existing Git configuration files were changed.
  • corepack yarn lint:fix — passed.
  • corepack yarn lint — passed.
  • corepack yarn tsc --noEmit --pretty false — passed.
  • git diff --check — passed.

Ad-hoc bundled-runtime verification used SDK 1.0.27-preview.1 / runtime 1.0.104-1, isolated synthetic repositories, and a loopback fake model. corepack yarn test app/test/unit/stores/copilot-session-runtime-test.ts passed; the temporary test is not part of this diff. Both actual store flows returned the expected synthetic output, included .github/copilot-instructions.md in the model request, and produced no lifecycle-hook markers with fixtures in .github/hooks, .github/copilot/settings.json, and .claude/settings.json.

The enabled control automatically discovered the .github/hooks fixture and ran all four configured lifecycle hooks. The two settings-file controls did not execute through automatic discovery in this bundled runtime; explicitly supplying their directories confirmed that the hook fixtures themselves execute. Those two checks therefore do not establish an automatic-discovery before/after reproduction.

Playwright UI verification passed for commit-message generation and conflict resolution: Desktop committed the generated message and applied the suggested resolution to complete a merge. Custom instructions reached both model requests, and the repository hook fixture did not run. The recording uses the real bundled SDK/runtime with a local test model; it does not validate live Copilot authentication or model quality. Temporary test instrumentation was removed.

  • node node_modules/@playwright/test/cli.js test --config app/test/e2e/playwright.config.ts app/test/e2e/copilot-session-proof.e2e.ts — passed, 1 test covering both flows. The ad-hoc spec was removed after recording.

Team-authored review

Evidence: See Validation and the Playwright recording.

Review path: light review

Screenshots

Playwright walkthrough of commit-message generation and merge-conflict resolution using the real bundled SDK/runtime with a local test model (not the live Copilot service):

copilot-ui-walkthrough.webm

Release notes

Notes: [Improved] Keep Copilot commit-message generation and conflict resolution focused on their supplied context and custom instructions

Copilot AI balanced review requested due to automatic review settings November 3, 2026 00:50
@tidy-dev tidy-dev added the needs-deep-review Requires in-depth human code review of affected paths; agent review is not sufficient. label Nov 3, 2026

Copilot AI 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.

🔵 Needs a closer look

Human review is needed to confirm bundled SDK discovery-flag semantics and custom-instruction preservation, since reported runtime checks reproduced hook discovery but not configuration-discovery behavior before and after the change.

No open issues 🎉

What changed in this PR

This PR disables optional discovery in the shared Copilot session factory used by GitHub Desktop’s commit-message generation and conflict resolution, including retried sessions.

Changes:

  • Disable file hooks, configuration discovery, and skills while preserving custom instructions and existing session settings.
  • Add regression tests for both flows’ session options, including append-mode prompts and custom-instruction availability.
File Description
app/​test/​unit/​stores/​copilot-store-credentials-test.ts Add session-configuration regression tests for both Copilot flows.
app/​src/​lib/​stores/​copilot-store.ts Disable optional discovery centrally in the shared session factory.

Review effort: Balanced

@tidy-dev tidy-dev removed the needs-deep-review Requires in-depth human code review of affected paths; agent review is not sufficient. label Nov 3, 2026
@tidy-dev
tidy-dev marked this pull request as ready for review November 3, 2026 17:38
@tidy-dev
tidy-dev requested a review from a team as a code owner November 3, 2026 17:38
@tidy-dev
tidy-dev requested review from babakks and sergiou87 November 3, 2026 17:38
@tidy-dev
tidy-dev merged commit 6d36273 into development Nov 4, 2026
45 checks passed
@tidy-dev
tidy-dev deleted the tidy-dev-copilot-session-configuration branch November 4, 2026 15:23
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.

3 participants