Audit deployment timeouts as DeploymentTimedOut, not DeploymentFailed#429
Merged
Conversation
A wall-clock timeout now pauses the deployment and preserves its checkpoint for resume rather than failing it irrecoverably. Recording the audit event as DeploymentFailed misrepresented this recoverable outcome. Adds EventCategory.DeploymentTimedOut (19 — additive, no renumber of the persisted smallint, no migration; plain smallint column accepts it) with its EventCategoryRegistry descriptor (mandatory: the read path and the drift test both require every category to have one), and repoints DeploymentAuditEventHandler.OnDeploymentTimedOutAsync to it.
ppXD
force-pushed
the
feat/deployment-timedout-audit-category
branch
from
June 11, 2026 01:17
79321bf to
b229ed7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DeploymentFailedmisrepresented this recoverable outcome, so a timed-out deployment showed up in the audit feed as a failure.EventCategory.DeploymentTimedOut = 19and repointsDeploymentAuditEventHandler.OnDeploymentTimedOutAsyncto it, so the audit feed distinguishes a timeout (paused/resumable) from a genuine failure.Why it's non-breaking
19is additive — no existing value (1–18) is renumbered, andEventCategorystaysshort-backed. Theevent.categorycolumn is a plainsmallintwith no CHECK constraint / enum type, so no migration is needed.EventCategoryRegistrydescriptor is mandatory, not optional: the read path (EventService.ToDto→EventCategoryRegistry.Describe) throws on an unmapped category, and theEveryEventCategory_HasANonEmptyDescriptordrift test enforces it. Both are satisfied by the added descriptor.switch/exhaustive match overEventCategoryanywhere insrc/lacks a default. The handler diff is surgical — onlyOnDeploymentTimedOutAsyncchanged;OnDeploymentFailedAsyncand the other 8 mappings are untouched.Pairs with
The resumable-timeout change (separate PR on this milestone) is what makes a timeout paused/resumable. This PR is independently correct — the
DeploymentTimedOutEventis emitted on timeout regardless — and the two together make task state and audit category fully consistent.Test plan
EventCategoryRegistryTests— display-nameInlineData+19numbering pin;DeploymentAuditEventFactoryTests— passthroughInlineData. (23/23)DeploymentAuditEventHandlerTests.TimedOutEvent_IsAuditedAsDeploymentTimedOutasserts the timeout recordsDeploymentTimedOut;FailedEvent_PersistsDeploymentFailedretained as the contrast proving genuine failures are unaffected. (7/7)dotnet build src/Squid.Core— 0 errors.ship, no blocking issues.Follow-up (frontend, separate repo)
SquidWeb feat/deployment-timedout-event-tone tones the new category as
warning(orange) — opened alongside.