Skip to content

Check for expected content#325100

Open
chrmarti wants to merge 1 commit into
mainfrom
chrmarti/wet-grouse
Open

Check for expected content#325100
chrmarti wants to merge 1 commit into
mainfrom
chrmarti/wet-grouse

Conversation

@chrmarti

@chrmarti chrmarti commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 9, 2026 09:38
@chrmarti chrmarti enabled auto-merge (squash) July 9, 2026 09:38

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.

Pull request overview

Updates the Copilot extension’s “collect diagnostics” networking probes to validate that each endpoint not only responds, but returns the expected kind of payload, improving the usefulness of diagnostics output when investigating connectivity/proxy issues.

Changes:

  • Adds per-URL expectedContent markers and checks fetched response bodies for those markers.
  • Enhances diagnostics output with a single-line “unexpected content” note (including truncation/formatting for readability).
  • Introduces a helper to format unexpected response bodies for display.
Show a summary per file
File Description
extensions/copilot/src/extension/log/vscode-node/loggingActions.ts Adds expected-content validation for diagnostic network probes and formats unexpected bodies for display.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +203 to +212
let contentNote = '';
try {
const body = await response.text();
if (!body.includes(expectedContent)) {
contentNote = ` - unexpected content: ${formatUnexpectedContent(body)} (expected: '${expectedContent}')`;
}
} catch (bodyErr) {
contentNote = ` - failed to read content: ${collectErrorMessages(bodyErr)}`;
}
await appendText(editor, `HTTP ${response.status} (${Date.now() - start} ms)${contentNote}\n`);
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