forked from 1b-agent/opencadstudio-upstream
fix: settle the Count and Sheet Set merge
- Both PRs registered "Requires an integer between {min} and {max}." under
their own key; keep the sheet set one, which every locale translates.
- Pin the MCP tool schema digest with the sheet set actions added.
- searchable_layer_coexists_with_outlines read glyph outlines from the
shared atlas while other tests could re-bake it, and failed now and
then; lay out and export under one atlas generation.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
fbe55bab37
commit
fafb1758c1
24 files changed
+23
-35
No files matched your search
+22
-12
@@ -2779,20 +2779,30 @@ mod tests {
|
||||
// identical in both (zero visual change — the layer only adds bytes).
|
||||
#[test]
|
||||
fn searchable_layer_coexists_with_outlines() {
|
||||
let mut outline_only = text_wire("HELLO", [20.0, 20.0, 0.0]);
|
||||
outline_only.wire.searchable_text.clear();
|
||||
let mut searchable = text_wire("HELLO", [20.0, 20.0, 0.0]);
|
||||
searchable.wire.searchable_text =
|
||||
searchable_wire("HELLO", [20.0, 20.0, 0.0]).wire.searchable_text;
|
||||
use crate::scene::text::sdf_atlas;
|
||||
// Other tests share the glyph atlas; a re-bake between laying out the
|
||||
// glyphs and exporting them moves the outline lookups, so build and
|
||||
// export under one atlas generation.
|
||||
let (outline_bytes, searchable_bytes) = loop {
|
||||
let generation = sdf_atlas::generation();
|
||||
let mut outline_only = text_wire("HELLO", [20.0, 20.0, 0.0]);
|
||||
outline_only.wire.searchable_text.clear();
|
||||
let mut searchable = text_wire("HELLO", [20.0, 20.0, 0.0]);
|
||||
searchable.wire.searchable_text =
|
||||
searchable_wire("HELLO", [20.0, 20.0, 0.0]).wire.searchable_text;
|
||||
|
||||
// Outlines are never suppressed: both wires keep their glyph quads.
|
||||
assert!(
|
||||
!searchable.wire.text_verts.is_empty(),
|
||||
"searchable wire must keep its outline quads"
|
||||
);
|
||||
// Outlines are never suppressed: both wires keep their glyph quads.
|
||||
assert!(
|
||||
!searchable.wire.text_verts.is_empty(),
|
||||
"searchable wire must keep its outline quads"
|
||||
);
|
||||
|
||||
let outline_bytes = build_pdf_pages(&[test_page(vec![outline_only])], None).unwrap();
|
||||
let searchable_bytes = build_pdf_pages(&[test_page(vec![searchable])], None).unwrap();
|
||||
let outline_bytes = build_pdf_pages(&[test_page(vec![outline_only])], None).unwrap();
|
||||
let searchable_bytes = build_pdf_pages(&[test_page(vec![searchable])], None).unwrap();
|
||||
if sdf_atlas::generation() == generation {
|
||||
break (outline_bytes, searchable_bytes);
|
||||
}
|
||||
};
|
||||
let outline_stream = pdf_stream_text(&outline_bytes);
|
||||
let searchable_stream = pdf_stream_text(&searchable_bytes);
|
||||
|
||||
|
||||
@@ -5719,7 +5719,6 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static
|
||||
"count area is active." => Some(("count-feature", "area-active")),
|
||||
"{name} = {v} (read only)" => Some(("count-feature", "read-only-value")),
|
||||
"Requires 0 or 1 only." => Some(("count-feature", "requires-0-or-1")),
|
||||
"Requires an integer between {min} and {max}." => Some(("count-feature", "requires-int-range")),
|
||||
"{name} ...... {n}" => Some(("count-feature", "target-count")),
|
||||
"MTEXT Current text style: \"{}\" Text height: {:.4}" => Some(("count-feature", "mtext-current-style")),
|
||||
"{found} field(s) found." => Some(("count-feature", "fields-found")),
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ const MODERN_PROTOCOL_VERSION: &str = "2026-07-28";
|
||||
/// changes, so schema drift (new params, renamed tools) is always a conscious,
|
||||
/// reviewed edit — and clients can detect a stale bridge by comparing digests.
|
||||
#[cfg(test)]
|
||||
const TOOL_SCHEMA_DIGEST: &str = "537fd4e77a61b9333f21dcd294b6c91b338884acc9cd2964cbb74855821cfa12";
|
||||
const TOOL_SCHEMA_DIGEST: &str = "bbecd61a9295ecd8e3fefe6a223252107d80d173da7544edacaa2880139683ad";
|
||||
const MAX_REQUEST: usize = 1_048_576;
|
||||
const MAX_RESPONSE: u64 = 16 * 1024 * 1024;
|
||||
const CACHE_TTL_MS: u64 = 3_600_000;
|
||||
|
||||
Reference in new issue
Block a user