Repository navigation
[11] Store work summaries as row logs - #1389
Open
tautvydasLiekis wants to merge 18 commits into
Open
tautvydasLiekis wants to merge 18 commits into
tautvydasLiekis wants to merge 18 commits into
Conversation
|
📚 No documentation changes were needed for this PR. |
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 06:06
2805f8e to
e37c377
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 06:06
23c4178 to
aa50cf3
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 07:05
e37c377 to
c31771f
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
2 times, most recently
from
October 9, 2026 08:17
5f0fa95 to
f208f42
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
2 times, most recently
from
October 9, 2026 08:39
41d9c6f to
1310db0
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 08:39
f208f42 to
197ba3d
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 09:24
1310db0 to
7cb037e
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 09:24
197ba3d to
d0ecbe4
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 09:41
7cb037e to
c45fcf2
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 09:41
d0ecbe4 to
a2c031e
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 10:46
c45fcf2 to
378135f
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 10:48
a2c031e to
0646f64
Compare
2 of 5 tasks
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 11:14
378135f to
1ea83ef
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 11:14
0646f64 to
ca42015
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 11:37
1ea83ef to
d87cbc2
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 11:38
ca42015 to
b161746
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 12:54
d87cbc2 to
211a178
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 12:54
b161746 to
90012a2
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 13:00
211a178 to
116744a
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 9, 2026 13:00
90012a2 to
d1640a5
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 14:38
116744a to
7742178
Compare
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
2 times, most recently
from
October 9, 2026 21:49
466a5cc to
f10ef52
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 9, 2026 21:49
7742178 to
97dbe29
Compare
added 16 commits
October 10, 2026 10:58
tautvydasLiekis
force-pushed
the
feat/split-work-files
branch
from
October 10, 2026 09:09
f10ef52 to
95614e7
Compare
tautvydasLiekis
force-pushed
the
feat/browse-work-costs
branch
from
October 10, 2026 09:09
97dbe29 to
483b773
Compare
This was referenced Oct 10, 2026
mszostok
reviewed
Oct 11, 2026
mszostok
left a comment
Contributor
There was a problem hiding this comment.
I strongly doubt the compatibility is necessary.
I'd drop v1 entirely and not care about existing works: no v1 reader, no migration, no fixtures, no rebuild-on-upgrade. Just have the new version delete old v1 work.json files and let this PR focus solely on v2.
Contributor
|
also quite potential alternative for that in the future can be SQLite 🤔 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes work summary updates cost the same at any size. Every request, response, billing change, edit and commit used to read, merge and rewrite the whole
work/<id>/work.json, so large works slowed the TUI and eventually broke/work. Nowwork.jsonis a small manifest and the rows go into append-only logs.Stacked on #1386. Ship it in the same release as #1348 and #1386, or before them: #1348 makes each request row about five times larger, and #1386 adds the
/workbrowser that reads these files.Problem
work.jsonpassed the browser's 8 MiB read limit, so/workshowed "Summary unavailable" and lost the work's PR state./workwith 30 medium works parsed about 190 MB of JSON.How it works
work.json, which commits them. Readers stop at each log's committed length, so an interrupted append is ignored and the next writer cuts it off. Merge rules are unchanged./workreads only manifests andcost-totals.json, never the row logs. The text/workin ACP and print mode uses the same totals.costs.jsonkeeps its shape but is rewritten at most once every five minutes per work (immediately on a process's first pass, or when it orcost-totals.jsonis missing).Evidence
Measured during development on an Apple M4 Pro, base
74f8e0d0against an earlier build of this branch, median of 15 updates in one process:/workdetails/workwith 30 works of 5,000 requests: 379 ms, +474 MB heap and 0 of 30 summaries readable → 3 ms, +1 MB heap, 30 of 30./workopened in at most 357 ms.On
95614e7c6, after the final review fixes:pr-checks,master-checks, TUI e2e in 4 shards, ACP e2e and MCP e2e pass on this head. A duplicatetui-e2eentry from a superseded workflow run shows as cancelled.pnpm checkpasses; the full unit suite passes except 5 tests that need tools this machine lacks: a DAP js-debug adapter, a builtvalidate-skill.mjsand a binary rebuilt for the smoke test.Tests also cover:
/workcost lines fromcost-totals.jsonequal to the previous output for every saved report in thecost-synctests, connected works included, and totals that are written again after being deleted.Compatibility and risks
version: 2, rebuilds a version 1 file from the journals, and this build migrates it again on return.summary too largein/workwith PR state and partial spend until their next update./workheader now adds each listed work's connected cost report once, so connected works that are not listed also count. [10] Browse works, costs and PRs in /work #1386 counted only the listed works' own requests.costs.jsonstill repeats a connected group in each member's file.docs/work-attribution.mdlists each row log and its keys.🤖 Generated with Claude Code