Skip to content

Tick-store fixes, chart drag fix, Capsule replay strip, install --all, dsh adapter - #11

Merged
godzillacode0000 merged 7 commits into
mainfrom
claude/hermes-plugin-readonly-audit-5u7anz
Oct 30, 2026
Merged

godzillacode0000 merged 7 commits into
mainfrom
claude/hermes-plugin-readonly-audit-5u7anz

Conversation

@godzillacode0000

@godzillacode0000 godzillacode0000 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Everything not yet on main: six commits plus one merge of main (at 0fd1304), so this merges cleanly. It also turns main's CI green again: main has been red on ruff since 94e12d2.

Fixes

Tick store and data (aca9d43)

  • Long windows came back short and slow. fxticks.bars grew its window by a day per pass from a 0.4× guess, re-read every hour on each pass, and stopped after 60 passes. On a two-year store, 500 × 4h returned 404 bars in 12 s and 500 × D returned 186 in 67 s, with no sign anything was missing. The window is now sized once from the timeframe, with one wider pass for holidays and never before the store's first day. Result: 500 and 500, in 0.8 s and 4.9 s. Bars are identical wherever the old walk did reach.
  • The hour cache held raw ticks (gigabytes at 4,096 busy hours). Each hour is now packed as at most 60 minute bars (~4 KB). The documented-but-nonexistent bars-v1 disk cache and the unused TRADERS_FX_BARS are removed.
  • One truncated hour file sank the whole request to the network. Unreadable hours are now skipped and counted in unreadable_hours.
  • tools/fx-fetch.py:
    • Writes go through a .part file and a rename.
    • The walk stops at the last complete hour.
    • A 404 is only marked .empty once it is a day old.
  • The Data tab could stay on "Reading the tick store…" forever when the network cache folder didn't exist. /api/fx/status now always has one shape, plus a yahoo flag. The tab's Yahoo line follows that flag and the tab re-reads on every visit.
  • CI: removed an unused import json in tools/fx-fetch.py.

The chart sprang back to its right edge after a drag, in replay and out (cf2fe0c)

  • nudgeChart() fired a synthetic window resize, and the resize handler called nudgeChart() again. That loop ran forever: 140 view resets in 10 idle seconds, measured in Chromium.
  • Each reset re-applied getVisibleRange(). Vela caps that range at the newest bar in whole bars, so the empty space you had dragged in was thrown away and the zoom crept in.
  • Fix: the resize handler ignores untrusted events, and the redraw is Vela's public panBy(0), which keeps zoom and position.
  • Verified: 0 resets while idle, drags hold (in replay too), and the canvas still redraws after a panel flip or a window resize.

Features

  • Replay strip redesign, "Capsule" (5811de7), picked by the operator from two designs:
    • One frosted-glass pill. Its top edge is the scrubber; the range ends fade in on hover.
    • Play is the one accented control and becomes Pause while playing.
    • The cursor time shows as date over clock and still opens the calendar.
    • A ring next to "N bars left" fills as the replay advances. The speed is a chip.
    • The speed menu and the calendar use the same glass.
    • Behaviour is unchanged: seek on release, Start bar, the drag handle and its saved position, and the paper broker's replay price.
    • Icon-only buttons have accessible names and keyboard focus is visible.
  • ./install.sh --all (ac2503e): sets up Python (bin/setup-python.sh, uv first), installs the service (console/service-linux.sh, or launchd on macOS), registers MCP and waits for health. --setup-python and --service run those steps alone. Kept alongside main's --with-prop.
  • DeepSeek Harness adapter (65ad2b5): adapters/dsh/install-dsh.sh installs the desk skill and registers the MCP server, with --doctor and --uninstall.
  • Docs (863317c): TRADERS_AGENT_ALLOWED_HOSTS is documented as a full-trust door. A request using an allowlisted host from loopback is handed the POST token, which the new tests pin. The package README now leads with --all.

Merge notes

  • The conflict resolution keeps both sides of install.sh.
  • server.py, plugin.yaml and HANDOFF.md take main's VERSION-file approach (test_versions.py), so the branch's older version-literal test is dropped.

Test plan

  • Full backend suite: 1,314 tests OK (9 skipped), with TRADER_CHART_REQUIRE_NODE=1 TRADER_CHART_REQUIRE_MCP=1. Earlier runs on this branch: 1,293 after the data fix, then OK after each later commit.
  • ruff check --select F,E9 console tools, node --check on every frontend file, bash -n on the shell scripts, vendor-sums --check, modulepreload --check, verify-plugin.mjs and its self-test.
  • Each fix has tests that failed before it: 15 for the data fixes, 3 for the drag fix, 8 for the replay strip.
  • In Chromium: drag and replay at 620 and 1150 px; every replay control driven at 1150 px (dark), and the strip checked at rest at 620 and 420 px (dark) and 1150 px (light); no console errors.
  • After merge: reload the Hermes chart pane and check the replay strip and dragging in the real pane.

Generated by Claude Code


Play the walkthrough    Follow each request

…he DeepSeek Harness

adapters/dsh/install-dsh.sh: skill copy, merge-safe MCP entry (--mcp-file), --doctor with a real MCP handshake, --uninstall. Interpreter order matches bin/register-mcp.sh (PY, .venv, python with mcp, else uvx); bash 3.2 safe; probes scrub PYTHONPATH. Tests, README section, CHANGELOG, CI syntax check. Rebased on v1.1.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
bin/setup-python.sh makes <repo>/.venv with the mcp client (uv when present: 5.6 s vs 286 s for pip in the same sandbox; else python3.11+ venv + pip; an existing python with mcp is left alone). It asks for Python 3.12/3.13/3.11, never the newest: a bare >=3.11 picked a 3.14 release candidate whose pydantic could not import. console/service-linux.sh is the systemd counterpart of service-macos.sh, with a detached fallback that does not hold the caller's pipe. install.sh --all chains plugin, python, service, MCP registration and a health wait; a plain ./install.sh is unchanged. Tests (test_fast_install), README, CHANGELOG, MACOS.md, CI syntax check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
SERVER_VERSION was typed once at 1.0.0 and never touched, so /api/health, /api/build and the
Server: header all answered 1.0.0 while the repo shipped 1.3.0; traders-desk/plugin.yaml had
drifted the other way (1.2.0 against a v1.3.0 tag and a catalog entry claiming 1.3.0), so the
manifest the catalog reads disagreed with the entry pointing at it. All three state 1.3.0 and
test_docs_drift.OneVersionNumber fails while they disagree — the old drift test checked the
manifest's name, never its version.

TRADERS_AGENT_ALLOWED_HOSTS appeared in no document. Measured: an allowlisted Host from loopback
is handed the POST token and POST /api/broker answers 200, so behind `tailscale serve` every
device on the tailnet can approve paper orders with ALLOW_LAN unset, while the README's ALLOW_LAN
row still promised LAN peers a read-only console. The README now carries the variable, calls each
name a full-trust door and corrects that row; three live-socket tests pin the token, the write and
the still-refused unknown name. No behaviour changed, only what the repo admits to.

Also: the package README documented the pre---all install, and the test counts disagreed
(README ~1,130, HANDOFF 1,166). Both now match a measured run: 1,188 tests, 9 skipped, 73 files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
Conflicts kept both sides: install.sh has --with-prop and --all/--setup-python/--service; server.py,
plugin.yaml and HANDOFF take main's VERSION-file approach (test_versions.py), so the branch's
three-literal OneVersionNumber test and its SERVER_VERSION literal are dropped; the README keeps the
branch's fuller TRADERS_AGENT_ALLOWED_HOSTS / ALLOW_LAN rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
… green

