Skip to content

Maintenance: safe start and stop, faster UI, updated dependencies, CI and a plan - #6

Open
SenseiIssei wants to merge 15 commits into
mainfrom
pflege-plan
Open

SenseiIssei wants to merge 15 commits into
mainfrom
pflege-plan

Conversation

@SenseiIssei

Copy link
Copy Markdown
Owner

Maintenance round after an audit of everything outside research/, and a plan for what comes next. Trading and risk logic is unchanged; nothing under research/ is touched. The commits are small and can be read one by one.

Fixed

  • Desktop: a second start no longer runs a second engine on the same keys and state file. Quit in the tray saves. An unreadable state file that could not be moved aside is never saved over. A crash is written to crash.log, which stays on the machine.
  • Server: the port is taken before the state is read or a tick starts. Ctrl+C and SIGTERM save the state (up to 60 s was lost before). Without PYTHIA_STATE_FILE it says so at the start.
  • CLI: pythia kill on and kill off. kill --yes twice used to release the switch. watch survives an engine restart.
  • App: with limits=wallet the panels show the caps the code enforces instead of "none". Numbers look the same on every machine; one UI test failed on a German Windows. The browser demo says its prices are made up.
  • Docs: SAFETY, SECURITY, the runbooks, .env.example, the README and its seven translations match the code.

Faster

  • Pages load when opened: first script 1,159 kB to 495 kB, DOM 5,850 to 350 nodes, idle main-thread time 811 to 1,070 ms down to 45 to 145 ms per 10 s (headless, CPU slowed four times, npm run bench:ui).
  • Quotes and bars are fetched together, so a slow venue holds a tick for 5 s at most instead of 15 s (from the time limits). The state is written for the stream only while someone listens.

Dependencies and CI

  • cargo audit 5 vulnerabilities to 0, npm audit 3 high to 0. Building needs Rust 1.90.
  • New workflows: UI (types, tests, also in German, build), Rust on Linux and Windows plus the oldest supported version, a weekly audit. Dependabot monthly and grouped; glib is ignored because Tauri pins it.

Plan

PLAN.md section 10: a comparison with ten tools and 25 pieces of work in order, each with what done looks like and how it is verified.

Checked

npm run check is green on Windows (1,140 Rust tests, 597 UI tests), both audits are clean, the Windows installer builds. All 33 pages open in a headless browser.

Not checked

  • The desktop app and the server were not started, so the second-start guard, saving on exit and the crash log are built and unit-tested where possible, but not seen running.
  • The lab's tests do not load on Windows (fcntl).
  • Merging changes the server code that a deploy from main builds.

…failed on a German Windows because euro amounts and a few counts used the machine's locale ("104,00 €" next to "$130.00", "1.234" next to "$1,234"); a test keeps it that way
… start: first bundle 1,159 kB to 610 kB, DOM 5,850 to 440 nodes, a page opens in 3 to 38 ms (headless); the error box offers a reload when a page's code is gone after a server update and names the Stop button as it is called today; npm run bench:ui measures startup and idle cost; tests
…act 1, framer-motion 14, react 19.3 and the rest; npm audit 3 high to 0 (zod under puppeteer-core); first bundle 610 kB to 495 kB; lucide dropped the GitHub mark, the link uses the code icon; tailwind 4 stays for its own change
…"none (the wallet is the limit)"; since 406caee the daily loss, the total and the trade size are capped in code whatever the file says, the app still said they were not; tests
…o-bigint, ctutils, quinn-udp, url), 7 unmaintained or unsound warnings stay (glib 0.18 comes with Tauri on GTK 3, chrono); the minimum Rust is 1.90, what the Tauri crates ask for (1.85 was already wrong: notify-rust needed 1.89); 1,134 tests pass
…aged switch off (pythia kill --yes twice released it), kill off asks, the bare kill still switches; watch survives an engine restart; tests
… it ends before it reads the state or ticks; Ctrl+C and SIGTERM save the state (up to 60 s of fills and record were lost at every stop) and a server without PYTHIA_STATE_FILE says so; quotes and bars are fetched together, so a tick waits for the slowest (5 s) instead of the sum (15 s), one Alpaca request took 11.9 s when measured; the state is written for the stream only while someone listens; the header names the real routes; tests
…engine on the same keys and state file; Quit in the tray saves (up to 60 s were lost); an unreadable state is said in a notification and never saved over when it could not be moved aside; a crash is written to crash.log in the app data folder; quotes and bars fetched together; tests
…ust tests on Linux and Windows and the oldest supported Rust when the engine changes, an audit weekly and on lockfile changes; until now only a release tag ran anything; Dependabot grouped once a month, glib ignored because Tauri pins it (its update failed every time); actions up to date
…e on-chain wallet, the two protections the owner can switch off and that the typed phrase is a guard of the app; closing orders are never blocked, share shorts exist but are off; stale caps, models, venues and tips corrected; SECURITY's known issues after the update; .env.example keeps the state by default; README and its seven translations together; CHANGELOG has an Unreleased section
…our and the asset sheet called them real); About shows the version of the build
…mparison with ten tools, and 25 pieces of work in order, each with what done looks like, how it is verified and what needs the owner
…e real one and a runner has no secret service
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.

1 participant