Skip to content

test(release-gate): accept the worker's own error in inline-worker-fatal - #1666

Merged
rohitg00 merged 1 commit into
mainfrom
fix/gate-inline-worker-fatal-race
Nov 3, 2026
Merged

rohitg00 merged 1 commit into
mainfrom
fix/gate-inline-worker-fatal-race

Conversation

@rohitg00

@rohitg00 rohitg00 commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

The inline-worker-fatal startup scenario in the release gate fails at random on unrelated pull requests (#1661 and #1664, on both packed artifact jobs), while main passes.

When the 3 s readiness timeout fires, the CLI asks Worker Compose for status (src/cli.ts, startup failure path). If Compose has already marked the crashed worker failed, the CLI throws that failure, which carries the worker's real error ("agentmemory could not create its API secret ..."). If not, it throws the generic timeout text, which contains 3s. The scenario only accepted the second form, so the result depended on how fast Compose recorded the exit.

The real cause is the better message for a user, so the scenario now accepts either. It still asserts a non-zero exit and that the worker log holds the secret error.

Changes

  • expectFailure accepts a RegExp as well as a string.
  • inline-worker-fatal expects /3s|could not create its API secret/.

Testing

Summary by CodeRabbit

  • Tests
    • Updated release-gate checks to accept either of two expected failure messages in the inline-worker scenario.

When the readiness timeout fires, the CLI asks Worker Compose for status.
If Compose has already marked the crashed worker failed, the CLI reports
that failure, including the worker's "could not create its API secret"
error, instead of the generic "not ready after 3s" text. Which message
wins depends on how fast Compose records the exit, so the scenario
failed on unrelated pull requests on both Linux and macOS.

The scenario now accepts either message. It still asserts a non-zero
exit and that the worker log holds the secret error.
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agentmemory Ready Ready Preview Nov 3, 2026 7:17pm UTC

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The startup release gate now supports regular-expression expected-message checks. The inline-worker-fatal scenario accepts either of two expected messages in failure output.

Changes: Startup release-gate failure matching

Layer / File(s) Summary
Failure output matching
scripts/release-gate/startup.mjs
expectFailure tests regular expressions against child output and retains substring matching for strings. The inline-worker-fatal scenario accepts 3s or could not create its API secret.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: guibeira

Merge Risk: Minimal · up to ae021

The startup scenario accepts either reported failure message while retaining its failure-exit and worker-log assertions. No actionable merge-blocking risk is identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: updating the inline-worker-fatal release-gate test to accept the worker's own error.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 984b872a-64c1-47bb-a024-ed3e0243b3e1
Commits

Reviewing files that changed from the base of the PR and between 241d536 and ae02161.

Files selected for processing: 1
  • scripts/release-gate/startup.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@rohitg00
rohitg00 merged commit e93dafa into main Nov 3, 2026
15 checks passed
@rohitg00
rohitg00 deleted the fix/gate-inline-worker-fatal-race branch November 3, 2026 19:24

This branch was successfully deployed

1 active deployment
Preview — ae021613 Deployed Nov 3, 2026 by vercel[bot]
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.

1 participant