Commit 9ae13173 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: rung C3b - freeze conditioning at cycle 2 (C3's cycle-1 freeze FAILED its gate)

C3 gate result: freezing at cycle 1 regressed azimuth RMS 0.0349->0.0518 px
(+48%), roll 0.0270->0.0542 (+100%), NOT-settled 51->267. Mechanism: cycle-1
peaks are measured at the blurriest, pre-correction pose - freezing them
locks in the WORST conditioning; per-cycle re-derivation carried convergence
signal, not just noise. Andrey's observation: the first outer cycle absorbs
nearly the whole prediction error (single near-GN inner step, lambda=1e-3),
so the cycle-2 measurement is at an essentially converged pose. C3b: cycles
1-2 run FULL prepares; the SECOND result freezes; cycles 3+ run light.
Context (Andrey): exit_change_atr QC threshold was test-era; the application
bar is 0.1 px - C2-level quality remains the gate target, revert to
per-cycle stays the fallback.
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 6e7b92d8
......@@ -494,11 +494,14 @@ public class IntersceneLma {
// [19,20]. The one-shot oracle cycle (pose_lma_debug>=1, first prepare) runs
// the FULL legacy path and compares the captured buffers at the end.
// By Claude on 07/17/2026.
// Rung C3: the cycle-1 result carries the FROZEN conditioning (weights/
// eigen/selection/pull/reg/pure_weight) - later cycles of the same scene
// run a LIGHT prepare (fresh measured offsets + fx only). The instance is
// per-scene, so this naturally resets per scene. By Claude on 07/17/2026.
final IntersceneLmaFloat.PrepareResidentResult frozen_prepare = poseResidentPrepare;
// Rung C3/C3b: the result of the SECOND full prepare carries the FROZEN
// conditioning (weights/eigen/selection/pull/reg/pure_weight) - later
// cycles of the same scene run a LIGHT prepare (fresh measured offsets +
// fx only). Cycle 1 is never the freeze source (its peaks are measured at
// the blurriest, pre-correction pose - see C3 gate failure). The instance
// is per-scene, so this naturally resets per scene. By Claude on 07/16/2026.
final IntersceneLmaFloat.PrepareResidentResult frozen_prepare =
(poseResidentFullPrepares >= 2) ? poseResidentPrepare : null;
poseResidentPrepare = null;
boolean lean_pose_shape = (num_components == 2) &&
(par_indices.length == IntersceneLmaFloat.NUM_PARAMS);
......@@ -2066,6 +2069,14 @@ public class IntersceneLma {
poseSeqCenters = null;
}
private IntersceneLmaFloat.Camera poseResidentSceneCamera = null; // per-scene; NOT cleared by resetPoseFxInputs
// Rung C3b (Andrey 07/16, after the C3 gate FAILED): conditioning freezes at
// CYCLE 2, not cycle 1. The first outer cycle absorbs nearly the whole
// prediction error (single near-GN inner step, lambda=1e-3), so the cycle-1
// peaks are measured at the blurriest pose - freezing them regressed azimuth
// RMS +48%, roll +100%, NOT-settled 51->267. The cycle-2 measurement is at an
// essentially converged pose = converged-quality eigen/weights.
// By Claude on 07/16/2026.
private int poseResidentFullPrepares = 0; // full resident prepares this scene (instance = per-scene)
/** Run the resident GPU prepare at the current parameters_vector (mirrors the
* getFxDerivs head: ERS pokes + setupERS + camera/centers capture). On
......@@ -2142,14 +2153,15 @@ public class IntersceneLma {
(float) min_confidence, same_weights, pull, regw, lightPrepare, capture);
if ((result == null) || !result.valid) return false;
if (lightPrepare) {
// Rung C3: keep the cycle-1 compact result (pure_weight/num_meas/reg
// stay authoritative for the whole scene). By Claude on 07/17/2026.
// Rung C3/C3b: keep the frozen compact result (pure_weight/num_meas/reg
// stay authoritative for the rest of the scene). By Claude on 07/17/2026.
poseResidentPrepare = frozen;
} else {
poseResidentPrepare = result;
pure_weight = result.pureWeight;
num_defined = result.numMeas;
sum_weights = result.sumWRaw;
poseResidentFullPrepares++; // C3b: freeze only after the 2nd full prepare // By Claude on 07/16/2026
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment