From d8a68f71349ca33986dcd3d6986f578feb2060a9 Mon Sep 17 00:00:00 2001 From: solakpetri Date: Thu, 3 Dec 2026 17:57:19 +0100 Subject: [PATCH 1/3] style(ace): order query creation test modules --- crates/engines/tablecraft-ace/src/queries/creation/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/engines/tablecraft-ace/src/queries/creation/tests.rs b/crates/engines/tablecraft-ace/src/queries/creation/tests.rs index 0dadb4e80..b3d5e9c02 100644 --- a/crates/engines/tablecraft-ace/src/queries/creation/tests.rs +++ b/crates/engines/tablecraft-ace/src/queries/creation/tests.rs @@ -1,6 +1,6 @@ //! Independent complete-image QueryDef creation and original-source refusals. -mod initialization; mod indexed_template; +mod initialization; mod local_tables; use super::{QueryCreationDefinition, QueryCreationError}; use crate::{InspectError, NativeImage, QueryAttribute, read_saved_query_definition}; From 9c819393fec30926eb3e768106ba9ba556f73b76 Mon Sep 17 00:00:00 2001 From: solakpetri Date: Thu, 3 Dec 2026 17:57:21 +0100 Subject: [PATCH 2/3] test(desktop): drop unused query action test imports delete_design never used Desktop or Harness, and schema only uses PendingOperation and NodeT in its unix-only guarded reopen test, so clippy -D warnings rejected both files on Windows. --- .../editing/query_action/tests/delete_design.rs | 3 +-- .../workspace/editing/query_action/tests/schema.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/delete_design.rs b/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/delete_design.rs index 06f0e41da..d7f386e85 100644 --- a/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/delete_design.rs +++ b/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/delete_design.rs @@ -1,12 +1,11 @@ //! Actual QBE DELETE Build, decision, native save and fresh Design restoration. use super::{PARKED, ReviewedAction, assert_image, confirm_parameter, park_saved_sql}; use crate::workspace::{ - Desktop, query_design::tests::{design, run, scratch, sql}, test_support::{finish_reads, finish_save, opened}, }; use egui::accesskit::Role; -use egui_kittest::{Harness, kittest::Queryable}; +use egui_kittest::kittest::Queryable; use std::fs; use tablecraft_builders::query::{DesignDeleteRole, DesignDeleteTargetMode, DesignOperation}; use tablecraft_runtime::{SaveOutcome, journal_path}; diff --git a/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/schema.rs b/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/schema.rs index 234493952..3eb9d517a 100644 --- a/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/schema.rs +++ b/apps/tablecraft-desktop/src/workspace/editing/query_action/tests/schema.rs @@ -6,12 +6,13 @@ mod index_drop; mod unique_lifecycle; use super::{finish_reads, finish_save, opened, reviewed, run}; -use crate::workspace::{Desktop, PendingOperation}; +use crate::workspace::Desktop; +#[cfg(unix)] +use crate::workspace::PendingOperation; use egui::{Key, accesskit::Role}; -use egui_kittest::{ - Harness, - kittest::{NodeT, Queryable}, -}; +#[cfg(unix)] +use egui_kittest::kittest::NodeT; +use egui_kittest::{Harness, kittest::Queryable}; #[cfg(unix)] use std::time::{Duration, Instant}; use tablecraft_runtime::{SaveOutcome, SaveSchemaChange, journal_path}; From 343bab78fb2dfc3e4c794be3cfcbffcf5da8f079 Mon Sep 17 00:00:00 2001 From: solakpetri Date: Thu, 3 Dec 2026 17:57:23 +0100 Subject: [PATCH 3/3] test(ace): select memo read limits explicitly Ordinary reads now accept every length the native descriptor can represent, so the default no longer rejects a 1 MiB + 1 decoded Memo or a 2 MiB + 2 encoded value. Request those lower ceilings explicitly to keep the decoded-text and encoded-storage refusals separate. --- .../tablecraft-ace/tests/calculated_memos.rs | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/crates/engines/tablecraft-ace/tests/calculated_memos.rs b/crates/engines/tablecraft-ace/tests/calculated_memos.rs index 19794f497..94db0b26a 100644 --- a/crates/engines/tablecraft-ace/tests/calculated_memos.rs +++ b/crates/engines/tablecraft-ace/tests/calculated_memos.rs @@ -174,7 +174,21 @@ fn decoded_text_encoded_storage_native_budget_and_cancellation_are_separate() { let text = vec![b'x'; 1024 * 1024 + 1]; let compressed = [b"\xff\xfe".as_slice(), &text].concat(); let bytes = chained_database(6, false, &compressed); - assert_eq!(read(&bytes).err(), Some(InspectError::StructureLimit)); + let mut source = LongValueReadSource::new(Cursor::new(&bytes), LongValueReadLimits::default()) + .with_text_limits(LongTextReadLimits::new(1024 * 1024).unwrap()); + assert_eq!( + read_stored_calculation( + &mut source, + CatalogScope::new(1), + "Items", + "Score", + &mut budget(), + &|| false, + ) + .err(), + Some(InspectError::StructureLimit) + ); + let mut source = LongValueReadSource::new(Cursor::new(&bytes), LongValueReadLimits::default()) .with_text_limits(LongTextReadLimits::new(2 * 1024 * 1024).unwrap()); let stored = read_stored_calculation( @@ -196,8 +210,11 @@ fn decoded_text_encoded_storage_native_budget_and_cancellation_are_separate() { false, &text.iter().flat_map(|byte| [*byte, 0]).collect::>(), ); - let mut source = LongValueReadSource::new(Cursor::new(&bytes), LongValueReadLimits::default()) - .with_text_limits(LongTextReadLimits::new(2 * 1024 * 1024).unwrap()); + let mut source = LongValueReadSource::new( + Cursor::new(&bytes), + LongValueReadLimits::new(2 * 1024 * 1024).unwrap(), + ) + .with_text_limits(LongTextReadLimits::new(2 * 1024 * 1024).unwrap()); assert_eq!( read_stored_calculation( &mut source,