Releases: dwsmith1983/interlock
Release list
v0.6.1
Fixed
- Glue RCA false-positive failure classification:
verifyGlueRCACheck 2 queried/aws-glue/jobs/errorwithout aFilterPattern, causing benign stderr messages (e.g."Preparing ...") to be misclassified as failures. AddedFilterPatternwith error indicators (?Exception ?Error ?FATAL ?Traceback ?OutOfMemoryError ?StackOverflowError) so only genuine errors trigger failure classification. This prevented unnecessary re-runs that doubled Glue compute. - Watchdog date-boundary test flake:
TerminalTriggerRetainsRecordE2E test used sensor data without adatefield, causingResolveExecutionDateto fall back totime.Now(). When the calendar date advanced past the hardcoded trigger date, reconciliation resolved to a different date and fired a spuriousTRIGGER_RECOVERED. Sensor data now includes an explicit date.
v0.6.0
STAMP Safety Hardening
Closes 6 STAMP behavioral specification violations with bounded execution, failure classification, and config validation.
Added
- SFN global timeout:
TimeoutSecondson Step Function execution (default 4h, configurable viasfn_timeout_secondsTerraform variable) - Bounded job poll window:
jobPollWindowSecondspipeline config field (default 1h). PublishesJOB_POLL_EXHAUSTEDwhen exceeded. - Per-source rerun limits:
maxDriftReruns,maxManualReruns,maxCodeRetrieswith*intpointer semantics (nil = default, 0 = disabled) - Failure classification:
FailureCategorypropagated from trigger runner through joblog.PERMANENTfailures usemaxCodeRetriesbudget,TRANSIENT/empty usemaxRetries - Pipeline config validation:
ValidatePipelineConfigenforces bounds on all retry/rerun fields at config load time (fail-open) - Configurable trigger retry:
trigger_max_attemptsTerraform variable (default 3) - Trigger terminal lifecycle:
CompleteTriggerASL state setsCOMPLETED/FAILED_FINALon trigger records - Dynamic trigger lock TTL: reads
SFN_TIMEOUT_SECONDSenv var + 30m buffer
Fixed
- Glue false-success detection via CloudWatch RCA log cross-check
- SLA alert suppression for completed/failed pipelines
- Joblog fallback in SLA guards for TTL-expired or missing triggers
- Watchdog forward-only alerting prevents retroactive
SCHEDULE_MISSEDon deploy - Watchdog reconcile mass-triggering guard via joblog terminal check + TTL removal on terminal triggers
- Proactive SLA scheduling skips sensor-triggered pipelines
Removed
- Dead
FailureEvaluatorCrashconstant
v0.5.2
Hourly SLA deadline offset fix
Offset hourly SLA deadlines to the processing window (H+1) so breach times fall after data actually exists.
Fixed
- Hourly SLA deadline offset: relative deadline
:MMfor hourly pipelines (date format2026-03-05T12) now resolves to H+1:MM instead of H:MM. Data for hour H isn't generated until ~H+1:00, so the previous calculation set the breach deadline before data existed — guaranteeing a false breach every execution. Daily pipelines are unchanged.
v0.5.1
Proactive SLA Monitoring
Decouple SLA alerting from Step Function execution so warnings and breaches fire even when pipelines never trigger (data never arrives, sensor fails, trigger missed).
Added
- Proactive SLA monitoring: watchdog Lambda creates EventBridge Scheduler entries for all pipelines with SLA configs. Idempotent via deterministic scheduler names —
ConflictExceptionmeans the schedule already exists and is skipped. (#45)
Changed
- SLA scheduling moved from SFN to watchdog: removed
CheckSLAConfigandScheduleSLAAlertsstates from the Step Function (18 → 16 states). The SFN retains onlyCancelSLASchedulesto clean up unfired timers on job completion. (#45) - CancelSLASchedules accepts deadline/expectedDuration: instead of pre-computed
warningAt/breachAt, the cancel handler now receives raw SLA config and recalculates internally. This decouples cancel from the removed scheduling state. (#45) - Watchdog Lambda now requires
SLA_MONITOR_ARN,SCHEDULER_ROLE_ARN, andSCHEDULER_GROUP_NAMEenvironment variables andscheduler:CreateSchedule+iam:PassRoleIAM permissions. (#45)
v0.5.0
Added
- Centralized observability pipeline: new
event-sinkLambda writes all 14 EventBridge event types to a DynamoDB events table with a GSI for querying by event type and timestamp. Newalert-dispatcherLambda reads from an SQS alert queue and delivers formatted Slack notifications. EventBridge rules route events to both targets automatically. (#41) - Slack Bot API with message threading: alert-dispatcher uses
chat.postMessagewith Bot token authentication. Thread records (THREAD#{scheduleId}#{date}) stored in the events table group related alerts into Slack threads by pipeline, schedule, and date. First alert for a pipeline-day creates a new thread; subsequent alerts reply in-thread. (#41) - SLA warning suppression:
fire-alertmode checksBreachAttimestamp before publishingSLA_WARNING. If breach time has already passed, the warning is suppressed to prevent duplicate warning+breach notifications. (#41) - Manual rerun system: external processes write
RERUN_REQUEST#records to the control table. Stream-router validates requests with a circuit breaker that compares sensorupdatedAtvs joblogcompletedAt— rejects reruns when no new data has arrived. (#40) - Late data arrival detection: stream-router detects sensor updates after job completion and publishes
LATE_DATA_ARRIVALevents to EventBridge. (#40) - Prefix-match sensor keys: stream-router matches sensor keys by prefix for per-period pipelines, enabling a single trigger condition to match sensors keyed with date+hour suffixes. (#38)
- Watchdog trigger reconciliation: watchdog re-evaluates sensor trigger conditions every 5 minutes. If a sensor meets the trigger threshold but no trigger lock exists, the watchdog acquires the lock, starts the Step Function, and publishes a
TRIGGER_RECOVEREDevent. (#44) - New event types:
LATE_DATA_ARRIVAL,RERUN_REJECTED,RETRY_EXHAUSTED,TRIGGER_RECOVERED - New DynamoDB events table with GSI1 (
eventType→timestamp) - SQS alert queue with dead-letter queue for reliable Slack delivery
Changed
- alert-dispatcher requires
SLACK_BOT_TOKENandSLACK_CHANNEL_IDenvironment variables (replacesSLACK_WEBHOOK_URL) - Terraform module exposes
slack_bot_token(sensitive) andslack_channel_idvariables instead ofslack_webhook_url - Lambda function count: 4 → 6 (added event-sink and alert-dispatcher)
Fixed
- Orchestrator remaps per-period sensor keys during evaluation, preventing key mismatch when sensors use date+hour suffixes (#39)
ValidationExhaustednow ends the Step Functions execution asFAILEDinstead ofSUCCEEDED(#41)- Joblog entry written on validation exhaustion for audit trail completeness (#41)
- Watchdog prefix-matches trigger records for per-hour pipelines instead of requiring exact key match (#41)
- SLA deadline calculation for daily pipelines with next-day deadlines (e.g.,
"02:00") now rolls forward 24 hours when the computed breach time is already past (#43)
v0.4.0
Added
- SLA monitoring via EventBridge Scheduler: one-time Scheduler entries fire
SLA_WARNINGandSLA_BREACHevents at exact timestamps, replacing the previous parallel-branch polling approach. Schedules auto-delete after firing. On job completion, unfired schedules are cancelled andSLA_METis published. - Sub-daily execution granularity: pipelines can run at hourly or daily cadence depending on sensor data. When sensors include both
dateandhourfields, the framework uses a composite execution date (2026-03-03T10). Glue triggers receive--par_dayand--par_hourarguments automatically. - Infrastructure trigger retry: trigger execution failures (e.g., Glue
ConcurrentRunsExceededException) retry 4 times with exponential backoff (30s, 60s, 120s, 240s) via Step Functions native Retry. Each failure is logged to the joblog table for audit. This retry budget is separate frommaxRetriesfor job failures. - StatusChecker fallback in check-job: when no terminal joblog entry exists, the orchestrator polls the trigger API directly to determine job status.
Changed
- 18-state sequential Step Functions workflow replaces the 47-state machine. SLA monitoring uses EventBridge Scheduler instead of a parallel branch.
- sla-monitor Lambda supports 5 modes:
schedule,cancel,fire-alert,calculate,reconcile. - Declarative YAML validation rules replace the archetype/trait/evaluator system. Pipeline configs define validation as YAML rules (
exists,equals,gt,gte,lt,lte,age_lt,age_gt). - 3 DynamoDB tables (control, joblog, rerun) replace the single-table design for clearer access patterns and independent scaling.
- 4 Lambda functions (stream-router, orchestrator, sla-monitor, watchdog) replace the previous 7+ handlers.
- EventBridge events replace SNS for all alerting and lifecycle notifications.
- Reusable Terraform module — consumers deploy infrastructure without framework code in their repo.
- Trigger state retries infrastructure failures independently of job failure retries (
maxRetries).
Removed
- Redis and Postgres storage providers (AWS-first; GCP and Azure planned after AWS stabilizes)
- CLI binary (
cmd/interlock) and HTTP server - Archetype, trait, and evaluator subprocess system
- Local mode (Docker Compose + Redis)
Fixed
- Pipeline config included in Step Functions execution input (#30)
- YAML configs converted to JSON before DynamoDB storage (#27)
- Sensor data
datamap unwrapped in stream-router (#28) - SLA monitor handles relative
:MMdeadline format for hourly pipelines (#35) check-jobskips non-terminal joblog events (#36)EventSLAResolvedconstant renamed toEventSLAMetto match published event string
v0.3.1
Fixed
- Validation timeout retry: SFN retries trait evaluation every 60s until validation timeout, instead of exiting after one attempt
- Stream-router date accuracy: reads
datefield from MARKER record NewImage for correct date at midnight rollover, falls back totime.Now()for backward compatibility
Added
- At-risk SLA alerting: proactive warnings before evaluation and completion deadline breaches
- Watchdog re-trigger: detects missed schedules and re-fires SFN executions for recovery
- ReleaseLock catch: ASL catches ReleaseLock errors to prevent silent lock leaks
v0.3.0
Added
- Post-Completion Monitoring Expiry: watchdog handles
COMPLETED_MONITORING → COMPLETEDtransitionsCheckCompletedMonitoring()pure function scans for runs inCOMPLETED_MONITORINGwhose monitoring window has elapsed- Uses
RunLogEntry.UpdatedAtas the monitoring start time — no schema changes required - Transitions expired runs to
COMPLETEDviaPutRunLog, appendsEventMonitoringCompletedaudit event - Monitoring window duration read from
Watch.Monitoring.Durationper-pipeline config - Wired into both local-mode
Watchdog.scan()and Lambda handler - Offloads the monitoring wait from Step Function executions to the watchdog's 5-minute scan, freeing SFN capacity immediately after the Glue job succeeds
MonitoringResultexported type for callers to inspect results- 3 unit tests: expired → transitions, still-in-window → skips, already-completed → ignores
v0.2.1
Fixed
- Evaluation retry loop: Step Function now retries trait evaluation every 60s when traits aren't ready, terminating via the existing validation timeout. Previously in AWS event-driven mode, the SFN wrote a PENDING RUNLOG and exited immediately — the RUNLOG stayed PENDING indefinitely unless a new MARKER arrived. The local watcher loop was unaffected.
- ResolvePipeline error logging: Step Function now writes a FAILED RUNLOG when
ResolvePipelinereturns an error (missing archetype, pipeline not found, archetype resolution failure). Previously these configuration errors caused a silent exit with no audit trail. logResultattempt counter:attemptNumbernow only increments when retrying after a terminal state (COMPLETED/FAILED/CANCELLED). Transitioning within the same attempt (e.g., PENDING → COMPLETED) preserves the counter.- Validation timeout test: Fixed midnight boundary edge case in
TestCheckValidationTimeout_NotBreachedwherenow + 1hwrapping past midnight caused a false positive.
Changed
- Step Function state count: 49 → 52 (added
LogResolveFailed,CheckIfFirstEvalAttempt,WaitForReadiness)
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's New
Adds lifecycle events, stuck-run detection, and alert categorization to the interlock framework.
Lifecycle Events
The stream-router now publishes SNS events when a pipeline run reaches a terminal status (COMPLETED or FAILED). Downstream consumers — monitoring dashboards, notification systems, active recovery workflows — can subscribe to the lifecycle topic without polling DynamoDB.
PIPELINE_COMPLETEDandPIPELINE_FAILEDevents emitted to a dedicated lifecycle SNS topic- Configurable via
LIFECYCLE_TOPIC_ARNenvironment variable on stream-router Lambda - Best-effort publishing — errors are logged, not propagated
LifecycleEventstruct ininternal/lambda/types.go
Stuck-Run Detection
The watchdog now detects runs stuck in non-terminal states (PENDING, TRIGGERING, RUNNING) beyond a configurable threshold, in addition to missed schedules.
CheckStuckRuns()pure function scans for runs beyond threshold (default: 30 minutes)- Dedup via distributed lock (
watchdog:stuck:{pipeline}:{schedule}:{date}, 24h TTL) EventRunStuckevent kind for audit trailRUN_STUCKalert with Category"stuck_run"
Alert Categorization
All alerts now carry a machine-readable Category field (JSON: alertType) for filtering and routing without parsing message strings.
- Values:
schedule_missed,stuck_run,evaluation_sla_breach,completion_sla_breach,validation_timeout,trait_drift
Install
go get github.com/dwsmith1983/interlock@v0.2.0
Full Changelog: v0.1.1...v0.2.0