Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
This is an automated message. We have closed this pull request because it has been open for more than two weeks. |
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.
Human comments
What was wrong
A plugin CLI continuation could use its disposed API after reload and crash the server (#5964). Core only attributed uncaught errors from background services. The two production crash records both show
PluginContextStaleErrorfromhost-careafter a pending CLI continuation calledrealtime.publish.What changed
How you verified
3465033; warnings deduplicated, ordinary errors degraded only the fixture, reload recovered it.Research baseline and reused implementation
Baseline was current main
06ae8f039a7198a6aad2b9b6e030efb88f8dd923. Read the requested source and both October 19/21 crash JSON files in full, without changing production files. Checked each relevant file's history, including the original service supervisor containment change.unhandledRejectionlistener; default Node behavior promoted rejections to uncaught exceptions.start-server.ts:526–532plugin-runtime.ts:529–565assertLivethrows only after invalidation. The internal error now carries the plugin ID and is cached per handle for weak deduplication.plugin-api.ts:151–159,plugin-api.ts:640–642invokeWrapped; event dispatch does too. Attribution fits in the existing runtime, under 100 changed implementation lines.plugin-service.ts:2089–2160,plugin-service.ts:2208–2255,plugin-runtime.ts:895–921plugin-runtime.ts:581–599plugin-uncaught.test.tsRegression coverage: awaited CLI reload with native uncaught exception and unhandled rejection, repeated errors across two generations, stale handle without attribution after disable, detached CLI/route/RPC/event attribution, and rejecting unattributed core failures or a forged stale-error name. Real process survival is checked separately in isolated E2E.
Slop Cop scope and P2 follow-ups
Reviewed exact head
e074fe4ec05eb39ea94d30fcfc2c09cfcbf69e43, base06ae8f039a7198a6aad2b9b6e030efb88f8dd923, usinggit diff <base>..<head>. Independent security, architecture and code-quality reviewers; author's performance panel and isolated E2E. No P0/P1. Code quality and performance have no additional findings.uncaughtExceptionMonitorstill writes a diagnostic file before each contained stale exception. A surviving timer can grow diagnostic files despite warning deduplication. Follow up by deduplicating identical error objects indiagnostics.ts:173–185; distinct instances/core errors must still produce diagnostics.onClosecallbacks can begin after the replacement loads.invokeWrappedthen captures the replacement, so an ordinary detached failure can degrade it. Follow up by retaining originating instance identity throughroutes/plugins.ts:357–366; verify a delayed old close leaves the new instance running. Source-confirmed; separate live WebSocket reproduction remains follow-up work.Isolated end-to-end evidence and QA handoff
Exact head:
e074fe4ec05eb39ea94d30fcfc2c09cfcbf69e43. Sourcepnpm startbuild, Linux. Fresh empty data directory, dedicated ports; managed temporary job. Every QA CLI write was preceded by astatus --jsonpreflight requiring that exact data directory and rejecting production. No production server or plugins changed.Fixture
uncaught5964registers a CLI handler that writes a started marker, awaits a release file, then schedules two detached calls to its oldbb.realtime.publish. Started each request through the real CLI, reloaded while awaiting, and only then released it.uncaught5964.degraded, detailcli uncaught5964 raised an uncaught error: fixture ordinary uncaught failure.running; same server PID.Warning:
[plugin:uncaught5964] plugin "uncaught5964" used a stale API handle — it was reloaded or disabled; re-entry happens via a fresh factory call.The first launch failed before starting because the source checkout lacked generated
profile-worker.js. Generated that existing Turbo prerequisite, then the bounded retry passed. This PR must not merge before QA passes.Fixes #5964
BB-Thread-ID: thr_csxw97jsa6