piker/piker
Gud Boi 2347ad6198 Fix IB fill accounting by execution identity
Keep each commission callback's exact `Fill` paired with its
report, so overlapping executions on one contract cannot borrow
each other's fees. Cache positions by account and `conId`, queue
commissioned fills by execution ID until a position arrives, and
accept zero commissions. Reject mismatched execution/report IDs.

Keep `Execution.execId` authoritative when flattening ledger
entries; an empty commission ID must not erase a valid fill. Add
regressions for empty commission IDs, reversed fee arrival, and
positions arriving before or after overlapping executions.

The human live-tested fills and reports the accounting fix works.
Exact-boundary automated checks remain pending; the earlier nine
passes covered the mixed working tree. Included Prompt-IO logs
retain whole-session context, including separate roaming work.

Prompt-IO: ai/prompt-io/opencode/20260916T194052Z_749ca1f0_prompt_io.md

(this patch was generated in some part by `opencode` using
`gpt-6-astra` (`openai`))
2026-11-13 17:17:57 -05:00
..
accounting .clearing: lazily spawn `brokerd` from `emsd` 2026-11-09 17:05:43 -05:00
brokers Fix IB fill accounting by execution identity 2026-11-13 17:17:57 -05:00
clearing .clearing: lazily spawn `brokerd` from `emsd` 2026-11-09 17:05:43 -05:00
cli brokerd: slim RPC caps + `ib` client-id offset 2026-11-09 17:05:43 -05:00
data Expose storage state through `piker store` 2026-11-12 09:48:06 -05:00
fsp Use `tractor.ipc._shm` types directly across codebase 2026-03-17 18:00:29 -04:00
service Add `datad` daemon machinery to `.data` 2026-11-09 17:05:39 -05:00
storage Simplify `store` series and SHM discovery 2026-11-12 09:48:09 -05:00
testing Pass a config `tmp_dir: Path` to the runtime when testing 2023-03-09 15:37:43 -05:00
toolz Delegate `.toolz.open_crash_handler()` to `tractor.devx` 2024-01-16 10:26:38 -05:00
tsp Fix sparse IB history prepends in `ShmArray` 2026-11-13 15:47:52 -05:00
ui .data: cut feed layer over to `datad` actors 2026-11-09 17:05:43 -05:00
watchlists Add license headers to pertinent files 2020-11-06 12:23:14 -05:00
__init__.py Start `piker.service` sub-package 2023-03-09 15:37:42 -05:00
_cacheables.py Move `._cacheables.open_cached_client()` into `.brokers` pkg mod 2023-06-27 13:41:47 -04:00
calc.py Lul, adhere to returning `str`s in `humanize()` 2022-01-25 07:57:01 -05:00
config.py Fix `pytest` config-dir isolation in subactors 2026-10-07 03:10:41 -04:00
log.py Preserve exact `piker` logger namespaces 2026-10-07 03:10:41 -04:00
types.py Point `.types.Struct` to `tractor.msg.pretty_struct` 2026-02-22 16:07:53 -05:00