Skip to content

fix(process): attribute slow memory Worker requests - #2457

Merged
justinhelmer merged 1 commit into
mainfrom
codex/memory-worker-ci-2119-followup
Sep 29, 2026
Merged

justinhelmer merged 1 commit into
mainfrom
codex/memory-worker-ci-2119-followup

Conversation

@justinhelmer

@justinhelmer justinhelmer commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Memory Worker tests now allow cold Durable Object startup and record which request is slow or still pending when a case fails. Related to #2119; this does not close it.

Why: After #2440, a multi-request transcript case exceeded the 5-second case limit on #2444 (5.53 seconds), then passed on the same head. A 50-run Linux probe measured one first /runs/transcript/owner request at 1.82 seconds while the following seven requests were fast. The old limit hid which request consumed the time. That probe supports a cold-start explanation but does not prove the failed request had the same cause.

Where to look

  1. Case deadline gives multi-request cases 15 seconds.
  2. Operation capture records route, outcome and duration in each test artifact.
  3. Shared test fetch records every routed request, including direct calls outside the post helpers.
  4. Failure summary prints pending routes and recent requests without flooding CI logs.
  5. Behavior proof keeps the remaining reliability gap explicit.

Feedback wanted: Check the 15-second case bound and whether the request markers identify the stalled operation if the flake returns.

Risk: A genuinely stalled case can take 10 seconds longer to fail. This changes the test harness only; the production Worker is unchanged. #2119 stays open for live CI evidence.

Verified: 50/50 fresh Linux suite runs on five Depot runners at the final head, 50/50 on each of two prior candidates, and 70/70 baseline runs. All exact-head PR checks passed. Local named Worker tests: 225 passed, one expected failure; four diagnostic tests passed. Worker and root typechecks, consistency, spec coverage and formatting passed. Current PR-head CI is pending.

Decisions (1)
Validation (3 criteria)
Criterion Proof
A timed-out case records completed and pending request labels, including a stalled response body. src/memoryWorkerDiagnostics.test.ts: the stalled-route and stalled-body fixtures pass.
The Worker suite retains its assertions and passes repeatedly on Linux. Depot exact-head probe: five jobs, 10 fresh suite processes each, 0 failures on 4bcc8765a.
Generated and declared artifacts match the source. npm run check:consistency and specs:coverage --require passed locally.

@justinhelmer
justinhelmer force-pushed the codex/memory-worker-ci-2119-followup branch from 50c05ca to af51486 Compare September 29, 2026 01:09
@justinhelmer
justinhelmer marked this pull request as ready for review September 29, 2026 01:11

@coreplane-switchboard coreplane-switchboard 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.

Changes requested: The new request diagnostics can mark a stalled response as complete.

Warning

Changes requested · head af51486 · 1 finding: 1 minor

Severity Finding Where
minor F1 Keep request diagnostics open through response-body consumption deploy/cloudflare-memory/testFetch.ts:8
Full review

F1 (minor, high confidence): fetchMemoryTest marks a request passed as soon as SELF.fetch returns, but the test helpers read res.text() or res.json() afterward. If a response body stalls, the case can time out while the diagnostic reports that route as completed and shows no pending request. Keep the operation open through body consumption, and cover that timeout in the fixture test.

@justinhelmer
justinhelmer force-pushed the codex/memory-worker-ci-2119-followup branch from af51486 to 4bcc876 Compare September 29, 2026 01:18

@coreplane-switchboard coreplane-switchboard 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.

LGTM: The prior response-body attribution gap is closed; no remaining findings in the complete PR diff.

Note

Approved · head 4bcc876 · no findings

Full review

The prior F1 is resolved: the operation stays pending through response-body consumption, and a stalled-body regression test covers it. No further findings.

@coreplane-switchboard coreplane-switchboard 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.

LGTM: The request instrumentation and longer Worker test deadline preserve the existing assertions and add useful timeout diagnostics.

Note

Approved · head 4bcc876 · no findings

Full review

No findings.

@github-actions github-actions 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.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). This repository opted in through its REVIEW_BOT_LOGIN and REVIEW_BOT_ID variables.

@github-actions github-actions 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.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). This repository opted in through its REVIEW_BOT_LOGIN and REVIEW_BOT_ID variables.

@justinhelmer
justinhelmer merged commit e38ad51 into main Sep 29, 2026
36 checks passed
@justinhelmer
justinhelmer deleted the codex/memory-worker-ci-2119-followup branch September 29, 2026 01:42
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