Commit graph

64 commits

Author SHA1 Message Date
5e50c4eb6f
tweak tests 2026-05-23 11:25:39 -07:00
60e2f438c2
portfolio loading fixes + full lint pass 2026-05-23 09:51:55 -07:00
65bb84e6d5
single code path for portfolio loading 2026-05-23 08:44:46 -07:00
21279c1aeb
initial implementation of import command 2026-05-21 15:18:23 -07:00
e319313583
handle multiple portfolio paths - default file name portfolio*.srf 2026-05-21 14:04:59 -07:00
d23e2dd977
fix tui command line args and make benchmarks configurable 2026-05-21 12:40:18 -07:00
b4db761733
allow interactive mode a --help option 2026-05-19 12:35:12 -07:00
fa39749980
user-errors management...any non-user error panics like before 2026-05-19 12:28:05 -07:00
c73b58f059
data refresh policy 2026-05-18 17:58:27 -07:00
4e6ae0ba51
rework framework to something much more sane 2026-05-18 17:39:19 -07:00
2f13b16021
finish CLI framework refactor: per-command --help, delegate help to modules, cleanup 2026-05-18 17:15:47 -07:00
a690d55c2b
migrate projections to new cli framework (restore audit command functionally) 2026-05-18 17:12:29 -07:00
62d058bb11
migrate contributions to new cli framework 2026-05-18 17:07:50 -07:00
4f02c937d0
migrate compare to new cli framework 2026-05-18 17:04:18 -07:00
e3dbd429df
migrate audit to new cli framework 2026-05-18 16:44:43 -07:00
b8e6732df1
migrate snapshot to new cli framework 2026-05-18 16:42:45 -07:00
682ebd10c0
migrate analysis to new cli framework 2026-05-18 16:40:11 -07:00
4cb5d1f711
migrate portfolio to new cli framework 2026-05-18 16:37:36 -07:00
51aaee9966
migrate milestones to new cli framework 2026-05-18 16:05:21 -07:00
1228d50ce6
migrate history to new cli framework 2026-05-18 16:02:02 -07:00
63f5cc445b
migrate enrich to new cli framework 2026-05-18 15:52:44 -07:00
8b9537dbf5
migrate version to new cli framework 2026-05-18 15:47:06 -07:00
6d9c864a40
migrate cache to new cli framework 2026-05-18 15:41:27 -07:00
2dcae073b0
migrate simple commands to new cli framework 2026-05-17 20:45:28 -07:00
86106d291c
add new TimeRange struct for handling all time specs in cli 2026-05-17 17:50:12 -07:00
77df2a30a7
add cli command framework 2026-05-17 17:49:33 -07:00
50dd3b5533
initial projections back test 2026-05-16 19:20:54 -07:00
9cea368f2c
initial implementation of projections actual (note TODO comments) 2026-05-13 13:05:01 -07:00
0987a61634
land date refactor (similar to money) 2026-05-12 21:40:32 -07:00
f9d2148c23
add ability to use imported history data 2026-05-12 10:52:43 -07:00
fad9be6ce8
upgrade to zig 0.16.0
All checks were successful
Generic zig build / build (push) Successful in 2m20s
Generic zig build / deploy (push) Successful in 27s
IO-as-an-interface refactor across the codebase. The big shifts:
- std.io → std.Io, std.fs → std.Io.Dir/File, std.process.Child → spawn/run.
- Juicy Main: pub fn main(init: std.process.Init) gives gpa, io, arena,
  environ_map up front. main.zig + the build/ scripts use it directly.
- Threading io through everywhere that touches the outside world (HTTP,
  files, stderr, sleep, terminal detection). Functions taking `io` now
  announce side effects at the call site — the smell is the feature.
- date math takes `as_of: Date`, not `today: Date`. Caller resolves
  `--as-of` flag vs wall-clock at the boundary; the function operates
  on whatever date it's given. Every "today" parameter renamed and
  the as_of: ?Date + today: Date pattern collapsed.
- now_s: i64 (or before_s/after_s pairs) for sub-second metadata
  fields like snapshot captured_at, audit cadence, formatAge/fmtTimeAgo.
  Also pure and testable.
