Commit graph

1332 commits

Author SHA1 Message Date
Resham Joshi
897020591a
Merge pull request #984 from Enclavet/fix/kiro-parse-oom
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (push) Waiting to run
fix: OOM on cold parse (V8 SlicedString retention) + kiro projectPath for repo attribution
2026-08-16 01:54:54 -07:00
iamtoruk
c7c3a878d8 fix(parser): flatten already-sliced previews and memoize canonical path walks
flatSlice returned strings within the bound unchanged, but provider adapters
pre-truncate with .slice(0, 500) before the cache site, so those views still
pinned their parent buffers. Always flatten; the round-trip is ~150ns per turn.
Use utf16le so lone surrogates survive the copy.

Cache the canonical-path Promise instead of the resolved value so calls in one
Promise.all batch share a single walk.

Document the one-time kiro re-parse and worktree regrouping.
2026-08-16 01:49:10 -07:00
Andrew Lee
db35fdd079 fix(kiro): set projectPath from session cwd for attribution support
The kiro provider was reading the full working directory from session
metadata (meta.cwd for CLI sessions, workspacePaths[0] for v2 IDE
sessions, workspaceDirectory for workspace sessions) but discarding it
via basename(), keeping only the leaf name for display. This meant
computeAttributionRecords could never resolve kiro sessions to a git
repo, so `codeburn sync push --attribution` produced 0 facts for all
kiro-originated sessions.

Now passes the full path as projectPath on emitted ParsedProviderCalls,
which buildRepoGroups uses to resolve git identity and correlate
commits with sessions via timestamp windows. The path stays local:
only the normalized origin remote egresses in attribution spans.

Behavior changes beyond attribution:
- kiro calls now flow through canonicalizeProviderCallProject, so kiro
  sessions in LINKED GIT WORKTREES canonicalize to the main repository:
  their report project name changes from the worktree dir name to the
  main repo name (consistent with claude/codex behavior).
- workingDirectory is now populated on kiro calls.
- PROVIDER_PARSE_VERSIONS.kiro bumped (project-path-v1): cached entries
  predate projectPath and are served without re-invoking the parser, so
  without the bump this fix silently no-ops for every warm cache. The
  bump forces a one-time cold kiro re-parse on upgrade.

ORDERING: this commit must land WITH (or after) the preceding
SlicedString OOM fix. The forced cold re-parse it triggers is exactly
the workload that OOM'd before that fix on multi-GB kiro stores.

Perf: per-call canonicalization added a measured +5% to cold parse
(.git-marker lstat walk per call). resolveCanonicalProjectPath is now
memoized on cwd (cleared with the session cache), removing the
redundant walks for all providers.

Tests: projectPath emission fixtures for all three session formats
(CLI, v2 IDE, workspace-session), fingerprint-change assertion, and a
regression test seeding a pre-bump cache entry and proving the re-parse
recovers projectPath.

AI-Origin: human
2026-08-12 20:00:04 +00:00
Andrew Lee
d47a1711b1 fix(parser): OOM on cold parse — V8 SlicedString retention in session cache
String.prototype.slice returns a V8 SlicedString: a view that retains a
reference to its ENTIRE parent string. The parsers store short previews
of message text (userMessage.slice(0, 500/2000)) in the long-lived
session cache. Session files routinely carry 100KB+ strings (agent-
injected system prompts, tool results), so every cached preview pinned
its full parent buffer for the life of the process.

Measured on 3.2GB of kiro CLI session files (6,659 files, largest 40MB):

  cold parse, default heap, before:  4.33GB peak -> OOM crash
  cold parse, 8GB heap, before:      5.67GB peak (kiro provider alone)
  after kiro flatSlice:              0.91GB peak
  after parser.ts cache sites too:   0.64GB peak
  original failing command (cold,
  default heap, all providers):      0.89GB peak -> completes

Warm runs were always fine (~0.29GB) because the cache's JSON round-trip
flattens the strings on load — which made this bug appear intermittent:
it only fired on a cold or invalidated cache.

Fix: flatSlice() in content-utils.ts forces a flat copy via Buffer
round-trip. Applied at the six kiro userMessage capture sites and the
three shared cache-building sites in parser.ts (protects all providers).

