Commit Graph

335 Commits

Author SHA1 Message Date
b4d0d9e948 Add "(no output)" fallback to all git error messages
The helpers already handled empty stderr but the git module did not,
leading to confusing error messages with a trailing colon and no detail.
2026-04-10 08:54:17 -07:00
374454f0fb Add missing lockfiles to skip list and show fallback for empty stderr
Several ecosystem lockfiles (Nix flake, Gradle, npm-shrinkwrap, Swift PM)
were missing from SKIP_RESOLVE, causing unnecessary conflict resolution
attempts. Empty stderr on failure produced confusing error messages.
2026-04-10 08:44:17 -07:00
cbb6bac1b9 Expand the lock-file skip list for merge conflict resolution
Add bun.lockb, mix.lock, Pipfile.lock, Podfile.lock, pubspec.lock, and
uv.lock to SKIP_RESOLVE so generated files from additional ecosystems are
auto-resolved with theirs during rebases. Sort entries alphabetically.
2026-04-10 08:29:45 -07:00
85cf9cc02f Expand lock-file skip list and extract checkoutTheirs into git module
Covers all common ecosystem lock files (npm, yarn, pnpm, Go, Ruby,
PHP, Poetry) so merge conflicts in any of them are auto-resolved
with --theirs rather than sent to Claude.
2026-04-10 08:17:55 -07:00
cc61e09384 Propagate git-add failures instead of silently swallowing them
The old `stageFile` call discarded non-zero exit codes, hiding issues
like unresolved conflicts or missing files from the caller.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 08:07:43 -07:00
e694ab06d7 Accept theirs for conflicting lock files instead of deleting them
Removing lock files during conflict resolution caused missing dependencies
after the merge. Checking out theirs and staging preserves a valid lockfile.
2026-04-07 17:55:40 -07:00
29cbf29b76 Remove lock files instead of resolving them during conflict resolution
Lock files like bun.lock and Cargo.lock get regenerated, so resolving
their conflict markers is unnecessary work.
2026-04-07 09:26:55 -07:00
1143bf08c9 Skip AI conflict resolution for lock files
Lock files like bun.lock and Cargo.lock contain auto-generated content
that Claude cannot meaningfully merge. Remove them during conflict
resolution so they get regenerated cleanly.
2026-04-07 09:21:11 -07:00
6175d753f0 0.0.43 2026-03-20 11:12:55 -07:00
a992e2b12e Add fish shell completions for config subcommand keys 2026-03-20 11:12:45 -07:00
84845af28b 0.0.42 2026-03-20 11:02:09 -07:00
f7a8ff6a3c Fix config command to pass actual key instead of hardcoded "memory"
The config command already parsed the key but ignored it when calling
set() and printing the result. Also clarify sync vs async convention
in CLAUDE.md and log invalid memory config instead of silently falling
back.
2026-03-20 10:59:37 -07:00
3b3820f95f Derive config keys from DEFAULTS and enforce minimum memory of 512M
The config command previously maintained a separate key list and used a
switch statement that would need updating for each new key. Deriving
VALID_KEYS from config.DEFAULTS keeps them in sync automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:40:22 -07:00
fa077ff8f5 Move validateMemory to config module and harden against bad values
The validator is now reusable by both the CLI config command and
the VM startup path, which falls back to the default if the stored
value is invalid. Also lowers the default memory limit to 16G and
makes config.load() resilient to malformed JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:36:48 -07:00
ea1b09dc8e Move config defaults to a shared constant in config.ts
Eliminates duplicated default values and simplifies the config
command by replacing the generic key metadata registry with
direct validation functions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:30:39 -07:00
e3e4419933 Refactor config command and fix default memory limit
Move defaults and normalization into KEYS metadata, validate config
file shape on load, and lower default container memory from 32G to 16G.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:24:57 -07:00
f7d876776b Add per-user config system with sandlot config command
Allow users to configure container memory limit (default 32G) via
`sandlot config memory <value>` instead of hardcoding it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:13:20 -07:00
0f568e69de 0.0.41 2026-03-20 10:02:45 -07:00
6f00cc3556 Add sccache as Rust build cache in container environment
Speeds up repeated cargo builds across sessions by caching
compilation artifacts on the persistent mount.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 10:01:23 -07:00
26c5c3c7b0 0.0.40 2026-03-19 11:56:31 -07:00
727920c206 Change review status icon from ⦿ to ⊛
Improve visual distinction from the saved status icon (●)
2026-03-19 11:56:24 -07:00
f9d3428195 0.0.39 2026-03-19 11:29:30 -07:00
2da22b940a Fix list command to skip empty JSON output and batch stale-review cleanup
Collapse redundant empty-session branch so --json falls through to the
normal serialization path instead of printing "[]" separately. Replace
per-branch load/save loop with a single state cycle to avoid racing
concurrent writes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:29:22 -07:00
e8e5b850a0 Fix race conditions in state persistence by reading fresh session before writing
Batch-clearing stale flags in list and blindly writing back the session
in review could clobbер concurrent changes. Use per-session get/set
instead of whole-state load/save, and re-read before clearing in_review.
2026-03-19 11:24:18 -07:00
d10adac712 Replace patchSession with setSession to fix concurrent state writes
The fire-and-forget patchSession calls in list could race with each
other, each reading stale state before writing. Collecting stale
branches and doing a single load-modify-save eliminates the race.
Also emits valid JSON (`[]`) when listing with --json and no sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:17:41 -07:00
9336deed9c Remove state file locking and simplify review cleanup
The mkdir-based lock was unreliable (stale lock recovery was racy) and
added latency. The atomic rename in save() already prevents corruption,
and concurrent writes to different keys are rare enough to not warrant
the complexity. Also inlines stale review self-healing into the map
callback and collapses the review try/catch/finally into just finally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:11:16 -07:00
bd9d481e81 Add file-based locking to state mutations to prevent concurrent write races
Parallel operations (e.g. stale review cleanup in `list`) could
clobber each other via read-modify-write on the shared state file.
Also fix spinner lifecycle in `review` and simplify empty-list output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:04:33 -07:00
69ba73b3c3 Use patchSession to avoid race conditions in review flag updates
The load-modify-save pattern could overwrite concurrent state changes.
patchSession does an atomic read-patch-write, and the list command now
re-checks activity before clearing stale flags to avoid racing with a
review that just started.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:56:50 -07:00
ad90c9dcc1 Fix race condition in stale review flag self-healing
Reload fresh state before saving to avoid overwriting concurrent changes
from other processes between the initial load and the heal write.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 10:47:20 -07:00
2f524da292 Fix stale review flag healing and prevent concurrent state overwrites
Use already-loaded state in list command instead of re-reading. In review
command, patch in_review on fresh state to avoid clobbering concurrent
changes, and skip worktree save in print mode. Remove unused white import
and unnecessary nullish coalescing fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:55:49 -07:00
99f5a378f1 Fix stale in_review self-healing to run in JSON mode and update local objects before state load 2026-03-18 23:48:09 -07:00
a682539db3 Batch stale review-flag writes and fix review cleanup ordering
Move in_review flag set before try block so it is always visible,
and consolidate per-session state writes into a single batch to
avoid repeated disk I/O during list. Also guard against missing
status entries with fallback defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:38:02 -07:00
3ba550d80a Fix stale in_review flag handling and review lifecycle
Move in_review flag set inside try block so finally always clears it,
and actively clear stale flags in list when Claude is no longer active.
Previously a crash between setting the flag and entering try would
leave the session stuck in review state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:28:42 -07:00
bc102e416c Add in_review status to sessions and self-heal stale review flags
Review status now requires Claude to be active, preventing stale flags
from showing after a crash. Consolidates icon/color maps into a single
styles record and defers setting in_review until the container is up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:16:06 -07:00
92dbad3cad Add review status tracking to sessions
The list command needs to show when a session is under active
review so users don't interrupt it. Wrapping the review body in
try/finally ensures the flag is always cleared on exit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 23:08:41 -07:00
8172065928 0.0.38 2026-03-18 22:59:33 -07:00
da4b3a047e new version system 2026-03-18 22:59:28 -07:00
a35f16761a 0.0.37 2026-03-18 22:50:36 -07:00
2dea1d7df7 Merge branch 'active-bug' 2026-03-18 22:50:25 -07:00
1205249628 0.0.36 2026-03-18 22:36:08 -07:00
2ca978b728 Increase container memory limit from 4G to 32G 2026-03-18 22:36:04 -07:00
de48aeb02a Replace PostToolUseFailure hook with PreToolUse for activity tracking
PostToolUseFailure incorrectly marked the session idle on transient tool
errors. PreToolUse keeps the active signal fresh throughout tool execution,
while Stop alone handles the transition to idle.
2026-03-18 22:18:38 -07:00
48a06a2a79 0.0.35 2026-03-15 23:14:06 -07:00
97a6a2632a Improve commit message prompts and use Opus model 2026-03-15 23:13:40 -07:00
24ebdf4f5a Merge branch 'path' 2026-03-15 13:50:56 -07:00
b2694a3933 Add /sandlot/bin to container PATH 2026-03-15 13:50:50 -07:00
ec16a6722b Replace make with build-essential in package lists 2026-03-15 12:40:40 -07:00
8c1a01ba77 0.0.34 2026-03-15 09:34:36 -07:00
c68c9b5e0d Replace unzip with make in package list 2026-03-15 09:34:27 -07:00
b8c9603c71 Add musl target and cargo config for Rust 2026-03-15 09:24:27 -07:00