Skip to content

test(reborn): close OpenAI compat security gates - #4571

Merged
think-in-universe merged 74 commits into
mainfrom
issue-4447-reborn-openai-compat-security-tests
Jun 9, 2026
Merged

think-in-universe merged 74 commits into
mainfrom
issue-4447-reborn-openai-compat-security-tests

Conversation

@think-in-universe

Copy link
Copy Markdown
Collaborator

Summary

  • Adds route-level compatibility/security coverage for OpenAI-compatible Chat and Responses errors, unsupported Responses tool_choice, and cross-scope lookup/cancel not-found masking.
  • Adds an architecture guardrail preventing the Reborn OpenAI-compatible route crate from depending on v1 gateway handlers, raw SseManager/AppEvent streams, or legacy conversation reconstruction.
  • Updates Reborn OpenAI-compatible API docs and crate guardrails to reflect the wired projection-streaming surface and first-slice unsupported behaviors.

Linked Issue

Closes #4447

Depends on #4446

Part of #3283

Validation

  • cargo +1.92.0 fmt --all -- --check
  • git diff --check
  • cargo +1.92.0 check -p ironclaw_reborn_openai_compat --features openai-compat-beta - blocked locally before Cargo starts: bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted
  • cargo +1.92.0 test -p ironclaw_reborn_openai_compat --features openai-compat-beta --test chat_workflow_handlers_contract - blocked locally by the same sandbox wrapper
  • cargo +1.92.0 test -p ironclaw_reborn_openai_compat --features openai-compat-beta --test responses_workflow_handlers_contract - blocked locally by the same sandbox wrapper
  • cargo +1.92.0 test -p ironclaw_reborn_openai_compat --features openai-compat-beta --test streaming_handlers_contract - blocked locally by the same sandbox wrapper
  • cargo +1.92.0 test -p ironclaw_architecture reborn_openai_compat_routes_do_not_depend_on_v1_gateway_or_legacy_streams - blocked locally by the same sandbox wrapper

Security Impact

Yes. This PR adds security/redaction and architecture guardrail coverage for the Reborn OpenAI-compatible route boundary. It does not add new route semantics.

Database Impact

No schema or migration changes.

Blast Radius

Limited to Reborn OpenAI-compatible route contract tests, architecture boundary tests, and docs.

Rollback Plan

Revert this PR to remove the added #4447 closeout tests/docs/guardrail while leaving #4446 route behavior intact.


Review track: C

hanakannzashi and others added 30 commits June 4, 2026 19:48
* feat(reborn): add OpenAI-compatible product refs

* fix(reborn): validate OpenAI-compatible ref mappings

* fix(reborn): address OpenAI product refs review

* Validate durable OpenAI compat ref records

* Format OpenAI compat storage review fixes

---------

Co-authored-by: Robert Yan <mstr.raphael@gmail.com>
…ns-workflow' into issue-4445-reborn-responses-workflow

# Conflicts:
#	crates/ironclaw_reborn_openai_compat/src/chat_workflow.rs
…flow' into issue-4446-reborn-openai-projection-streams

# Conflicts:
#	crates/ironclaw_reborn_openai_compat/CLAUDE.md
…ion-streams' into issue-4447-reborn-openai-compat-security-tests

# Conflicts:
#	crates/ironclaw_reborn_openai_compat/CLAUDE.md
#	crates/ironclaw_reborn_openai_compat/tests/chat_workflow_handlers_contract.rs
#	crates/ironclaw_reborn_openai_compat/tests/responses_workflow_handlers_contract.rs
…eborn-openai-projection-streams

# Conflicts:
#	crates/ironclaw_reborn_openai_compat/src/responses_workflow.rs
…-4447-reborn-openai-compat-security-tests

# Conflicts:
#	crates/ironclaw_reborn_openai_compat/tests/responses_workflow_handlers_contract.rs
…eborn-openai-projection-streams