Regression test asserts the no-retention property via bounded heap
growth over 1000 large-parent slices.

AI-Origin: human
2026-08-12 19:51:09 +00:00
Resham Joshi
c9e6e2ecae
Merge pull request #979 from avs-io/codex/add-star-history
Some checks failed
CI / semgrep (push) Has been cancelled
Tests / test (push) Has been cancelled
docs: add self-updating star history
2026-08-12 06:54:23 -07:00
Aditya Vikram Singh
e4d7cf0f26 docs: add self-updating star history 2026-08-12 19:21:10 +05:30
iamtoruk
b6b3c78811 assets: desktop app demo gif 2026-08-12 06:13:23 -07:00
iamtoruk
af97effb0d flathub: arch restriction file used in the submission 2026-08-12 06:12:06 -07:00
Resham Joshi
4c53e07d26
Merge pull request #976 from getagentseal/fix/flathub-tool-count
flathub: correct supported tool count to 40
2026-08-12 06:03:56 -07:00
Resham Joshi
1d1ffaec31
Merge pull request #978 from getagentseal/snap/strict-personal-files
snap: strict confinement with read-only personal-files plug
2026-08-12 05:30:19 -07:00
iamtoruk
c755a3c521 snap: strict confinement with read-only personal-files plug
Classic has no fitting store category (per forum feedback) and strict is
electron-builder's well-supported path. One personal-files plug grants
read-only access to the dot-directories the supported tools write session
logs into; the app's own config and cache stay in the snap's private area.
2026-08-12 05:20:15 -07:00
iamtoruk
be53377774 readme: new recipient banner, Product Hunt badge alongside 2026-08-12 04:45:44 -07:00
iamtoruk
2eaad264b9 flathub: correct supported tool count to 40 2026-08-11 22:02:11 -07:00
Resham Joshi
9437fb6faf
Merge pull request #970 from getagentseal/packaging/linux-stores
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (push) Waiting to run
packaging: Snap Store target and CI, Flathub manifest
2026-08-11 21:55:25 -07:00
iamtoruk
7e99b875d5 packaging: Snap Store target and CI, Flathub manifest
- electron-builder snap target (classic confinement) with package:snap script
- build-snap.yml: builds on ubuntu, uploads artifact, optional store publish
  gated on workflow_dispatch input + SNAPCRAFT_STORE_CREDENTIALS secret
- app/flathub: manifest repacking the released deb, desktop file, AppStream
  metainfo, and submission runbook
2026-08-11 08:16:39 -07:00
Resham Joshi
d78bdb21f8
Merge pull request #966 from getagentseal/test/spawn-suite-timeouts
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (push) Waiting to run
test: file-level 30s timeout for the three spawn-heavy CLI suites
2026-08-11 01:03:54 -07:00
iamtoruk
74823d2117 test: file-level 30s timeout for the three spawn-heavy CLI suites
cli-json-daily, spend-flow and cli-emitters spawn the real CLI per test
and blow the 5s default under full parallel suite load while passing in
isolation - the flake set #948 documented on unmodified main, observed
again locally (cli-json-daily) and in CI (cli-emitters on a green PR).
Same file-level remedy the CLI menubar suite already uses; the default
stays 5s for everything else.
2026-08-11 00:55:07 -07:00
Resham Joshi
1c21de6168
Merge pull request #965 from getagentseal/release/0.9.20
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (push) Waiting to run
chore: release 0.9.20
2026-08-10 15:41:44 -07:00
iamtoruk
0090decf7d chore: bump to 0.9.20 2026-08-10 15:38:47 -07:00
Resham Joshi
e1d44f0f23
Merge pull request #964 from getagentseal/docs/changelog-aug10
docs(changelog): entries for the Aug 10 wave
2026-08-10 15:27:29 -07:00
iamtoruk
5b2251616c docs(changelog): entries for the Aug 10 wave (serve perf, parity, accuracy fixes) 2026-08-10 15:27:23 -07:00
Resham Joshi
84b2bcd857
Merge pull request #963 from getagentseal/fix/punchcard-tooltip
fix: punchcard tooltip cropping; remove menubar Workflow strip
2026-08-10 14:38:41 -07:00
iamtoruk
6cd11ab436 fix(app,dash): punchcard tooltip never crops; remove the menubar Workflow strip
- Punchcard tooltips flipped below the cursor on the top rows (the
  overflow container clips anything above its own edge) and clamp
  horizontally near the strip edges. Applied to both the app and dash
  copies of the component.
