Skip to content

fix: avoid source worker startup deadlines in Codex history tests - #170668

Merged
steipete merged 1 commit into
mainfrom
dbasync/flakefix
Oct 13, 2026
Merged

steipete merged 1 commit into
mainfrom
dbasync/flakefix

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Codex history projection tests can exhaust the worker task deadline while loading their TypeScript dependency graph. The history worker was missing from Vitest's compiled-worker declarations and build entries, unlike the neighboring catalog worker.

User Impact

No user-visible behavior change. History tests use the existing compiled-worker infrastructure, with their assertions and timeouts unchanged.

Why This Change Was Made

Move the existing descriptor into a sibling entrypoint module and register it in both compiled-worker inventories. Its source and packaged paths stay identical. Vitest redirects only the descriptor; runtime parents and direct worker imports stay source-backed. The old inline declaration is removed.

The diagnostic replay associated with #170262 recorded a source history worker failing at its 60-second deadline before the handler started. Successful controls spent roughly 44–53 seconds reaching the handler, then completed the operation in under 200 ms. These are startup observations from a loaded host, not a latency benchmark.

Evidence

The unchanged base (b78d2d4c7ec7d) passed all seven selected item-limit, field-limit, and evidence-budget cases: pnpm test extensions/codex/src/app-server/session-history.test.ts --maxWorkers=1 -t 'retains (item_limit|field_limit) in capture diagnostics|projects native evidence within its budget'. Invocation wall time: 278.85 seconds on macOS / Node 26. This confirms that the old failures are intermittent; it is not candidate proof or a claim that every incognito timeout has the same cause.

Changed-file formatting, basic oxlint and git diff --check pass. Independent Codex review is scoped-clean with no actionable findings.

PR CI passed at bea1f9c21862740bdf4fc6f35b3b9c29f4a01608, including production/test types, type-aware lint, source contracts, architecture and database ratchets. The extension worker test job passed 12 files / 175 tests. All seven selected history cases passed on Linux / Node 24:

Case incognito=false incognito=true
Item-limit diagnostics 4.580 s 9.884 s
Field-limit diagnostics 1.134 s 6.480 s
Oversized evidence budget 1.564 s 10.250 s
Ordinary evidence budget 0.843 s —

The separate exact-head Knip export scan passed the script scan with zero entries. Production/full scans reported 14 distinct inherited exports in untouched files; none involve this patch. Thirteen match the exact file/symbol findings in scheduled main, repaired by #170660 (bda83ac9f168). The remaining ChatPermissionCard production export has identical source and consumers on observed main 03fb581d3584: its only external consumer is a test; production uses the local bridge. Scanner owners and export configurations are unchanged, apart from main adding two unrelated offline entrypoints. That cleanup is now merged as #170680 (9a15afcfbdcc). This is an inherited-static exception, not a claim that the full Knip scan passed. No scan was rerun.

These are test durations, not product latency claims. No local candidate rerun or full-suite replay was needed. The distinct historical incognito timeout and native process-startup/placement failures are not claimed repaired by this change.

Runtime measure Change
Warmed statements / requests Unchanged by construction; no SQL-path edits
MAIN statements / T1 calls Unchanged; descriptor extraction only
Removed runtime checks None

No schema, SDK surface, plugin-loading, update or service-lifecycle change. SQL harness and published-driver update cell are not applicable. LOC: production unchanged in net LOC; test-build metadata +4 net (14 additions, 10 deletions total).

@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T05:21:09.362678Z bea1f9c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit 7fbd58b into main Oct 13, 2026
133 of 135 checks passed
@steipete
steipete deleted the dbasync/flakefix branch October 13, 2026 05:47
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…enclaw#170668)

Register the Codex session-history worker in the existing compiled-worker inventories and extract its unchanged entrypoint descriptor. This removes avoidable TypeScript startup work from tests without changing assertions or task deadlines.

All seven selected history cases passed in exact-head PR CI. Unrelated Knip export findings were matched to main and repaired separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant