Files
Jeremy d94a3593ad refactor: group crates into foundation, api, local and app (#203)
Crates move from a flat crates/ folder into four folders by what they reach:
foundation (core, http, features, native, media), api (hosted services
that take a key), local (ComfyUI, SAM 3 and the built-in engines) and app
(client, widgets, agents, MCP gateway).

Package names are unchanged, so consumers pinned to a git revision are not
affected. Path dependencies need the new folder.

Every path that named a crate folder is rewritten: workspace members and
dependencies, relative paths inside crates (manifests, #[path] test
support, include_str!), docs, consumer-smoke and the mutation tools. The
TLS scan in ai-http now walks every group. docs/LAYOUT.md describes the
folders and where a new crate goes.
2026-11-15 11:33:20 +00:00

4 lines
2.5 KiB
Python

'Selection request/result contract checks only. No runner is introduced by this slice.'
SEG_CASES = [('click-outside-accepted', 'crates/foundation/ai-core/src/segment.rs', 'if fraction(click.x) && fraction(click.y) {', 'if true {', 'craft-ai-core', 'lib', 'clicks_outside'), ('too-many-clicks-accepted', 'crates/foundation/ai-core/src/segment.rs', 'if list.len() > MAX_POINTS {', 'if false {', 'craft-ai-core', 'lib', 'clicks_outside'), ('click-list-form-accepted', 'crates/foundation/ai-core/src/segment.rs', ' if !p.is_object() {\n return Err(wrong());\n }\n', '', 'craft-ai-core', 'lib', 'clicks_outside'), ('box-turned-round-accepted', 'crates/foundation/ai-core/src/segment.rs', 'if inside && area.x0 < area.x1 && area.y0 < area.y1 {', 'if inside {', 'craft-ai-core', 'lib', 'a_box_turned'), ('box-outside-accepted', 'crates/foundation/ai-core/src/segment.rs', 'if inside && area.x0 < area.x1 && area.y0 < area.y1 {', 'if area.x0 < area.x1 && area.y0 < area.y1 {', 'craft-ai-core', 'lib', 'a_box_turned'), ('box-list-form-accepted', 'crates/foundation/ai-core/src/segment.rs', ' if !value.is_object() {\n return Err(wrong());\n }\n', '', 'craft-ai-core', 'lib', 'a_box_turned'), ('blank-prompt-is-a-description', 'crates/foundation/ai-core/src/segment.rs', ' if !text.trim().is_empty() =>', ' if true =>', 'craft-ai-core', 'lib', 'a_blank_prompt'), ('long-name-shown', 'crates/foundation/ai-core/src/segment.rs', ' && n.chars().count() <= MAX_NAME_CHARS\n', '', 'craft-ai-core', 'lib', 'hostile'), ('control-name-shown', 'crates/foundation/ai-core/src/segment.rs', ' && !n.chars().any(char::is_control)\n', '', 'craft-ai-core', 'lib', 'hostile'), ('score-out-of-range-shown', 'crates/foundation/ai-core/src/segment.rs', 'found.score = found.score.filter(|s| fraction(*s));', '', 'craft-ai-core', 'lib', 'hostile'), ('any-inline-image-taken-as-mask', 'crates/foundation/ai-core/src/segment.rs', 'Payload::Inline { media_type, .. } if media_type.as_str() == MASK_MEDIA_TYPE', 'Payload::Inline { media_type, .. } if !media_type.as_str().is_empty()', 'craft-ai-core', 'lib', 'only_an_inline_png'), ('image-handle-taken-as-mask', 'crates/foundation/ai-core/src/segment.rs', 'Payload::Inline { media_type, .. } if media_type.as_str() == MASK_MEDIA_TYPE\n )', 'Payload::Inline { media_type, .. } if media_type.as_str() == MASK_MEDIA_TYPE\n ) || matches!(p, Payload::Handle(_))', 'craft-ai-core', 'lib', 'only_an_inline_png')]