Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions spec/isc/semantics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,39 @@ def with_map(name, body)
# provisioning error that tells the user what is missing. The fix
# (restoring the require) yields the ideal shape: a
# RegistryError that enumerates the known model ids.
expect {
Interscript::Stdlib::Functions::SecrystAdapter.call("test", model: "no-such-model")
}.to raise_error(
Interscript::ML::IMF::RegistryError,
/unknown model id "no-such-model" \(known:/
)
#
# The unknown-id rejection is pinned against a LOCAL index fixture:
# resolve() fetches DEFAULT_INDEX_URL over HTTP before validating,
# and on a network-constrained runner the raw Net::ReadTimeout used
# to surface instead of the named error. The contract under test —
# unknown ids fail loudly with a RegistryError — does not need the
# network.
Dir.mktmpdir do |dir|
index = File.join(dir, "models.yaml")
File.write(index, <<~YAML)
version: 1
models: {}
YAML
with_env("INTERSCRIPT_ML_INDEX", index) do
expect {
Interscript::Stdlib::Functions::SecrystAdapter.call("test", model: "no-such-model")
}.to raise_error(
Interscript::ML::IMF::RegistryError,
/unknown model id "no-such-model" \(known:/
)
end
end
end
end

def with_env(name, value)
old = ENV[name]
ENV[name] = value
yield
ensure
ENV[name] = old
end

RSpec.describe "ISC semantics — strict parse (adoption ruling)" do
it "rules: the corpus is strict-parse-clean; the stricter parse is adoptable" do
# Gate evaluation 2026-10-23: all 295 corpus files (291 maps + 4
Expand Down
Loading