- The menubar Workflow strip is removed (view, strip model, tests):
  the popover is the compact surface and the workflow metrics live in
  the desktop app, dash and TUI. The payload keeps emitting the block
  (add-only contract; the other surfaces read it).
2026-08-10 14:35:40 -07:00
Resham Joshi
8df6c4f553
Merge pull request #962 from getagentseal/feat/surface-parity
feat(app,menubar): surface parity — punchcard in the app, PR spend in the menubar
2026-08-10 14:32:30 -07:00
iamtoruk
411d52f924 feat(app,menubar): surface parity — Spend punchcard in the app, Pull requests strip in the menubar
The release's new capabilities were unevenly surfaced: the Spend
punchcard existed only on the web dashboard, and the menubar decoded
nothing of the PR-attribution block the payload already carries.

- Desktop app: new Punchcard component (hour-of-day x weekday spend
  matrix, ported from the dash and restyled to the app's tokens) on the
  Spend page. Fed by a dedicated getTimeline bridge channel that fetches
  the payload WITH history.timeline; every other fetch keeps the lean
  --no-timeline path, and the serve child makes the extra fetch cheap.
  Hides gracefully when the payload has no timeline (older CLI).
- Menubar: PullRequestsSection renders the top three PRs by attributed
  spend under the Workflow strip; MenubarPayload now decodes the
  pullRequests block (decodeIfPresent, so older payloads are unchanged).
  Hidden when absent or empty.

Deliberately NOT ported: codex Tok/s (reads rollout files per session -
too heavy for payload cadence; stays a TUI/report analytics view) and
the punchcard in the menubar (a 7x24 matrix has no legible place in a
compact popover).

App suite 468 green (bridge channel pinned, mocks extended), swift
build + 156 tests green, CLI suite green.
2026-08-10 14:29:26 -07:00
Resham Joshi
9703e35e4e
Merge pull request #961 from getagentseal/fix/pr-cwd-time-bound
fix(pr-attribution): time-bound the working-directory correlation
2026-08-10 14:17:19 -07:00
iamtoruk
2262a82f51 fix(pr-attribution): time-bound working-directory correlation
The cwd evidence rule attributed ANY session sharing a checkout with a
PR-linked session, with no time bound - so a repo whose only captured PR
link was pasted once became a black hole: 129 of 131 sessions and a
month of unrelated work (~$7.4K direct, $11.2K displayed) attributed to
one PR, observed live on the desktop Pull requests tab.

Cwd anchors now carry the evidence sessions' own activity window (union
across evidence for the same PR set), and only sessions overlapping that
window plus a 6h pad inherit the PR. The rule's charter is 'a tool
session launched around PR work in this checkout', which is inherently a
same-working-stretch claim; the design's own philosophy (timestamps
narrow, never create) now applies to this rule too.

On the real corpus the row corrected to $450.87 / 21 sessions across the
PR's actual two-day working stretch. Regression pins both directions:
nearby same-cwd session inherits, weeks-later one never does; multiple
evidence sessions widen the window.
2026-08-10 14:13:57 -07:00
Resham Joshi
a887233cd9
Merge pull request #960 from getagentseal/perf/serve-fs-invalidation
perf(serve): event-driven parse reuse — a no-change fetch costs nothing
2026-08-10 14:07:04 -07:00
iamtoruk
555a1a89f5 perf(serve): event-driven parse reuse — a no-change fetch costs nothing
The remaining warm-serve cost was the per-request discovery sweep
(stat-ing thousands of session files) plus re-aggregation, even when
nothing on disk had changed. Serve now watches every provider's
probeRoots() via fs.watch (FSEvents-backed recursive watches on macOS)
and injects a quiet-since validator into the parser: while the watched
roots are quiet, a previous parse stays reusable past the burst window,
and an output-level memo returns identical panel queries verbatim - so a
fetch with no data changes skips the sweep AND the aggregation.

