Commit Graph
3150 Commits
Author SHA1 Message Date
Kenneth Hau aab57cdeb3 feat: Phase 0/1 TradingAgents swarm graft, mandate paper automation, and P0 WhatsApp outbound send
Desktop Windows / package (push) Waiting to run
Build and Push Docker Image / validate-build (push) Waiting to run
Build and Push Docker Image / build-and-push (push) Skipped
CI / Hash lock / macOS ARM64 (push) Waiting to run
CI / Hash lock / Linux x64 (push) Waiting to run
CI / Hash lock / Windows x64 (push) Waiting to run
CI / test / Python 3.11 (push) Waiting to run
CI / test / Python 3.14 (push) Waiting to run
CI / frontend (push) Waiting to run
CI / Windows 11 ARM64 / Python 3.14 background lifecycle (push) Waiting to run
CI / Windows Server 2025 x64 / Python 3.14 background lifecycle (push) Waiting to run
CI / Windows desktop source lifecycle (push) Waiting to run
Deploy Wiki / Deploy to Cloudflare Pages (push) Waiting to run
Wiki / validate (push) Waiting to run
2026-10-16 14:58:47 +08:00
Haozhe Wu 4da7579065 ci: keep internal documents out of tracked files 2026-10-15 21:14:09 +08:00
Haozhe Wu b116a5e094 test(cli): isolate model-spending preview from local HTTP services 2026-10-15 18:30:53 +08:00
Haozhe Wu b63aef9f86 docs: publish October 15 maintenance news in seven languages 2026-10-15 18:20:24 +08:00
Haozhe Wu 1d0c1733fe test(session): verify configured iteration limit reaches agent execution 2026-10-15 18:20:23 +08:00
Haozhe Wu 5926d5980b Merge PR #1833: make session iteration cap configurable
Accepted under the repository owner-approved DCO exception for this maintenance batch; the original author commit is preserved without adding an attestation on their behalf.
2026-10-15 18:18:17 +08:00
Haozhe Wu 47b80d3ec9 fix(ui): describe editable model budgets on runtime page 2026-10-15 17:23:05 +08:00
Haozhe Wu 6404807e7f fix(sdm): deduplicate copied bench measurements atomically 2026-10-15 17:05:10 +08:00
Haozhe Wu 779889b1f3 Merge PR #1849: record declared backtests in strategy bench history 2026-10-15 17:00:06 +08:00
Haozhe Wu 01ee083db0 fix(grounding): normalize percent operands before evaluating arithmetic 2026-10-15 17:00:05 +08:00
Haozhe Wu 9df0642ec8 Merge PR #1823: track percentage-point evidence units 2026-10-15 16:57:47 +08:00
Haozhe Wu f402d90392 fix(grounding): keep scalar contributions outside keyed instrument maps 2026-10-15 16:57:47 +08:00
Haozhe Wu c0ae0fb5ad Merge PR #1865: keep full trade history alongside lightweight previews 2026-10-15 16:57:23 +08:00
Haozhe Wu a176f41236 Merge PR #1853: load lightweight run previews off the event loop 2026-10-15 16:56:53 +08:00
Haozhe Wu 134d01afea Merge PR #1851: preserve instrument identity in keyed metrics 2026-10-15 16:56:52 +08:00
Haozhe Wu 72734b7371 fix: close reviewed tool identity and credential redaction edge cases 2026-10-15 16:56:52 +08:00
Haozhe Wu 54763631e9 Merge PR #1874: redact private keys, cookies and platform tokens 2026-10-15 16:55:45 +08:00
Haozhe Wu b519018833 Merge PR #1858: reviewed focused maintenance fix 2026-10-15 16:54:55 +08:00
Haozhe Wu 2d89bf3674 Merge PR #1859: reviewed focused maintenance fix 2026-10-15 16:54:55 +08:00
Haozhe Wu 51155bac02 Merge PR #1860: reviewed focused maintenance fix 2026-10-15 16:54:55 +08:00
Haozhe Wu 1a92a99f8b Merge PR #1872: reviewed focused maintenance fix 2026-10-15 16:54:54 +08:00
Haozhe Wu 8974cfb532 Merge PR #1871: reviewed focused maintenance fix 2026-10-15 16:54:54 +08:00
Haozhe Wu c86439a954 fix(backtest): use shared crypto classification for signal alignment 2026-10-15 16:54:33 +08:00
Haozhe Wu d720a2432c Merge PR #1875: calculate downside deviation over all returns 2026-10-15 16:54:14 +08:00
Haozhe Wu fed85e30f2 Merge PR #1873: emit swing signals only after confirmation 2026-10-15 16:54:13 +08:00
Haozhe Wu 7945829259 Merge PR #1864: preserve combined crypto routing fixes 2026-10-15 16:54:13 +08:00
Haozhe Wu aec473b8ed Merge PR #1862: retain digit-leading bases with separated quote pairs 2026-10-15 16:53:46 +08:00
Haozhe Wu 70a2801426 Merge PR #1861: recognize digit-leading crypto bases 2026-10-15 16:53:33 +08:00
Haozhe Wu 66aed999c4 fix(live): bound model spending and isolate decision context (#1854) 2026-10-15 16:53:22 +08:00
Rudy Celekli 1b29cd4854 fix(risk-xray): measure downside deviation as zero-target RMS over all bars
The x-ray took the sample standard deviation of the losing bars only, which measures how much the losses differ from each other. A book that loses the same amount on every losing bar reported zero downside deviation, and a single loss reported none. #1693 and #1727 already moved the Sortino in calc_metrics and the options engine to the zero-target root mean square over every return period; this is the remaining call site.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-15 01:46:09 -04:00
Rudy Celekli 4e8b183e6a fix(redaction): cover more secret formats (tokens, private-key blocks, cookies, provider keys)
redact_text() and the structured-payload key matcher missed several common
credential shapes that carry no key label the existing patterns can see:

- bare GitHub fine-grained (github_pat_), GitLab (glpat-), npm (npm_) and
  Hugging Face (hf_) tokens
- PEM / PGP private-key blocks in free text (whole block redacted; an
  unterminated block is redacted to the end of the text)
- Cookie / Set-Cookie header values
- bare Stripe (sk_/rk_ live/test), Google API (AIza) and AWS ASIA keys
- cookie and private_key field names in structured payloads

The token shapes are added to the shared token alternation, the private-key
and cookie patterns run first in redact_text, and the field markers extend
_SENSITIVE_ARG_MARKERS. Each family keeps its own test file.

Consolidates #1866, #1867, #1868, #1869 and #1870.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-15 01:44:28 -04:00
Rudy Celekli 7d75ead10f fix(journal): parse parenthesised accounting negatives instead of zeroing them
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-15 01:41:05 -04:00
Rudy Celekli 5ef6d37b84 fix(journal): keep fiat currency pairs (EUR/USD) out of the crypto market
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-15 01:41:04 -04:00
Rudy Celekli 13085c2695 fix(skills): stamp swing-based signals on the pivot confirmation bar
The elliott-wave engine and the harmonic fallback detector find swing points
with a centred rolling window (rolling(2w+1, center=True)), so a pivot at bar t
is only known once bar t+w has closed. Both engines stamped the signal on bar t,
i.e. w bars of future prices were already baked into it, and the zigzag/merge
step then ran over the whole series, so a later, more extreme pivot could
silently replace an earlier one.

Detect the swings once, then replay them in time order: at each pivot only the
pivots confirmed so far are zigzagged/merged, patterns are matched on that
prefix, and the signal is stamped on the confirmation bar (pivot + swing_window).
Truncating the history after bar t no longer changes any signal at or before t.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-15 01:35:34 -04:00
alex 07f97519b7 fix(frontend): list run trades newest first from the full trades.csv
The Trades tab rendered trade_log, which the runs API caps at the first
500 rows of trades.csv. Trades were shown oldest first, and a run with
more than 500 trades lost its most recent ones in the table and in the
CSV download.

The same response already carries every row in artifacts_trades_csv, and
the strategy dashboard reads it with a trade_log fallback. Move that
fallback into runTrades() in lib/runReports.ts and use it for the Trades
tab, its CSV download and the dashboard.

The Trades tab now sorts newest first. Clicking the time header flips
the order; aria-sort reports the direction.

Signed-off-by: alex <alexwan02@163.com>
2026-10-15 11:15:19 +08:00
Jackzigen 626f7a9c8c fix(backtest): route BASE-USDT-PERP perpetuals to the crypto market
_detect_market had no pattern for the documented USD-M perpetual spelling
(BASE-USDT-PERP, parsed and documented by ccxt_loader._parse_ccxt_symbol
and binance_loader), so BTC-USDT-PERP fell through _MARKET_PATTERNS to the
"a_share" default. A leveraged perpetual then ran under China A-share
rules: 100-share board-lot rounding turned every computed position size
into a zero_size rejection, every rebalance was dropped, and the backtest
reported trade_count 0 with no surfaced error.

Add the pattern next to the other USDT pairs with the loader's own base
alphabet ([A-Z0-9]+, so numeric bases like 1000PEPE-USDT-PERP are covered)
and pin it with parameterized regressions.

Closes #1863
2026-10-15 08:34:49 +08:00
Rudy Celekli 5cf858be9c fix(backtest): classify separated USDC/BUSD pairs (BTC-USDC, ETH/USDC) as crypto
Only the USDT spellings were separator-aware in the market classifier, so
BTC-USDC, ETH/USDC and BTC-BUSD matched no pattern and fell through to the
a_share default (T+1, no shorting, CNY), while the unseparated BTCUSDC and
correlation.infer_market already treated them as crypto.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-14 18:05:25 -04:00
Rudy Celekli b5888e857a fix(backtest): keep digit-leading crypto bases (1INCH, 1000PEPE) on crypto rules
USDT-pair patterns used [A-Z]+ for the base asset, so 1INCH-USDT,
1INCH/USDT, 1INCHUSDT, 1000PEPE-USDT and 1000SHIBUSDT matched no pattern
and fell through to the a_share default (T+1, no shorting, CNY, tushare).
Require at least one letter in the base so digit-only A-share/HK codes
are still never treated as crypto.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-14 18:03:55 -04:00
Lanre Shittu 80413fa1e3 fix(channels): stop dropping telegram replies when the stream preview never sent
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
2026-10-14 20:12:34 +00:00
Lanre Shittu 3f0a408492 fix(cli): pair tool results with their own call during parallel tool runs
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
2026-10-14 20:04:40 +00:00
Lanre Shittu df2b09433f fix(agent): keep saved skill frontmatter name in sync with its slug
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
2026-10-14 19:56:48 +00:00
alex ca113bb0c3 perf(web): load run previews instead of full runs in Agent chat
Loading a session fetched GET /runs/{run_id} one message at a time for
every assistant turn without stored metrics, and each run card without
an equity curve fetched it again on mount. Most turns are plain
replies, and backtest cards pulled the full chart payload just to draw
a sparkline.

History loading now requests GET /runs/{run_id}/preview for all those
turns at once, deduplicated by run id, and awaits them in message
order. Live completion and RunCompleteCard use the same endpoint.
lib/runCards.ts turns a preview into card fields for both the history
and live paths; a failed preview still shows the fallback card, as a
failed run fetch did before. report_worthy comes from the backend, so
the client-side rule in lib/runReports.ts and its test helper are
removed.

Signed-off-by: alex <alexwan02@163.com>
2026-10-15 00:15:58 +08:00
alex 1cc1aaa97e feat(runs): add a lightweight run preview endpoint
The chat UI fetched the full GET /runs/{run_id} for every assistant
turn in a loaded session, only to read metrics and the equity curve
and to decide whether the turn deserves a run card. Every turn owns a
run directory, so this ran for plain replies too, and for backtests it
pulled tens of megabytes of chart payload.

GET /runs/{run_id}/preview returns just metrics, the first 1000 equity
points (same shape as the full response) and report_worthy. The
response is built and encoded in the threadpool. is_report_worthy
decides from the artifact file names and run_card.json, so a plain
reply costs one directory listing and no file reads.

src/api/run_artifacts.py holds the metrics parsing and equity
projection shared by the detail and preview responses. Both routes
read files through ui_services.load_json_file and load_csv_records,
which replace the private copies in runs_routes; load_csv_records
gains a limit that stops reading early. The unused api_server
re-exports of those copies are dropped. GET /runs/{run_id} now
declares its schema through `responses`, since it returns pre-rendered
bytes that FastAPI does not re-validate; the OpenAPI document is
unchanged.

On 142 local runs the preview matches the full response's metrics and
equity curve, and report_worthy matches the previous client-side rule
everywhere.

Signed-off-by: alex <alexwan02@163.com>
2026-10-15 00:15:58 +08:00
alex f1d4ebb5c1 perf(runs): build and serialize run detail off the event loop
GET /runs/{run_id} built its response synchronously inside an async
handler and returned the model, so both the build and FastAPI's JSON
encoding ran on the event loop. A full payload for a multi-symbol
backtest is ~70MB and stalled every other request for about a second.

Build and encode inside run_in_threadpool and return the rendered
bytes. The chart_payload/chart_symbol variants move into the same
call. Response bytes are unchanged: sha256 matches the previous
implementation on six real runs, full and summary variants.

The encoder itself is a single native call that holds the GIL, so a
~200ms stall per full payload remains; shrinking that needs a smaller
default payload and is left out of this change.

Signed-off-by: alex <alexwan02@163.com>
2026-10-15 00:15:58 +08:00
Haozhe Wu d7f1b9e22b refactor(grounding): remove unused matrix column metadata
Signed-off-by: Haozhe Wu <haozhe_wu@connect.hku.hk>
2026-10-14 23:18:14 +08:00
zeus229 7072e2305c fix(grounding): preserve indexed scalar contribution references
Signed-off-by: zeus229 <69399886+zeus229@users.noreply.github.com>
2026-10-14 11:58:35 -03:00
zeus229 494033b509 fix(grounding): preserve identity in ticker-keyed analysis metrics
Signed-off-by: zeus229 <69399886+zeus229@users.noreply.github.com>
2026-10-14 11:39:47 -03:00
Haozhe Wu bfc0e70978 docs(readme): add October 14 maintenance news
Signed-off-by: Haozhe Wu <haozhe_wu@connect.hku.hk>
2026-10-14 22:34:29 +08:00
Haozhe Wu 12bae07ff9 test(quantlib): remove unused tenor import
Signed-off-by: Haozhe Wu <haozhe_wu@connect.hku.hk>
2026-10-14 22:27:50 +08:00
Haozhe Wu a1f5bc6960 Merge pull request #1850 for October 14 maintenance 2026-10-14 22:17:11 +08:00