[control] Phase 2 control plane: routes repo via git, journaled apply with trial/watch/revert, undo and restore, push with retry, share links, API tokens, REST API with OpenAPI, --dev

This commit is contained in:
2026-11-07 18:17:06 +01:00
parent 56209cc595
commit aa0f66b5ac
20 changed files with 7165 additions and 13 deletions
+27
View File
@@ -0,0 +1,27 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//! Crash points for the crash-safety tests: with `IANITOR_TEST_CRASH_AT=<stage>` in its
//! environment, control aborts (no cleanup, like a kill -9) when an apply reaches that stage.
//! Without the variable this does nothing; the NixOS unit never sets it.
/// The stages, in order.
pub const STAGES: [&str; 9] = [
"prepared",
"committed",
"trial_written",
"trial_loaded",
"watching",
"watched",
"confirmed",
"promoted",
"reverting",
];
pub fn point(stage: &str) {
if std::env::var("IANITOR_TEST_CRASH_AT").as_deref() == Ok(stage) {
log::error!(target: "ianitor::crash", "IANITOR_TEST_CRASH_AT={stage}: aborting on purpose");
std::process::abort();
}
}