Commit Graph
6861 Commits
Author SHA1 Message Date
abkslm a3fb1fd4ae Merge nucleic/warm-coral-viper-sn0m into dev 2026-08-04 04:18:59 -07:00
abkslm 5607b222c8 Merge nucleic/sleek-ancient-otter-hgeb into dev 2026-08-04 04:11:57 -07:00
abkslm ddceca5fe4 Merge nucleic/calm-umber-gecko-9uzp into dev 2026-08-04 03:17:40 -07:00
abkslm 3d383ff1a7 Merge nucleic/warm-north-vole-pf37 into dev 2026-08-04 03:10:06 -07:00
abkslm 10026c374d Merge nucleic/quiet-meadow-dingo-4rxh into dev 2026-08-04 03:04:06 -07:00
abkslm 5c6a14591f Merge nucleic/warm-north-vole-pf37 into dev 2026-08-04 02:46:53 -07:00
abkslm 2e228383db Merge nucleic/sleek-umber-ibis-q6rk into dev 2026-08-04 02:23:03 -07:00
abkslm 935ed5f03d Merge nucleic/keen-harbor-robin-3sbz into dev 2026-08-04 02:14:33 -07:00
abkslm 33fa9f6118 Merge nucleic/humble-slate-gecko-d1il into dev 2026-08-04 02:14:15 -07:00
abkslm a34884db5e Merge nucleic/hazy-harbor-newt-zjej into dev 2026-08-04 02:10:57 -07:00
abkslm 176bd935fa Merge nucleic/tidy-dewy-lynx-x2au into dev 2026-08-04 02:06:30 -07:00
abkslm caced96334 update .gitignore 2026-08-04 01:11:52 -07:00
abkslm 05cdf492e3 Merge nucleic/mellow-thistle-civet-6gxc into dev
# Conflicts:
#	Sources/NucleicCore/NucleicHeadless.swift
#	Tests/NucleicCoreTests/ClaudeTokenProxyTests.swift
2026-08-04 07:44:16 +00:00
abkslm 0a00f22f00 Nucleic: Backend Claude OAuth Token Refresh 2026-08-04 00:36:35 -07:00
abkslm 6f7aedc981 Merge nucleic/brisk-north-weasel-lmh2 into dev 2026-08-04 00:10:01 -07:00
abkslm 213354bd35 Merge nucleic/vivid-spruce-robin-bacs into dev 2026-08-04 00:09:36 -07:00
abkslm 4c5fadd838 Merge nucleic/jolly-maple-panda-f3t5 into dev 2026-08-04 00:07:23 -07:00
abkslm 2b208a1cc4 Merge nucleic/dusky-fern-seal-rl4l into dev 2026-08-03 23:58:50 -07:00
abkslm a79d09cfa1 Merge nucleic/warm-quartz-marten-mswp into dev 2026-08-03 23:56:01 -07:00
abkslm 02fbbefc3f Merge nucleic/zesty-spruce-heron-ck0i into dev 2026-08-03 23:37:57 -07:00
abkslm 9d105d7344 Merge nucleic/mellow-drift-lemur-xey5 into dev 2026-08-03 23:30:14 -07:00
abkslm f78dc76b48 sync(dev): VERSION 0.6.1 (969) -> 0.6.2 (974) — catch up to canary 2026-08-03 23:19:40 -07:00
abkslm f75eea53d1 Merge nucleic/ivory-opal-toad-utu9 into dev 2026-08-03 22:48:20 -07:00
abkslm 4e6abef68b Merge nucleic/frosty-ember-quail-tzv1 into dev 2026-08-03 21:39:29 -07:00
abkslm a8227e5120 Merge nucleic/amber-glass-quail-0ar2 into dev 2026-08-03 21:30:22 -07:00
abkslm aab4b75348 Merge nucleic/nimble-umber-civet-vrp5 into dev 2026-08-03 21:16:32 -07:00
abkslm 52c908f1f5 Merge nucleic/gentle-opal-raven-tjbz into dev 2026-08-03 21:04:53 -07:00
abkslm 3e59418f78 Nucleic: Intelligence Model Router Update 2026-08-03 21:04:52 -07:00
abkslm 3f1cb65ad0 Merge nucleic/plucky-iris-vole-5mls into dev 2026-08-03 21:04:14 -07:00
abkslm ebbae73d62 Merge nucleic/calm-cedar-egret-zurc into dev 2026-08-04 03:41:40 +00:00
abkslmandClaude Fable 5 35f611cd7e Fold in the parallel storage-retention work (SessionDataArchive)
A second implementation of session-storage reclamation was drafted
uncommitted on the control root's dev checkout (SessionDataArchive).
This folds its distinct ideas into the committed implementation, which
stays the base (per-directory locking, partial-then-rename with the
directory-wins invariant, funnel-covered transparent restore, tests):

