test(rtx-fsi): coupling rescue rung A' — increment trigger (CRESCUE_INC=<K>), default off
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Trigger (c) of omni-cortex docs/coupling_rescue_campaign.md §11: a predictor increment above K x its trailing-2000 median (non-rescued steps; median refreshed every 10 steps) opens a coarse episode (rung C) BEFORE the step's first pass — no pass is spent on a step the episode replaces. Calibrated on the INCTRACE dumps: the anchor u=1.00 r=1 stays under 1.72x for its whole march (K = 2..8 never fire); the (1.27, 2.0) death crosses 3x at 145 steps before its panic and never during resonant growth (the tip-jump trigger fires at 54). Registered K = 3, fallback 4. Needs CRESCUE=1 and CRESCUE_COARSE=<M>. Verified: FSI2 committed default digit-identical knob-off vs the same-day baseline; fmt + clippy clean on the touched files. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01X2GmJXeQ2njUecEKiJZ1G2
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
7e0f159097
commit
b66f73aeef
@@ -136,6 +136,13 @@ pub struct MarchConfig {
|
||||
/// committed tip jump. Reporting-only (rung A′'s calibration data:
|
||||
/// the healthy distribution of the increment vs a death's).
|
||||
pub inc_trace: Option<String>,
|
||||
/// Rung A′ (`RTX_{prefix}_CRESCUE_INC=<K>`, default 0 = off; needs
|
||||
/// `coupling_rescue` and `coarse_episode`): a predictor increment
|
||||
/// above K × its trailing-2000 median opens a coarse episode BEFORE
|
||||
/// the step's first pass. Calibrated (campaign doc §11): the anchor's
|
||||
/// whole march stays under 1.72×; the (1.27, 2.0) death crosses 3×
|
||||
/// 145 steps before its panic and never during growth.
|
||||
pub increment_factor: f64,
|
||||
/// C^1 interface motion (constant acceleration across the step from
|
||||
/// the previous end velocity) instead of a constant velocity with a
|
||||
/// jump at the step boundary. See `Fsi2Harness::advance_subcycled`.
|
||||
@@ -193,6 +200,7 @@ impl MarchConfig {
|
||||
coupling_rescue: num("CRESCUE", f64::from(u8::from(defaults.coupling_rescue))) != 0.0,
|
||||
coarse_episode: num("CRESCUE_COARSE", defaults.coarse_episode as f64) as usize,
|
||||
inc_trace: std::env::var(key("INCTRACE")).ok().or(defaults.inc_trace),
|
||||
increment_factor: num("CRESCUE_INC", defaults.increment_factor),
|
||||
c1_interface: num("C1", f64::from(u8::from(defaults.c1_interface))) != 0.0,
|
||||
predictor: std::env::var(key("PREDICTOR")).unwrap_or(defaults.predictor),
|
||||
quiescent_release: num("QUIESCENT", f64::from(u8::from(defaults.quiescent_release)))
|
||||
@@ -346,6 +354,7 @@ pub fn run_march(case: BenchmarkCase, config: &MarchConfig) -> MarchResult {
|
||||
coupling_rescue,
|
||||
coarse_episode,
|
||||
ref inc_trace,
|
||||
increment_factor,
|
||||
c1_interface,
|
||||
ref predictor,
|
||||
quiescent_release,
|
||||
@@ -488,6 +497,9 @@ pub fn run_march(case: BenchmarkCase, config: &MarchConfig) -> MarchResult {
|
||||
// step index of every episode start (for the loud cap).
|
||||
let mut coarse_remaining = 0usize;
|
||||
let mut coarse_episodes: Vec<usize> = Vec::new();
|
||||
// Rung A′: the trailing window of predictor increments and its median.
|
||||
let mut inc_window: std::collections::VecDeque<f64> = std::collections::VecDeque::new();
|
||||
let mut running_inc_median: Option<f64> = None;
|
||||
let mut inc_trace_file = inc_trace.as_ref().map(|p| {
|
||||
let mut w = std::io::BufWriter::new(std::fs::File::create(p).expect("inctrace path"));
|
||||
writeln!(
|
||||
@@ -765,7 +777,33 @@ pub fn run_march(case: BenchmarkCase, config: &MarchConfig) -> MarchResult {
|
||||
// accepted and counted instead of fatal.
|
||||
let retry_at = (5.0 * tol_step).max(0.1 * increment);
|
||||
let acceptable = (stall_accept * tol_step).max(0.1 * increment);
|
||||
let mut outcome = if let Some(iqn) = iqn.as_mut() {
|
||||
// Rung A′: the predictor increment against its trailing median —
|
||||
// known before any pass runs, the earliest measured signature of
|
||||
// the runaway (campaign doc §11).
|
||||
let increment_trigger = coupling_rescue
|
||||
&& coarse_episode > 0
|
||||
&& increment_factor > 0.0
|
||||
&& step + 1 < coupled_steps
|
||||
&& running_inc_median.is_some_and(|m| increment > increment_factor * m);
|
||||
if coupling_rescue && !increment_trigger {
|
||||
inc_window.push_back(increment);
|
||||
if inc_window.len() > super::rescue::TIP_JUMP_WINDOW {
|
||||
inc_window.pop_front();
|
||||
}
|
||||
if inc_window.len() == super::rescue::TIP_JUMP_WINDOW && step % 10 == 0 {
|
||||
let mut sorted: Vec<f64> = inc_window.iter().copied().collect();
|
||||
sorted.sort_by(|a, b| a.partial_cmp(b).unwrap());
|
||||
running_inc_median = Some(sorted[sorted.len() / 2]);
|
||||
}
|
||||
}
|
||||
let mut outcome = if increment_trigger {
|
||||
// No pass is spent on a step the episode will replace.
|
||||
Ok(rtx_fsi::Converged {
|
||||
state: Vec::new(),
|
||||
residual: 0.0,
|
||||
iterations: 0,
|
||||
})
|
||||
} else if let Some(iqn) = iqn.as_mut() {
|
||||
iqn.set_tolerance(tol_step).unwrap();
|
||||
iqn.solve(&d_predicted, pass)
|
||||
} else {
|
||||
@@ -866,6 +904,9 @@ pub fn run_march(case: BenchmarkCase, config: &MarchConfig) -> MarchResult {
|
||||
// Rung C: (trigger, its magnitude, the rejected tip) when a coarse
|
||||
// episode is to start on this step.
|
||||
let mut do_coarse: Option<(&'static str, f64, f64)> = None;
|
||||
if increment_trigger {
|
||||
do_coarse = Some(("increment", increment, f64::NAN));
|
||||
}
|
||||
if let (Some(line), Err(_)) = (&trace_line, &outcome) {
|
||||
// A stall's record prints here (accepted or fatal — a death
|
||||
// panics below, before the commit); a converged step's
|
||||
|
||||
Reference in New Issue
Block a user