Commit f5257ef
fix(neural): wire LearningScheduler→force_cycle + RBF restore at init (#275)
## Root cause (issue #274, epic #273)
Ground-truth audit found the 8 neural organs were **wired and consumed
but UNFED**: `Hypatia.LearningScheduler` (supervised, 5-min poll)
ingested outcomes but never called
`Hypatia.Neural.Coordinator.force_cycle/0`; `Coordinator.init/1` never
called `Persistence.load_all/0` (zero callers). Networks ran on
init-defaults forever and `pattern_analyzer` defensively ignored their
untrained output — the root cause of the token-cost/scattergun symptom.
## Change
- **`learning_scheduler.ex`** — `run_learning_cycle` now triggers the
Neural Coordinator cycle (N6) *after* ingesting outcomes, so ESN/RBF
train on accumulated trajectories every poll (~5s after boot, then every
5 min). Guarded + non-fatal.
- **`neural/coordinator.ex`** — `init/1` best-effort restores the RBF
network from persisted state (the one cleanly-invertible learned
network; trust rebuilt per cycle, MoE/ESN/LSM train per cycle, ESN/LSM
persistence is summary-only by design). Safe fallback to defaults on any
mismatch — never crashes the supervisor.
## Validation
Training data was already sufficient (`recipe-shell-quote-vars` 166-pt
series ≥60; `registry.json` 9 patterns ≥5) — only the trigger was
missing. Targeted tests green: neural (28), training_pipeline,
cross_repo_learning (11). Compiles cleanly.
## Out of scope / follow-ups
- Pre-existing `--warnings-as-errors` drift (`prover_recommender.ex:123`
unused default arg; `vcl/client.ex:133` ungrouped `handle_call/3`) —
unrelated, not touched.
- Lossless ESN/LSM persistence (currently summary-only, so reservoir not
restored across restarts; retrains on first cycle) — tracked follow-up.
Refs #274
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 19fb955 commit f5257ef
2 files changed
Lines changed: 90 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
| |||
140 | 147 | | |
141 | 148 | | |
142 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
143 | 157 | | |
144 | 158 | | |
145 | 159 | | |
| |||
197 | 211 | | |
198 | 212 | | |
199 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
200 | 237 | | |
201 | 238 | | |
202 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
95 | | - | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
100 | | - | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
106 | 157 | | |
107 | 158 | | |
108 | 159 | | |
| |||
0 commit comments