Skip to content

fix(app-server-client): enforce inbound request ID lifetime - #670

Merged
GraciousGazelles merged 5 commits into
mainfrom
rebuild/pr609-stage1-inbound-identity
Aug 21, 2026
Merged

GraciousGazelles merged 5 commits into
mainfrom
rebuild/pr609-stage1-inbound-identity

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • retain every inbound server-request ID for the full connection lifetime
  • reject duplicate, unsupported, oversized, and over-capacity IDs with an InvalidData protocol failure
  • permit each admitted request to resolve or reject exactly once
  • add regression coverage for live reuse, initialize-to-live reuse, double resolution, bounded exhaustion, and unsupported-request reuse

Validation

  • git diff --check
  • rustfmt --edition 2024 --check codex-rs/app-server-client/src/remote.rs codex-rs/app-server-client/src/lib.rs

Build-heavy local tests were not run; hosted checks are the canonical proof surface.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces an InboundServerRequestLedger to track and bound inbound server request IDs over the lifetime of a connection, preventing ID reuse and limiting memory consumption. Extensive unit tests are added to verify duplicate request termination, double resolution rejection, and ledger exhaustion. The reviewer suggested optimizing the ledger initialization by pre-allocating the HashMap with the calculated maximum capacity to avoid unnecessary reallocations.

Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved
Comment thread codex-rs/app-server-client/src/lib.rs Resolved
@GraciousGazelles
GraciousGazelles marked this pull request as ready for review August 21, 2026 17:31
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit e94921a Aug 21, 2026
96 of 97 checks passed
@GraciousGazelles
GraciousGazelles deleted the rebuild/pr609-stage1-inbound-identity branch August 21, 2026 17: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.

2 participants