# Conflicts:
#	crates/ironclaw_reborn_openai_compat/src/responses_workflow.rs
hanakannzashi
hanakannzashi previously approved these changes Jun 9, 2026
Base automatically changed from issue-4446-reborn-openai-projection-streams to main June 9, 2026 12:53
@think-in-universe
think-in-universe dismissed hanakannzashi’s stale review June 9, 2026 12:53

The base branch was changed.

Resolve conflicts after OpenAI projection streaming landed on main.
Copilot AI review requested due to automatic review settings June 9, 2026 12:56

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@think-in-universe
think-in-universe merged commit 7c19a5d into main Jun 9, 2026
66 checks passed
@think-in-universe
think-in-universe deleted the issue-4447-reborn-openai-compat-security-tests branch June 9, 2026 13:11
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
* feat(reborn): add OpenAI-compatible API contracts

* fix(reborn): tighten OpenAI-compatible response contracts

* fix(reborn): address OpenAI compat contract review

* fix(reborn): satisfy merged main clippy

* feat(reborn): add OpenAI-compatible product refs

* fix(reborn): validate OpenAI-compatible ref mappings

* fix(reborn): address OpenAI product refs review

* feat(reborn): route chat completions through ProductWorkflow

* fix(reborn): simplify chat completion timestamps

* fix(reborn): use explicit ProductWorkflow submit door

* test(reborn): stabilize subagent cancellation propagation

* Validate durable OpenAI compat ref records

* Fix chat completions idempotency validation

* Format OpenAI compat storage review fixes

* feat(reborn): add OpenAI-compatible product refs (nearai#4489)

* feat(reborn): add OpenAI-compatible product refs

* fix(reborn): validate OpenAI-compatible ref mappings

* fix(reborn): address OpenAI product refs review

* Validate durable OpenAI compat ref records

* Format OpenAI compat storage review fixes

---------

Co-authored-by: Robert Yan <mstr.raphael@gmail.com>

* Address chat completions review comments

* Persist chat completion idempotency replay metadata

* Export OpenAI compat ack recording request

* Persist OpenAI compat accepted workflow acks

* feat(reborn): route responses through ProductWorkflow

* fix(reborn): declare compat storage chrono dependency

* fix(reborn): resolve chat completions review feedback

* fix(reborn): resolve chat completions review feedback

* fix(reborn): keep responses cancel within adapter boundary

* feat(reborn): translate projection streams to OpenAI SSE

* fix(reborn): format chat streaming workflow

* fix(reborn): format responses streaming workflow

* fix(reborn): handle terminal projection stream status

* fix(reborn): make OpenAI stream replay terminal-safe

* test(reborn): close OpenAI compat security gates

* fix(reborn): keep responses unsupported-tooling router reusable

* fix(openai-compat): address chat workflow review comments

* fix(openai-compat): address responses handler review comments

* fix(openai-compat): persist responses replay state

* test(openai-compat): cover responses review paths

* fix(openai-compat): annotate optional responses router state

* test(product-adapters): cover cancel run payload validation

* fix(openai-compat): address chat ref store review

* fix(reborn): resolve chat projections through workflow

* fix(reborn): close responses workflow review gaps

* test(reborn): cover responses wait cancellation

* fix(reborn): update streaming tests for projection reader

* fix(reborn): close OpenAI stream review gaps

* fix(reborn): tighten OpenAI workflow internals

* feat(reborn): wire OpenAI chat completions route

* fix(reborn): wire OpenAI responses composition

* fix(reborn): wire OpenAI projection streams

* fix(reborn): centralize chat body validation

* fix(reborn): centralize responses body validation

* fix(reborn): keep OpenAI compat off turns

---------

Co-authored-by: Coffee <zjchen1234@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: experienced 6-19 merged PRs risk: low Changes to docs, tests, or low-risk modules scope: docs Documentation size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Reborn] Close OpenAI-compatible API migration with compatibility and security tests

3 participants