- deleteSession is now truly permanent: it removes sessions/<id>/, the
  compressed <id>.tar.gz if the sweep packed it, and any local
  Carbon-mirror copy — previously every deleted chat leaked its
  transcript directory forever. Project deletion purges the same per
  chat; deleteEphemeralSession drops its now-redundant own removal.
- The worktree-cleanup and storage sweeps source candidates from
  database.loadAllSessions() instead of persistedSessionRecords, which
  only holds active projects' sessions — an archived project's chats
  could otherwise never be reclaimed (a permanent worktree leak).
- New opt-in retention policy (Settings ▸ Chats ▸ "Reclaim archived
  chat data", Never by default): an archived, non-favorite chat past
  the window is deleted outright on an Optimized-storage Mac, but on an
  All-Copies Mac it is compressed in place through the same guarded
  compression path — full storage never deletes. Off by default because
  discarding chat data must be an explicit opt-in.
- The archiver verifies the fresh archive is listable (tar -tzf)
  before the source directory is removed, so a truncated stream is
  caught at compress time, not restore time.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-04 03:41:25 +00:00
abkslm fb9a488bbc Merge dev into nucleic/calm-cedar-egret-zurc (git-ops timeout/QoS fixes, .build-host removal) 2026-08-04 03:21:33 +00:00
abkslmandClaude Fable 5 c19af1e528 Storage at scale: Done-only worktree reclaim + idle-chat session compression
At hundreds-to-thousands of sessions Nucleic's storage balloons into the
hundreds of gigabytes across worktrees and per-session storage. Two changes:

1. "Delete archived chat worktrees" now reclaims only chats whose work is
   Done (a finished run, or a last turn classified/marked .completed) — a
   chat archived mid-conversation keeps its checkout. Moved-away tombstones
   remain reclaimable regardless: their work lives on another Mac, and the
   transfer's own discard is best-effort. The Done predicate is the new
   Session.isCompleted, shared with isChatDone so the definitions can't
   drift, and the Settings ▸ Chats picker documents the narrowed behavior.

2. Idle-chat session-storage compression for Macs in Carbon's "All Copies"
   role — the machines carrying the mesh's full storage burden. A new
   SessionStorageArchiver packs sessions/<id>/ (transcript, render
   sidecars, agent home) into a sibling <id>.tar.gz via the system tar
   (~10x on this JSONL-heavy data), with a partial-then-rename protocol
   and a "directory wins over any archive beside it" invariant so every
   crash point degrades safely. A sweep on the auto-archive loop packs at
   most 4 chats per pass, and only ones with no live controller, no
   hydration in flight or queued, not open, not pinned, not transferring,
   and idle past the threshold. Restore is transparent at every read
   funnel: prepareSession (open/hydration/dashboard repair), the open-chat
   preview streamer, and the mesh transcript server. The idle window is a
   new Settings ▸ Carbon dropdown (default: after 7 days), resolved
   against the storage role at launch and on change; Optimized-role Macs
   and headless hosts stay off.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-04 03:21:25 +00:00
abkslm c25087dc65 Merge branch 'claude/clever-feistel-424397' into claude/git-ops-canary-failure-38d1f8 2026-08-03 20:12:21 -07:00
abkslmandClaude Fable 5 47ba27da34 Remove the .utility QoS clamp on ProcessHost children
582cf9eaf clamped every host child (agent CLIs, builds, tests, probes) to
.utility to protect main-thread responsiveness. Measured on a loaded M2 Max
(load avg ~30, sibling session builds running), that clamp makes an 8-way
parallel child workload 3.2x slower (~1.0s -> ~3.1s) and single-threaded
commands ~1.6x slower on average (up to 2.5x), with the child at kernel
priority 20 vs 31 — the same mechanism that pushed every GitRunner call past
its 120s wall-clock timeout. Default-tier children still lose to the
user-interactive main thread under contention, so the clamp buys no
responsiveness; .userInitiated measured no better than default, so no
per-command priority plumbing is warranted.

ProcessStallMonitor needs no threshold change: even a maximally starved
utility child still received 86% of one core (43x the 0.02 resource-quiet
threshold), so slow-but-honest work was never at risk of a false
"Command Stalled" verdict — the clamp's only real cost was throughput.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-03 20:08:34 -07:00
abkslmandClaude Fable 5 82d85d7a34 Nucleic: Fix all-git-ops timeout failures in canary
Every git op the app ran (worktree add, ship's add -A, the reconcile
landed-check diff) was dying as GitError.timedOut(120s) in the 2026-08-03
canary — observed live: the app's own 'git add -A' SIGTERM/KILLed at
exactly the deadline while actively working. Three compounding causes:

1. 582cf9eaf clamped every GitRunner child to .utility QoS. On Apple
   silicon that confines the child to efficiency cores and deprioritizes
   its I/O, so under a session build/test storm honest multi-GB git work
   slowed 20-40x and blew the wall-clock bound. GitRunner children are no
   longer QoS-clamped (they're bounded and usually user-blocking; see the
   comment in run) — ProcessHost's agent/build clamp is unchanged.
2. The 120s default timeout policed honest work, not just pathological
   hangs. Killing an honest worktree checkout fails the whole flow it
   serves; the default is now 600s, which still catches the wedged
   hook/credential-helper case it exists for.
3. CarbonSnapshotter seeded a throwaway GIT_INDEX_FILE every tick, so
   'add -A' re-read and re-hashed every tracked+untracked byte of the
   worktree per tick (~5 GB on a real checkout) — a permanent kill/retry
   storm that kept the disk saturated and dragged every other git op over
   the deadline too. The scratch index is now persistent per session (in
   the worktree's own git dir, swept of stale locks, dropped on archive),
   so each tick re-hashes only what changed.

New test pins the persistent-index lifecycle: reuse across ticks, stale
index.lock sweep, porcelain untouched (§16), removal on archive.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-03 20:03:32 -07:00
abkslmandClaude Fable 5 9196b6de28 Nucleic: Remove committed .build-host build tree
A full SwiftPM build tree (.build-host/ — 4.82 GB, 41,678 files: debug
binaries, .a archives, xctest bundles, dependency clones' git packs) was
committed to dev by 6945303ca on 2026-08-03. Every worktree created from
dev since then checks it out, and every whole-tree git operation in those
worktrees (worktree add, add -A, status, Carbon's snapshot hashing) has to
stat/hash ~5 GB it never should have seen — the data-volume half of the
2026-08-03 'all git ops time out' failure.

Untracked here (disk copy left in place, now ignored); .gitignore grows a
.build-*/ rule so no ad-hoc --build-path tree can be committed again.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-03 20:00:04 -07:00
abkslm 3904abdec7 Merge nucleic/ivory-velvet-newt-jbbf into dev 2026-08-03 17:55:25 -07:00
abkslm 459d00fa3f Merge nucleic/lucid-quartz-ibis-ivqe into dev 2026-08-03 17:46:46 -07:00
abkslm 23936bed38 Merge nucleic/clever-lunar-toad-i3g5 into dev 2026-08-03 17:22:45 -07:00
abkslm c0c49f71ec Merge nucleic/warm-umber-ibis-uzf8 into dev 2026-08-03 17:11:26 -07:00
abkslm c4a3f63571 Merge nucleic/ivory-velvet-newt-jbbf into dev 2026-08-03 17:08:16 -07:00
abkslm 4aaadc218b Merge nucleic/warm-umber-ibis-uzf8 into dev 2026-08-03 17:02:23 -07:00
abkslm 7d4e37dcc5 Merge nucleic/mellow-thistle-civet-6gxc into dev 2026-08-03 15:34:46 -07:00
abkslm c0f106e68a Nucleic: Backend Claude OAuth Token Refresh 2026-08-03 15:34:44 -07:00
abkslm d97ab9294c Merge nucleic/dusky-willow-quail-chpw into dev 2026-08-03 15:02:18 -07:00
abkslm 9b6ae49420 Merge nucleic/zesty-umber-lemur-ciqf into dev 2026-08-03 14:42:55 -07:00
abkslm 1ab77632ab Merge nucleic/ivory-slate-dingo-9tiv into dev 2026-08-03 14:00:27 -07:00
abkslm 392e437d61 Merge nucleic/amber-breezy-lemur-uno1 into dev 2026-08-03 04:44:56 -07:00
abkslm 8f64edbb6a Merge nucleic/lucid-coral-otter-x7ib into dev 2026-08-03 04:24:06 -07:00