feat(tahuantinsuyu): fase 13 — Solar Return como sexto overlay

Sexto módulo siguiendo el patrón establecido. Cambio estructural:
3-way mutual exclusion para los módulos que comparten el outer ring
(transit + synastry + solar_return). Constante OUTER_RING_MODULES
abstrae el grupo para que fase 14+ pueda sumar lunar return / planet
returns sin tocar la lógica del shell.

- engine: PipelineRequest::SolarReturn { target_age_years } +
  build_solar_return_overlay. Llama eternal_astrology::next_return
  (Sun back to natal Sun, ventana ±1.5 años) desde un instante
  ~30 días antes del cumpleaños target. Computa la carta natal
  completa al return_instant (mismo observer + config natales —
  convención clásica) y la apila como Outer + Aspects cross natal ×
  return. z=12/13. Import: `next_return` añadido a la lista de
  re-exports del bridge.
- modules: solar_return::SolarReturnModule (id "solar_return", toggle
  + slider target_age_years 0..120 step 1.0). Registry pasa a 6
  módulos para Natal.
- shell: OUTER_RING_MODULES const con los tres ids; mutual exclusion
  generalizada de pair-wise a N-way (for-loop sobre el slice). Init
  de age en apply_selection ahora incluye solar_return. build_requests
  agrega la rama. Misma estructura que progression/solar_arc en la
  rama de age handling.
- canvas: aspect_endpoints("solar_return") = (bodies, transits). Tres
  loops del outer ring (paint dots, paint glyphs, anillos guía) ahora
  aceptan los tres module_ids.

Probarlo: en el panel, slider "Edad del retorno" en valor entero (ej.
36) + toggle "Activar" = ves la carta del año cuando volviste a tu
Sol natal a los 36, con todos sus planetas en el outer ring y cross
aspects con tu natal. Cambiando el slider podés explorar año por año.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
sergio
2026-05-17 11:23:25 +00:00
parent d9e21fbedc
commit 8d95833c20
5 changed files with 203 additions and 26 deletions
@@ -136,6 +136,7 @@ impl Registry {
r.register(Box::new(progression::ProgressionModule));
r.register(Box::new(solar_arc::SolarArcModule));
r.register(Box::new(synastry::SynastryModule));
r.register(Box::new(solar_return::SolarReturnModule));
r
}
@@ -393,6 +394,58 @@ pub mod synastry {
}
}
// =====================================================================
// SolarReturnModule — carta del año en curso (Sun back to natal Sun)
// =====================================================================
pub mod solar_return {
use super::*;
/// Computa la carta natal completa al instante del próximo retorno
/// solar para la edad pedida. Comparte el outer ring con Transit y
/// Synastry — mutuamente excluyentes a nivel de Shell.
pub struct SolarReturnModule;
impl Module for SolarReturnModule {
fn id(&self) -> &'static str {
"solar_return"
}
fn label(&self) -> &'static str {
"Retorno solar"
}
fn description(&self) -> &'static str {
"Carta del año — Sol de vuelta a su posición natal."
}
fn applies_to(&self, kind: ChartKind) -> bool {
matches!(kind, ChartKind::Natal)
}
fn enabled_by_default(&self) -> bool {
false
}
fn controls(&self) -> Vec<Control> {
vec![
Control::Toggle {
key: "enabled".into(),
label: "Activar".into(),
default: false,
hotkey: None,
},
Control::Slider {
key: "target_age_years".into(),
label: "Edad del retorno".into(),
min: 0.0,
max: 120.0,
step: 1.0,
default: 30.0,
},
]
}
fn compute_layers(&self, _chart: &Chart, _cfg: &serde_json::Value) -> Vec<Layer> {
Vec::new()
}
}
}
// =====================================================================
// SolarArcModule — Solar Arc dirigido (true progressed Sun)
// =====================================================================
@@ -458,8 +511,9 @@ mod tests {
assert!(r.find("progression").is_some());
assert!(r.find("solar_arc").is_some());
assert!(r.find("synastry").is_some());
// Natal kind tiene 5 módulos aplicables.
assert_eq!(r.for_kind(ChartKind::Natal).len(), 5);
assert!(r.find("solar_return").is_some());
// Natal kind tiene 6 módulos aplicables.
assert_eq!(r.for_kind(ChartKind::Natal).len(), 6);
assert!(r.for_kind(ChartKind::Synastry).is_empty());
}
}