Skip to content

Studio frontend tests: pin the chat refusal action, not the whole chain - #19272

Merged
danielhanchen merged 1 commit into
mainfrom
ci/refusal-header-pin-managed-logs
Nov 24, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/refusal-header-pin-managed-logs

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Problem

studio/frontend/tests/load-refusal-header.test.ts fails on main in Frontend unit tests, so every open PR inherits it:

not ok - Images, Video and chat raise the refusal under its title, with the owner's settings link
  AssertionError: features/chat/hooks/use-chat-model-runtime.ts missing: ? modelMemorySettingsAction()
                : (engineSettingsAction(message) ?? logsAction);

Cause

#19166 (per-attempt logs for managed SGLang) is correct. When a managed engine fails to load, the chat toast now offers that engine's own log first:

const action = refusal
  ? modelMemorySettingsAction()
  : (managedLogsAction ?? engineSettingsAction(message) ?? logsAction);

A refusal still gets the owner's model memory settings link. The test pinned the whole non-refusal chain as one literal string, so adding an action at its head broke it.

Fix

That one literal is replaced with a structural check of what the test is about:

  • a refusal shows modelMemorySettingsAction();
  • any other failure still falls back to engineSettingsAction(message) ?? logsAction.

Actions ahead of those, like a managed engine's own log, are allowed. The Images, Video and chat pins for the refusal check and its title are unchanged.

Verification

  • load-refusal-header.test.ts: 7 pass here. On main, 1 of them fails.
  • Making a refusal show logsAction fails the test.
  • Dropping engineSettingsAction(message) from the chain fails the test.
  • The use-chat-model-runtime.ts from before Add per-attempt logs for managed SGLang #19166 still passes.

…in (#19166)

#19166 put a managed engine's per-attempt log first in the chat load-failure
action chain. load-refusal-header.test.ts pinned that chain as one literal
string, so it fails on main. Check what the test is about instead: a refusal
gets the owner's model memory settings link, and any other failure still
falls back to the engine settings and then the logs.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 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-24T13:59:16.690818Z bd275cc Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-24T13:58:08.952497Z bd275cc PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: bd275cccd8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit ab747ee into main Nov 24, 2026
1 of 41 checks passed
@danielhanchen
danielhanchen deleted the ci/refusal-header-pin-managed-logs branch November 24, 2026 14:01
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.

1 participant