Commit Graph
2 Commits
Author SHA1 Message Date
mathias 57b6352c98 fix(mod): move module path off the decommissioned gitea.d-ma.be host
CD / Lint / Test / Vet (push) Successful in 5s
go.mod declared this module under gitea.d-ma.be, the pre-rename host
(infra ADR-0004). That name still resolves in DNS but no longer serves --
HTTPS to it fails outright -- so the declared path pointed at nothing.

It built anyway, because a Go module does not have to be fetchable from its
own declared path to compile locally. That is exactly what made it durable
rot: nothing failed, so nothing flagged it. What it did break is anyone
trying to depend on this repo -- `go get git.d-ma.be/mathias/<repo>` fails on
the path mismatch, and an importer would have to spell the dead host.

Verified safe before changing: nothing in the estate requires this module
(checked every go.mod across the Go repos) -- these are leaf binaries, so the
rename breaks no importer.

Mechanical: module path plus every internal import rewritten, templ
regenerated where applicable. Verified after -- go build, go vet, go test and
golangci-lint (against a Go 1.26.1 toolchain, matching CI) all pass, and no
gitea.d-ma.be reference remains in any .go/.templ/.mod file.

Found by an estate-wide scan for the old host, prompted by the same rot
turning up in tapir internal/web/views.templ (tapir@4bafd5f).
2026-09-05 14:46:41 +02:00
mathiasandClaude Sonnet 4.6 68bf8f15c5 feat(eval): VaR breach rate metric (#12) + HMM regime detector (#13) — rq-04 prep
CD / Lint / Test / Vet (push) Failing after 2s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped
#12 — VaR_breach_rate_99_oos_regime_cond metric:
- internal/eval/var.go: VaRBreachRate() + kupiecPOF() + LinearProbePredict() (stdlib math only)
- internal/eval/var_test.go: 8 golden tests (zero/all breach, perfect calibration, boundary)
- cmd/eval/main.go: -metric var flag (no-leakage probe → VaR → Kupiec P)
- scripts/var_breach.py: Python equivalent with METRIC_KEY constant (13 TDD tests)
- train.py LOCKED VaR EVAL BLOCK: writes VaR_breach_rate_99_oos_regime_cond + kupiec_p to metrics.json
- Fixed bug: train.py used bare 'os' before import; now uses module-level '_os' consistently

#13 — HMM regime detector + JEPA conditioning seam:
- scripts/prepare_regime.py: GaussianHMM (diag, 3-state) on realized_vol; states sorted by mean vol
  (0=calm, 1=stressed, 2=crisis); deterministic (random_state=42); outputs eurusd_regime.parquet
- tests/test_regime.py: 11 TDD tests (dtype, states, determinism, vol sort, daily fallback)
- train.py: JEPA_ENABLE_REGIME toggle + REGIME CONDITIONING SEAM (concat baseline, agent-editable)
- requirements.txt: hmmlearn>=0.3, scikit-learn>=1.4

78 Python + all Go tests green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 10:35:10 +02:00