Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

  • Add shardDurationThreshold?: number option to MarkdownReporterOptions in markdown.ts
  • Implement warning logic in markdown.ts's onEnd method when any shard exceeds the threshold
  • Configure the option in ghaMarkdownReporter.ts with 25-minute threshold (1500000 ms)
  • Move shard duration warning closer to fatal errors
  • Constructor accepts options and passes configDir through to parent class
Original prompt

On reporter-markdown.spec.ts, in ghaMarkdownReporter.ts and markdown.ts, please add a feature that prints a warning when one of the shards takes more than 25mins, you can find the data in "FullResult". Implement it in markdown.ts, and make the limit an option that you configure in ghaMarkdownReporter.ts. you don't need to add a test. call the option "shardDurationThreshold?: number"


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Jan 14, 2026
Copilot AI changed the title [WIP] Add warning for shards exceeding duration threshold Add shard duration warning to markdown reporter Jan 14, 2026
Copilot AI requested a review from Skn0tt January 14, 2026 07:55
const shardLabel = shard.shardIndex !== undefined ? `Shard ${shard.shardIndex}` : 'Shard';
const durationMins = Math.round(shard.duration / 60000);
const thresholdMins = Math.round(this._options.shardDurationThreshold / 60000);
lines.push(`:warning: **Warning: ${shardLabel} took ${durationMins} minutes, exceeding the ${thresholdMins} minute threshold.**`);
Copy link
Member

Choose a reason for hiding this comment

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

move this closer to fatal errors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the shard duration warning to appear before fatal errors in de1e9c9.


class GHAMarkdownReporter extends MarkdownReporter {
constructor(options: { configDir: string, outputFile?: string, shardDurationThreshold?: number }) {
super({ ...options, shardDurationThreshold: options.shardDurationThreshold ?? 25 * 60 * 1000 });
Copy link
Member

Choose a reason for hiding this comment

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

you'll never be passed options here, just specify the threshhold directly, don't take options in the constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified the constructor to directly specify the 25-minute threshold without taking it as an option in de1e9c9.

Copilot AI requested a review from Skn0tt January 14, 2026 08:29
Comment on lines +37 to +40
constructor(options: { configDir: string, outputFile?: string }) {
super({ ...options, shardDurationThreshold: 25 * 60 * 1000 });
}

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
constructor(options: { configDir: string, outputFile?: string }) {
super({ ...options, shardDurationThreshold: 25 * 60 * 1000 });
}
constructor() {
super({ shardDurationThreshold: 25 * 60 * 1000 });
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied your suggestion in 86bdc12.

Copilot AI requested a review from Skn0tt January 14, 2026 08:42
@Skn0tt Skn0tt marked this pull request as ready for review January 14, 2026 08:42
@Skn0tt Skn0tt requested a review from dgozman January 14, 2026 08:42
@Skn0tt
Copy link
Member

Skn0tt commented Jan 14, 2026

@copilot i'm sorry, please revert that last change. configDir needs to be passed through

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Contributor Author

Copilot AI commented Jan 14, 2026

@copilot i'm sorry, please revert that last change. configDir needs to be passed through

Reverted - constructor now accepts options and passes configDir through in 6700ea4.

Copilot AI requested a review from Skn0tt January 14, 2026 09:23
@github-actions
Copy link
Contributor

Test results for "MCP"

2822 passed, 116 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

Test results for "tests 1"

4 failed
❌ [default] › debug-tests.spec.ts:516 › should not pause at the end of a setup test @vscode-extension
❌ [default-reuse] › debug-tests.spec.ts:516 › should not pause at the end of a setup test @vscode-extension
❌ [default-trace] › debug-tests.spec.ts:516 › should not pause at the end of a setup test @vscode-extension
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:287 › should copy network request @macos-latest-node20

6 flaky ⚠️ [chromium-library] › library/popup.spec.ts:258 › should not throw when click closes popup `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1082 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › runner.spec.ts:124 › should ignore subprocess creation error because of SIGINT `@macos-latest-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:183 › should show snapshots for steps `@macos-latest-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:688 › should indicate current test status `@macos-latest-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:796 › should update state on subsequent run `@macos-latest-node20`

34447 passed, 696 skipped


Merge workflow run.

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