Commit Graph
15 Commits
Author SHA1 Message Date
Neil 6e77c02fc6 fix: update Electron and revert UTF-8 write mitigations (#4598) 2026-06-03 16:45:01 -07:00
Neilandthiagomsoares 996b69dce0 Harden large app state UTF-8 writes (#4587)
* fix: write stats file in chunks to avoid Electron UTF-8 abort

orca-stats.json gains an event on every agent start/stop. After about a
month of use mine had grown to ~3.6k events / ~608 KB, and the app started
hard-crashing a few seconds after every launch (SIGTRAP, no catchable JS
stack):

    Assertion failed: (length + 1) <= (capacity())
    node::MaybeStackBuffer<char>::SetLengthAndZeroTerminate <- node::Utf8Value

The crash is in StatsCollector.writeToDiskSync(), which saves the whole
file in one writeFileSync(JSON.stringify(data)). Electron 42.3.2's bundled
Node aborts when encoding a string that large to UTF-8 in a single write;
stock Node 24 handles the same file fine and the data is well-formed, so
it's an Electron/Node encoding limit, not bad data. The save runs on a
debounce after agent_start, which restored agents fire on launch -- so it
crashed right after opening.

Write the JSON in 64 KB slices through one fd instead (never splitting a
surrogate pair), and lower MAX_EVENTS 10k -> 1k so the file can't grow back
this large. Lifetime aggregates are unaffected.

Verified by reproducing the abort standalone with the real 608 KB file
under ELECTRON_RUN_AS_NODE, confirming the chunked writer round-trips it
byte-for-byte with no crash, and running a patched build that loads the
file without crashing. The underlying encode abort is an Electron/Node bug
to report upstream.

* fix: harden stats JSON writes

* fix: chunk app state UTF-8 writes

* fix: stabilize status and terminal polling

---------

Co-authored-by: thiagomsoares <5190162+thiagomsoares@users.noreply.github.com>
2026-06-03 14:58:28 -07:00
Jinwoo HongandOrca 530bfe6c39 Speed up cached usage analytics loads (#4528)
Co-authored-by: Orca <help@stably.ai>
2026-06-02 18:10:31 -07:00
Neil 0856df806f perf: cap usage worktree canonicalization (#4263) 2026-05-31 10:11:51 -07:00
Neil 74455bfe52 perf: reuse fresh Codex usage scans (#4153) 2026-05-31 06:12:21 -07:00
07b8d014bd Fix usage attribution for dotdot-prefixed child paths (#3651)
* fix: attribute dotdot-prefixed usage paths

* Add usage attribution boundary tests

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-05-30 12:46:55 -07:00
Neil f79977ac5a fix: avoid spread limit in usage session scans (#3640) 2026-05-30 04:36:45 -07:00
Brennan BensonandOrca 6f939896c0 Bridge legacy Codex sessions into runtime home (#2816)
Co-authored-by: Orca <help@stably.ai>
2026-05-25 19:56:48 -07:00
Brennan BensonandOrca a2c71461b4 Isolate Codex hooks in Orca runtime home (#2350)
Co-authored-by: Orca <help@stably.ai>
2026-05-25 15:07:40 -07:00
Jinjing 73d4a1781e fix: combine buf0-bot validated bug fixes (#2086) 2026-05-16 11:34:13 -07:00
Jinjing be76195159 Report automation usage costs (#1994)
* feat: report automation usage costs

* fix: satisfy max-lines lint
2026-05-15 17:07:55 -07:00
Jinwoo HongandOrca 79838275a4 Improve Claude and Codex usage tracking (#1968)
Co-authored-by: Orca <help@stably.ai>
2026-05-15 13:16:55 -07:00
JinjingandOrca 4ded9e6e9d fix(codex-usage): correct Codex model pricing table (#1669)
Update MODEL_PRICING to current Codex rates: add gpt-5.1, gpt-5.4, gpt-5.5;
rename gpt-5.2-codex -> gpt-5.2 with corrected rates; align gpt-5.3-codex
rates. Stop aliasing gpt-5.4 to gpt-5 in normalizeModelForPricing.

Co-authored-by: Orca <help@stably.ai>
2026-05-10 13:58:25 -07:00
Neil 7b83b2dcdc fix: avoid repeated macOS privacy prompts (#1524)
* fix: avoid repeated macos privacy prompts

* fix: reduce background worktree permission probes

* chore: pin oxlint for ci

* fix: preserve optional rpc params with zod 4.4

* fix: preserve optional inline rpc params with zod 4.4
2026-05-06 23:30:03 -07:00
Jinwoo Hong 1b3719cb4c Add Codex usage tracking (#444) 2026-04-10 10:04:57 -07:00