Repository navigation
v0.9.0
Added
-
Pine
alert()delivery in pinelive. A strategy'salert()calls now reach
registered notification channels, with the same host semantics as the fractal
web app's TradingView-style alerting: warmup/replay alerts stay data, only
fresh authoritative bar closes dispatch (forming revisions and recovered
replays never do), a pure sample-time frequency gate (all/
once_per_bar/once_per_bar_close, default close) keys per message, and
every gated alert lands in the ledger with per-channel outcomes (new v1
alertrecord and schema-v3alertevent, recovery-validated). Delivery is
fail-open and bounded — per-alert send deadline, transient-only retries with
linear backoff, and a per-bar cap journaled assuppressed— and can never
delay a reconcile: trading always completes first. Ships with awebhook
channel (fractal's delivery contract: coarse non-PII failure reasons, URL and
headers never journaled or thrown) and atelegramchannel (Bot API
sendMessage; plain-text messages truncated to the 4096-char limit; honors
retry_afteron 429 rate limits; the bot token and chat id are construction
secrets), configured via a new strictalertsconfig section shared by v1
and v2, anAlertChannelprotocol for custom channels, and
runAlertChannelConformancein@heyphat/pinelive/testing.
See docs/pinelive-alerts.md. -
A standalone
pinelivebinary. Releases now carrypinelivefor the same
five targets aspinerun/pinetop, stamped bybuild-bin.tsso
pinelive --versionself-reports, and self-updating viapinelive upgrade
(the shared checksum-verified pinerun implementation). Thecurl | sh
installer does not fetch it by default — opt in with
PINESTACK_BINS="pinerun pinetop pinelive"— because the forward runner is
the binary that can place orders: Paper remains its default broker and the
Tiger adapters are offline-tested only, not sandbox- or production-approved. -
Limit-order execution in pinelive.
OrderRequestnow requireslimitPricefor limit orders, andPositionMirroraccepts an explicit market/limit policy with a side-aware tick offset from each closed-bar price. Market remains the default. Deterministic client ids now frame every identity component by length to prevent sanitizer and delimiter-boundary collisions; limit type/price are included in identity and schema-v2 cycle ledgers. Deploy the new ID format only with no unresolved old-format orders.PaperBrokerfills only immediately marketable limits and never violates the requested price or invents a resting order.TigerTradingTransportgains a backward-compatible optionalsubmitLimit; the official Tiger SDK adapter submits native futuresLMTorders. Tiger limit mode requires cancellation support pluscancelStuckOrders, polls cancellation to terminal state, and blocks a second correction while any transmitted order remains unresolved. Flattening remains market-only.- CLI config adds
order.type,order.limitOffsetTicks, and TigerorderPollIntervalMs,maxOrderPolls, andcancelStuckOrderscontrols.
-
request.securityin live forward runs. The pinelive forward runner now
resolves static dependencies and runtime inputs fixed for the life of the run,
including cross-symbol, same-symbol other-timeframe, plain lower-timeframe, and
request.security_lower_tfseries. Call sites are deduplicated, fetched through
the same pinery provider before warmup, and refreshed with explicit overlap and
catch-up ranges before every closed chart tick. Self-references reuse the chart's
exact resolved instrument.- Safety is fail-closed: resolution, timeout, insufficient warmup, truncated
catch-up, history-cap, and refresh failures stop before reconciliation by
default. Refresh failures and per-cycle health are ledgered; an explicit
maxSecurityStaleRefreshesallows bounded tolerance. - Runtime dependencies that change after startup are detected after evaluation
and stop before broker reconciliation instead of silently trading onna. - Provider work is bounded by feed count, concurrency, request timeout, and a
non-truncating history ceiling. Timed-out operations retain their real slots
until settlement; shutdown interrupts the provider and then either drains all
such operations or reports a bounded cleanup failure. Existing timestamps are
revision-aware and missed bars are repaired from an inclusive cursor. - New config/options:
resolveSecurity,securityWarmupBars,
maxSecurityBars,maxSecurityFeeds,securityConcurrency,
securityRequestTimeoutMs, andmaxSecurityStaleRefreshes. - Shared timeframe helpers live in
@heyphat/pinery; pinerun and pinelive use
the same finest-base planning rule for plain cross-symbol lower timeframes.
- Safety is fail-closed: resolution, timeout, insufficient warmup, truncated
-
@heyphat/pineliveoffline core — a broker-SDK-free forward runner, Broker
protocol, position mirror, deterministic CSV replay, idempotent PaperBroker with
PnL accounting, append-only JSONL ledger, dry-run CLI, adapter conformance tools,
and live-vs-backtest target parity utility. Official Tiger quote/trade adapters
have injected offline SDK-facade coverage only; credentialed venue, demo-order,
cancellation, and fill validation remain intentionally pending.
Changed
- pinetop page 8 renamed TRADES → LOGS. The tab shows the engine log plus
the fill ledger for the loaded run, and the old name misread as a trading
surface. Keyboard ordinal (8), behavior, and panes are unchanged;
--page tradesremains an accepted alias for--page logs.
Fixed
-
Pinelive safety-audit remediation. An earlier pass fixed 17 findings across exact Tiger account/order identity, unresolved-order serialization, runtime order validation, Paper quantity handling, tiny quantity grids, futures roots/expiry, replay catch-up, primary and secondary warmup coverage, shutdown drainage, cache partitioning, strict timeframe identity, finer security-history ranges, truthful capabilities, and injective client ids.
-
Pinelive execution-safety fixes. A later full-branch logic audit found and fixed one critical and two major defects plus hardening items:
- Journal-only skipped evaluations (forming revisions, compute-only decisions) no longer consume the per-bar admission budget, so an every-update bar's authoritative close can no longer be starved by its own forming revisions and silently dropped. Refusing an authoritative final by
target-limitnow latches the execution breaker (new durable breaker reasontarget-limit) instead of passing silently. LedgertargetOrdinalsemantics are unchanged; recovery additionally tracks the admitted count. TargetSchedulerand the compute-only journal prune finalized per-bar decision state to a bounded retention window (default 512 bars per binding;retainBarsoption), so multi-day forward runs no longer grow memory without bound. Durable rows are never pruned; bars with unresolved orders or unreset position uncertainty are always retained, and stale duplicates of pruned decisions are rejected fail-closed by the chart-update gate.- Live aggregation and duplicate-final dedupe compare volume with a relative 1e-9 tolerance (OHLC stays exact), so float-summation noise on fractional-volume venues can no longer spuriously abort a run as a data conflict.
- Fallback decision/event identity hashing widened from 32-bit to 64-bit FNV-1a; canonical identity serialization now sorts by codepoint instead of locale; target-attainment checks use the same tolerant comparison as recovery, removing a redundant broker round trip per fractional fill; an unconfigured
TargetSchedulernow defaults to the shared fail-closed execution limits instead of unlimited; the instrument binding attests broker-suppliedpointValuewhen the data provider reports none; and Paper's non-marketable-limit rejection names the limit and mark prices (calling out off-grid reference data). - A follow-up hardening pass extended the retention bound through degraded and restart paths: a protected bar (unresolved order or unreset position uncertainty) is now a bounded exception instead of blocking all pruning behind it, scheduler and compute-only recovery compact to the retention window immediately on restart and release the recovered ledger from memory, the compute journal fail-closes on decisions older than its retained dedupe horizon rather than ever reusing a durable identity, and a broker-only
pointValuemust be positive and finite before it is attested into the instrument binding.
- Journal-only skipped evaluations (forming revisions, compute-only decisions) no longer consume the per-bar admission budget, so an every-update bar's authoritative close can no longer be starved by its own forming revisions and silently dropped. Refusing an authoritative final by