Skip to content

Add ValidationResultSeverity filtering for command execution#1789

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-validationresultseverity-parameter
Draft

Add ValidationResultSeverity filtering for command execution#1789
Copilot wants to merge 4 commits intomainfrom
copilot/add-validationresultseverity-parameter

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

Summary

Commands can now specify which validation severity levels to allow, enabling UIs to show warnings/info to users for confirmation before re-executing with relaxed constraints.

Added

  • Optional allowedSeverity parameter to ICommand.execute() and Command.execute()
    • Client-side: Filter validation results before blocking execution
    • Server-side: Filter via CommandPipeline.FilterValidationResults()
    • Communication: X-Allowed-Severity HTTP header
  • Default behavior: Only Error severity blocks execution (warnings/info filtered out)
  • When specified: Validation results with severity > allowedSeverity block execution

Usage:

// Default - only errors block
await command.execute();

// Allow warnings through, block only on errors
await command.execute(ValidationResultSeverity.Warning);

// Typical workflow: show warnings, let user confirm, re-execute
const result = await command.execute();
if (!result.isValid && hasOnlyWarnings(result)) {
    if (await userConfirms(result.validationResults)) {
        await command.execute(ValidationResultSeverity.Warning);
    }
}

Implementation:

  • Frontend: Command.filterValidationResultsBySeverity() filters client validation
  • Backend: CommandContext.AllowedSeverity property, CommandEndpointMapper reads header, CommandPipeline filters server validation
  • Backward compatible: Parameter optional, default behavior unchanged

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run grep -l ext eptor/given/an_interceptor.cs nfig/composer/vendor/bin/grep ext event_source_id_-l cal/bin/grep grep -l ext eptorSelector/when_selecting_interceptors/for_sync_methods.cs de/node/bin/grep ext /and_query_retur--norc /usr/bin/grep grep (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run grep -l ext ursor/when_moving_next_with_cancellation.cs cal/bin/grep ext er_signature/and/usr/share/dotnet/sdk/10.0.102/MSBuild.dll ndor/bin/grep grep -l ext /when_asking_sho/low:false /usr/bin/grep ext uery.cs (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run grep -l ext CollectionInterceptor/InvocationTargetWithCollectionNotFound.cs de/node/bin/grep ext s /home/REDACTED/.co-m grep -l ext CollectionInterceptorSelector/given/an_interceptor_selector.cs ep ext orrect_type.cs tnet/tools/grep grep (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>When executing commands you should be able to tell what ValidationResultSeverity you allow</issue_title>
<issue_description>From the frontend, we could have the .execute() method have an optional parameter which could then be something like this:

command.execute(ValidationResultSeverity.warning)

This would effectively allow for warnings to go through.
By not specifying it, warnings would come back.

The frontend can then show warnings / information to the user and then allow the user to confirm and then execute it by ignoring the warnings.

This is similar thinking as we would do when we're logging, think of it as Validation severity levels.

</issue_description>

Comments on the Issue (you are @copilot in this section)

@einari Related to #62

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 17, 2026 13:16
Co-authored-by: einari <134365+einari@users.noreply.github.com>
Co-authored-by: einari <134365+einari@users.noreply.github.com>
Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copilot AI changed the title [WIP] Add optional parameter for ValidationResultSeverity in execute method Add ValidationResultSeverity filtering for command execution Feb 17, 2026
Copilot AI requested a review from einari February 17, 2026 13:26
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.

When executing commands you should be able to tell what ValidationResultSeverity you allow

2 participants

Comments