- legitimate Timestamp.now callers (cache TTL math, FetchResult
  timestamps, rate limiter, per-frame TUI "now" captures) gain
  `// wall-clock required: ...` comments justifying the read.

Test discovery: replaced the local refAllDeclsRecursive with bare
std.testing.refAllDecls(@This()). Sema-pulling main.zig's top-level
decls reaches every test file transitively through the import graph;
no explicit _ = @import(...) lines needed.

Cleanup along the way:
- Dropped DataService.allocator()/io() accessor methods; renamed the
  fields to drop the base_ prefix. Callers use self.allocator and
  self.io directly.
- Dropped now-vestigial io parameters from buildSnapshot,
  analyzePortfolio, compareSchwabSummary, compareAccounts,
  buildPortfolioData, divs.display, quote.display, parsePortfolioOpts,
  aggregateLiveStocks, renderEarningsLines, capitalGainsIndicator,
  aggregateDripLots, printLotRow, portfolio.display, printSnapNote.
- Dropped the unused contributions.computeAttribution date-form
  wrapper (only computeAttributionSpec is called).
- formatAge/fmtTimeAgo take (before_s, after_s) instead of io and
  reading the clock internally.
- parseProjectionsConfig uses an internal stack-buffer
  FixedBufferAllocator instead of an allocator parameter.
- ThreadSafeAllocator wrappers in cache concurrency tests dropped
  (0.16's DebugAllocator is thread-safe by default).
- analyzePortfolio bug surfaced by the rename: snapshot.zig was
  passing wall-clock today instead of as_of, mis-valuing cash/CDs
  for historical backfills.

83 new unit tests added due to removal of IO, bringing coverage from 58%
-> 64%
2026-05-09 22:40:33 -07:00
86cf60447f
nag when data is stale 2026-05-08 14:47:31 -07:00
7729ac8d7e
initial transfer capability on contributions 2026-05-07 10:43:59 -07:00
cab4c291ad
begin transfer log 2026-05-06 22:10:13 -07:00
10f54c24ad
allow explicit pinning of snapshots and commits 2026-05-05 13:06:30 -07:00
1839bce49b
add projections comparison to compare and projections commands 2026-05-02 11:29:55 -07:00
d15939a9ad
periodic review: projections --as-of, contributions --since, comparison and tui projections date picker 2026-05-01 15:59:17 -07:00
6a2cc8e775
add new compare command (CLI only for now) 2026-05-01 08:52:43 -07:00
0d3dfc6a55
handle write failed due to piping through commands like head
All checks were successful
Generic zig build / build (push) Successful in 1m59s
Generic zig build / deploy (push) Successful in 17s
2026-04-30 15:27:08 -07:00
0c08cdda6c
replace finnhub with fmp - finnhub data not correct 2026-04-30 15:22:52 -07:00
8387692de1
incorporate life events (e.g. social security) into projections 2026-04-30 10:10:44 -07:00
6debed0d69
add CLI command for projections 2026-04-27 17:36:37 -07:00
a2271e3582
master audit command to do all the things
All checks were successful
Generic zig build / build (push) Successful in 2m0s
Generic zig build / deploy (push) Successful in 15s
2026-04-25 14:58:37 -07:00
41208f3732
history view refactor 2026-04-23 16:02:34 -07:00
a44ad0b7d0
use arena allocator for cli commands 2026-04-23 06:38:09 -07:00
8561a130e0
initial commit for new portfolio history (UI will change) 2026-04-22 12:40:54 -07:00
6ed2ff1f20
add snapshot command
All checks were successful
Generic zig build / build (push) Successful in 1m55s
Generic zig build / deploy (push) Successful in 51s
2026-04-21 21:24:54 -07:00
0cb3b2948b
use config defaults 2026-04-21 12:12:12 -07:00
a7abc5f5d7
add version command 2026-04-21 11:53:00 -07:00
6493a3745b
add contributions command
All checks were successful
Generic zig build / build (push) Successful in 1m42s
Generic zig build / deploy (push) Successful in 14s
2026-04-20 05:17:41 -07:00