Skip to content

Auto-load harness: inline isOtherCacheSnapshot from source so the scenarios run on main again - #17816

Merged
danielhanchen merged 1 commit into
mainfrom
fix-autoload-harness-cache-snapshot
Nov 15, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-autoload-harness-cache-snapshot

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

tests/studio/test_chat_autoload_failure_gate.py has failed 85 of 86 scenarios on main since #17673 ("Show loadable Hugging Face snapshots from custom folders in Select Model"). It shows up in Repo tests (CPU, studio), first on the staging run of #16717:

tests/studio/test_chat_autoload_failure_gate.py:950: in _build_harness
E   AssertionError: the sliced region uses ['isOtherCacheSnapshot'], imported by chat-adapter.ts but absent
    from this harness. Add a stub to PREAMBLE, or these scenarios will fail as wrong-model assertions

#17673 is correct. isAutoLoadableLocalRow now admits another cache's snapshot rows through isOtherCacheSnapshot (from features/model-picker/inventory/local-cache-snapshot.ts). The harness slices that region of chat-adapter.ts and supplies its imports itself, and its import guard flagged the new name as intended.

Change (test only)

The harness now inlines the shipped isOtherCacheSnapshot, plus the looksLikeLocalPath it calls, read from source. It already inlines server-model-wait.ts and load-request.ts the same way. A hand-written stub would let the scenarios drift from the rule auto-load actually applies. If the function stops being a top-level export function, the extraction asserts and names the file.

Verification

test_chat_autoload_failure_gate.py
main (04ce4572) 85 failed, 1 passed
this branch 86 passed

Every tests/studio file that reads chat-adapter.ts (16 files): 446 passed.

… from source

#17673 made isAutoLoadableLocalRow admit another cache's snapshot rows through isOtherCacheSnapshot,
imported from model-picker/inventory/local-cache-snapshot.ts. test_chat_autoload_failure_gate.py slices
that region of chat-adapter.ts into a harness and its import guard flagged the new name, failing 85 of
86 scenarios on main. Inline the shipped function (and the looksLikeLocalPath it calls) the same way the
harness already inlines server-model-wait.ts and load-request.ts, so the scenarios run the real rule.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T11:41:23.770098Z a407638 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: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a407638e94

ℹ️ 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 b6912f5 into main Nov 15, 2026
@danielhanchen
danielhanchen deleted the fix-autoload-harness-cache-snapshot branch November 15, 2026 11: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.

1 participant