- fxticks.bars sized its window from a 0.4x guess and grew it a day per pass, re-reading every hour
  each time and stopping after 60: on a two-year store 500 x 4h gave 404 bars (12 s) and 500 x D gave
  186 (67 s), silently. The window is now sized once (1.5x the trading time + 4 days, one wider pass,
  never before the store's first day): 500 and 500 in 0.8 s and 4.9 s, identical bars elsewhere.
- The LRU held raw ticks (gigabytes at 4,096 busy hours); hours are now packed minute bars, ~4 KB each.
  The docstring's on-disk bars-v1 cache never existed; the claim and the unused TRADERS_FX_BARS go.
- A truncated hour raised inside bars() and sank the whole request to the network; it is now skipped
  and counted (unreadable_hours). fx-fetch writes via a .part file and rename so it leaves none.
- fx-fetch walked to the current, unfinished hour and marked unpublished hours .empty for good; it now
  ends at the last complete hour and only marks 404s older than a day.
- fxdata.status() dropped `ticks` when the network cache folder did not exist, so the Data tab sat on
  "Reading the tick store..." for an operator who only ran fx-fetch. One shape always, plus `yahoo`;
  the card's Yahoo line follows it and the card re-reads on every visit.
- Unused `import json` in tools/fx-fetch.py, which failed the ruff gate on main.

15 new tests; full suite 1,293 OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
…y and out

nudgeChart()'s repaint dispatched a window 'resize' and the resize handler called nudgeChart() again:
an endless loop, 140 view resets in 10 idle seconds (measured in Chromium). Each reset re-applied
getVisibleRange(), which Vela caps at the newest bar in whole bars, so a drag into the right-hand space
sprang back to the edge and the zoom crept in.

- onWindowResize ignores synthetic (untrusted) resize events, so the nudge no longer re-enters itself
- the repaint is Vela's public panBy(0): same zoom and position, full redraw

Verified: 0 resets idle; drags into empty space and into history hold, in replay too (step and play
leave a panned view alone); the canvas still repaints after a panel flip and a window resize.
Three new tests in test_escape_and_layout.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
The operator's pick of two designs ("A — Capsule"): one frosted pill whose top edge is the scrubber
(white playhead; the range ends fade in on hover), Play as the one bright control (Pause while
playing), back-to-start and next-bar as icons, the cursor time as date over clock (still opens the
calendar), a ring beside "N bars left" that fills as this replay advances, and the speed as a chip.
The speed menu and calendar wear the same glass.

Behaviour is unchanged: seek on release, Start bar, drag handle and saved spot, the paper broker's
replay price. Icon-only buttons are named, focus is visible, the count has a fixed width so the pill
does not wobble during playback, and a narrow pane drops the words but keeps the number and ring.
Verified in Chromium at 1150/620/420 px, dark and light, driving every control. 8 new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLsbckEp88WEwC41dfyMeS
@coldtea-pr-lens

coldtea-pr-lens Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Architecture

Architecture diagram for godzillacode0000/tradersagent-plugin at 5811de7

Play the walkthrough

Inside the changed components — 3 views

Component view — Replay & Chart Frontend

Capsule replay strip and repaint stabilization on the Vela workspace

Architecture view of Component view — Replay & Chart Frontend in godzillacode0000/tradersagent-plugin

Component view — FX Data & Tick Cache

Optimized tick store reading, atomic writes, and backend data services

Architecture view of Component view — FX Data & Tick Cache in godzillacode0000/tradersagent-plugin

Component view — Fast Install & Adapters

Automated Python bootstrapping, Linux systemd service configuration, and dsh integration

Architecture view of Component view — Fast Install & Adapters in godzillacode0000/tradersagent-plugin

Data flow

Data flow diagram for godzillacode0000/tradersagent-plugin at 5811de7

Follow each request


Tip

Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture… row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion
  • Set github.description: false in .github/pr-lens.yml to stop PR Lens adding buttons to your PR descriptions

Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it.  Star PR Lens on GitHub

@godzillacode0000
godzillacode0000 merged commit c51fffd into main Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants