Skip to content

test: pin INPAINT_OK and NEEDS_SRC_IDS picker lockstep - #404

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-099a
Draft

test: pin INPAINT_OK and NEEDS_SRC_IDS picker lockstep#404
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-099a

Conversation

@cursor

@cursor cursor Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

  • INPAINT_OK (verified mask-honoring editors). Many models advertise inpainting yet regenerate the whole image when handed a mask (ideogram-v2/v3/v4, qwen-image, seedream-v4, glm-image-edit). The editor Set and play object are the only reason those verified ids (nano-banana, flux-kontext, gemini-flash-edit, …) open the Inpaint node. A one-sided drop hides a working brush; a one-sided add ships a dead mask that still bills.
  • NEEDS_SRC_IDS (edit-only ids the catalog mislabels text+image->image). hidream-e1-1, wan-2.6-image-edit, and vidu-q2-reference 400 without a source image, but their names carry no upscal/img2img tell. Without the list they surface as generators. Optional-image editors that do work text-only (nano-banana-2-lite, seedream-v4.5, qwen-image-3) must stay out — modality cannot separate the two.
  • Picker lockstep. Editor normImg (gen / edit / inpaint) and play modelSuits (image / edit / inpaint) must agree on the same catalog row: true *inpaint* ids stay out of Gen/Edit (no mask sent → 400); INPAINT_OK + image-to-image name-regex leaves Gen but keeps Edit+Inpaint; name-regex upscal/img2img leaves Gen without opening Inpaint.

Test files added/updated

  • Added scripts/check-inpaint-src-gates.mjs — extracts both maps + editor normImg + play modelSuits; pins the shipped allowlists and drives them on the same catalog table.
  • Updated .githooks/pre-committouches_inpaintsrc runs the check when index.html, play.html, or the checker change.

Why these tests materially reduce regression risk

These are hand-copied catalog-gap allowlists with a paid-call blast radius and no prior assertions (editor Set vs play {id:1} — twin-drift does not compare them):

  • Dropping an INPAINT_OK id on one surface hides a live-verified mask; adding a false advertiser ships a billed whole-image regen.
  • Dropping a NEEDS_SRC_IDS id offers a generator that 400s (No input image data provided / INVALID_IMAGE_INPUT); widening it hides a working text-only editor.
  • A *inpaint* id leaking into Edit/Gen is a guaranteed 400 (No mask image data provided).

No production behavior change. Offline, deterministic, no API spend. Ran node scripts/check-inpaint-src-gates.mjs, plus check-image-ports.mjs and check-run-compat.mjs — all green.

Open in Web View Automation 

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
nanoodle 5b334fc Commit Preview URL

Branch Preview URL
Sep 01 2026, 08:52 PM

@cursor
cursor Bot force-pushed the cursor/missing-test-coverage-099a branch from 2de8946 to 34b7b0a Compare September 1, 2026 20:47
Editor Set vs play object — a one-sided edit hides a working mask
or offers a text-to-image slot that 400s on a paid send.

Co-authored-by: mikkel <mikkel@255bits.com>
@cursor
cursor Bot force-pushed the cursor/missing-test-coverage-099a branch from 34b7b0a to 5b334fc Compare September 1, 2026 20:50
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