[codex] add user-scoped WebUI tool approvals#5251
Conversation
…nai-api-contracts
…nai-api-contracts
…reborn-chat-completions-workflow
* 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>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces user-scoped tool permission settings, auto-approval stores, and persistent approval policies, integrating them into the WebUI. It also implements ProductWorkflow-backed, non-streaming Chat Completions and Responses workflows within the OpenAI-compatible API layer, alongside SSE streaming translation for projection-backed streams. Feedback on the changes suggests improving robustness in both the chat and responses workflows by logging failures in binding internal references rather than propagating the errors and failing otherwise successful client requests.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| Ok(result) => { | ||
| let _ = result?; | ||
| } |
There was a problem hiding this comment.
If bind_internal_refs fails at the end of a successful chat completion, propagating the error with result? will fail the entire client request. Since the turn has already run and completed successfully, it is much more robust to log the error and proceed to return the successful response to the user.
Ok(result) => {
if let Err(err) = result {
tracing::error!(
public_id = public_id.as_str(),
error = ?err,
"failed to bind internal refs; continuing to return successful response"
);
}
}| if let Some(internal_refs) = wait_result.internal_refs { | ||
| self.bind_internal_refs(caller.scope().clone(), public_id, internal_refs) | ||
| .await?; | ||
| } |
There was a problem hiding this comment.
Similarly, if bind_internal_refs fails at the end of a successful response completion, propagating the error with ? will fail the entire client request. Since the turn has already run and completed successfully, it is much more robust to log the error and proceed to return the successful response to the user.
if let Some(internal_refs) = wait_result.internal_refs {
if let Err(err) = self.bind_internal_refs(caller.scope().clone(), public_id, internal_refs).await {
tracing::error!(
public_id = public_id.as_str(),
error = ?err,
"failed to bind internal refs; continuing to return successful response"
);
}
}|
🚅 Deployed to the ironclaw-pr-5251 environment in ironclaw-ci-preview
|
|
Closing this draft in favor of a clean replacement branch based directly on current main. |
Fixes #5242
Summary
Security / tenancy
Notes
Cargo.lockalso includes Cargo 1.92 lockfile normalization for optionalironclaw_reborn_openai_compatdeps already declared in that crate;cargo +1.92.0 metadata --lockedpasses after the lockfile update.Tests
cargo +1.92.0 test -p ironclaw_approvalscargo +1.92.0 test -p ironclaw_product_workflow --lib tool_permissions_are_user_scoped_and_apply_persistent_policycargo +1.92.0 test -p ironclaw_webui_v2 --features webui-v2-beta every_descriptor_matches_the_locked_policy_surfacecargo +1.92.0 check -p ironclaw_reborn_composition --features webui-v2-betacargo +1.92.0 metadata --locked --format-version 1git diff --check