Commit Graph

11824 Commits

Author SHA1 Message Date
metaphorics 6d16c19a04 fix(robomp): run sandbox setup/teardown off the event loop safely
Workspace setup/teardown (git clone/fetch, worktree add/remove, chown)
ran synchronously on the asyncio dispatcher loop, so one stalled
subprocess froze the entire process.

- Offload every ensure_workspace/remove_workspace call to a worker thread
  via a new _run_workspace_op helper that drains the thread to completion
  on cancellation, so a cancelled event cannot reap/release a slot the
  setup thread still owns.
- Serialize same-repo setup with a per-repo threading.RLock while letting
  distinct repos run concurrently.
- Bound the direct git/chown subprocesses with a 120s timeout
  (returncode 124); treat a timed-out branch probe as an error rather
  than "branch absent" to avoid silently rebasing a follow-up onto the
  default branch and losing the PR's commits.
- When a timed-out worktree remove leaves the checkout behind, rmtree it
  and run `git worktree prune` so the pool's dangling registration cannot
  trip a later worktree add for the same path.

Adds regression tests for event-loop liveness, cancellation-safe offload,
per-repo lock serialization, subprocess timeout mapping, the branch-probe
timeout guard, and worktree-prune after a failed remove.

Op: correct
Restores: spec:dispatcher-event-loop-never-blocks-on-workspace-io
2026-07-02 08:10:37 +09:00
can1357 0823892295 fix(coding-agent): repaired type errors from merge sweep
- Restored CustomInputRow.priority field dropped in 3b80dc01d ask row budgeting.
- Narrowed dereferenced schema properties via isRecord in yield-assembly and output-schema-validator instead of untyped object access.
- Renamed stale advisorReadOnlyTools to advisorTools in advisor parity test.
- Narrowed AgentMessage content access in session-loader-stream test.
- Reformatted browser-schema test to satisfy biome.
2026-07-01 23:49:32 +02:00
can1357 73ef29bd00 fix(session): corrected branch traversal order breaking ctrl+p cycling
- Removed a duplicated branch.reverse() left by the PR #3862 merge in
  SessionEntryIndex.pathTo(), which returned branches leaf-to-root and made
  getLastModelChangeRole() read the oldest model change instead of the
  newest — pinning the ctrl+p cycle to one slot and breaking session model
  restore.
- Hardened getRoleModelCycle() to trust the recorded role only while its
  resolved model still equals the active model, falling back to matching by
  model after switches through alt+m, /model, or retry fallback.
- Added mutation-verified regression tests for branch ordering and the
  stale-role fallback.
2026-07-01 23:48:26 +02:00
can1357 1b3bcb98db refactor(coding-agent/tools): consolidated browser tool schemas into a single schema
- Consolidated `browserOpenSchema`, `browserCloseSchema`, and `browserRunSchema` into a single `browserSchema`.
- Simplified the `action` type definition to accept `'open' | 'close' | 'run'`.
- Updated schema validation tests to reflect the unified schema definition.
2026-07-01 23:18:17 +02:00
roboomp 5244b8bdcd fix(ai): omitted stale responses replay ids
Dropped rebuilt OpenAI Responses assistant item IDs when a replayed turn lacks its matching reasoning item while preserving text and call_id pairing. Added regression coverage for message, function_call, and custom_tool_call replay.\n\nFixes #4173
2026-07-01 23:15:56 +02:00
can1357 5f1ed0fcde chore: reformat 2026-07-01 23:14:36 +02:00
can1357 5c38d3ccce Merge PR #2141 (semantic port): bound ConPTY full-paint frames (@roboomp)
Fixes issue #2115: ConPTY hosts truncated a >1MB single full paint at a logical-line boundary, corrupting large-session resume. Bounds the bytes #emitFullPaint emits (retain tail) while keeping full logical state for render planning/commit; guarded to ConPTY hosts only. Includes the issue-2115 repro test. The PR head's original pre-planning truncation was obsolete against the refactored render pipeline, so the evaluator-approved approach (fix 44b88a2f5) was ported onto current #emitFullPaint.
2026-07-01 22:45:43 +02:00
can1357 e4c3cba143 Merge PR #3875 (selective): skip double-format of revealed thinking blocks (@oldschoola)
Ports only the thinking double-format fix: resolveThinkingDisplay reuses block.thinking when rawThinking is set (buildDisplayMessage already formatted it), plus a single-entry memo in formatThinkingForDisplay and a rawThinking regression test. The PR's incremental reveal slicing is superseded by the already-merged #3848 (memoized grapheme slicing).
2026-07-01 22:37:36 +02:00
can1357 1bf06d9cec Merge PR #3640 (selective): advisor inherits main agent promptCacheKey (@roboomp)
Ports only the advisor cache-key fix (advisorPromptCacheKey = agent.promptCacheKey ?? advisorSessionId) + its provider-options parity regression. tan/shared sessions read the parent provider cache shard byte-for-byte. Excludes the unrelated CI-isolation test commit e3160a09c. Fixes #3639.
2026-07-01 22:34:13 +02:00
can1357 2e53c40c9e Merge PR #3412 (selective): clamp compaction reserve budget for small windows (@wolfiesch)
Cherry-pick of the reserve-budget clamp only (resolveBudgetReserveTokens + no-op compaction guard): applies compaction.ts + agent-session.ts + compaction/shake/progress-guard tests. Excludes unrelated Julia prelude timeout and ai/test churn from the PR head.
2026-07-01 22:29:53 +02:00
ben 47a02929db test(coding-agent): preserve agent-dir env restore 2026-07-01 22:25:59 +02:00
ben 510ed57712 fix(coding-agent): harden local ci isolation review fixes 2026-07-01 22:25:04 +02:00
ben 34a4777497 test(coding-agent): harden local ci isolation 2026-07-01 22:25:04 +02:00
can1357 a5a7b5b77c fix(coding-agent): limit mnemopi shutdown timeout to interactive exit 2026-07-01 22:22:09 +02:00
roboomp efaad3ffb5 fix(coding-agent): bounded mnemopi consolidate-on-dispose so /quit returns within ~2 s
/quit and /exit hung for many seconds because AgentSession.dispose()
awaited MnemopiSessionState.dispose() unconditionally, and that path
runs consolidate() (state.ts:421) which fires a fresh LLM fact
extraction for the just-retained transcript and then awaits
flushExtractions() per owned bank. One LLM round-trip per shutdown,
no upper bound, no visible status.

