Skip to content

- Fix: ignore queued peek failures after cleanup - #49

Merged
pkaminski merged 1 commit into
masterfrom
codex/peek-failure-after-cleanup-20261120
Nov 20, 2026
Merged

pkaminski merged 1 commit into
masterfrom
codex/peek-failure-after-cleanup-20261120

Conversation

@pkaminski

@pkaminski pkaminski commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

When a peek() has already completed or failed, Dispatcher can still invoke a failure interceptor captured before cleanup. That callback reads the now-null connector and raises a second, unhandled TypeError.

Ignore the callback after its connector has been cleaned up. Active peeks still reject with their original read error. Bump Firetruss to 8.3.1 and regenerate the distributed bundles.

  • Fix: avoid a secondary exception from queued read failures after peek cleanup.

Validation: all 81 tests pass, lint passes, and UMD/ES bundles plus source maps regenerate successfully. The two new regression cases reproduce the exact null-at exception on the previous code after failed and successful peeks, then pass with the guard. They also verify that the original outcome and one-time cleanup are preserved.

Fixes REVIEWABLEIO-CLIENT-4V4

Sentry issue · Motivating event

The consuming application must adopt the published library version before this is fixed in production.


This change is Reviewable

Copy link
Copy Markdown
Member Author
Sentry investigation context

The two captures in REVIEWABLEIO-CLIENT-4V4 occurred one second apart on SaaS client build 7950 / Firetruss 8.3.0, during reads of two reviews in the same repository. The event's final identity is unauthenticated, but earlier breadcrumbs identify an authenticated agent followed by an auth refusal and sign-out. The source also screened as residential, so the anonymous data-center archive rule does not apply.

Dispatcher._afterEnd() copies matching failure interceptors before scheduling their invocation. Removing an interceptor during peek() cleanup cannot remove it from that queued copy. The first callback (or successful completion) destroys the connector; a later invocation then dereferences connector.at. The regression cases preserve the queued callback across both outcomes and reproduce the event's exact exception without the guard.

This corrects the secondary lifecycle exception, not the upstream authentication refusal or access failures. Sentry remains unresolved while the library PR is reviewed; production needs publication and consumer adoption before a deployment-based resolution is justified. No authenticated production behavior or credentials were changed.

@pkaminski pkaminski left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@pkaminski reviewed 9 files and all commit messages.
Reviewable status: 0 of 9 files reviewed, all discussions resolved (waiting on pkaminski).

@pkaminski
pkaminski marked this pull request as ready for review November 20, 2026 08:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T08:24:42.527787Z 9ea7dd6 Draft marked ready
ℹ️ 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.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

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

Devin Review

@pkaminski
pkaminski requested a review from snoack November 20, 2026 08:26

@snoack snoack 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:

@snoack reviewed 9 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pkaminski).

@pkaminski
pkaminski merged commit 722273e into master Nov 20, 2026
7 checks passed
@pkaminski
pkaminski deleted the codex/peek-failure-after-cleanup-20261120 branch November 20, 2026 19:35
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.

2 participants