Checkpoint source 7 workflows and in-progress diagram authoring redesign
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
Rust checks / check (windows-latest) (push) Canceled after 0s
Rust checks / check (ubuntu-latest) (push) Canceled after 0s
Rust checks / check (windows-latest) (push) Canceled after 0s
Preserve current core, source, REST, desktop, recovery, documentation and validation work, including AGENTS.md and the development summary. This is a work-in-progress checkpoint: the new compact palette has outstanding compilation errors and native acceptance; earlier passing gates retain their documented scope.
This commit is contained in:
@@ -13,6 +13,10 @@ use std::{
|
||||
sync::{Mutex, MutexGuard},
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "store_preparation_gate.rs"]
|
||||
pub(crate) mod preparation_gate;
|
||||
|
||||
pub const MAX_MODEL_BYTES: usize = 8 * 1024 * 1024;
|
||||
pub const MAX_SOURCE_PROJECT_BYTES: usize = 8 * 1024 * 1024;
|
||||
pub const MAX_OBJECTS: usize = 5_000;
|
||||
@@ -89,6 +93,8 @@ pub enum StoreError {
|
||||
|
||||
pub struct Store {
|
||||
inner: Mutex<StoreInner>,
|
||||
#[cfg(test)]
|
||||
preparation_gate: Mutex<Option<preparation_gate::Armed>>,
|
||||
// Keep the OS lock alive for the store's entire lifetime, including requests.
|
||||
_directory_lock: File,
|
||||
}
|
||||
@@ -242,6 +248,8 @@ impl Store {
|
||||
) -> ApiResult<(StoredProject, bool)> {
|
||||
let current = self.checked(id, expected)?;
|
||||
let prepared = PreparedProject::replacement(¤t, decoded)?;
|
||||
#[cfg(test)]
|
||||
self.wait_after_preparation(id, expected, &prepared)?;
|
||||
self.lock()?.replace(id, expected, prepared)
|
||||
}
|
||||
|
||||
@@ -381,6 +389,8 @@ impl Store {
|
||||
}
|
||||
}
|
||||
Ok(Self {
|
||||
#[cfg(test)]
|
||||
preparation_gate: Mutex::new(None),
|
||||
inner: Mutex::new(StoreInner {
|
||||
directory,
|
||||
projects,
|
||||
|
||||
Reference in New Issue
Block a user