fix: close 15 STAMP safety gaps for v0.7.0#57
Merged
dwsmith1983 merged 4 commits intomainfrom Mar 8, 2026
Merged
Conversation
Calendar exclusion now uses the job's execution date (not wall clock), preventing incorrect skips on re-runs for previous days. Lock reset is atomic via DynamoDB UpdateItem (eliminates delete+create race window). New events (BASELINE_CAPTURE_FAILED, PIPELINE_EXCLUDED, RERUN_ACCEPTED) close audit trail gaps. ASL CompleteTrigger failure path cancels SLA schedules before entering terminal Fail state. All paths that start SFN executions now release locks on failure. Safety gaps addressed: - Calendar exclusion uses execution date, not time.Now() - Atomic lock reset (ResetTriggerLock) replaces delete+create - Lock release on SFN StartExecution failure (rerun + job failure) - BASELINE_CAPTURE_FAILED event on post-run baseline capture error - PIPELINE_EXCLUDED event on calendar exclusion (sensor + rerun paths) - RERUN_ACCEPTED event before lock reset (audit completeness) - INFRA_FAILURE event on lock reset failure - ASL CompleteTrigger catch → SLA cancellation → Fail state - Post-run drift skips rerun write on excluded dates - 30+ new tests covering all new paths
…ervability) - handleJobFailure: set trigger to FAILED_FINAL on calendar exclusion (prevents orphaned RUNNING lock that silently expires via TTL) - handleRerunRequest: move RERUN_ACCEPTED event after ResetTriggerLock succeeds (event now only publishes when rerun actually starts) - handlePostRunCompleted: publish PIPELINE_EXCLUDED event when drift rerun is skipped due to calendar exclusion (closes observability gap)
Hardcode constant pipeline/schedule/date values in test helpers that only ever receive a single value. Remove unused seedSensorForCircuitBreaker and seedJobSuccess functions. Remove orphaned const blocks.
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
time.Now()), preventing incorrect exclusions on weekends/holidaysResetTriggerLockuses single DynamoDBUpdateItemwithattribute_exists(PK)condition, eliminating the delete+create race windowBASELINE_CAPTURE_FAILED,PIPELINE_EXCLUDED,RERUN_ACCEPTEDclose audit trail gaps across all code pathsStartExecutionfailshandleJobFailuresetsFAILED_FINALinstead of leaving the lock inRUNNINGto expire via TTLRERUN_ACCEPTEDonly publishes after lock atomicity is confirmedPIPELINE_EXCLUDEDevent published when drift rerun is skipped by calendar