Safety rails, in order: a parse is validated-reusable only if the
watchers were armed before it ran; any filesystem event ends reuse
instantly; a 5-minute hard cap self-heals a missed event; a root that
fails to watch just goes uncovered (shorter reuse, never staleness);
outside serve the validator is never installed and behavior is
byte-identical. During an active AI session the session roots fire
constantly, so reuse correctly stays inside the 10s burst window - the
extended reuse serves the idle-browsing case it was built for.

The one watched path inside the cache dir is antigravity's statusline
file specifically, so serve's own cache writes never self-invalidate.
2026-08-10 14:04:01 -07:00
Resham Joshi
77e809a3ec
Merge pull request #959 from getagentseal/perf/web-prefetch
perf: web dashboard period prefetch + menubar serve client
2026-08-10 11:21:01 -07:00
iamtoruk
df05d7792e perf: web dashboard period prefetch + menubar serve client
Two more surfaces adopt the resident-serve pattern the desktop app got:

- Web dashboard: every period tab is prefetched sequentially right after
  startup, so the first click on 7d/30d/Month answers from the payload
  cache instead of paying a full parse; stale-while-revalidate rebuilds
  behind a served payload past 75% of the TTL so expiry never lands its
  multi-second parse on a user's click. Lifetime prefetches last.
- Menubar: ServeConnection (Swift actor) holds one codeburn serve --stdio
  child; status payload fetches route through it once warm, with the same
  contract as the app client — cold start and every failure keep the
  spawn path, three child deaths disable serve for the run, requests
  time out by killing the child, app termination shuts it down, and a
  pre-serve CLI (0.9.19) simply dies into permanent spawn fallback, so
  mixed-version installs degrade gracefully.

swift build clean, swift test 156/156, CLI tsc clean; verified live with
both the Electron app's and the menubar's serve children resident and
answering.
2026-08-10 11:17:59 -07:00
Resham Joshi
635299563b
Merge pull request #958 from getagentseal/fix/dash-oneshot-percent
fix(dash): one-shot rate showed 10000% in Model efficiency
2026-08-10 10:40:21 -07:00
iamtoruk
5bfc0e436c fix(dash): render modelEfficiency one-shot rate verbatim, it is already a percent
The payload's current.oneShotRate is a fraction but
modelEfficiency[].oneShotRate is 0-100 (the TUI and menubar render it
verbatim); the dash multiplied the latter by 100 again and showed
10000% / 8570% in the Model efficiency table. Caught live during the
release surface sweep.
2026-08-10 10:37:10 -07:00
Resham Joshi
8e61b205b3
Merge pull request #957 from getagentseal/fix/serve-hardening
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (push) Waiting to run
fix(serve): close the resident-process staleness and growth holes
2026-08-10 10:06:10 -07:00
iamtoruk
cecb6239c6 fix(serve): close the resident-process staleness and growth holes
Adversarial review of the serve design surfaced three weaknesses a
one-shot CLI never had, because it never lived long enough:

- Pricing-affecting config (model aliases, price overrides, local-model
  savings) now participates in the parse memo key. Config reloads fresh
  per request (the preAction hook), but a memoized or burst-reused parse
  embedded costs priced under the OLD config; the widened key makes any
  such change an automatic memo miss. New alias-hash helper + tests.
- Memory guard: past 3GB RSS the serve loop drops its in-memory memos
  (session cache + parse entries) and the next request re-parses once.
  The child never exits for this, so the client's death budget is
  untouched.
- codeburn serve typed in an interactive terminal now explains itself on
  stderr instead of hanging silently on stdin.
2026-08-10 10:03:33 -07:00
Resham Joshi
da31f21a8d
Merge pull request #956 from getagentseal/perf/serve-stdio
perf: resident serve process — desktop panel fetches drop from ~7s to milliseconds
2026-08-10 09:46:53 -07:00
iamtoruk
d78ab77d96 perf: resident serve process for the desktop app — panel fetches in milliseconds
Every CLI spawn on a large corpus pays seconds of fixed cost before any
query work: node boot, a 100MB+ session-cache JSON.parse, the discovery +
fingerprint sweep, and serve-time classification. The desktop app spawns
one CLI per panel fetch, so it pays that cost per panel.

