test: pin LoRA URL validation and family/cap payload lockstep - #405
Draft
cursor[bot] wants to merge 1 commit into
Draft
test: pin LoRA URL validation and family/cap payload lockstep#405cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
nanoodle | c2369d4 | Commit Preview URL Branch Preview URL |
Sep 01 2026, 08:52 PM |
cursor
Bot
force-pushed
the
cursor/missing-test-coverage-4dc4
branch
from
September 1, 2026 20:47
689b828 to
e7cf8e7
Compare
CivitAI / bare HF repo / HF file-page URLs must throw before a paid image POST. Drive the shipped helpers on all three surfaces and assert play runGraph never bills a bad LoRA URL. Co-authored-by: mikkel <mikkel@255bits.com>
cursor
Bot
force-pushed
the
cursor/missing-test-coverage-4dc4
branch
from
September 1, 2026 20:50
e7cf8e7 to
c2369d4
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Risky behavior now covered
normalizeLoraUrl(CivitAI / bare HF repo / HF file-page). NanoGPT pulls the LoRA URL server-side. A signed CivitAI link (civitai.com/civitai.red/civit.ai) is a charged 422; a bareuser/repoid or an HF/blob/page that is not a.safetensorsfile is the same class of billed miss. The helper must throw before/images/generations. HF/blob/must rewrite to/resolve/so the server gets the raw file.loraFamily/loraCap/imageTakesLora/loraBodyFor. Ordered classifier (klein before flux-2, spicy excluded). A one-sided family edit ships the wrong param shape (lora_urlvslora_url_Nvslora_weights) or the old krea cap of 1 (stacks 2–3 silently dropped). Inpaint ids must stay out of the image LoRA box (those carry nolora_url).runGraph. A CivitAI URL on a realimagenode must POST zero times and surface as a node error — not a billed 422. A good HF blob URL must land rewritten on the wire.Test files added/updated
scripts/check-lora-url-gates.mjs— extracts the shipped helpers fromindex.html, play RUNTIME, andvendor/njs-engine.js; drives the same URL / family / cap / body table; drives realrunGraph()viaplay-engine.mjs..githooks/pre-commit—touches_loragatesruns the check whenindex.html,play.html,vendor/njs-engine.js, the checker, orplay-engine.mjschange.Why these tests materially reduce regression risk
These are hand-copied validation / capability gates with a paid-call blast radius and no prior behavioral assertions (twin-drift only proves the source lines exist;
check-lora-models.mjsis a live catalog audit, not pre-commit, and does not drivenormalizeLoraUrlorrunGraph):ltx) posts the wrong keys — stacks 2–3 vanish, or alorasoverride we do not implement is implied.imgExtra→loraParamsthrow lets a bad URL reachgenImage.No production behavior change. Offline, deterministic, no API spend. Ran
node scripts/check-lora-url-gates.mjs— green.