Personal-data catalog spec, default D1 (settled 2026-09-28): log files were never deleted. inbuxa:LogSettings.keepForDays says how many days rotated log files are kept; unset (null) keeps every file, as before, and a new install sets 30 days. It is a fork-owned setting, stored under T + l as audit retention is, not a field on x:TracerLog: that object is also stored inside x:Bootstrap with a field after it, so a new field would change x:Bootstrap's stored format. Server-level, with the tracers' permissions (sysTracerGet, sysTracerUpdate); changes are in the audit log, before and after. Log files are local, so every node deletes its own: hourly, and at once when the setting changes on that node. Only regular files named <prefix>.<something> in each enabled log tracer's directory, last changed more than the limit ago, are removed; the file being written is never that old, and nothing else in the directory is touched. Minimum one day. The catalog classifies inbuxa:LogSettings and points the log file's retention at it. Tested: unit tests for the file rule (only this log's old files; the current file, other files and directories stay) and a purge on disk; the system suite, which reads, sets, refuses zero, restores null and checks the audit records; fork checks.
82 lines
2.4 KiB
Rust
82 lines
2.4 KiB
Rust
/*
|
|
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
|
*
|
|
* Modified by Coffey Labs in 2026 for INBUXA.
|
|
*/
|
|
|
|
// inbuxa: composite stores (sharded members, read replicas) nest store
|
|
// futures deeply enough to pass rustc's default query depth
|
|
#![recursion_limit = "512"]
|
|
|
|
#![warn(clippy::large_futures)]
|
|
|
|
use broadcast::publisher::spawn_broadcast_publisher;
|
|
use common::{
|
|
BuildServer, Inner,
|
|
manager::boot::{BootManager, IpcReceivers},
|
|
};
|
|
use state_manager::manager::spawn_push_router;
|
|
use std::sync::Arc;
|
|
|
|
use crate::task_manager::{manager::spawn_task_manager, scheduler::spawn_task_scheduler};
|
|
|
|
pub mod broadcast;
|
|
// inbuxa: AL-5, delegations end at their date
|
|
pub mod inbuxa_lock_expiry;
|
|
pub mod inbuxa_log_retention; // inbuxa: personal-data catalog, D1
|
|
pub mod state_manager;
|
|
pub mod task_manager;
|
|
|
|
pub trait StartServices: Sync + Send {
|
|
fn start_services(&mut self) -> impl Future<Output = ()> + Send;
|
|
}
|
|
|
|
pub trait SpawnServices {
|
|
fn spawn_services(&mut self, inner: Arc<Inner>);
|
|
}
|
|
|
|
impl StartServices for BootManager {
|
|
async fn start_services(&mut self) {
|
|
let server = self.inner.build_server();
|
|
// Unpack webadmin
|
|
self.inner
|
|
.data
|
|
.applications
|
|
.unpack_all(&server, false)
|
|
.await;
|
|
|
|
if !server.registry().is_recovery_mode() {
|
|
self.ipc_rxs.spawn_services(self.inner.clone());
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SpawnServices for IpcReceivers {
|
|
fn spawn_services(&mut self, inner: Arc<Inner>) {
|
|
if !inner.shared_core.load().storage.registry.is_recovery_mode() {
|
|
// Spawn push manager
|
|
spawn_push_router(inner.clone(), self.push_rx.take().unwrap());
|
|
|
|
// Spawn broadcast publisher
|
|
if let Some(event_rx) = self.broadcast_rx.take() {
|
|
// Spawn broadcast publisher
|
|
spawn_broadcast_publisher(inner.clone(), event_rx);
|
|
}
|
|
|
|
// Spawn task manager
|
|
spawn_task_manager(inner.clone());
|
|
|
|
// inbuxa: AL-5, end delegations at their `until`
|
|
inbuxa_lock_expiry::spawn_lock_expiry(inner.clone());
|
|
|
|
// inbuxa: personal-data catalog, D1: old log files go, per node
|
|
inbuxa_log_retention::spawn_log_retention(inner.clone());
|
|
|
|
// Spawn task scheduler
|
|
spawn_task_scheduler(inner);
|
|
}
|
|
}
|
|
}
|