Conversation
The test "TTL boundary: flag at TTL_MS - 1ms old is still fresh" was failing due to timing precision issues. A gap between calculating the flag timestamp and checking freshness allowed Date.now() to advance, causing the boundary to shift and the test to fail intermittently. Solution: Modified isFlagFresh() to accept a reference time parameter and updated all callers to pass Date.now() at the same point in time. This ensures consistent time calculations and eliminates the timing race condition. Fixes: Failed test in pending-template-runner-auth-event.test.ts:213
fix: resolve TTL timing test flakiness by capturing reference time
…ispatch Scheduled (K8s job + in-process) and MCP workflow executions never passed ownerId into executeWorkflow, so the KEEP-613 database-query authorization check ran with a null-userId principal and rejected org-visibility integrations - surfacing to users as "DATABASE_URL is not configured". Centralise executor input construction in buildExecutorInput so every dispatch entry point derives ownerId/organizationId from the workflow row, and add a unit test pinning the owner derivation.
fix: thread workflow owner into scheduled and MCP executor dispatch
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.
No description provided.