codeburn serve --stdio is the same CLI kept warm: the app holds one child,
sends {id, args} per line, and gets the command's stdout back. Three layers
make it fast, each disabled outside serve so one-shot runs stay byte-exact:

- loadCache memo (session-cache.ts): the parsed cache object is reused
  while a stat() shows the file unchanged; saveCache updates it
  write-through. A rewrite by another process still forces a fresh read.
- burst reuse (parser.ts, CODEBURN_PARSE_BURST_MS, serve sets 10s): panel
  bursts anchor their range ends at their own new Date(), so the exact-key
  memo never hits in real traffic; within the window a re-anchored range is
  served by trimming the previous parse instead of re-running discovery.
- fresh commander program per request (main.ts buildProgram factory),
  because commander option state is sticky across parses.

The server allows only the app's read queries (status/overview/models/
sessions/compare/yield/spend/optimize/audit), refuses everything else
(client falls back to a spawn), serializes requests, and converts
process.exit into a caught signal. The app starts the child once at
startup; requests route through it only when warm, cold-start keeps the
spawn path with its progress events, any serve failure falls back to a
spawn, and three child deaths disable serve for the app run.

Measured on a real 17B-token corpus: panel fetches drop from ~7.4s per
spawn to 5-900ms warm (sessions/spend 5ms, status 898ms). One-shot CLI
output verified byte-identical against the pre-branch baseline.
2026-08-10 09:43:44 -07:00
Resham Joshi
d302846453
Merge pull request #955 from getagentseal/fix/868-activate-only
fix(menubar): activate before creating the status item, policy pinned (#868)
2026-08-10 06:25:20 -07:00
iamtoruk
1ba09dc423 docs(menubar): correct the activation-policy comment the #868 probe disproved 2026-08-10 06:21:37 -07:00
ozymandiashh
0c8cb9e8eb experiment(menubar): activate before setupStatusItem, no policy transition
Test build for #868. Keeps the activation policy pinned at .accessory
(LSUIElement makes the :92-96 call a no-op in packaged builds anyway) and
restores only the NSApp.activate(ignoringOtherApps: true) half of the
#147 fix, immediately before the status item is created.
2026-08-10 06:20:49 -07:00
Resham Joshi
0af7c00e30
Merge pull request #954 from getagentseal/fix/941-bash-read-verify
fix(insights): count read-shaped shell commands as reads, not as verification
2026-08-10 06:10:52 -07:00
iamtoruk
1103ca77a5 fix(insights): count read-shaped shell commands as reads, not as verification (#941) 2026-08-10 06:07:27 -07:00
Resham Joshi
7fd9015c72
Merge pull request #783 from getagentseal/feat/dash-workflow-punchcard
dash: Workflow panel and Spend punchcard
2026-08-10 04:52:55 -07:00
iamtoruk
b55a14542e Merge remote-tracking branch 'origin/main' into feat/dash-workflow-punchcard 2026-08-10 04:52:29 -07:00
Resham Joshi
93402f2392
Merge pull request #786 from getagentseal/feat/tui-workflow-titles
tui: Workflow panel, rotating coaching notes, titles in the context browser
2026-08-10 04:52:15 -07:00
iamtoruk
44082c3d1f Merge remote-tracking branch 'origin/main' into feat/tui-workflow-titles
# Conflicts:
#	src/dashboard.tsx
2026-08-10 04:51:55 -07:00
Resham Joshi
e7a3313cb9
Merge pull request #951 from getagentseal/feat/tui-wheel-scroll
feat(tui): mouse-wheel scrolling for the dashboard viewport
2026-08-10 04:51:18 -07:00
Resham Joshi
c3e2f67d57
Merge pull request #952 from getagentseal/fix/correction-detector-prose
fix(insights): stop counting prose 'wrong answer' as a user correction
2026-08-10 04:51:15 -07:00
iamtoruk
f220bea73d fix(dash): floor pricing coverage so 100% means genuinely complete 2026-08-10 04:47:10 -07:00
iamtoruk
61f5e7c24f fix(tui): floor pricing coverage so 100% means genuinely complete 2026-08-10 04:46:39 -07:00