- Add a timeoutMs option to MnemopiSessionState.dispose. When the cap
  fires the in-flight consolidate is detached to the background and the
  SQLite handles close once it settles, so writes never race a closed
  handle.
- AgentSession.dispose passes SHUTDOWN_CONSOLIDATE_BUDGET_MS = 1_500 on
  the user-visible shutdown path. Per-turn maybeRetainOnAgentEnd has
  already retained earlier turns, so the worst case is losing episodic
  promotion for the last few turns. State-replacement disposes
  (mnemopiBackend.start) stay unbounded.
- InteractiveMode.shutdown surfaces a 'Closing session…' status before
  dispose runs so the brief pause is explained rather than mysterious.

Two regression tests in memory-tools.test.ts cover (1) dispose returns
within the budget when flushExtractions stalls and the deferred close
still runs once consolidate settles, and (2) unbounded dispose still
runs the full #2320 consolidate-then-close pipeline.

Fixes #3641
2026-07-01 22:18:44 +02:00
roboomp 9aa729c586 fix(tui): preserved prompt drafts on esc
Stopped Esc from clearing typed TUI prompt text while preserving double-Esc disarming behavior.\n\nFixes #3869
2026-07-01 22:17:37 +02:00
can1357 63b812320d Merge PR #3903: fix(coding-agent): identify user-invoked skills and expose skill directory (@metaphorics)
# Conflicts:
#	packages/coding-agent/src/extensibility/skills.ts
#	packages/coding-agent/src/modes/acp/acp-agent.ts
#	packages/coding-agent/src/modes/rpc/rpc-mode.ts
#	packages/coding-agent/src/modes/skill-command.ts
2026-07-01 22:16:53 +02:00
can1357 88ae6c5314 fix(task): refresh spawn semaphore on release 2026-07-01 22:09:29 +02:00
can1357 1cb8608a58 Merge PR #3896: fix(task): respect task.maxConcurrency + task.maxRecursionDepth across spawn paths (@roboomp)
# Conflicts:
#	packages/coding-agent/src/eval/__tests__/agent-bridge.test.ts
#	packages/coding-agent/src/eval/agent-bridge.ts
2026-07-01 22:07:28 +02:00
can1357 5ca07b1759 Merge PR #3759: Merge remote-tracking branch 'can1357/main' into fix/compaction-summary-chronological-position (@DarkPhilosophy)
# Conflicts:
#	packages/coding-agent/src/session/session-context.ts
2026-07-01 22:04:47 +02:00
can1357 9403df1abd fix(session): avoid empty exit-marker sessions 2026-07-01 21:55:01 +02:00
can1357 b8ae1e21b1 Merge PR #2607: fix(session): detected pending tool calls without toolUse (@roboomp)
# Conflicts:
#	packages/coding-agent/src/session/agent-session.ts
2026-07-01 21:55:01 +02:00
can1357 3f16615afa fix-task-recent-output-tail-preview 2026-07-01 21:53:20 +02:00
can1357 32f5820d66 Merge PR #4167: fix(tui): cap subagent live progress output (@roboomp) 2026-07-01 21:53:20 +02:00
can1357 070143682e fix(agent): keep approved plan readable 2026-07-01 21:53:20 +02:00
can1357 569b83d5a6 Merge PR #4166: fix(agent): preserve approved plan path (@roboomp) 2026-07-01 21:53:19 +02:00
can1357 021d4fc1e3 Merge PR #4161: fix(agent): interrupt waits for IRC delivery (@roboomp) 2026-07-01 21:53:19 +02:00
can1357 d9beb9731d Merge PR #4158: fix(coding-agent): paint selectedBg band on focused HookSelector row (@roboomp) 2026-07-01 21:53:19 +02:00
can1357 8bfe33fc06 Merge PR #4154: fix(coreweave): harden project header setup (@lance0) 2026-07-01 21:53:19 +02:00
can1357 93f27769ef test(ai): remove stale juice wording 2026-07-01 21:53:19 +02:00
can1357 8a76e4bc76 Merge PR #4153: fix(ai): reword GPT-5 Responses fallback prompt (@roboomp) 2026-07-01 21:53:18 +02:00
can1357 ab7f623ac4 Merge PR #4149: fix(tui): coalesce editor top-border rebuild to render tempo (#4145) (@roboomp) 2026-07-01 21:53:18 +02:00
can1357 bea614ef64 Merge PR #4143: fix(coding-agent): fall back for Kernel field when os.version returns 'unknown' (@roboomp) 2026-07-01 21:53:18 +02:00
can1357 87a53cbe0d Merge PR #4137: fix(agent): handle already-applied patch-mode merges (@roboomp) 2026-07-01 21:53:18 +02:00
can1357 debe71ae0e Merge PR #4129: fix(coding-agent): preserved explicit :auto suffix in modelRoles (@roboomp) 2026-07-01 21:53:17 +02:00
can1357 7e77716cad Merge PR #4126: test(tui): pin committed-prefix resync earliest-mismatch contract (@roboomp) 2026-07-01 21:53:17 +02:00
can1357 cfdd369d9b fix(tui): reset stdin escape hint before paste 2026-07-01 21:53:17 +02:00
can1357 6022239102 Merge PR #4122: fix(tui): bound terminal input parsing so malformed sequences and non-bracketed pastes do not block the event loop (@roboomp) 2026-07-01 21:53:17 +02:00
can1357 b7cb4b8cde fix(coding-agent): mark session disposing before draft save 2026-07-01 21:53:17 +02:00
can1357 1479b689d8 Merge PR #4121: fix(coding-agent): route SIGTERM/SIGHUP/uncaughtException through session teardown (@roboomp) 2026-07-01 21:53:16 +02:00
can1357 c704c5248f fix(rpc): wait for background bash before stdin shutdown 2026-07-01 21:53:16 +02:00
can1357 82232cefb6 Merge PR #4117: fix(rpc): dispatch bash concurrently and reset abort controller on restart (@roboomp) 2026-07-01 21:53:16 +02:00
can1357 9e64acfc93 fix(coding-agent): wait for timed-out git subprocesses 2026-07-01 21:53:16 +02:00
can1357 9e02f47748 Merge PR #4116: fix(coding-agent): bound git subprocess execution (@roboomp) 2026-07-01 21:53:16 +02:00
can1357 efee86afe5 fix(hashline): reject ambiguous colliding snapshot tags 2026-07-01 21:53:16 +02:00
can1357 28843ec015 Merge PR #4113: fix(hashline): guarded against 16-bit snapshot tag collisions (@roboomp) 2026-07-01 21:53:15 +02:00
can1357 6ce3f686b2 fix(agent): budget branch tool results after truncation 2026-07-01 21:53:15 +02:00
can1357 2a632d41c0 Merge PR #4112: fix(agent): preserve tool results in branch summaries (@roboomp) 2026-07-01 21:53:15 +02:00
can1357 ed3170ed76 fix(edit): flush apply_patch batch before stopping 2026-07-01 21:53:15 +02:00
can1357 4cbb7afbbe Merge PR #4111: fix(edit): guard apply_patch against clobber and swallowed multi-file failures (@roboomp) 2026-07-01 21:53:15 +02:00