Skip to content

test: make the ML funcall provisioning spec offline-deterministic - #835

Merged
ronaldtse merged 1 commit into
mainfrom
fix/ml-funcall-spec-offline
Nov 8, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
fix/ml-funcall-spec-offline

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Summary

Makes the ML funcall provisioning contract spec deterministic: the unknown-model rejection is now pinned against a local index fixture (INTERSCRIPT_ML_INDEX → temp file), not the live registry index.

Why

resolve() fetches DEFAULT_INDEX_URL over HTTP before validating the model id, so on a network-constrained CI runner the raw Net::ReadTimeout (or a 502) surfaces instead of the named RegistryError the contract ruling requires. Today this flake failed three CI jobs across PR runs and main (Ruby 3.4 / ubuntu, 3.3 / windows). The contract under test — unknown ids fail loudly with a named provisioning error enumerating known ids — does not need the network: load_index reads a file:-path index with File.read.

Verification

  • Local run of the fixture path: RegistryError with /unknown model id "no-such-model" (known:/ — deterministic, no network touched (the env var makes load_index take the File.read branch).
  • No production code changed; the assertion and its message contract are unchanged.

…fixture

resolve() fetches the remote index over HTTP before validating the
model id, so on a network-constrained CI runner the raw
Net::ReadTimeout surfaced instead of the named RegistryError the
contract ruling requires. The unknown-id rejection does not need the
network: point INTERSCRIPT_ML_INDEX at a local fixture and the spec
becomes deterministic (with_env restores the process env). The three
flake failures today (PR runs and main, 3.4/ubuntu) were all this spec
hitting Net::ReadTimeout / 502 on the registry fetch.
@ronaldtse
ronaldtse merged commit 346a957 into main Nov 8, 2026
13 checks passed
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