Conversation
A whitespace-only modalRegions entry passed the min(1) check and reached Modal as an invalid region, failing at sandbox creation. Region names now must match /^\S+$/ so blank and whitespace-containing values are rejected at config parse time instead of repaired.
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Ayush
|
TL;DR
ModalSandboxOptionsSchemanow rejects blank or whitespace-containingmodalRegionsentries at config parse time instead of forwarding them to Modal.What changed?
src/sandbox/modal-schema.ts: region names must match/^\S+$/(replaces.min(1)), with the messageregion must not be blank or contain whitespace.src/sandbox/modal.test.ts: the blank-region test now also covers" ","\t","us east"and" us".Why?
Devin Review on openrouter-web#44757 flagged that a whitespace-only region passed
.min(1)and reached Modal as an invalid region identifier, failing at sandbox creation rather than at config validation. The schema is harness-owned and shared by every Modal-backed benchmark (and byagent_dxin openrouter-web viaModalSandboxOptionsSchema.shape), so the fix lives here rather than per consumer. Rejecting is preferred over.trim()so malformed input is refused rather than repaired.How to test
bun test src/sandboxExpected:
rejects blank region identifierspasses for all five inputs,["us"]and[]still parse.Reviewer focus
/^\S+$/is intentionally the narrowest constraint that addresses the finding. Modal region ids are lowercase alphanumerics with hyphens today, but I did not lock that in.Checklist
Link to Devin session: https://openrouter.devinenterprise.com/sessions/4a11ad51b948470fbe1b893fd1f275f8
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/4a11ad51b948470fbe1b893fd1f275f8?variant=devin
Requested by: @ayush-or