Skip to content

Fix false aborts on ordinary Codex requests - #5

Merged
YeungKC merged 1 commit into
mainfrom
hotfix/0.0.2-request-pass-through
Aug 16, 2026
Merged

Fix false aborts on ordinary Codex requests#5
YeungKC merged 1 commit into
mainfrom
hotfix/0.0.2-request-pass-through

Conversation

@YeungKC

@YeungKC YeungKC commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • pass through ordinary provider requests when reconstructed history does not match Pi input
  • keep transition/checkpoint replay fail-closed and wait for active transitions
  • add regression coverage
  • bump package to 0.0.2
  • update MIT copyright to YeungKC

Verification

  • bun test — 43 pass

Copilot AI 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.

Pull request overview

Allows ordinary Codex requests with unmatched reconstructed history to pass through while preserving fail-closed transition and checkpoint behavior.

Changes:

  • Waits for active transitions and validates replay state.
  • Adds regression tests for request pass-through and transition handling.
  • Bumps the package version and updates copyright ownership.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
session-coordinator.ts Refines request replay and transition coordination.
session-coordinator.test.ts Adds regression coverage for new behavior.
package.json Bumps version to 0.0.2.
LICENSE Updates the copyright holder.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread session-coordinator.test.ts Outdated
@YeungKC
YeungKC force-pushed the hotfix/0.0.2-request-pass-through branch from 068b46a to 1f3caed Compare August 16, 2026 13:56
@YeungKC
YeungKC requested a balanced review from Copilot August 16, 2026 13:57

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

session-coordinator.ts:233

  • A model selection can occur while this promise is pending. The completing transition then unconditionally deletes pendingBySession, so the recursive request loses the newer transition and reaches recoverCurrentModel, which creates its checkpoint with basePayload set to undefined. Request-specific fields such as reasoning effort or text verbosity are therefore dropped for the newer model. Preserve/version the pending transition and only delete the transition that actually completed, so the recursive call takes the pending path and forwards this request's basePayload.
		const activeTransition = transitionBySession.get(sessionId);
		if (activeTransition) {
			await activeTransition;
			return prepareRequest(model, ctx, requestInput, basePayload);

@YeungKC
YeungKC merged commit c9457a4 into main Aug 16, 2026
1 check passed
@YeungKC
YeungKC deleted the hotfix/0.0.2-request-pass-through branch August 16, 2026 14:00
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