Skip to content

Stabilize workflow failure event wait - #1050

Merged
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1049-workflow-failure-timeout
Jul 30, 2026
Merged

Stabilize workflow failure event wait#1050
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1049-workflow-failure-timeout

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Closes #1049

Related: #958, #1000, #1048, #1047, #1045, #1043, #1041, #1033

What changed

  • replace the two-second time.After wait with a stopped ten-second timer
  • retain the exact live workflow.failed assertion and event-history diagnostics
  • document the shared-CI contention evidence and cross-surface impact

Verification

  • focused normal and race at -count=100
  • complete internal/workflows normal and race
  • ./scripts/test-regression.sh (normal, race, coverage 85.6%, zero uncovered functions)

@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fedcf60731

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


events := append([]Event(nil), history...)
deadline := time.After(2 * time.Second)
deadline := time.NewTimer(10 * time.Second)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Close the history/live gap instead of extending the wait

When execute emits workflow.failed after Subscribe takes its GetEvents snapshot but before it registers live under e.mu (engine.go:137-147), the event is absent from both returned history and the channel forever. Since this test starts execution before subscribing, that race can still produce the reported failed stored state with no terminal event; changing the deadline to ten seconds only makes the same failure eight seconds slower. Make history retrieval and subscriber registration atomic relative to emit, or otherwise close that gap, rather than relying on a longer timer.

AGENTS.md reference: AGENTS.md:L31-L35

Useful? React with 👍 / 👎.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

Exact tested head: fedcf60. @codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: fedcf60731

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dennisonbertram
dennisonbertram merged commit fedcf60 into main Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Workflow failure event test times out under race contention

1 participant