FMP and Tiingo both returned raw OHLC, so dividend gaps booked as fake
losses and momentum was computed on the wrong caliber. Yahoo and
yfinance were already moved to qfq in #1287; this brings the remaining
us_equity loaders to the same caliber: Tiingo now prefers adjOpen/adjClose
(and falls back to adjClose/close ratio when only adjClose is present), FMP
switches to the Stable historical-price-eod/full endpoint and scales OHLC
by adjClose/close when available, keeping volume raw. The FMP parser also
accepts the Stable top-level array while retaining legacy {historical: [...]}
compatibility.
Fixes#1296.
Signed-off-by: lorenzozanee <wyz0707@proton.me>
isProcessAlive treated every kill error as not alive, so EPERM
(process exists but no permission) was misclassified as exited.
This made shutdown evidence report backendExited and watchdogExited
true while the PID was still alive, allowing stopForUpdate to
succeed prematurely and risk installer launch while the backend
still held the loopback listener.
Distinguish EPERM (alive) from ESRCH (not alive) in both
backend-manager.ts and backend-watchdog.ts, matching Node.js
process.kill semantics.
Signed-off-by: lorenzozanee <wyz0707@proton.me>
Derive a versioned ReconciliationTolerance from recorded
local-versus-exchange comparison samples and verify that a tolerance
bounds a recorded sample set. Calibration is pure and offline, fails
closed on invalid or under-sampled input, and leaves the merged
reconciliation and drift-evidence contracts unchanged.
Progresses #1030.
Signed-off-by: lorenzozanee <wyz0707@proton.me>
The single stream retry slept a fixed constant at both call sites, so a
sustained provider overload burned the retry budget at a flat 1s per
iteration. Each site now doubles the delay across consecutive retryable
failures (capped, exponent clamped like the worker-level backoff) and
honors a provider-suggested Retry-After on 429/529, bounded by the new
SWARM_STREAM_RETRY_MAX_DELAY_S / VT_STREAM_RETRY_MAX_DELAY_S knobs.
Retry-After is extracted once on ProviderStreamError so every retry site
benefits. Retry counts and first-failure timing are unchanged.
Closes#1208
Signed-off-by: lorenzozanee <wyz0707@proton.me>
Next-generation Claude models reject any request carrying `temperature`
with HTTP 400 "`temperature` is deprecated for this model." (issue
#1223). The native Anthropic Messages path already classifies the error,
retries once without the field and remembers the model, but the generic
OpenAI-compatible branch still sent `temperature` unconditionally, so
LANGCHAIN_PROVIDER=openai with OPENAI_BASE_URL pointed at Anthropic's
compatibility endpoint failed on every call.
Extend the same self-heal to ChatOpenAIWithReasoning: reuse
_is_anthropic_temperature_unsupported_error and the process-wide
_ANTHROPIC_TEMPERATURE_UNSUPPORTED set, retry sync/async generate and
both stream paths once without the field, and omit temperature up front
for remembered models in _get_request_payload. _astream's stream_usage
fallback moves to a named _astream_with_usage_fallback to mirror the
sync layering; behavior is unchanged.
Models that accept `temperature` are unaffected. Regression tests feed
the verbatim 400 body through mocked endpoints and fail on the
pre-fix code.
Signed-off-by: lorenzozanee <wyz0707@proton.me>
_plan_open_order returns None for seven distinct reasons and callers
cannot tell "nothing to do" from "wanted but unfillable". Split the
combined guard into labelled branches that pass a machine-readable
reason (no_target_weight, already_held, no_data, no_bar,
execution_blocked, invalid_price, zero_size) to a new no-op
_on_plan_rejected hook that engine subclasses can override. No
behavior change; the default hook does nothing.
Closes#1235
Signed-off-by: lorenzozanee <wyz0707@proton.me>