A deploy waits a grace for its build record before it is a mismatch - #67
Merged
Merged
Conversation
The pipeline puts `maestro.build` before `maestro.deploy`, but runtime-service's intake queue is a standard queue and a retry can bring the deploy first: that would record a false DigestMismatchDetected and raise a SEV item. A deploy of a digest the ledger has never seen, younger than BUILD_GRACE_SECONDS (300), is now retried rather than recorded — the queue's visibility timeout (360s) outlasts the grace, so the retry records it, built or a mismatch. Over HTTP it answers 425. Seen on the first tenant's first apply: the intake's first batch failed (its workspace was not yet applied), and the retries could have come back in any order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A deploy now waits up to 300 s for its build record before counting as a digest mismatch; a false mismatch would raise a SEV item.
The hazard. Pipelines put
maestro.buildbeforemaestro.deploy, but runtime-service's intake is a standard SQS queue, which doesn't keep order.How it showed. runtime-service's first apply on the first tenant hit this: the intake's first batch failed because the workspace wasn't applied yet, so four events were retried. They happened to come back in order.
The fix.
BUILD_GRACE_SECONDS(default 300), isn't recorded. The Lambda reports it as a batch-item failure and SQS retries it.Checks. runtime: 30 tests. New
grace.test.ts:🤖 Generated with Claude Code